forked from OSchip/llvm-project
[BOLT] Support building bolt when LLVM_LINK_LLVM_DYLIB is ON
This does *not* link with libLLVM, but with static archives instead. Not super-great, but at least the build works, which is probably better than failing. Related to #57551 Differential Revision: https://reviews.llvm.org/D134434
This commit is contained in:
parent
8b587113b7
commit
61cff9079c
|
@ -24,6 +24,7 @@ add_llvm_library(LLVMBOLTCore
|
||||||
ParallelUtilities.cpp
|
ParallelUtilities.cpp
|
||||||
Relocation.cpp
|
Relocation.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
${LLVM_PTHREAD_LIB}
|
${LLVM_PTHREAD_LIB}
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,6 +45,8 @@ add_llvm_library(LLVMBOLTPasses
|
||||||
VeneerElimination.cpp
|
VeneerElimination.cpp
|
||||||
RetpolineInsertion.cpp
|
RetpolineInsertion.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
${LLVM_PTHREAD_LIB}
|
${LLVM_PTHREAD_LIB}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ add_llvm_library(LLVMBOLTProfile
|
||||||
YAMLProfileReader.cpp
|
YAMLProfileReader.cpp
|
||||||
YAMLProfileWriter.cpp
|
YAMLProfileWriter.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
LINK_COMPONENTS
|
LINK_COMPONENTS
|
||||||
Support
|
Support
|
||||||
)
|
)
|
||||||
|
|
|
@ -33,6 +33,8 @@ add_llvm_library(LLVMBOLTRewrite
|
||||||
MachORewriteInstance.cpp
|
MachORewriteInstance.cpp
|
||||||
RewriteInstance.cpp
|
RewriteInstance.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
${LLVM_PTHREAD_LIB}
|
${LLVM_PTHREAD_LIB}
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,6 +10,8 @@ add_llvm_library(LLVMBOLTRuntimeLibs
|
||||||
RuntimeLibrary.cpp
|
RuntimeLibrary.cpp
|
||||||
HugifyRuntimeLibrary.cpp
|
HugifyRuntimeLibrary.cpp
|
||||||
InstrumentationRuntimeLibrary.cpp
|
InstrumentationRuntimeLibrary.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(LLVMBOLTRuntimeLibs
|
target_link_libraries(LLVMBOLTRuntimeLibs
|
||||||
|
|
|
@ -7,6 +7,8 @@ set(LLVM_LINK_COMPONENTS
|
||||||
add_llvm_library(LLVMBOLTTargetAArch64
|
add_llvm_library(LLVMBOLTTargetAArch64
|
||||||
AArch64MCPlusBuilder.cpp
|
AArch64MCPlusBuilder.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
AArch64CommonTableGen
|
AArch64CommonTableGen
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,6 +9,8 @@ add_llvm_library(LLVMBOLTTargetX86
|
||||||
X86MCPlusBuilder.cpp
|
X86MCPlusBuilder.cpp
|
||||||
X86MCSymbolizer.cpp
|
X86MCSymbolizer.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
X86CommonTableGen
|
X86CommonTableGen
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,6 +2,8 @@ add_llvm_library(LLVMBOLTUtils
|
||||||
CommandLineOpts.cpp
|
CommandLineOpts.cpp
|
||||||
Utils.cpp
|
Utils.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
LINK_LIBS
|
LINK_LIBS
|
||||||
${LLVM_PTHREAD_LIB}
|
${LLVM_PTHREAD_LIB}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ set(LLVM_LINK_COMPONENTS
|
||||||
|
|
||||||
add_llvm_tool(llvm-bat-dump
|
add_llvm_tool(llvm-bat-dump
|
||||||
bat-dump.cpp
|
bat-dump.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(llvm-bat-dump
|
target_link_libraries(llvm-bat-dump
|
||||||
|
|
|
@ -14,6 +14,8 @@ endif()
|
||||||
add_bolt_tool(llvm-bolt
|
add_bolt_tool(llvm-bolt
|
||||||
llvm-bolt.cpp
|
llvm-bolt.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${BOLT_DRIVER_DEPS}
|
${BOLT_DRIVER_DEPS}
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,6 +7,7 @@ set(LLVM_LINK_COMPONENTS
|
||||||
|
|
||||||
add_bolt_tool(llvm-bolt-heatmap
|
add_bolt_tool(llvm-bolt-heatmap
|
||||||
heatmap.cpp
|
heatmap.cpp
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(llvm-bolt-heatmap
|
target_link_libraries(llvm-bolt-heatmap
|
||||||
|
|
|
@ -4,6 +4,8 @@ set(LLVM_LINK_COMPONENTS
|
||||||
|
|
||||||
add_llvm_fuzzer(llvm-bolt-fuzzer
|
add_llvm_fuzzer(llvm-bolt-fuzzer
|
||||||
llvm-bolt-fuzzer.cpp
|
llvm-bolt-fuzzer.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
if (TARGET llvm-bolt-fuzzer)
|
if (TARGET llvm-bolt-fuzzer)
|
||||||
|
|
|
@ -3,6 +3,8 @@ set(LLVM_LINK_COMPONENTS Support)
|
||||||
add_bolt_tool(merge-fdata
|
add_bolt_tool(merge-fdata
|
||||||
merge-fdata.cpp
|
merge-fdata.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
|
|
||||||
DEPENDS
|
DEPENDS
|
||||||
intrinsics_gen
|
intrinsics_gen
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,6 +9,8 @@ add_bolt_unittest(CoreTests
|
||||||
BinaryContext.cpp
|
BinaryContext.cpp
|
||||||
MCPlusBuilder.cpp
|
MCPlusBuilder.cpp
|
||||||
DynoStats.cpp
|
DynoStats.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(CoreTests
|
target_link_libraries(CoreTests
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
add_bolt_unittest(ProfileTests
|
add_bolt_unittest(ProfileTests
|
||||||
DataAggregator.cpp
|
DataAggregator.cpp
|
||||||
|
|
||||||
|
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(ProfileTests
|
target_link_libraries(ProfileTests
|
||||||
|
|
Loading…
Reference in New Issue