Reapply "[CMake] Fold export_executable_symbols_* into function args. (#101741)" (#102138)

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.
This commit is contained in:
Steven Wu 2024-08-07 09:12:15 -07:00 committed by GitHub
parent e4e96b3e26
commit 01b488faab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
58 changed files with 70 additions and 125 deletions

View File

@ -33,6 +33,7 @@ clang_target_link_libraries(clangTidyMain
# Support plugins.
if(CLANG_PLUGIN_SUPPORT)
set(support_plugins SUPPORT_PLUGINS)
set(export_symbols EXPORT_SYMBOLS_FOR_PLUGINS)
endif()
add_clang_tool(clang-tidy
@ -41,6 +42,7 @@ add_clang_tool(clang-tidy
DEPENDS
clang-resource-headers
${support_plugins}
${export_symbols}
)
clang_target_link_libraries(clang-tidy
PRIVATE
@ -57,10 +59,6 @@ target_link_libraries(clang-tidy
${ALL_CLANG_TIDY_CHECKS}
)
if(CLANG_PLUGIN_SUPPORT)
export_executable_symbols_for_plugins(clang-tidy)
endif()
install(PROGRAMS clang-tidy-diff.py
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang"
COMPONENT clang-tidy)

View File

@ -160,7 +160,7 @@ macro(add_clang_tool name)
AND (NOT LLVM_DISTRIBUTION_COMPONENTS OR ${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS)
)
set(get_obj_args ${ARGN})
list(FILTER get_obj_args EXCLUDE REGEX "^SUPPORT_PLUGINS$")
list(FILTER get_obj_args EXCLUDE REGEX "^(SUPPORT_PLUGINS|EXPORT_SYMBOLS_FOR_PLUGINS)$")
generate_llvm_objects(${name} ${get_obj_args})
add_custom_target(${name} DEPENDS llvm-driver clang-resource-headers)
else()

View File

@ -31,6 +31,7 @@ add_clang_tool(clang-linker-wrapper
DEPENDS
${tablegen_deps}
EXPORT_SYMBOLS_FOR_PLUGINS
)
set(CLANG_LINKER_WRAPPER_LIB_DEPS
@ -41,5 +42,3 @@ target_link_libraries(clang-linker-wrapper
PRIVATE
${CLANG_LINKER_WRAPPER_LIB_DEPS}
)
export_executable_symbols_for_plugins(clang-linker-wrapper)

View File

@ -9,6 +9,8 @@ set( LLVM_LINK_COMPONENTS
add_clang_tool(clang-repl
ClangRepl.cpp
EXPORT_SYMBOLS_FOR_PLUGINS
)
if(MSVC)
@ -61,8 +63,6 @@ clang_target_link_libraries(clang-repl PRIVATE
clangInterpreter
)
export_executable_symbols_for_plugins(clang-repl)
# The clang-repl binary can get huge with static linking in debug mode.
# Some 32-bit targets use PLT slots with limited branch range by default and we
# start to exceed this limit, e.g. when linking for arm-linux-gnueabihf with

View File

@ -21,6 +21,7 @@ set( LLVM_LINK_COMPONENTS
# Support plugins.
if(CLANG_PLUGIN_SUPPORT)
set(support_plugins SUPPORT_PLUGINS)
set(export_symbols EXPORT_SYMBOLS_FOR_PLUGINS)
endif()
add_clang_tool(clang
@ -35,6 +36,7 @@ add_clang_tool(clang
ARMTargetParserTableGen
AArch64TargetParserTableGen
${support_plugins}
${export_symbols}
GENERATE_DRIVER
)
@ -54,11 +56,6 @@ else()
set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION})
endif()
# Support plugins.
if(CLANG_PLUGIN_SUPPORT)
export_executable_symbols_for_plugins(clang)
endif()
add_dependencies(clang clang-resource-headers)
if(NOT CLANG_LINKS_TO_CREATE)

View File

@ -13,6 +13,8 @@ add_clang_unittest(ClangReplInterpreterTests
InterpreterTest.cpp
InterpreterExtensionsTest.cpp
CodeCompletionTest.cpp
EXPORT_SYMBOLS
)
target_link_libraries(ClangReplInterpreterTests PUBLIC
clangAST
@ -28,8 +30,6 @@ if(NOT WIN32)
add_subdirectory(ExceptionTests)
endif()
export_executable_symbols(ClangReplInterpreterTests)
if(MSVC)
set_target_properties(ClangReplInterpreterTests PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1)

View File

@ -12,6 +12,8 @@ set(LLVM_LINK_COMPONENTS
add_clang_unittest(ClangReplInterpreterExceptionTests
InterpreterExceptionTest.cpp
EXPORT_SYMBOLS
)
llvm_update_compile_flags(ClangReplInterpreterExceptionTests)
@ -22,5 +24,3 @@ target_link_libraries(ClangReplInterpreterExceptionTests PUBLIC
clangFrontend
)
add_dependencies(ClangReplInterpreterExceptionTests clang-resource-headers)
export_executable_symbols(ClangReplInterpreterExceptionTests)

View File

@ -11,9 +11,18 @@ set( LLVM_LINK_COMPONENTS
TargetParser
)
option(FLANG_PLUGIN_SUPPORT "Build Flang with plugin support." ON)
# Enable support for plugins, which need access to symbols from flang-new
if(FLANG_PLUGIN_SUPPORT)
set(export_symbols EXPORT_SYMBOLS_FOR_PLUGINS)
endif()
add_flang_tool(flang-new
driver.cpp
fc1_main.cpp
${export_symbols}
)
target_link_libraries(flang-new
@ -28,11 +37,4 @@ clang_target_link_libraries(flang-new
clangBasic
)
option(FLANG_PLUGIN_SUPPORT "Build Flang with plugin support." ON)
# Enable support for plugins, which need access to symbols from flang-new
if(FLANG_PLUGIN_SUPPORT)
export_executable_symbols_for_plugins(flang-new)
endif()
install(TARGETS flang-new DESTINATION "${CMAKE_INSTALL_BINDIR}")

View File

@ -44,7 +44,7 @@ macro(add_lld_tool name)
AND (NOT LLVM_DISTRIBUTION_COMPONENTS OR ${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS)
)
set(get_obj_args ${ARGN})
list(FILTER get_obj_args EXCLUDE REGEX "^SUPPORT_PLUGINS$")
list(FILTER get_obj_args EXCLUDE REGEX "^(SUPPORT_PLUGINS|EXPORT_SYMBOLS_FOR_PLUGINS)$")
generate_llvm_objects(${name} ${get_obj_args})
add_custom_target(${name} DEPENDS llvm-driver)
else()

View File

@ -8,8 +8,8 @@ add_lld_tool(lld
SUPPORT_PLUGINS
GENERATE_DRIVER
EXPORT_SYMBOLS_FOR_PLUGINS
)
export_executable_symbols_for_plugins(lld)
function(lld_target_link_libraries target type)
if (TARGET obj.${target})

View File

@ -1197,7 +1197,7 @@ if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
# Make sure we don't get -rdynamic in every binary. For those that need it,
# use export_executable_symbols(target).
# use EXPORT_SYMBOLS argument.
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
include(AddLLVM)
@ -1238,7 +1238,7 @@ if( LLVM_INCLUDE_UTILS )
if( LLVM_INCLUDE_TESTS )
set(LLVM_SUBPROJECT_TITLE "Third-Party/Google Test")
add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
set(LLVM_SUBPROJECT_TITLE)
set(LLVM_SUBPROJECT_TITLE)
endif()
else()
if ( LLVM_INCLUDE_TESTS )

View File

@ -1010,7 +1010,7 @@ endmacro()
macro(add_llvm_executable name)
cmake_parse_arguments(ARG
"DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH;SUPPORT_PLUGINS"
"DISABLE_LLVM_LINK_LLVM_DYLIB;IGNORE_EXTERNALIZE_DEBUGINFO;NO_INSTALL_RPATH;SUPPORT_PLUGINS;EXPORT_SYMBOLS;EXPORT_SYMBOLS_FOR_PLUGINS"
"ENTITLEMENTS;BUNDLE_PATH"
""
${ARGN})
@ -1070,7 +1070,8 @@ macro(add_llvm_executable name)
endif(LLVM_EXPORTED_SYMBOL_FILE)
if (DEFINED LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND
NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES)
NOT LLVM_ENABLE_EXPORTED_SYMBOLS_IN_EXECUTABLES AND
NOT ARG_EXPORT_SYMBOLS AND NOT ARG_EXPORT_SYMBOLS_FOR_PLUGINS)
if(LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS)
set_property(TARGET ${name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-no_exported_symbols")
@ -1080,6 +1081,12 @@ macro(add_llvm_executable name)
endif()
endif()
if (ARG_EXPORT_SYMBOLS)
export_executable_symbols(${name})
elseif(ARG_EXPORT_SYMBOLS_FOR_PLUGINS)
export_executable_symbols_for_plugins(${name})
endif()
if (LLVM_LINK_LLVM_DYLIB AND NOT ARG_DISABLE_LLVM_LINK_LLVM_DYLIB)
set(USE_SHARED USE_SHARED)
endif()
@ -1464,7 +1471,7 @@ macro(add_llvm_example name)
if( NOT LLVM_BUILD_EXAMPLES )
set(EXCLUDE_FROM_ALL ON)
endif()
add_llvm_executable(${name} ${ARGN})
add_llvm_executable(${name} EXPORT_SYMBOLS ${ARGN})
if( LLVM_BUILD_EXAMPLES )
install(TARGETS ${name} RUNTIME DESTINATION "${LLVM_EXAMPLES_INSTALL_DIR}")
endif()

View File

@ -16,6 +16,6 @@ endif()
add_llvm_example(ExceptionDemo
ExceptionDemo.cpp
)
export_executable_symbols(ExceptionDemo)
EXPORT_SYMBOLS
)

View File

@ -7,6 +7,6 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(HowToUseLLJIT
HowToUseLLJIT.cpp
)
export_executable_symbols(HowToUseLLJIT)
EXPORT_SYMBOLS
)

View File

@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(BuildingAJIT-Ch1
toy.cpp
)
export_executable_symbols(BuildingAJIT-Ch1)

View File

@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(BuildingAJIT-Ch2
toy.cpp
)
export_executable_symbols(BuildingAJIT-Ch2)

View File

@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(BuildingAJIT-Ch3
toy.cpp
)
export_executable_symbols(BuildingAJIT-Ch3)

View File

@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(BuildingAJIT-Ch4
toy.cpp
)
export_executable_symbols(BuildingAJIT-Ch4)

View File

@ -3,7 +3,7 @@ set_target_properties(Kaleidoscope PROPERTIES FOLDER "LLVM/Examples")
macro(add_kaleidoscope_chapter name)
add_dependencies(Kaleidoscope ${name})
add_llvm_example(${name} ${ARGN})
add_llvm_example(${name} EXPORT_SYMBOLS ${ARGN})
endmacro(add_kaleidoscope_chapter name)
add_subdirectory(BuildingAJIT)

View File

@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch4
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch4)

View File

@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch5
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch5)

View File

@ -15,5 +15,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch6
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch6)

View File

@ -16,5 +16,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch7
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch7)

View File

@ -5,5 +5,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch8
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch8)

View File

@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
add_kaleidoscope_chapter(Kaleidoscope-Ch9
toy.cpp
)
export_executable_symbols(Kaleidoscope-Ch9)

View File

@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITDumpObjects
LLJITDumpObjects.cpp
)
export_executable_symbols(LLJITDumpObjects)

View File

@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITRemovableCode
LLJITRemovableCode.cpp
)
export_executable_symbols(LLJITRemovableCode)

View File

@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithCustomObjectLinkingLayer
LLJITWithCustomObjectLinkingLayer.cpp
)
export_executable_symbols(LLJITWithCustomObjectLinkingLayer)

