[clang] [Driver] Do not transform explicit --config filename
Disable transformations (e.g. attempting to replace target architecture) in the config filename that is passed explicitly via `--config`. This behavior is surprising and confusing -- if user passes an explicit config filename, Clang should use it as is. The transformations are still applied when the name is deduced from filename. Update the tests accordingly. This primarily ensures that full filename with .cfg suffix is passed to --config (appending `.cfg` implicitly is not documented, and would collide with use of filenames with other suffixes). The config-file2.c suite is removed entirely as it tested the transformations on the argument to --config. However, the aspects of that that were not tested as part of config-file3.c are now added there (based on config filename deduced from executable). This change streamlines the code in Driver::loadConfigFile(), opening the possibility of further changes, including support for handling multiple --config options and refactoring of filename deduction. Differential Revision: https://reviews.llvm.org/D134208
Loading
Please sign in to comment