Skip to content
Commit f947d8d1 authored by Bob Haarman's avatar Bob Haarman
Browse files

enable building with LTO on Windows using clang-cl and lld

Summary: With clang-cl gaining support for link-time optimization, we can now enable builds using LTO when using clang-cl and lld on Windows. To do this, we must not pass the -flto flag to the linker; lld-link does not understand it, but will perform LTO automatically when it encounters bitcode files. We also don't pass /Brepro when using LTO - the compiler doesn't generate object files for LTO, so passing the flag would only result in a warning about it being unused.

Reviewers: rnk, ruiu, hans

Reviewed By: hans

Subscribers: mgorny, mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D30240

llvm-svn: 296658
parent 9a563daf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment