[BOLT][CMake] Don't export bolt libraries in LLVMExports.cmake (#121936)
Bolt makes use of add_llvm_library and as such ends up exporting its libraries from LLVMExports.cmake, which is not correct. Bolt doesn't have its own exports file, and I assume that there is no desire to have one either -- Bolt libraries are not intended to be consumed as a cmake module, right? As such, this PR adds a NO_EXPORT option to simplify exclude these libraries from the exports file.
This commit is contained in:
@@ -35,6 +35,7 @@ add_llvm_library(LLVMBOLTCore
|
||||
ParallelUtilities.cpp
|
||||
Relocation.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
LINK_LIBS
|
||||
${LLVM_PTHREAD_LIB}
|
||||
|
||||
@@ -46,6 +46,7 @@ add_llvm_library(LLVMBOLTPasses
|
||||
VeneerElimination.cpp
|
||||
RetpolineInsertion.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
LINK_LIBS
|
||||
|
||||
@@ -7,6 +7,7 @@ add_llvm_library(LLVMBOLTProfile
|
||||
YAMLProfileReader.cpp
|
||||
YAMLProfileWriter.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
LINK_COMPONENTS
|
||||
|
||||
@@ -25,6 +25,7 @@ add_llvm_library(LLVMBOLTRewrite
|
||||
RewriteInstance.cpp
|
||||
SDTRewriter.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
LINK_LIBS
|
||||
|
||||
@@ -11,6 +11,7 @@ add_llvm_library(LLVMBOLTRuntimeLibs
|
||||
HugifyRuntimeLibrary.cpp
|
||||
InstrumentationRuntimeLibrary.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ endif()
|
||||
add_llvm_library(LLVMBOLTTargetAArch64
|
||||
AArch64MCPlusBuilder.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
DEPENDS
|
||||
|
||||
@@ -20,6 +20,7 @@ endif()
|
||||
add_llvm_library(LLVMBOLTTargetRISCV
|
||||
RISCVMCPlusBuilder.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
DEPENDS
|
||||
|
||||
@@ -21,6 +21,7 @@ add_llvm_library(LLVMBOLTTargetX86
|
||||
X86MCPlusBuilder.cpp
|
||||
X86MCSymbolizer.cpp
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
DEPENDS
|
||||
|
||||
@@ -29,6 +29,8 @@ add_llvm_library(LLVMBOLTUtils
|
||||
CommandLineOpts.cpp
|
||||
Utils.cpp
|
||||
${version_inc}
|
||||
|
||||
NO_EXPORT
|
||||
DISABLE_LLVM_LINK_LLVM_DYLIB
|
||||
|
||||
LINK_LIBS
|
||||
|
||||
Reference in New Issue
Block a user