[compiler-rt] build compiler-rt runtimes without LTO
authorBob Haarman <llvm@inglorion.net>
Wed, 22 Mar 2017 17:25:49 +0000 (17:25 +0000)
committerBob Haarman <llvm@inglorion.net>
Wed, 22 Mar 2017 17:25:49 +0000 (17:25 +0000)
commit1012fe8a5459c7227791e4f14714846af249f094
treefd5faef39566ebacbd76f26ef1f83cdd4ffcb9bd
parent26b09b27e5c7bc9e35875df4fc349529429c185e
[compiler-rt] build compiler-rt runtimes without LTO

Summary: Currently, we build the compiler-rt runtimes with link-time optimization if LTO is configured for the LLVM project. This will break external programs that don't invoke the linker in such a way that it supports LLVM's LTO. To avoid this, this change causes the compiler-rt runtimes to be compiled with -fno-lto. This also makes the check-profile tests work on systems when doing a lld LTO build on a system where the system linker does not support LLVM LTO.

Reviewers: rnk, davidxl

Reviewed By: davidxl

Subscribers: dberris, mgorny, llvm-commits, mehdi_amini

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

llvm-svn: 298525
compiler-rt/cmake/Modules/AddCompilerRT.cmake