Skip to content

Commit 583f7a8

Browse files
[CMake] Fold export_executable_symbols_* into function args
Fix the builds with LLVM_TOOL_LLVM_DRIVER_BUILD enabled. LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES is not completely compatible with export_executable_symbols as the later will be ignored if the previous is set to NO. Fix the issue by passing if symbols need to be exported to llvm_add_exectuable so the link flag can be determined directly without calling export_executable_symbols_* later.
1 parent 9f1932b commit 583f7a8

File tree

43 files changed

+33
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+33
-88
lines changed

clang/unittests/Interpreter/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ add_clang_unittest(ClangReplInterpreterTests
1313
InterpreterTest.cpp
1414
InterpreterExtensionsTest.cpp
1515
CodeCompletionTest.cpp
16+
17+
EXPORT_SYMBOLS
1618
)
1719
target_link_libraries(ClangReplInterpreterTests PUBLIC
1820
clangAST
@@ -28,8 +30,6 @@ if(NOT WIN32)
2830
add_subdirectory(ExceptionTests)
2931
endif()
3032

31-
export_executable_symbols(ClangReplInterpreterTests)
32-
3333
if(MSVC)
3434
set_target_properties(ClangReplInterpreterTests PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1)
3535

clang/unittests/Interpreter/ExceptionTests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ set(LLVM_LINK_COMPONENTS
1212

1313
add_clang_unittest(ClangReplInterpreterExceptionTests
1414
InterpreterExceptionTest.cpp
15+
16+
EXPORT_SYMBOLS
1517
)
1618

1719
llvm_update_compile_flags(ClangReplInterpreterExceptionTests)
@@ -22,5 +24,3 @@ target_link_libraries(ClangReplInterpreterExceptionTests PUBLIC
2224
clangFrontend
2325
)
2426
add_dependencies(ClangReplInterpreterExceptionTests clang-resource-headers)
25-
26-
export_executable_symbols(ClangReplInterpreterExceptionTests)

llvm/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
12121212
endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
12131213

12141214
# Make sure we don't get -rdynamic in every binary. For those that need it,
1215-
# use export_executable_symbols(target).
1215+
# use EXPORT_SYMBOLS argument.
12161216
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
12171217

12181218
include(AddLLVM)
@@ -1253,7 +1253,7 @@ if( LLVM_INCLUDE_UTILS )
12531253
if( LLVM_INCLUDE_TESTS )
12541254
set(LLVM_SUBPROJECT_TITLE "Third-Party/Google Test")
12551255
add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
1256-
set(LLVM_SUBPROJECT_TITLE)
1256+
set(LLVM_SUBPROJECT_TITLE)
12571257
endif()
12581258
else()
12591259
if ( LLVM_INCLUDE_TESTS )

llvm/cmake/modules/AddLLVM.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ endmacro()
10161016

10171017
macro(add_llvm_executable name)
10181018
cmake_parse_arguments(ARG
1019-
"DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH;SUPPORT_PLUGINS"
1019+
"DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH;SUPPORT_PLUGINS;EXPORT_SYMBOLS"
10201020
"ENTITLEMENTS;BUNDLE_PATH"
10211021
""
10221022
${ARGN})
@@ -1076,7 +1076,8 @@ macro(add_llvm_executable name)
10761076
endif(LLVM_EXPORTED_SYMBOL_FILE)
10771077

10781078
if (DEFINED LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND
1079-
NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES)
1079+
NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND
1080+
NOT ARG_EXPORT_SYMBOLS)
10801081
if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS)
10811082
set_property(TARGET ${name} APPEND_STRING PROPERTY
10821083
LINK_FLAGS " -Wl,-no_exported_symbols")
@@ -1117,6 +1118,10 @@ macro(add_llvm_executable name)
11171118
endif()
11181119