View File

@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithExecutorProcessControl
LLJITWithExecutorProcessControl.cpp
)
export_executable_symbols(LLJITWithExecutorProcessControl)

View File

@ -12,7 +12,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithGDBRegistrationListener
LLJITWithGDBRegistrationListener.cpp
)
# We want JIT'd code to be able to link against process symbols like printf
# for this example, so make sure they're exported.
export_executable_symbols(LLJITWithGDBRegistrationListener)

View File

@ -11,5 +11,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithInitializers
LLJITWithInitializers.cpp
)
export_executable_symbols(LLJITWithInitializers)

View File

@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithLazyReexports
LLJITWithLazyReexports.cpp
)
export_executable_symbols(LLJITWithLazyReexports)

View File

@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithObjectCache
LLJITWithObjectCache.cpp
)
export_executable_symbols(LLJITWithObjectCache)

View File

@ -10,5 +10,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithObjectLinkingLayerPlugin
LLJITWithObjectLinkingLayerPlugin.cpp
)
export_executable_symbols(LLJITWithObjectLinkingLayerPlugin)

View File

@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithOptimizingIRTransform
LLJITWithOptimizingIRTransform.cpp
)
export_executable_symbols(LLJITWithOptimizingIRTransform)

View File

@ -20,6 +20,4 @@ if (LLVM_INCLUDE_UTILS)
DEPENDS
llvm-jitlink-executor
)
export_executable_symbols(LLJITWithRemoteDebugging)
endif()

