[PATCH] D11464: CMake: Add -fno-rtti to llvm-config --cxx-flags when RTTI is disabled
Tom Stellard
thomas.stellard at amd.com
Thu Jul 23 08:53:41 PDT 2015
tstellarAMD created this revision.
tstellarAMD added reviewers: chandlerc, bogner.
tstellarAMD added a subscriber: llvm-commits.
This is a fix for PR14200.
http://reviews.llvm.org/D11464
Files:
tools/llvm-config/CMakeLists.txt
Index: tools/llvm-config/CMakeLists.txt
===================================================================
--- tools/llvm-config/CMakeLists.txt
+++ tools/llvm-config/CMakeLists.txt
@@ -16,6 +16,11 @@
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+
+if (NOT LLVM_ENABLE_RTTI)
+ set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -fno-rtti")
+endif()
+
# Use the C++ link flags, since they should be a superset of C link flags.
set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11464.30491.patch
Type: text/x-patch
Size: 778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150723/7a041551/attachment.bin>
More information about the llvm-commits
mailing list