set(update_src_props ON)
endif()
- if(LLVM_REQUIRES_EH)
- set(LLVM_REQUIRES_RTTI ON)
+ # LLVM_REQUIRES_EH is an internal flag that individual
+ # targets can use to force EH
+ if(LLVM_REQUIRES_EH OR LLVM_ENABLE_EH)
+ if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
+ message(AUTHOR_WARNING "Exception handling requires RTTI. Enabling RTTI for ${name}")
+ set(LLVM_REQUIRES_RTTI ON)
+ endif()
else()
if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND LLVM_COMPILE_FLAGS "-fno-exceptions")
endif()
endif()
- if(NOT LLVM_REQUIRES_RTTI)
+ # LLVM_REQUIRES_RTTI is an internal flag that individual
+ # targets can use to force RTTI
+ if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND LLVM_COMPILE_FLAGS "-fno-rtti")
endif()
if(ARG_MODULE OR ARG_SHARED)
+ # Do not add -Dname_EXPORTS to the command-line when building files in this
+ # target. Doing so is actively harmful for the modules build because it
+ # creates extra module variants, and not useful because we don't use these
+ # macros.
+ set_target_properties( ${name} PROPERTIES DEFINE_SYMBOL "" )
+
if (LLVM_EXPORTED_SYMBOL_FILE)
add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
endif()
llvm_update_compile_flags(${name})
add_dead_strip( ${name} )
+ # Do not add -Dname_EXPORTS to the command-line when building files in this
+ # target. Doing so is actively harmful for the modules build because it
+ # creates extra module variants, and not useful because we don't use these
+ # macros.
+ set_target_properties( ${name} PROPERTIES DEFINE_SYMBOL "" )
+
if (LLVM_EXPORTED_SYMBOL_FILE)
add_llvm_symbol_exports( ${name} ${LLVM_EXPORTED_SYMBOL_FILE} )
endif(LLVM_EXPORTED_SYMBOL_FILE)
set(HOST_OS ${CMAKE_SYSTEM_NAME})
set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})
- if (CLANG_ENABLE_ARCMT)
- set(ENABLE_CLANG_ARCMT "1")
- else()
- set(ENABLE_CLANG_ARCMT "0")
- endif()
- if (CLANG_ENABLE_REWRITER)
- set(ENABLE_CLANG_REWRITER "1")
- else()
- set(ENABLE_CLANG_REWRITER "0")
- endif()
- if (CLANG_ENABLE_STATIC_ANALYZER)
- set(ENABLE_CLANG_STATIC_ANALYZER "1")
- else()
- set(ENABLE_CLANG_STATIC_ANALYZER "0")
- endif()
-
configure_file(${input} ${output} @ONLY)
endfunction()