-
Notifications
You must be signed in to change notification settings - Fork 7
Fix language detection handling #43493
Copy link
Copy link
Open
Labels
C:coreBlight's core classes and interfacesBlight's core classes and interfacesenhancementNew feature or requestNew feature or request
Description
This has two parts:
- The "high level" bug is that inputs don't affect the
Tool.langcorrectly --Tool.langis determined only by the presence of an-xflag or the tool class itself, meaning thatblight.CC.langwill always reportLang.Cunless-x c++is passed. This manifests particularly as the wronglangvalue for assembly inputs:cc foo.sought to reportLang.Asm(which doesn't exist yet), but reportsLang.Cinstead. - The "low level" bug is that
Tool.langis a bad abstraction: a given tool invocation might be handling multiple languages at once, or no languages at all.
Long term, we should probably just kill off the Tool.lang API. Shorter term, we should try to make its behavior more intuitive (e.g. sniffing file suffixes when available, and presenting a Lang variant based on them).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:coreBlight's core classes and interfacesBlight's core classes and interfacesenhancementNew feature or requestNew feature or request