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

David Truby via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 18 04:35:59 PST 2024


================
@@ -490,6 +490,16 @@ 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) {
+      StringRef V = A->getValue();
+      if (V == "ArmPL") {
+        CmdArgs.push_back(Args.MakeArgString("-lamath"));
+        CmdArgs.push_back(Args.MakeArgString("-lm"));
----------------
DavidTruby wrote:

I suppose the actual answer to your question is no, as Windows doesn't have a separate libm, and the logic for linking to amath will probably be more complicated because you need a version of it matching your libc (the debug/release/static/dynamic grid that Windows makes you deal with)

https://github.com/llvm/llvm-project/pull/116432


More information about the cfe-commits mailing list