[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-03 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,17 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + const llvm::Triple &Tr

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

2024-12-04 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm 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-04 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > This LGTM but I think the other reviewers need to take a look too. Can you > change the title and description of the PR/commit to represent that what > we're doing is different now? The commit title and message has been changed already, the PR description comment too, I've

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

2024-12-04 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > This looks good to me but no doc updates? Would a paragraph in clang/docs/UsersManual.rst "Configuration files" section do? If so, I'd write one. https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-co

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

2024-12-04 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From c450f66e28facca1c394e1b5db4e38c4e505f45b Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for -l and -Wl, flags in con

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

2024-12-04 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > This looks good to me but no doc updates? Added. 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-06 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From 65958806ff828cb0f41a2587e50abe0d221ae88c Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for linker flags in config f

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

2024-12-06 Thread Paul Osmialowski 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] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-06 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-09 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-09 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > > with -fveclib=ArmPL -lamath put into a config file, it will always be > > linked with libamath, even if the user decides to use -fveclib=none > > I think there might be a related issue with the approach in this patch too > though, in that `-fveclib=ArmPL` will silently fo

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

2024-12-09 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm approved this pull request. Gosh, sorry for the confusion it caused. LGTM. https://github.com/llvm/llvm-project/pull/119249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-11 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed https://github.com/llvm/llvm-project/pull/116432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-10 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/116432 >From d19c8ea5e02ad92c1f89b129cd8fe2fd3cf1d4e3 Mon Sep 17 00:00:00 2001 From: Paul Osmialowski Date: Tue, 3 Dec 2024 12:41:15 + Subject: [PATCH] [clang][driver] When -fveclib=ArmPL flag is in use, always

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-10 Thread Paul Osmialowski via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-10 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/116432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix SemaCXX/msvc-pragma-function-no-builtin-attr.cpp test (PR #119873)

2024-12-13 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: I suppose this is the reason check-clang fails today. https://github.com/llvm/llvm-project/pull/119873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix SemaCXX/msvc-pragma-function-no-builtin-attr.cpp test (PR #119873)

2024-12-13 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > This should fix https://lab.llvm.org/buildbot/#/builders/190/builds/11300 > > I am compiling clang locally to verify that there would be no other problems > with the test on macOS. > > > I suppose this is the reason check-clang fails today. > > Are there other test failure

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

2024-12-06 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From 537a1c6529410d2a8411b39f0072ef5c60ee865d Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Use $ prefix with config file options to

[clang] [flang] [clang][driver] Use $ prefix with config file options to have them added after all of the command line options (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
@@ -1243,13 +1268,14 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // Try parsing configuration file. if (!ContainsError) ContainsError = loadConfigFiles(); - bool HasConfigFile = !ContainsError && (CfgOptions.get() != nullptr); + bool HasConfigFileHead

[clang] [flang] [clang][driver] Use $ prefix with config file options to have them added after all of the command line options (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm 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] Use $ prefix with config file options to have them added after all of the command line options (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > The subject (linker flags) is no longer accurate. > > It's better to mention that Add $ for Reworded https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [flang] [clang][driver] Use $ prefix with config file options to have them added after all of the command line options (PR #117573)

2024-12-06 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From c599850a039d407061fb6b20d7365184a68c9938 Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Use $ prefix with config file options to

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

2024-12-05 Thread Paul Osmialowski via cfe-commits
@@ -297,6 +297,9 @@ class Driver { /// Object that stores strings read from configuration file. llvm::StringSaver Saver; + /// Linker inputs originated from configuration file. + std::unique_ptr CfgLinkerInputs; pawosm-arm wrote: changed https://github

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

2024-12-05 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > It's worth spending more time discussing the metacharacter. > > `^` can be interpreted as `^` in regex, which means the beginning. `$`, on > the other side, suggests the end. While I agree that `@` for response files > is not a good choice, I personally would not rule out `

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

2024-12-05 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/117573 >From 7c7649d9e18bdf18671531065e48bb6ec49e0eaf Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Mon, 25 Nov 2024 14:46:55 + Subject: [PATCH] [clang][driver] Special care for linker flags in config f

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

2024-12-05 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm 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 Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm 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] Use $ prefix with config file options to have them added after all of the command line options (PR #117573)

2024-12-07 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed 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] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-31 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: > I guessing we pass `-lm` twice here to work around `ld.bfd` not handling > static libraries in a pleasant way? This is all due to the way libamath incremetnally emerged into its present existence. And yes, static linking added another layer of problems here. https://githu

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-31 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed https://github.com/llvm/llvm-project/pull/133578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-31 Thread Paul Osmialowski via cfe-commits
@@ -116,11 +116,17 @@ /// Verify that vectorized routines library is being linked in. // RUN: %clang -### --target=aarch64-pc-windows-msvc -fveclib=ArmPL %s 2>&1 | FileCheck --check-prefix=CHECK-LINKING-ARMPL-MSVC %s // RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmP

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-31 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/133578 >From 77dfec4939b3bba8d76cb7c43d2c309aa4c16588 Mon Sep 17 00:00:00 2001 From: Paul Osmialowski Date: Sat, 29 Mar 2025 07:51:26 + Subject: [PATCH] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib d

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-31 Thread Paul Osmialowski via cfe-commits
@@ -515,17 +515,19 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, // // 1. On Linux, link only when actually needed. // - // 2. Prefer libm functions over libamath. + // 2. Prefer libm functions over libamath (when

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-03-29 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: Seriously, this is something CI people signaled to me. Our CI builds everything with `-fveclib=ArmPL` and one of the packages failed on unexpected linker behavior when libm was artificially added by `-fveclib=ArmPL` despite the `-nostdlib` flag being used. My suggestion to us

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
@@ -116,11 +116,17 @@ /// Verify that vectorized routines library is being linked in. // RUN: %clang -### --target=aarch64-pc-windows-msvc -fveclib=ArmPL %s 2>&1 | FileCheck --check-prefix=CHECK-LINKING-ARMPL-MSVC %s // RUN: %clang -### --target=aarch64-linux-gnu -fveclib=ArmP

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
@@ -515,17 +515,19 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, // // 1. On Linux, link only when actually needed. // - // 2. Prefer libm functions over libamath. + // 2. Prefer libm functions over libamath (when

[clang] [flang] [clang][driver] Fix -fveclib=ArmPL issue: with -nostdlib do not link against libm (PR #133578)

2025-04-04 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm created https://github.com/llvm/llvm-project/pull/133578 Although combining -fveclib=ArmPL with -nostdlib is a rare situation, it should still be supported correctly and should effect in avoidance of linking against libm. >From c033be3cf15b3320b24d52f2414acf88ba

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-14 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: We're facing a regression after this one. We can't build https://github.com/dslarm/Financial-Services-Workload-Samples/tree/main/MonteCarloEuropeanOptions with `-g` for AArch64 with -fopenmp now: ``` Stack dump: 0. Program arguments: /usr/bin/clang-21 -cc1 -triple aarch

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-05-15 Thread Paul Osmialowski via cfe-commits
pawosm-arm wrote: One thing that worries me is that before this commit, there was no ICE caused by compiling this snippet of code (regardless its validity or usefulness), and now there is. It would be great if it could print a normal error message (which would encourage my resistant colleagues

<    1   2