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

2025-01-28 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Yep, was just trying to ping @Bo98 for an update here. 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)

2025-01-27 Thread Hans Wennborg via cfe-commits
zmodem wrote: Okay. I think most of my previous comments (except for "maybe the fix is to always ignore config files in clang-cl mode) still apply though. https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.

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

2025-01-22 Thread Carlo Cabrera via cfe-commits
carlocab wrote: LLVM 20 is branching soon -- would be good to try to get this in before then. 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-c

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

2024-12-16 Thread Hans Wennborg via cfe-commits
zmodem wrote: Looks like I was wrong. clang-cl does support `--config` since daebf2c13ce27ac6a7403525cc7fcbc063eb892e, so I suppose we can't just ignore these files. Your change to update the triple based on clang-cl mode earlier makes sense to me. I'm less sure about manually inspecting the

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

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Maybe the fix is to always _ignore_ config files in clang-cl mode I'd be fine with doing this too -- I just wasn't aware that clang-cl did not support config files (since this fact doesn't seem to be documented anywhere, unless I missed it). https://github.com/llvm/llvm-proj

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

2024-12-13 Thread Hans Wennborg via cfe-commits
@@ -1247,6 +1247,19 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { CLOptions = std::make_unique( ParseArgStrings(ArgList.slice(1), /*UseDriverMode=*/true, ContainsError)); + // We want to determine the triple early so that we load the correct config. +

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

2024-12-13 Thread Hans Wennborg 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-13 Thread Hans Wennborg via cfe-commits
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, the

[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
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-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 Carlo Cabrera via cfe-commits
carlocab wrote: > I didn't even realize people are using config files with clang-cl (since IIRC > it doesn't support the config file command-line options). 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 `cl

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

2024-12-12 Thread via cfe-commits
https://github.com/zmodem 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-12-12 Thread 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 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 via cfe-commits
https://github.com/zmodem commented: I didn't even realize people are using config files with clang-cl (since IIRC it doesn't support the config file command-line options). https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list

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

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. Needs conflict resolution, but otherwise LGTM https://github.com/llvm/llvm-project/pull/111397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[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] [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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bo Anderson (Bo98) Changes `clang-cl` sets the default triple to `-pc-windows-msvc`. The host triple was however being used instead when loading default configs. Move the default triple calculation earlier to handle this. --- Full

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

2024-10-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Bo Anderson (Bo98) Changes `clang-cl` sets the default triple to `-pc-windows-msvc`. The host triple was however being used instead when loading default configs. Move the default triple calculation earlier to handle this. --

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

2024-10-07 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[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 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