[PATCH] D116995: [gold] Ignore bitcode from sections inside object files
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 09:40:25 PST 2022
tejohnson added a comment.
A few comments and questions.
First, it looks like lld works because it has a similar check guarding its call of InputFile::create (which is embedded in the BitcodeFile constructor).
Note though I am seeing inconsistent info online as to what embedded bitcode is meant to be used for. It would be good to document this somewhere, like where fembed-bitcode is documented (which I am not finding). The initial submitter text when bcsection.ll was added suggests it was intended to be useful for LTO (https://reviews.llvm.org/D4371). I did find this recent discussion which indicates it was added for Apple recompilation: https://groups.google.com/g/llvm-dev/c/d1WSRvLefHQ/m/Iwm39FboAAAJ. I also found official ARM documentation online that points to the embedded .llvmbc section as being there to support LTO: https://developer.arm.com/documentation/dui0773/i/sbu1510240545830.
But in any case, as noted above, lld does not support its use in LTO links, so I think this is just in need of clear documentation somewhere.
Can you add a test?
If bcsection.ll is deleted, its input file bcsection.s should as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116995/new/
https://reviews.llvm.org/D116995
More information about the llvm-commits
mailing list