[clang] [lld] [llvm] [llvm][lld][clang] Delay initializing TargetOptions in LTO builds until a Triple is available (PR #179509)
Alexander Richardson via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 14 11:38:47 PST 2026
================
@@ -1350,7 +1352,12 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
assert(OptLevelOrNone && "Invalid optimization level!");
Conf.CGOptLevel = *OptLevelOrNone;
Conf.OptLevel = CGOpts.OptimizationLevel;
- initTargetOptions(CI, Diags, Conf.Options);
+ Conf.InitTargetOptions = [&](llvm::Triple TheTriple) -> llvm::TargetOptions {
----------------
arichardson wrote:
```suggestion
Conf.InitTargetOptions = [&](const llvm::Triple &TheTriple) -> llvm::TargetOptions {
```
https://github.com/llvm/llvm-project/pull/179509
More information about the cfe-commits
mailing list