11191120
llvm_codesign(${name} ENTITLEMENTS ${ARG_ENTITLEMENTS} BUNDLE_PATH ${ARG_BUNDLE_PATH})
1121+
1122+
if (ARG_EXPORT_SYMBOLS)
1123+
export_executable_symbols(${name})
1124+
endif()
11201125
endmacro(add_llvm_executable name)
11211126

11221127
# add_llvm_pass_plugin(name [NO_MODULE] ...)
@@ -1469,7 +1474,7 @@ macro(add_llvm_example name)
14691474
if( NOT LLVM_BUILD_EXAMPLES )
14701475
set(EXCLUDE_FROM_ALL ON)
14711476
endif()
1472-
add_llvm_executable(${name} ${ARGN})
1477+
add_llvm_executable(${name} EXPORT_SYMBOLS ${ARGN})
14731478
if( LLVM_BUILD_EXAMPLES )
14741479
install(TARGETS ${name} RUNTIME DESTINATION "${LLVM_EXAMPLES_INSTALL_DIR}")
14751480
endif()

llvm/examples/ExceptionDemo/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ endif()
1616

1717
add_llvm_example(ExceptionDemo
1818
ExceptionDemo.cpp
19-
)
2019

21-
export_executable_symbols(ExceptionDemo)
20+
EXPORT_SYMBOLS
21+
)

llvm/examples/HowToUseLLJIT/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ set(LLVM_LINK_COMPONENTS
77

88
add_llvm_example(HowToUseLLJIT
99
HowToUseLLJIT.cpp
10-
)
1110

12-
export_executable_symbols(HowToUseLLJIT)
11+
EXPORT_SYMBOLS
12+
)

llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
1414
add_kaleidoscope_chapter(BuildingAJIT-Ch1
1515
toy.cpp
1616
)
17-
18-
export_executable_symbols(BuildingAJIT-Ch1)

llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
1414
add_kaleidoscope_chapter(BuildingAJIT-Ch2
1515
toy.cpp
1616
)
17-
18-
export_executable_symbols(BuildingAJIT-Ch2)

llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
1515
add_kaleidoscope_chapter(BuildingAJIT-Ch3
1616
toy.cpp
1717
)
18-
19-
export_executable_symbols(BuildingAJIT-Ch3)

llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
1515
add_kaleidoscope_chapter(BuildingAJIT-Ch4
1616
toy.cpp
1717
)
18-
19-
export_executable_symbols(BuildingAJIT-Ch4)

llvm/examples/Kaleidoscope/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set_target_properties(Kaleidoscope PROPERTIES FOLDER "LLVM/Examples")
33

44
macro(add_kaleidoscope_chapter name)
55
add_dependencies(Kaleidoscope ${name})
6-
add_llvm_example(${name} ${ARGN})
6+
add_llvm_example(${name} EXPORT_SYMBOLS ${ARGN})
77
endmacro(add_kaleidoscope_chapter name)
88

99
add_subdirectory(BuildingAJIT)

llvm/examples/Kaleidoscope/Chapter4/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
1515
add_kaleidoscope_chapter(Kaleidoscope-Ch4
1616
toy.cpp
1717
)
18-
19-
export_executable_symbols(Kaleidoscope-Ch4)

llvm/examples/Kaleidoscope/Chapter5/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
1515
add_kaleidoscope_chapter(Kaleidoscope-Ch5
1616
toy.cpp
1717
)
18-
19-
export_executable_symbols(Kaleidoscope-Ch5)

llvm/examples/Kaleidoscope/Chapter6/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
1515
add_kaleidoscope_chapter(Kaleidoscope-Ch6
1616
toy.cpp
1717
)
18-
19-
export_executable_symbols(Kaleidoscope-Ch6)

