[PATCH] D79629: [Clang][Driver]Pass LLVM options to lld in case of LTO
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 08:00:47 PDT 2020
MaskRay requested changes to this revision.
MaskRay added a comment.
This revision now requires changes to proceed.
`-mllvm,foobar` is for compilation (.c/.cc -> .o)
`-Wl,-mllvm,foobar` for LTO options. For linking, `-mllvm,foobar` is not used and thus warned.
================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:363
+ llvm::sys::path::stem(Linker) == "ld.lld");
+ if (UseLLD) {
// Tell the linker to load the plugin. This has to come before
----------------
This is wrong. The intention is not to pass -plugin when the linker is clearly lld. lld does not need -plugin for LTO.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79629/new/
https://reviews.llvm.org/D79629
More information about the cfe-commits
mailing list