[CMake][NFC] Don't use uninitialized LLVM_REQUIRES_* (#175554)
LLVM_REQUIRES_* are per-target flags that are never set globally. Yet, some files used these (undefined) flags for some logic. This patch emoves these dead checks/unconditionally executes the logic. Note that the referenced *.exports files are empty, so there is no need to make related logic conditional on MSVC.
This commit is contained in:
parent
a698f7ebdf
commit
98640226ba
@ -1,13 +1,5 @@
|
||||
# If we don't need RTTI or EH, there's no reason to export anything
|
||||
# from the plugin.
|
||||
if(NOT MSVC) # MSVC mangles symbols differently, and
|
||||
# PrintLLVMFunctionNames.export contains C++ symbols.
|
||||
if(NOT LLVM_REQUIRES_RTTI)
|
||||
if(NOT LLVM_REQUIRES_EH)
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LLVMPrintFunctionNames.exports)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# There's no reason to export anything from the plugin.
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LLVMPrintFunctionNames.exports)
|
||||
|
||||
add_llvm_library(LLVMPrintFunctionNames MODULE LLVMPrintFunctionNames.cpp PLUGIN_TOOL clang)
|
||||
|
||||
|
||||
@ -1,13 +1,5 @@
|
||||
# If we don't need RTTI or EH, there's no reason to export anything
|
||||
# from the plugin.
|
||||
if( NOT MSVC ) # MSVC mangles symbols differently, and
|
||||
# PrintFunctionNames.export contains C++ symbols.
|
||||
if( NOT LLVM_REQUIRES_RTTI )
|
||||
if( NOT LLVM_REQUIRES_EH )
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/PrintFunctionNames.exports)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# There's no reason to export anything from the plugin.
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/PrintFunctionNames.exports)
|
||||
|
||||
add_llvm_library(PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang)
|
||||
|
||||
|
||||
@ -2,13 +2,8 @@ if( NOT LLVM_BUILD_TOOLS )
|
||||
set(EXCLUDE_FROM_ALL ON)
|
||||
endif()
|
||||
|
||||
# If we don't need RTTI or EH, there's no reason to export anything
|
||||
# from this plugin.
|
||||
if( NOT LLVM_REQUIRES_RTTI )
|
||||
if( NOT LLVM_REQUIRES_EH )
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/bugpoint.exports)
|
||||
endif()
|
||||
endif()
|
||||
# There's no reason to export anything from the plugin.
|
||||
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/bugpoint.exports)
|
||||
|
||||
if(WIN32 OR CYGWIN OR ZOS)
|
||||
set(LLVM_LINK_COMPONENTS Core Support)
|
||||
|
||||
@ -3,7 +3,7 @@ add_library(MathTest STATIC
|
||||
|
||||
target_include_directories(MathTest PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include")
|
||||
|
||||
if(NOT LLVM_REQUIRES_RTTI)
|
||||
if(NOT LLVM_ENABLE_RTTI)
|
||||
target_compile_options(MathTest PUBLIC -fno-rtti)
|
||||
endif()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user