================
@@ -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 &) {};
----------------
arichardson wrote:

```suggestion
  std::function<TargetOptions(const Triple &TT)> InitTargetOptions =
      [](const Triple &TT) {
      codegen::InitTargetOptionsFromCodeGenFlags(TT)
  };
```

Would this kind of hook be more flexible (probably need to push the 
initilization of this variable into a .cpp file we do this)

https://github.com/llvm/llvm-project/pull/179509
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to