[PATCH] D67409: [RISCV] enable LTO support, pass some options to linker.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 23:18:46 PDT 2019


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.cpp:414
+
+    CmdArgs.push_back(Args.MakeArgString(Twine("-plugin-opt=--"
+                                               "mattr=") +
----------------
The single-dash form of `mattr`: `-plugin-opt=-mattr=` should be preferred. `--mattr` is rare.


================
Comment at: clang/lib/Driver/ToolChains/Arch/RISCV.h:26
                       const llvm::Triple &Triple);
+void addGoldOptions(const ToolChain &ToolChain, const llvm::opt::ArgList &Args,
+                    llvm::opt::ArgStringList &CmdArgs);
----------------
The description should probably mention why `clang::driver:tools::AddGoldPlugin` is insufficient.


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

https://reviews.llvm.org/D67409





More information about the cfe-commits mailing list