weiwang updated this revision to Diff 286124.
weiwang added a comment.
Herald added subscribers: dang, arichardson, emaste.
Herald added a reviewer: espindola.
update:
1. add `--plugin-opt` alias for remarks in lld
2. handle both lld and ld.gold pass-through
3. simplify target checking logic
4. c
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
MaskRay added inline comments.
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:81
+CmdArgs.push_back("-mllvm");
+std::string Passes = std::string("-pass-remarks=") + A->getValue();
+CmdArgs.push_back(Args.MakeArgString(Passes));
Delete such one
MaskRay 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";
Checking the path is brittle. Consider
weiwang updated this revision to Diff 285205.
weiwang added a comment.
update test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85810/new/
https://reviews.llvm.org/D85810
Files:
clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver
weiwang added reviewers: wenlei, hoyFB.
weiwang added a comment.
This is the the 2nd of 3 dependent patches:
1. [lld] Enable remarks hotness filtering in lld:
https://reviews.llvm.org/D85809
2. [clang] Pass-through remarks options to lld: https://reviews.llvm.org/D85810
3. [remarks] Optimization
weiwang created this revision.
Herald added subscribers: cfe-commits, dexonsmith.
Herald added a project: clang.
weiwang requested review of this revision.
Propagate driver commandline remarks options to link. Pass-through happens when:
1. LTO is enabled;
2. Single arch target is specified;
3. Th