================ @@ -783,6 +783,28 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, "-generate-arange-section")); } + // Pass vector library arguments to LTO. + Arg *ArgVecLib = Args.getLastArg(options::OPT_fveclib); + if (ArgVecLib && ArgVecLib->getNumValues() == 1) { + // Map the vector library names from clang front-end to opt front-end. The + // values are taken from the TargetLibraryInfo class command line options. + std::optional<StringRef> OptVal = + llvm::StringSwitch<std::optional<StringRef>>(ArgVecLib->getValue()) ---------------- paschalis-mpeis wrote:
Reusing code for mapping the strings is a great suggestion, however, `TargetLibraryInfo` statically creates some `cl::opt` (command line options) and I'm not sure ATM what would be a clean way to do this. I would suggest such change (if is doable in a clean way) to be dealt in a separate patch. https://github.com/llvm/llvm-project/pull/78749 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits