mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Make sure to include -fno-rtti in LLVM_CXXFLAGS.
This commit is contained in:
@@ -95,6 +95,14 @@ else()
|
||||
llvm_set(LIBRARY_DIRS libdir)
|
||||
llvm_set_libs(LIBRARIES libfiles "${LLVM_LIBRARY_DIRS}/")
|
||||
llvm_set(ROOT_DIR prefix)
|
||||
|
||||
# On CMake builds of LLVM, the output of llvm-config --cxxflags does not
|
||||
# include -fno-rtti, leading to linker errors. Be sure to add it.
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
|
||||
if(NOT ${LLVM_CXXFLAGS} MATCHES "-fno-rtti")
|
||||
set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -fno-rtti")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
string(REGEX REPLACE "([0-9]+).*" "\\1" LLVM_VERSION_MAJOR "${LLVM_VERSION_STRING}" )
|
||||
|
||||
Reference in New Issue
Block a user