[PATCH] D85810: [clang] Pass-through remarks options to lld

Teresa Johnson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 14 08:26:47 PDT 2020


tejohnson added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:71
+
+  bool isLLD = llvm::sys::path::filename(LinkerPath) == "ld.lld" ||
+               llvm::sys::path::stem(LinkerPath) != "ld.lld";
----------------
MaskRay wrote:
> Checking the path is brittle. Consider `Args.getLastArgValue(options::OPT_fuse_ld_EQ) == "lld"`
Would be better to add equivalent support to gold-plugin.cpp, which uses the same lto::Config, and then you don't need the lld check. Just use --plugin-opt instead of -mllvm for passing down the internal options, that is recognized by lld as well (see other examples here).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85810/new/

https://reviews.llvm.org/D85810



More information about the cfe-commits mailing list