[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-14 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-14 Thread Carlo Cabrera via cfe-commits
@@ -3494,6 +3494,12 @@ def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group; def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group; def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group, Visibility<[ClangOption, FlangOption]>; +defm ini

[clang] [Driver] Warn when using msan on Android (PR #122540)

2025-01-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed https://github.com/llvm/llvm-project/pull/122540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Warn when using msan on Android (PR #122540)

2025-01-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/122540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Warn when using msan on Android (PR #122540)

2025-01-11 Thread Carlo Cabrera via cfe-commits
carlocab wrote: There is already handling of unsupported sanitisers just above: https://github.com/llvm/llvm-project/blob/77ef5a601ad3827316e412788f609e9141b51e83/clang/lib/Driver/SanitizerArgs.cpp#L523-L530 Is it not possible to incorporate the lack of support for msan on Android there? https

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread Carlo Cabrera via cfe-commits
@@ -3035,6 +3035,38 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-generate-temporal

[clang] [InstrProf] Add frontend temporal profiling flag (PR #122385)

2025-01-09 Thread Carlo Cabrera via cfe-commits
@@ -3035,6 +3035,38 @@ indexed format, regardeless whether it is produced by frontend or the IR pass. overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported by the target, or ``single`` otherwise. +.. option:: -fprofile-generate-temporal

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-09 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-09 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/122144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add a flag to control zero initialization of global v… (PR #122144)

2025-01-09 Thread Carlo Cabrera via cfe-commits
@@ -3494,6 +3494,9 @@ def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group; def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group; def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group, Visibility<[ClangOption, FlangOption]>; +def fno_z

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #122035)

2025-01-08 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` > running on `fuchsia-debian-64-us-central1-a-1` while building `clang,llvm` at > step 4 "annotate". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/11/builds/10651 > >

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #122035)

2025-01-07 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/122035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] add llvm abi support (PR #121123)

2025-01-06 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Introducing a target triple has large ecosystem implication and should not be > taken lightly. To be fair this patch doesn't introduce a target triple, it only makes it more easily usable in Clang. That said, I tend to agree with the review at https://github.com/llvm/llvm-

[clang] ohos: fix ohos.c test case error with LLVM_ENABLE_PER_TARGET_RUNTIME_… (PR #121484)

2025-01-02 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > And one question: will llvm deprecate the old layout? There was some desire to, but it seems to have fizzled out: https://discourse.llvm.org/t/rfc-time-to-drop-legacy-runtime-paths/64628 I imagine it'll happen eventually, but it will probably take a while. > should we consid

[clang] ohos: fix ohos.c test case error with LLVM_ENABLE_PER_TARGET_RUNTIME_… (PR #121484)

2025-01-02 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Note: OHOS driver doesn't support the old layout, compiler-rt for > ${arch}-linux-unknown-ohos targets have to be built with > LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON Can we make `cmake` error out if you try to build for `*-linux-unknown-ohos` with `LLVM_ENABLE_PER_TARGET_RUNT

[clang] Reapply "[nfc][Driver] Remove {{(.exe)?}} from sanitizer test (#121160)" (PR #121162)

2024-12-28 Thread Carlo Cabrera via cfe-commits
carlocab wrote: I don't really understand why this is needed either. Should we revert? https://github.com/llvm/llvm-project/pull/121162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add -fuse-lipo option (PR #121231)

2024-12-28 Thread Carlo Cabrera via cfe-commits
@@ -910,7 +910,10 @@ void darwin::Lipo::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(II.getFilename()); } - const char *Exec = Args.MakeArgString(getToolChain().GetProgramPath("lipo")); + std::string LipoName = + std::string(Args.getLastArg

[clang] Add -fuse-lipo option (PR #121231)

2024-12-28 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab commented: Thanks for the PR! This change needs new tests to be added. https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] Add -fuse-lipo option (PR #121231)

2024-12-28 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/121231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [nfc][Driver] Remove {{(.exe)?}} from sanitizer test (PR #121160)

2024-12-26 Thread Carlo Cabrera via cfe-commits
@@ -8,7 +8,7 @@ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | %{filecheck} --check-prefix=CHECK-ASAN-LINUX // -// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}" +// CHECK-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld" carlocab wrote: Is t

[clang] [clang] add llvm abi support (PR #121123)

2024-12-26 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab commented: Needs tests. https://github.com/llvm/llvm-project/pull/121123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Factor common code for quoting a builtin name (PR #120835)

2024-12-22 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/120835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. LGTM once @jroelofs is happy with the test. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
@@ -312,7 +312,8 @@ bool InitHeaderSearch::ShouldAddDefaultIncludePaths( break; case llvm::Triple::UnknownOS: -if (triple.isWasm()) +if (triple.isWasm() || ((triple.getVendor() == llvm::Triple::Apple) && +triple.isOSBinFormatMachO()))

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Carlo Cabrera via cfe-commits
@@ -1018,13 +1018,19 @@ bool Darwin::hasBlocksRuntime() const { } } -void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs, -ArgStringList &CC1Args) const { +void MachO::AddCudaIncludeArgs(const ArgList &DriverArgs, +

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #120149)

2024-12-17 Thread Carlo Cabrera via cfe-commits
@@ -0,0 +1,26 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] Temporarily disable test `clang/Interpreter/crash.cpp` (PR #119978)

2024-12-14 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > > Obsoleted by > > [61ab36a](https://github.com/llvm/llvm-project/commit/61ab36a3e226df32855286dd31a2c3859800475d) > > > > That was the right fix, not the revert... I'm inclined to agree. Could revert the revert then apply this. https://github.com/llvm/llvm-project/pull/11

[clang] Temporarily disable test `clang/Interpreter/crash.cpp` (PR #119978)

2024-12-14 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Obsoleted by 61ab36a3e226df32855286dd31a2c3859800475d https://github.com/llvm/llvm-project/pull/119978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
@@ -43,8 +43,8 @@ // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ // RUN: -### %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=NOSDK %s +// RUN: | FileCheck --check-prefix=INFERRED-SDK %s carlocab wrote: I think it does provide som

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
@@ -43,8 +43,8 @@ // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ // RUN: -### %t.o 2>&1 \ -// RUN: | FileCheck --check-prefix=NOSDK %s +// RUN: | FileCheck --check-prefix=INFERRED-SDK %s carlocab wrote: I think they'll pass since

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Thanks, done. https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/119670 >From 9db768ec1be84d6bf647b85f052776720822f64f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Tue, 10 Dec 2024 01:45:22 +0800 Subject: [PATCH 1/7] [clang][Driver][Darwin] Optionally use xcselect to find ma

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/119670 >From 9db768ec1be84d6bf647b85f052776720822f64f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Tue, 10 Dec 2024 01:45:22 +0800 Subject: [PATCH 1/6] [clang][Driver][Darwin] Optionally use xcselect to find ma

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: For reference, the failure from dropping `XFAIL` from `darwin-ld-platform-version-macos.c`: Failure Log ``` + /Users/carlocab/github/llvm-project/build-xcselect/bin/FileCheck --check-prefix=NOSDK /Users/carlocab/github/llvm-project/clang/test/Driver/darwin-ld-platform-versio

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: After excluding the `-darwin*` spelling from using `xcselect`, most of the failures go away, but one remains. I'll investigate it tomorrow. I've left it as `XFAIL` for now, since it seems to be the least bad option (compared to `CLANG_NO_XCSELECT` or `UNSUPPORTED`), given: > >

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
@@ -2257,17 +2261,25 @@ void Darwin::AddDeploymentTarget(DerivedArgList &Args) const { // Warn if the path does not exist. if (!getVFS().exists(A->getValue())) getDriver().Diag(clang::diag::warn_missing_sysroot) << A->getValue(); - } else { -if (char *env =

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/119670 >From 9db768ec1be84d6bf647b85f052776720822f64f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Tue, 10 Dec 2024 01:45:22 +0800 Subject: [PATCH 1/6] [clang][Driver][Darwin] Optionally use xcselect to find ma

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Maybe it is because the `darwin` legacy OS in the triple? This is a good guess, it seems to help: ```diff diff --git a/clang/test/Driver/arc.c b/clang/test/Driver/arc.c index 7f6ac81aad17..70cd66899dff 100644 --- a/clang/test/Driver/arc.c +++ b/clang/test/Driver/arc.c @@ -1,11

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/119670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
@@ -1,3 +1,6 @@ +// XFAIL: xcselect carlocab wrote: In theory, yes. In practice, it looks to me like all these failing test cases[^1] have deployment targets that pre-date macOS 10.14, so it seems very likely that anyone who can enable `CLANG_USE_XCSELECT` will

[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][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > > I don't quite understand why the failing tests are caused to fail when > > `CLANG_USE_XCSELECT` is enabled. I'll have to put more time into > > investigating them -- I consider this another blocker for enabling this > > feature more widely. > > I think the issue is that th

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > I don't quite understand why the failing tests are caused to fail when > `CLANG_USE_XCSELECT` is enabled. I'll have to put more time into > investigating them -- I consider this another blocker for enabling this > feature more widely. I think the issue is that the implicit `

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Need to add test. You should add `CLANG_USE_XCSELECT` as a requirement and > label all the tests properly (including those will break). Maybe you can also > remove the hack for `CLANG_NO_XCSELECT` but I am neutral on that. All done, thanks. I don't quite understand why the f

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-13 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/119670 >From 9db768ec1be84d6bf647b85f052776720822f64f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Tue, 10 Dec 2024 01:45:22 +0800 Subject: [PATCH 1/5] [clang][Driver][Darwin] Optionally use xcselect to find ma

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/119670 >From 9db768ec1be84d6bf647b85f052776720822f64f Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Tue, 10 Dec 2024 01:45:22 +0800 Subject: [PATCH 1/3] [clang][Driver][Darwin] Optionally use xcselect to find ma

[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 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] Support simplified triple versions for config files (PR #111387)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed 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-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Merging this to land the improvement. Happy to work on suggested improvements for the tests if any are still outstanding from the discussion in https://github.com/llvm/llvm-project/pull/111387#discussion_r1873784293 (since it's not clear to me which comments still apply). CC @M

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > We also introduce an environment variable `CLANG_NO_XCSELECT` that disables > this behaviour if Clang is configured with `CLANG_USE_XCSELECT=ON`. This is > needed to avoid breaking tests. It might also be nicer to set this only for the tests that break instead of globally.

[clang] [clang][Driver][Darwin] Optionally use xcselect to find macOS SDK (PR #119670)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/119670 This is a scaled down version of https://reviews.llvm.org/D136315. The intent is largely the same as before[^1], but I've scaled down the scope to try to avoid the issues that the previous patch caused: - the

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed 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] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-12 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Tested locally; seems to be working as intended. 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] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-10 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > The PR description (first comment), which will be used as the default commit > message, should be fixed. Thanks for the reminder, fixed. I plan to do a few more local tests with `DEFAULT_SYSROOT` enabled before merging (since this isn't tested in CI). https://github.com/llv

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-10 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited 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] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-09 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > > Sorry, which env var are you referring to? > > I'm suggesting an explicit test case that checks that `DEFAULT_SYSROOT` is > set and behaves as expected. It's ignored if sysroot or isysroot is passed, > it's used when they're missing. `DEFAULT_SYSROOT` is not an environment

[clang] [clang][docs] fix rendering of `$`-prefixed options (PR #119249)

2024-12-09 Thread Carlo Cabrera via cfe-commits
carlocab wrote: No worries, I missed it too. For future reference, it might be useful to check the rich diff too: https://github.com/user-attachments/assets/003082f8-1135-4be2-996a-2cde6691f61a";> https://github.com/llvm/llvm-project/pull/119249 ___

[clang] [clang][docs] fix rendering of `$`-prefixed options (PR #119249)

2024-12-09 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed https://github.com/llvm/llvm-project/pull/119249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] fix rendering of `$`-prefixed options (PR #119249)

2024-12-09 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/119249 This was added in #117573 but the options were not being rendered correctly due to the missing newline after `::`. >From ed70bf358357a5b54599db4a89e61588fd96aca7 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera D

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-09 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Dropped the `--sysroot=""` flag from the test. > Changing the test itself (to e.g. locally set that env var) is a good > regression test that should be added for this pr anyway. Sorry, which env var are you referring to? https://github.com/llvm/llvm-project/pull/115993 ___

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-09 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/115993 >From b072008a5b1a3bd697e3f9efc091bcddfbcc3547 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Wed, 13 Nov 2024 13:09:59 +0800 Subject: [PATCH] [Darwin][Driver][clang] Prioritise command line flags over `DE

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
@@ -82,3 +82,29 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

[clang] Make the `CHECK` lines here resistent to `chandlerc` (PR #118736)

2024-12-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab approved this pull request. https://github.com/llvm/llvm-project/pull/118736 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-04 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > It's unclear to me how homebrew gets into a situation where there are > conflicting sdks passed for `sysroot` and `isysroot` when you effectively > want to ignore whatever is passed to `sysroot`. Maybe this has already been answered, but just in case. You get conflicting SDK

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-04 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > Maybe instead, the logic in the patch should be setting `-syslibroot` for > linker in following order: > > * `--sysroot` > * `-isysroot` > * `C.getSysRoot()`, which is basically DEFAULT_SYSROOT as other cases is > handled in `--sysroot` Thanks, pushed a change that I think s

[clang] [Darwin][Driver][clang] Prioritise command line args over `DEFAULT_SYSROOT` (PR #115993)

2024-12-04 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited 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] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-12-04 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/115993 >From e257a7924d15e3f19fe483ea81d792feb4644874 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Wed, 13 Nov 2024 13:09:59 +0800 Subject: [PATCH] [Darwin][Driver][clang] Prioritise command line flags over `DE

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

2024-11-28 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > However, notably, even on Darwin, if you pass _both_ flags, you still get the > intended behavior of `-isysroot` affecting headers, and `--sysroot` affecting > libraries. Your change would break that. What's the use-case for this? Because for most users, you almost certainly

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

2024-11-20 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Ping? 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] [Darwin][Driver][clang] Prioritise `-isysroot` over `--sysroot` consistently (PR #115993)

2024-11-12 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/115993 On Darwin, `clang` currently prioritises `-isysroot` over `--sysroot` when selecting headers, but does the reverse when setting `-syslibroot` for the linker, which determines library selection. This is wrong, b

[clang] [Clang][Driver] Improve config file handling on Darwin (PR #111306)

2024-10-07 Thread Carlo Cabrera via cfe-commits
carlocab wrote: #111387 is a better approach to this. https://github.com/llvm/llvm-project/pull/111306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Improve config file handling on Darwin (PR #111306)

2024-10-07 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab closed https://github.com/llvm/llvm-project/pull/111306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Improve config file handling on Darwin (PR #111306)

2024-10-06 Thread Carlo Cabrera via cfe-commits
carlocab wrote: > ⚠️ We detected that you are using a GitHub private e-mail address to > contribute to the repo. Please turn off [Keep my email addresses > private](https://github.com/settings/emails) setting in your account. See > [LLVM > Discourse](https://discourse.llvm.org/t/hidden-emails

[clang] [Clang][Driver] Improve config file handling on Darwin (PR #111306)

2024-10-06 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/111306 >From 80b4301ba4a043fe426f206a4ae3a7b46ad8396c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Mon, 7 Oct 2024 01:53:37 +0800 Subject: [PATCH] [Clang][Driver] Improve config file handling on Darwin MIME-Vers

[clang] [Clang][Driver] Improve config file handling on Darwin (PR #111306)

2024-10-06 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/111306 On Darwin, the default target triple contains the version of the kernel: ❯ clang --print-target-triple arm64-apple-darwin24.0.0 ❯ uname -r 24.0.0 This makes writing config files for the target

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
carlocab wrote: That's annoying. Thanks GitHub. I've updating my settings now. https://github.com/llvm/llvm-project/pull/110962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
carlocab wrote: I authored my commit using a working email address. See the [header](https://github.com/llvm/llvm-project/commit/e31545f666eb4ca32030956a38dbc4078a64068c.patch) of the patch: ``` >From e31545f666eb4ca32030956a38dbc4078a64068c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: T

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
carlocab wrote: Thanks, done! I thought that was preferred given the handling of `CLANG_CONFIG_FILE_USER_DIR` below it. https://github.com/llvm/llvm-project/pull/110962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-03 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab updated https://github.com/llvm/llvm-project/pull/110962 >From e31545f666eb4ca32030956a38dbc4078a64068c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Thu, 3 Oct 2024 14:15:07 +0800 Subject: [PATCH] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SY

[clang] [Clang][Driver] Support relative paths for CLANG_CONFIG_FILE_SYSTEM_DIR (PR #110962)

2024-10-02 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab created https://github.com/llvm/llvm-project/pull/110962 Shipping a system configuration file for Clang is useful, but it limits the relocatability of the toolchain because it bakes in a reference to an absolute path on the file system. Let's fix that by allowing for