[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)
Tom Eccles via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 18 09:07:24 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"));
----------------
tblah wrote:
Flang and ArmPL both support Windows. I don't see why Windows should get second-class support. I would prefer to see this PR extended to also include any flags required on Windows.
I agree with the general concept of this PR. This makes ArmPL easier to use, and we know for sure what the armpl libraries will called. Flang already has a hack for a different veclib implementation on darwin https://github.com/llvm/llvm-project/blob/6bf8f08989420ccd10efed5fac88052ca16e1250/clang/lib/Driver/ToolChains/Flang.cpp#L441
https://github.com/llvm/llvm-project/pull/116432
More information about the cfe-commits
mailing list