[lld] lld: Add initial support for GNU LTO format (PR #157175)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 16 01:51:11 PST 2025
================
@@ -3298,7 +3344,13 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) {
// except a few linker-synthesized ones will be added to the symbol table.
const size_t numObjsBeforeLTO = ctx.objectFiles.size();
const size_t numInputFilesBeforeLTO = ctx.driver.files.size();
- compileBitcodeFiles<ELFT>(skipLinkedOutput);
+ if (ctx.arg.plugin.empty()) {
+ compileBitcodeFiles<ELFT>(skipLinkedOutput);
+#if LLD_ENABLE_GNU_LTO
+ } else {
----------------
smithp35 wrote:
I'm guessing that someone will either accidentally or intentionally try to compile both LLVM bitcode and GCC IR at the same time. Would it be worth an error message here if there are any bitcode if bitCodeFiles is not empty?
https://github.com/llvm/llvm-project/pull/157175
More information about the llvm-commits
mailing list