[clang] [lld] [llvm] [llvm][lld][clang] Delay initializing TargetOptions in LTO builds until a Triple is available (PR #179509)
Paul Kirth via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 13 09:15:14 PST 2026
================
@@ -1533,12 +1539,12 @@ class InProcessThinBackend : public CGThinBackend {
const FunctionImporter::ExportSetTy &ExportList,
const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes> &ResolvedODR,
const GVSummaryMapTy &DefinedGlobals,
- MapVector<StringRef, BitcodeModule> &ModuleMap) {
+ MapVector<StringRef, BitcodeModule> &ModuleMap, Triple TheTriple) {
auto ModuleID = BM.getModuleIdentifier();
+ LTOLLVMContext BackendContext(Conf);
----------------
ilovepi wrote:
In an earlier version I was reading the Triple from the module, and decided to share the LTO context object with the one created in the lambda when doing so. Since the Triple is passed in now, that's no longer necessary. Thanks for catching that. I'll put this back where it belongs.
https://github.com/llvm/llvm-project/pull/179509
More information about the cfe-commits
mailing list