[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 created https://github.com/llvm/llvm-project/pull/111387 Currently, the config file system loads the full target triple, e.g. `arm64-apple-darwin23.6.0.cfg`. This is however not very useful as this is a moving target. In the case of macOS, that target moves every 2 mont

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 created https://github.com/llvm/llvm-project/pull/111397 `clang-cl` sets the default triple to `-pc-windows-msvc`. The host triple was however being used instead when loading config. Move the default triple calculation earlier to handle this. >From a3e8b860788934d7cc148

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-10-07 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver] Support simplified triple versions for config files (PR #111387)

2024-10-22 Thread Bo Anderson via cfe-commits
Bo98 wrote: Ping? https://github.com/llvm/llvm-project/pull/111387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-10-22 Thread Bo Anderson via cfe-commits
Bo98 wrote: Ping? https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Bo Anderson via cfe-commits
Bo98 wrote: > The expected flow on Apple platforms is to only pass an `isysroot` argument > whether it's inherited from `xcrun -sdk clang` or passed > explicitly. Could homebrew instead only pass `isysroot` for Darwin targets? > Or check that `sysroot` and `isysroot` inputs are the same when

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Bo Anderson via cfe-commits
Bo98 wrote: > I don't think it's deprecated in the sense we have plans to drop support for > it. The problem here seems more like when those values conflict what should > be expected? > > Today it seems expected that `sysroot` will be used for library search but > not header search, which also

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Bo Anderson via cfe-commits
Bo98 wrote: > There is no standard location for macOS SDK, and it can be anywhere you want. > DEFAULT_SYSROOT can't fix any problem for distribution. To be clear: the build I talked about there required the CLT where the SDK location is standardised, so this isn't entirely true for the use cas

[clang] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Bo Anderson via cfe-commits
Bo98 wrote: That proposal makes sense to me. https://github.com/llvm/llvm-project/pull/115993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-12 Thread Bo Anderson via cfe-commits
@@ -1336,17 +1359,7 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // FIXME: TargetTriple is used by the target-prefixed calls to as/ld // and getToolChain is const. - if (IsCLMode()) { -// clang-cl targets MSVC-style Win32. -llvm::Triple T(TargetTri

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

2024-12-12 Thread Bo Anderson via cfe-commits
@@ -1286,6 +1299,16 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { appendOneArg(Args, Opt, nullptr); } } + +// The config file may have changed the architecture so apply it. +if (HasConfigFile && Args.hasArg(options::OPT__SLASH_arm64E

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

2024-12-12 Thread Bo Anderson via cfe-commits
https://github.com/Bo98 edited https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits