[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 05:30:28 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:
We actually do support this on Windows, I was wrong above. So we should not be breaking this for Windows users.
I suppose the other option is to say that if someone passes `-fveclib=ArmPL` they will also have to pass the right flags to link to ArmPL and libamath themselves, rather than doing anything in the driver automatically? Assuming that's what @paulwalker-arm means, I'd probably agree and say that should be on the user to sort out and not on the driver.
https://github.com/llvm/llvm-project/pull/116432
More information about the cfe-commits
mailing list