Hi,
When debugging ThinLTO with clang -mllvm -debug-only=function-import -flto=thin -fuse-ld=lld ..., it gives me below warning message:
warning: argument unused during compilation: '-mllvm -debug-only=function-import' [-Wunused-command-line-argument]
Actually lld already supports passing arguments to llvm using -mllvm, it would be easier for debug if driver passes it along to lld.
This simple patch does this. Note it also silently eats up such options if other linkers (ld.bfd, gold) are used.
Any comments? Thanks
This is wrong. The intention is not to pass -plugin when the linker is clearly lld. lld does not need -plugin for LTO.