File tree Expand file tree Collapse file tree 10 files changed +19
-3
lines changed Expand file tree Collapse file tree 10 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ add_llvm_library(LLVMBOLTCore
3535 ParallelUtilities.cpp
3636 Relocation.cpp
3737
38+ NO_EXPORT
3839 DISABLE_LLVM_LINK_LLVM_DYLIB
3940 LINK_LIBS
4041 ${LLVM_PTHREAD_LIB}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ add_llvm_library(LLVMBOLTPasses
4646 VeneerElimination.cpp
4747 RetpolineInsertion.cpp
4848
49+ NO_EXPORT
4950 DISABLE_LLVM_LINK_LLVM_DYLIB
5051
5152 LINK_LIBS
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ add_llvm_library(LLVMBOLTProfile
77 YAMLProfileReader.cpp
88 YAMLProfileWriter.cpp
99
10+ NO_EXPORT
1011 DISABLE_LLVM_LINK_LLVM_DYLIB
1112
1213 LINK_COMPONENTS
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ add_llvm_library(LLVMBOLTRewrite
2525 RewriteInstance.cpp
2626 SDTRewriter.cpp
2727
28+ NO_EXPORT
2829 DISABLE_LLVM_LINK_LLVM_DYLIB
2930
3031 LINK_LIBS
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ add_llvm_library(LLVMBOLTRuntimeLibs
1111 HugifyRuntimeLibrary.cpp
1212 InstrumentationRuntimeLibrary.cpp
1313
14+ NO_EXPORT
1415 DISABLE_LLVM_LINK_LLVM_DYLIB
1516 )
1617
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ endif()
1919add_llvm_library(LLVMBOLTTargetAArch64
2020 AArch64MCPlusBuilder.cpp
2121
22+ NO_EXPORT
2223 DISABLE_LLVM_LINK_LLVM_DYLIB
2324
2425 DEPENDS
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ endif()
2020add_llvm_library(LLVMBOLTTargetRISCV
2121 RISCVMCPlusBuilder.cpp
2222
23+ NO_EXPORT
2324 DISABLE_LLVM_LINK_LLVM_DYLIB
2425
2526 DEPENDS
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ add_llvm_library(LLVMBOLTTargetX86
2121 X86MCPlusBuilder.cpp
2222 X86MCSymbolizer.cpp
2323
24+ NO_EXPORT
2425 DISABLE_LLVM_LINK_LLVM_DYLIB
2526
2627 DEPENDS
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ add_llvm_library(LLVMBOLTUtils
2929 CommandLineOpts.cpp
3030 Utils.cpp
3131 ${version_inc}
32+
33+ NO_EXPORT
3234 DISABLE_LLVM_LINK_LLVM_DYLIB
3335
3436 LINK_LIBS
Original file line number Diff line number Diff line change @@ -932,7 +932,7 @@ endfunction()
932932
933933macro (add_llvm_library name )
934934 cmake_parse_arguments (ARG
935- "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN"
935+ "SHARED;BUILDTREE_ONLY;MODULE;INSTALL_WITH_TOOLCHAIN;NO_EXPORT "
936936 ""
937937 ""
938938 ${ARGN} )
@@ -967,7 +967,11 @@ macro(add_llvm_library name)
967967 set (umbrella)
968968 endif ()
969969
970- get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella} )
970+ if (ARG_NO_EXPORT)
971+ set (export_to_llvmexports)
972+ else ()
973+ get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella} )
974+ endif ()
971975 install (TARGETS ${name}
972976 ${export_to_llvmexports}
973977 LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
@@ -980,7 +984,9 @@ macro(add_llvm_library name)
980984 COMPONENT ${name} )
981985 endif ()
982986 endif ()
983- set_property (GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name} )
987+ if (NOT ARG_NO_EXPORT)
988+ set_property (GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name} )
989+ endif ()
984990 endif ()
985991
986992 get_subproject_title(subproject_title)
You can’t perform that action at this time.
0 commit comments