diff --git a/bolt/lib/Core/CMakeLists.txt b/bolt/lib/Core/CMakeLists.txt --- a/bolt/lib/Core/CMakeLists.txt +++ b/bolt/lib/Core/CMakeLists.txt @@ -24,6 +24,7 @@ ParallelUtilities.cpp Relocation.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB LINK_LIBS ${LLVM_PTHREAD_LIB} ) diff --git a/bolt/lib/Passes/CMakeLists.txt b/bolt/lib/Passes/CMakeLists.txt --- a/bolt/lib/Passes/CMakeLists.txt +++ b/bolt/lib/Passes/CMakeLists.txt @@ -45,6 +45,8 @@ VeneerElimination.cpp RetpolineInsertion.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + LINK_LIBS ${LLVM_PTHREAD_LIB} diff --git a/bolt/lib/Profile/CMakeLists.txt b/bolt/lib/Profile/CMakeLists.txt --- a/bolt/lib/Profile/CMakeLists.txt +++ b/bolt/lib/Profile/CMakeLists.txt @@ -7,6 +7,8 @@ YAMLProfileReader.cpp YAMLProfileWriter.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + LINK_COMPONENTS Support ) diff --git a/bolt/lib/Rewrite/CMakeLists.txt b/bolt/lib/Rewrite/CMakeLists.txt --- a/bolt/lib/Rewrite/CMakeLists.txt +++ b/bolt/lib/Rewrite/CMakeLists.txt @@ -33,6 +33,8 @@ MachORewriteInstance.cpp RewriteInstance.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + LINK_LIBS ${LLVM_PTHREAD_LIB} ) diff --git a/bolt/lib/RuntimeLibs/CMakeLists.txt b/bolt/lib/RuntimeLibs/CMakeLists.txt --- a/bolt/lib/RuntimeLibs/CMakeLists.txt +++ b/bolt/lib/RuntimeLibs/CMakeLists.txt @@ -10,6 +10,8 @@ RuntimeLibrary.cpp HugifyRuntimeLibrary.cpp InstrumentationRuntimeLibrary.cpp + + DISABLE_LLVM_LINK_LLVM_DYLIB ) target_link_libraries(LLVMBOLTRuntimeLibs diff --git a/bolt/lib/Target/AArch64/CMakeLists.txt b/bolt/lib/Target/AArch64/CMakeLists.txt --- a/bolt/lib/Target/AArch64/CMakeLists.txt +++ b/bolt/lib/Target/AArch64/CMakeLists.txt @@ -7,6 +7,8 @@ add_llvm_library(LLVMBOLTTargetAArch64 AArch64MCPlusBuilder.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + DEPENDS AArch64CommonTableGen ) diff --git a/bolt/lib/Target/X86/CMakeLists.txt b/bolt/lib/Target/X86/CMakeLists.txt --- a/bolt/lib/Target/X86/CMakeLists.txt +++ b/bolt/lib/Target/X86/CMakeLists.txt @@ -9,6 +9,8 @@ X86MCPlusBuilder.cpp X86MCSymbolizer.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + DEPENDS X86CommonTableGen ) diff --git a/bolt/lib/Utils/CMakeLists.txt b/bolt/lib/Utils/CMakeLists.txt --- a/bolt/lib/Utils/CMakeLists.txt +++ b/bolt/lib/Utils/CMakeLists.txt @@ -2,6 +2,8 @@ CommandLineOpts.cpp Utils.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + LINK_LIBS ${LLVM_PTHREAD_LIB} diff --git a/bolt/tools/bat-dump/CMakeLists.txt b/bolt/tools/bat-dump/CMakeLists.txt --- a/bolt/tools/bat-dump/CMakeLists.txt +++ b/bolt/tools/bat-dump/CMakeLists.txt @@ -5,6 +5,8 @@ add_llvm_tool(llvm-bat-dump bat-dump.cpp + + DISABLE_LLVM_LINK_LLVM_DYLIB ) target_link_libraries(llvm-bat-dump diff --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt --- a/bolt/tools/driver/CMakeLists.txt +++ b/bolt/tools/driver/CMakeLists.txt @@ -14,6 +14,8 @@ add_bolt_tool(llvm-bolt llvm-bolt.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + DEPENDS ${BOLT_DRIVER_DEPS} ) diff --git a/bolt/tools/heatmap/CMakeLists.txt b/bolt/tools/heatmap/CMakeLists.txt --- a/bolt/tools/heatmap/CMakeLists.txt +++ b/bolt/tools/heatmap/CMakeLists.txt @@ -7,6 +7,7 @@ add_bolt_tool(llvm-bolt-heatmap heatmap.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB ) target_link_libraries(llvm-bolt-heatmap diff --git a/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt b/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt --- a/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt +++ b/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt @@ -4,6 +4,8 @@ add_llvm_fuzzer(llvm-bolt-fuzzer llvm-bolt-fuzzer.cpp + + DISABLE_LLVM_LINK_LLVM_DYLIB ) if (TARGET llvm-bolt-fuzzer) diff --git a/bolt/tools/merge-fdata/CMakeLists.txt b/bolt/tools/merge-fdata/CMakeLists.txt --- a/bolt/tools/merge-fdata/CMakeLists.txt +++ b/bolt/tools/merge-fdata/CMakeLists.txt @@ -3,6 +3,8 @@ add_bolt_tool(merge-fdata merge-fdata.cpp + DISABLE_LLVM_LINK_LLVM_DYLIB + DEPENDS intrinsics_gen ) diff --git a/bolt/unittests/Core/CMakeLists.txt b/bolt/unittests/Core/CMakeLists.txt --- a/bolt/unittests/Core/CMakeLists.txt +++ b/bolt/unittests/Core/CMakeLists.txt @@ -9,6 +9,8 @@ BinaryContext.cpp MCPlusBuilder.cpp DynoStats.cpp + + DISABLE_LLVM_LINK_LLVM_DYLIB ) target_link_libraries(CoreTests diff --git a/bolt/unittests/Profile/CMakeLists.txt b/bolt/unittests/Profile/CMakeLists.txt --- a/bolt/unittests/Profile/CMakeLists.txt +++ b/bolt/unittests/Profile/CMakeLists.txt @@ -1,5 +1,7 @@ add_bolt_unittest(ProfileTests DataAggregator.cpp + + DISABLE_LLVM_LINK_LLVM_DYLIB ) target_link_libraries(ProfileTests