[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)
Paul Walker via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 02:35:07 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"));
----------------
paulwalker-arm wrote:
> Flang already has a hack for a different veclib implementation on darwin
The difference with the one instance of doing this is that Accelerate is a core part of that environment, much like libm is a core part of the linux environment. libamath is not core to any environment. I recommend seeking advice from the wider clang community before landing this work.
https://github.com/llvm/llvm-project/pull/116432
More information about the cfe-commits
mailing list