[clang] [clang][Driver] Fix triple config loading for clang-cl (PR #111397)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 13 07:04:36 PST 2024


zmodem wrote:

> You don't need to use config files with `clang-cl` to need this patch -- you need it if you use triple-based config files and also use `clang-cl`. The issue is that if you have, for example, a `x86_64-unknown-linux-gnu.cfg` in a location that `clang` loads by default, then this breaks `clang-cl` because running `clang-cl` also loads `x86_64-unknown-linux-gnu.cfg` (which will generically contain incompatible flags).

Okay, but that sounds like a case where clang-cl users *do not want* to use config files. Maybe the fix is to always *ignore* config files in clang-cl mode, since there is no corresponding concept in MSVC cl, and it's not commonly used for the embedded/cross compiling scenarios where config files are used?

https://github.com/llvm/llvm-project/pull/111397


More information about the cfe-commits mailing list