From 7674e4292fb837af86b2e88a4b70f72b4bf8a927 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Wed, 17 Oct 2012 20:36:47 +0200 Subject: [PATCH] =?UTF-8?q?Fixed=20GitHub=20#204=20=E2=80=93=20TableGen=20?= =?UTF-8?q?requires=20RTTI.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b319f6e7..aa5f5121 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -300,19 +300,28 @@ set_target_properties( ) target_link_libraries(${LDC_EXE} ${LDC_LIB} ${LIBCONFIG++_LIBRARY}) +# For use by the druntime/Phobos build system. +get_target_property(LDC_LOC ${LDC_EXE} LOCATION) + +# +# Intrinsics module generation tools. +# add_executable(gen_gccbuiltins utils/gen_gccbuiltins.cpp) + +# Prior to LLVM 3.2, TableGen still uses RTTI, contrary to the rest of LLVM. +# Thus, we have to remove the -fno-rtti flag from the llvm-config output. +string(REPLACE "-fno-rtti " "" TABLEGEN_CXXFLAGS ${LLVM_CXXFLAGS}) + set_target_properties( gen_gccbuiltins PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin - COMPILE_FLAGS "${LLVM_CXXFLAGS}" + COMPILE_FLAGS ${TABLEGEN_CXXFLAGS} ) target_link_libraries(gen_gccbuiltins "${LLVM_LDFLAGS}" ${LLVM_LIBRARIES}) if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(gen_gccbuiltins dl) endif() -# For use by the druntime/Phobos build system. -get_target_property(LDC_LOC ${LDC_EXE} LOCATION) get_target_property(GEN_GCCBUILTINS_LOC gen_gccbuiltins LOCATION) #