================
@@ -50,7 +51,12 @@ struct Config {
   TargetOptions Options;
   std::vector<std::string> MAttrs;
   std::vector<std::string> MllvmArgs;
-  std::vector<std::string> PassPlugins;
+  // LTO will register both lists of plugins, but
+  // if an LTO client has already loaded a set of plugins,
+  // they should register them via LoadedPassPlugins.
+  // This is currently used by distributed thin-lto.
+  std::vector<std::string> PassPluginFilenames;
----------------
NuriAmari wrote:

It's possible but I'm not necessarily convinced it's an improvement. We'd have 
to duplicate the plugin loading and error handling code for each user. It is 
also somewhat annoying in that each user has to make sure the pointed to pass 
plugins live long enough for LTO to use them since, as written, LTO does not 
take ownership. For example, in `createConfig` in 
[‎lld/MachO/LTO.cpp](https://github.com/llvm/llvm-project/pull/183525/changes#diff-b543a820fe9691347c01b16c3f49520bd86a80a56f4075d9868aca045f9794d7)
 we'd have to copy the plugins to the heap somehow.

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

Reply via email to