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

David Truby via flang-commits flang-commits at lists.llvm.org
Tue Nov 19 05:02:37 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:

MinGW here doesn't really mean MinGW (I realise this is quite confusing). It more specifically  means "using glibc, ld.bfd and libstdc++". This isn't supported on AArch64 at all, and is mostly being phased out on X86 too I believe. Only the "new style" mingw-w64 is supported on AArch64 (using libucrt and link.exe).

There's no Cygwin on AArch64 either.
I suppose more specifically I should have said that this function will never be called on Windows _on Arm_ 🙂

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


More information about the flang-commits mailing list