Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bolt/lib/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ add_llvm_library(LLVMBOLTCore
ParallelUtilities.cpp
Relocation.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB
LINK_LIBS
${LLVM_PTHREAD_LIB}
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Passes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ add_llvm_library(LLVMBOLTPasses
VeneerElimination.cpp
RetpolineInsertion.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

LINK_LIBS
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Profile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_llvm_library(LLVMBOLTProfile
YAMLProfileReader.cpp
YAMLProfileWriter.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

LINK_COMPONENTS
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Rewrite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ add_llvm_library(LLVMBOLTRewrite
RewriteInstance.cpp
SDTRewriter.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

LINK_LIBS
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/RuntimeLibs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_llvm_library(LLVMBOLTRuntimeLibs
HugifyRuntimeLibrary.cpp
InstrumentationRuntimeLibrary.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB
)

Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Target/AArch64/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ endif()
add_llvm_library(LLVMBOLTTargetAArch64
AArch64MCPlusBuilder.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

DEPENDS
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Target/RISCV/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ endif()
add_llvm_library(LLVMBOLTTargetRISCV
RISCVMCPlusBuilder.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

DEPENDS
Expand Down
1 change: 1 addition & 0 deletions bolt/lib/Target/X86/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ add_llvm_library(LLVMBOLTTargetX86
X86MCPlusBuilder.cpp
X86MCSymbolizer.cpp

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

DEPENDS
Expand Down
2 changes: 2 additions & 0 deletions bolt/lib/Utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ add_llvm_library(LLVMBOLTUtils
CommandLineOpts.cpp
Utils.cpp
${version_inc}

NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB

LINK_LIBS
Expand Down
12 changes: 9 additions & 3 deletions llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ endfunction()

macro(add_llvm_library name)
cmake_parse_arguments(ARG
"SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN"
"SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN;NO_EXPORT"
""
""
${ARGN})
Expand Down Expand Up @@ -967,7 +967,11 @@ macro(add_llvm_library name)
set(umbrella)
endif()

get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
if(ARG_NO_EXPORT)
set(export_to_llvmexports)
else()
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
endif()
install(TARGETS ${name}
${export_to_llvmexports}
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
Expand All @@ -980,7 +984,9 @@ macro(add_llvm_library name)
COMPONENT ${name})
endif()
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
if(NOT ARG_NO_EXPORT)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endif()
endif()

get_subproject_title(subproject_title)
Expand Down
Loading