[PATCH] D36227: [ELF] - LTO: Try to be option compatible with the gold plugin.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 08:54:36 PDT 2017


grimar added inline comments.


================
Comment at: ELF/Driver.cpp:703
 
+  for (auto *Arg : Args.filtered(OPT_plugin_opt, OPT_plugin_opt_eq)) {
+    StringRef S = Arg->getValue();
----------------
grimar wrote:
> ruiu wrote:
> > plugin_opt_eq is an alias for plugin_opt. Do you have to pass both?
> I'll recheck.
> plugin_opt_eq is an alias for plugin_opt. Do you have to pass both?

Yes, so if you have `--plugin-opt=aaa --plugin-opt bbb`, then
`Args.filtered(OPT_plugin_opt)` will return only `bbb` and 
`Args.filtered(OPT_plugin_opt_eq)` will return only `aaa`.

Not sure if it is a bug or by design of `filtered()`, but atm we need both it seems.


https://reviews.llvm.org/D36227





More information about the llvm-commits mailing list