[PATCH] D30239: enable -flto=thin, -flto-jobs=, and -fthinlto-index= in clang-cl

Bob Haarman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 10:31:08 PST 2017


inglorion added a comment.

@mehdi_amini:

> Is clang-cl using lld as default? How is the switch done? Ideally we should have a nice error message from the driver if -flto is used without lld.

I believe we use link.exe by default. You can use lld by passing -fuse-ld=lld to the compiler.

I can add an error message when -flto is used without -fuse-ld=lld at least for the case when linking is actually performed. Of course, it's possible to invoke clang-cl without it doing any linking. If you're only compiling, it's perfectly valid to use -flto without -fuse-ld=lld.


https://reviews.llvm.org/D30239





More information about the cfe-commits mailing list