llvm/examples/Kaleidoscope/Chapter7/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@ set(LLVM_LINK_COMPONENTS
1616
add_kaleidoscope_chapter(Kaleidoscope-Ch7
1717
toy.cpp
1818
)
19-
20-
export_executable_symbols(Kaleidoscope-Ch7)

llvm/examples/Kaleidoscope/Chapter8/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ set(LLVM_LINK_COMPONENTS
55
add_kaleidoscope_chapter(Kaleidoscope-Ch8
66
toy.cpp
77
)
8-
9-
export_executable_symbols(Kaleidoscope-Ch8)

llvm/examples/Kaleidoscope/Chapter9/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
1111
add_kaleidoscope_chapter(Kaleidoscope-Ch9
1212
toy.cpp
1313
)
14-
15-
export_executable_symbols(Kaleidoscope-Ch9)

llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
1111
add_llvm_example(LLJITDumpObjects
1212
LLJITDumpObjects.cpp
1313
)
14-
15-
export_executable_symbols(LLJITDumpObjects)

llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
1212
add_llvm_example(LLJITRemovableCode
1313
LLJITRemovableCode.cpp
1414
)
15-
16-
export_executable_symbols(LLJITRemovableCode)

llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
1010
add_llvm_example(LLJITWithCustomObjectLinkingLayer
1111
LLJITWithCustomObjectLinkingLayer.cpp
1212
)
13-
14-
export_executable_symbols(LLJITWithCustomObjectLinkingLayer)

llvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
1010
add_llvm_example(LLJITWithExecutorProcessControl
1111
LLJITWithExecutorProcessControl.cpp
1212
)
13-
14-
export_executable_symbols(LLJITWithExecutorProcessControl)

llvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,3 @@ set(LLVM_LINK_COMPONENTS
1212
add_llvm_example(LLJITWithGDBRegistrationListener
1313
LLJITWithGDBRegistrationListener.cpp
1414
)
15-
16-
# We want JIT'd code to be able to link against process symbols like printf
17-
# for this example, so make sure they're exported.
18-
export_executable_symbols(LLJITWithGDBRegistrationListener)

llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
1111
add_llvm_example(LLJITWithInitializers
1212
LLJITWithInitializers.cpp
1313
)
14-
15-
export_executable_symbols(LLJITWithInitializers)

llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
1010
add_llvm_example(LLJITWithLazyReexports
1111
LLJITWithLazyReexports.cpp
1212
)
13-
14-
export_executable_symbols(LLJITWithLazyReexports)

llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
1010
add_llvm_example(LLJITWithObjectCache
1111
LLJITWithObjectCache.cpp
1212
)
13-
14-
export_executable_symbols(LLJITWithObjectCache)

llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
1010
add_llvm_example(LLJITWithObjectLinkingLayerPlugin
1111
LLJITWithObjectLinkingLayerPlugin.cpp
1212
)
13-
14-
export_executable_symbols(LLJITWithObjectLinkingLayerPlugin)

llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
1212
add_llvm_example(LLJITWithOptimizingIRTransform
1313
LLJITWithOptimizingIRTransform.cpp
1414
)
15-
16-
export_executable_symbols(LLJITWithOptimizingIRTransform)

llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ if (LLVM_INCLUDE_UTILS)
2020
DEPENDS
2121
llvm-jitlink-executor
2222
)
23-
24-
export_executable_symbols(LLJITWithRemoteDebugging)
2523
endif()

llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
1212
add_llvm_example(LLJITWithThinLTOSummaries
1313
LLJITWithThinLTOSummaries.cpp
1414
)
15-
16-
export_executable_symbols(LLJITWithThinLTOSummaries)

llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsAddObjectFile
1414
OrcV2CBindingsAddObjectFile.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsAddObjectFile)

llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsBasicUsage
1414
OrcV2CBindingsBasicUsage.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsBasicUsage)

llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsDumpObjects
1414
OrcV2CBindingsDumpObjects.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsDumpObjects)

llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
1414
add_llvm_example(OrcV2CBindingsIRTransforms
1515
OrcV2CBindingsIRTransforms.c
1616
)
17-
18-
export_executable_symbols(OrcV2CBindingsIRTransforms)

llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsLazy
1414
OrcV2CBindingsLazy.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsLazy)

llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsRemovableCode
1414
OrcV2CBindingsRemovableCode.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsRemovableCode)

llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
1313
add_llvm_example(OrcV2CBindingsVeryLazy
1414
OrcV2CBindingsVeryLazy.c
1515
)
16-
17-
export_executable_symbols(OrcV2CBindingsVeryLazy)

llvm/tools/lli/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ add_llvm_tool(lli
5656

5757
DEPENDS
5858
intrinsics_gen
59-
)
6059

61-
export_executable_symbols(lli)
60+
EXPORT_SYMBOLS
61+
)

llvm/tools/lli/ChildTarget/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ add_llvm_utility(lli-child-target
1010

1111
DEPENDS
1212
intrinsics_gen
13-
)
1413

15-
export_executable_symbols(lli-child-target)
14+
EXPORT_SYMBOLS
15+
)

llvm/tools/llvm-jitlink/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ add_llvm_tool(llvm-jitlink
2626
llvm-jitlink-elf.cpp
2727
llvm-jitlink-macho.cpp
2828
llvm-jitlink-statistics.cpp
29+
30+
EXPORT_SYMBOLS
2931
)
3032

3133
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
@@ -35,5 +37,3 @@ endif()
3537
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
3638
target_link_libraries(llvm-jitlink PRIVATE socket)
3739
endif()
38-
39-
export_executable_symbols(llvm-jitlink)

llvm/tools/llvm-jitlink/llvm-jitlink-executor/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ add_llvm_utility(llvm-jitlink-executor
99

1010
DEPENDS
1111
intrinsics_gen
12-
)
1312

14-
export_executable_symbols(llvm-jitlink-executor)
13+
EXPORT_SYMBOLS
14+
)

llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ add_llvm_unittest(OrcJITTests
4343
TaskDispatchTest.cpp
4444
ThreadSafeModuleTest.cpp
4545
WrapperFunctionUtilsTest.cpp
46+
47+
EXPORT_SYMBOLS
4648
)
4749

4850
target_link_libraries(OrcJITTests PRIVATE
4951
LLVMTestingSupport
5052
${ORC_JIT_TEST_LIBS})
51-
52-
export_executable_symbols(OrcJITTests)

llvm/unittests/Support/DynamicLibrary/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function(dynlib_add_module NAME)
3838
)
3939

4040
add_dependencies(DynamicLibraryTests ${NAME})
41-
41+
4242
if(LLVM_INTEGRATED_CRT_ALLOC)
4343
# We need to link in the Support lib for the Memory allocator override,
4444
# otherwise the DynamicLibrary.Shutdown test will fail, because it would
@@ -48,7 +48,7 @@ function(dynlib_add_module NAME)
4848
llvm_map_components_to_libnames(llvm_libs Support)
4949
target_link_libraries(${NAME} ${llvm_libs} "-INCLUDE:malloc")
5050
endif()
51-
51+
5252
endfunction(dynlib_add_module)
5353

5454
# Revert -Wl,-z,nodelete on this test since it relies on the file

mlir/tools/mlir-cpu-runner/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ set(LLVM_LINK_COMPONENTS
77

88
add_mlir_tool(mlir-cpu-runner
99
mlir-cpu-runner.cpp
10+
11+
EXPORT_SYMBOLS
1012
)
1113
llvm_update_compile_flags(mlir-cpu-runner)
1214
target_link_libraries(mlir-cpu-runner PRIVATE
@@ -22,5 +24,3 @@ target_link_libraries(mlir-cpu-runner PRIVATE
2224
MLIRTargetLLVMIRExport
2325
MLIRSupport
2426
)
25-
26-
export_executable_symbols(mlir-cpu-runner)

0 commit comments

Comments
 (0)