View File

@ -12,5 +12,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithThinLTOSummaries
LLJITWithThinLTOSummaries.cpp
)
export_executable_symbols(LLJITWithThinLTOSummaries)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsAddObjectFile
OrcV2CBindingsAddObjectFile.c
)
export_executable_symbols(OrcV2CBindingsAddObjectFile)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsBasicUsage
OrcV2CBindingsBasicUsage.c
)
export_executable_symbols(OrcV2CBindingsBasicUsage)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsDumpObjects
OrcV2CBindingsDumpObjects.c
)
export_executable_symbols(OrcV2CBindingsDumpObjects)

View File

@ -14,5 +14,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsIRTransforms
OrcV2CBindingsIRTransforms.c
)
export_executable_symbols(OrcV2CBindingsIRTransforms)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsLazy
OrcV2CBindingsLazy.c
)
export_executable_symbols(OrcV2CBindingsLazy)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsRemovableCode
OrcV2CBindingsRemovableCode.c
)
export_executable_symbols(OrcV2CBindingsRemovableCode)

View File

@ -13,5 +13,3 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsVeryLazy
OrcV2CBindingsVeryLazy.c
)
export_executable_symbols(OrcV2CBindingsVeryLazy)

View File

@ -37,5 +37,5 @@ add_llvm_tool(bugpoint
DEPENDS
intrinsics_gen
SUPPORT_PLUGINS
EXPORT_SYMBOLS_FOR_PLUGINS
)
export_executable_symbols_for_plugins(bugpoint)

