[lld] [llvm] [lld][COFF] Restore `lto-embed-bitcode` and `-fembed-bitcode` Bitcode Embedding Features (PR #188398)

Austin Hudson via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 20:37:39 PDT 2026


================
@@ -1737,8 +1737,7 @@ MCSection *TargetLoweringObjectFileCOFF::getExplicitSectionGlobal(
       Name == getInstrProfSectionName(IPSK_covdata, Triple::COFF,
                                       /*AddSegmentInfo=*/false) ||
       Name == getInstrProfSectionName(IPSK_covname, Triple::COFF,
-                                      /*AddSegmentInfo=*/false) ||
-      Name == ".llvmbc" || Name == ".llvmcmd")
+                                      /*AddSegmentInfo=*/false))
----------------
realoriginal wrote:

Yes, but again, this only happens if you _tell_ it to embed the bitcode. It was an assumption until this release that the bitcode would be in the final binary. Dont use `-fembed-bitcode` if you dont want that. If you want the bitcode but not in the final binary, just use `-flto` by itself

https://github.com/llvm/llvm-project/pull/188398


More information about the llvm-commits mailing list