Go to file
Rafael Espindola f9dcf9029b Pass PRIVATE to target_link_libraries if using shared libraries.
A shared library (unlike a .a), has its dependencies recorded in the library and
we can pass PRIVATE to target_link_libraries.

This patch then removes some bogus dependencies when using
BUILD_SHARED_LIBS=ON. For example, we go from

build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMBitReader.so
lib/libLLVMTransformUtils.so lib/libLLVMInstCombine.so
lib/libLLVMScalarOpts.so lib/libLLVMipa.so lib/libLLVMAnalysis.so
lib/libLLVMMCParser.so lib/libLLVMMC.so lib/libLLVMObject.so
lib/libLLVMTarget.so lib/libLLVMProfileData.so

to

build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMTransformUtils.so
lib/libLLVMScalarOpts.so lib/libLLVMAnalysis.so lib/libLLVMMC.so
lib/libLLVMTarget.so

In fact, build.ninja goes from 5231028 bytes to 4896759 bytes.

With this, old verisons of bfd ld (2.24 is OK, 2.23 warns) will print a bogus
warning when building with BUILD_SHARED_LIBS.

llvm-svn: 221530
2014-11-07 15:33:56 +00:00
clang Improve comments in vtordisp tests: fix a typo, add a bit more clarity 2014-11-07 14:11:14 +00:00
clang-tools-extra [clang-tidy] google-readability-function: skip std::nullptr_t 2014-11-05 11:08:39 +00:00
compiler-rt [sanitizer] Never remove the last frame off the stack trace. 2014-11-07 12:03:07 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Prune CRLF. 2014-10-27 12:37:26 +00:00
libcxx Fix rvalue bug in __has_operator_addressof 2014-11-05 21:20:10 +00:00
libcxxabi Move ARM failure from FIXME to XFAIL 2014-11-07 10:30:53 +00:00
lld [ELF] Remove is64bits() and isLittlEndian(). 2014-11-07 14:08:43 +00:00
lldb Use llvm::StringRefMemoryObject NFC. 2014-11-07 04:24:12 +00:00
llvm Pass PRIVATE to target_link_libraries if using shared libraries. 2014-11-07 15:33:56 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly [Refactor][NFC] Generalize the creation of ScopArrayInfo objects. 2014-11-07 08:31:31 +00:00