View File

@ -30,6 +30,5 @@ add_llvm_tool(llc
DEPENDS
intrinsics_gen
SUPPORT_PLUGINS
EXPORT_SYMBOLS_FOR_PLUGINS
)
export_executable_symbols_for_plugins(llc)

View File

@ -56,6 +56,6 @@ add_llvm_tool(lli
DEPENDS
intrinsics_gen
)
export_executable_symbols(lli)
EXPORT_SYMBOLS
)

View File

@ -10,6 +10,6 @@ add_llvm_utility(lli-child-target
DEPENDS
intrinsics_gen
)
export_executable_symbols(lli-child-target)
EXPORT_SYMBOLS
)

View File

@ -26,6 +26,8 @@ add_llvm_tool(llvm-jitlink
llvm-jitlink-elf.cpp
llvm-jitlink-macho.cpp
llvm-jitlink-statistics.cpp
EXPORT_SYMBOLS
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
@ -35,5 +37,3 @@ endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket)
endif()
export_executable_symbols(llvm-jitlink)

View File

@ -9,6 +9,6 @@ add_llvm_utility(llvm-jitlink-executor
DEPENDS
intrinsics_gen
)
export_executable_symbols(llvm-jitlink-executor)
EXPORT_SYMBOLS
)

View File

@ -21,5 +21,6 @@ add_llvm_tool(llvm-lto2
DEPENDS
intrinsics_gen
EXPORT_SYMBOLS_FOR_PLUGINS
)
export_executable_symbols_for_plugins(llvm-lto2)

