Issue |
154910
|
Summary |
[clang] clang doesn't load the triple as specified in binary prefix
|
Labels |
clang
|
Assignees |
|
Reporter |
CendioOssman
|
The [documentation](https://clang.llvm.org/docs/UsersManual.html#configuration-files) states that if clang is called as `<triple>-<driver>` (e.g. `x86_64-w64-mingw32-clang++`), then clang will load both config files `<triple>.cfg` and `<driver>.cfg`. This is really convenient as it allows you to share configuration between drivers and targets.
However, this is not what actually happens. Under the hood, clang converts that `<triple>` to it's preferred "real triple". In the example above, that happens to be `x86_64-w64-windows-gnu` instead.
This is very confusing as it is not documented. It is also not very practical as the that triple then differs to what the rest of the system is using. It's also fragile as we then need to keep track of what clang considers a "real triple" for everything and keep an eye on if that changes.
Relevant code here:
https://github.com/llvm/llvm-project/blob/2d3167f8d86ca9bdaff44cf839488c5a513f5583/clang/lib/Driver/Driver.cpp#L1417-L1423
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs