[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:11:03 PST 2026
================
@@ -47,7 +47,9 @@ struct Config {
// Note: when adding fields here, consider whether they need to be added to
// computeLTOCacheKey in LTO.cpp.
std::string CPU;
- TargetOptions Options;
+ // Callback to modify the target options once they are instantiated.
+ std::function<void(TargetOptions &Options)> ModifyTargetOptions =
+ [](TargetOptions &) {};
----------------
ilovepi wrote:
Oh, I see. Yeah, that does make sense. I thought there was one place where the callback was issued much later on a TargetOption that had already been created/modified, but I'm not seeing it now. Let me try that, since it would make it clear that this *needs* the triple.
https://github.com/llvm/llvm-project/pull/179509
More information about the cfe-commits
mailing list