[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 16 13:05:26 PST 2019
efriedma added a comment.
My primary concern with this is that I'm not sure you should be passing this information separately, as opposed to encoding it into the bitcode.
On ARM, the ABI for a file is generally derived from the target triple. For example, "arm-eabi" is soft-float, "arm-eabihf" is hard-float. This makes the intended target clear, provides some protection against accidentally using LTO with files compiled for different ABIs, and matches up well with our existing configuration flags to set a default target for a compiler.
For other ABI-ish sorts of questions, LLVM IR also supports module flags, which can specify various parameters that apply to an entire object file. See, for example, http://llvm.org/docs/LangRef.html#c-type-width-module-flags-metadata . This has some of the same benefits: it clearly applies to the whole file, and it detects mixing targets with LTO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71387/new/
https://reviews.llvm.org/D71387
More information about the cfe-commits
mailing list