View File

@ -45,8 +45,7 @@ add_llvm_tool(opt
DEPENDS
intrinsics_gen
SUPPORT_PLUGINS
EXPORT_SYMBOLS_FOR_PLUGINS
)
target_link_libraries(opt PRIVATE LLVMOptDriver)
export_executable_symbols_for_plugins(opt)

View File

@ -62,8 +62,14 @@ else()
LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
endif()
# Export symbols from the plugins shared objects.
if(NOT WIN32)
set(export_symbols EXPORT_SYMBOLS_FOR_PLUGINS)
endif()
add_llvm_unittest_with_input_files(AnalysisTests
${ANALYSIS_TEST_SOURCES}
${export_symbols}
)
add_dependencies(AnalysisTests intrinsics_gen)
@ -76,10 +82,5 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
endif()
# Export symbols from the plugins shared objects.
if(NOT WIN32)
export_executable_symbols_for_plugins(AnalysisTests)
endif()
add_subdirectory(InlineAdvisorPlugin)
add_subdirectory(InlineOrderPlugin)

View File

@ -43,10 +43,10 @@ add_llvm_unittest(OrcJITTests
TaskDispatchTest.cpp
ThreadSafeModuleTest.cpp
WrapperFunctionUtilsTest.cpp
EXPORT_SYMBOLS
)
target_link_libraries(OrcJITTests PRIVATE
LLVMTestingSupport
${ORC_JIT_TEST_LIBS})
export_executable_symbols(OrcJITTests)

View File

@ -6,8 +6,9 @@ if (NOT WIN32 AND NOT CYGWIN)
set(LLVM_LINK_COMPONENTS Support Passes Core AsmParser)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
EXPORT_SYMBOLS_FOR_PLUGINS
)
export_executable_symbols_for_plugins(PluginsTests)
target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
unset(LLVM_LINK_COMPONENTS)

View File

@ -17,9 +17,10 @@ set_output_directory(DynamicLibraryLib
add_llvm_unittest(DynamicLibraryTests
DynamicLibraryTest.cpp
EXPORT_SYMBOLS
)
target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib)
export_executable_symbols(DynamicLibraryTests)
function(dynlib_add_module NAME)
add_library(${NAME} MODULE
@ -38,7 +39,7 @@ function(dynlib_add_module NAME)
)
add_dependencies(DynamicLibraryTests ${NAME})
if(LLVM_INTEGRATED_CRT_ALLOC)
# We need to link in the Support lib for the Memory allocator override,
# otherwise the DynamicLibrary.Shutdown test will fail, because it would
@ -48,7 +49,7 @@ function(dynlib_add_module NAME)
llvm_map_components_to_libnames(llvm_libs Support)
target_link_libraries(${NAME} ${llvm_libs} "-INCLUDE:malloc")
endif()
endfunction(dynlib_add_module)
# Revert -Wl,-z,nodelete on this test since it relies on the file

View File

@ -7,6 +7,8 @@ set(LLVM_LINK_COMPONENTS
add_mlir_tool(mlir-cpu-runner
mlir-cpu-runner.cpp
EXPORT_SYMBOLS
)
llvm_update_compile_flags(mlir-cpu-runner)
target_link_libraries(mlir-cpu-runner PRIVATE
@ -22,5 +24,3 @@ target_link_libraries(mlir-cpu-runner PRIVATE
MLIRTargetLLVMIRExport
MLIRSupport
)
export_executable_symbols(mlir-cpu-runner)

View File

@ -102,9 +102,9 @@ add_mlir_tool(mlir-opt
DEPENDS
${LIBS}
SUPPORT_PLUGINS
EXPORT_SYMBOLS_FOR_PLUGINS
)
target_link_libraries(mlir-opt PRIVATE ${LIBS})
llvm_update_compile_flags(mlir-opt)
mlir_check_all_link_libraries(mlir-opt)
export_executable_symbols_for_plugins(mlir-opt)