summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2015-11-04 20:57:43 +0000
committerTom Stellard <thomas.stellard@amd.com>2015-11-04 20:57:43 +0000
commit18bf626cf7fb7635c06f69c3a0f6323722c34041 (patch)
tree8119c6b320eafce72c2bfb653268ff15de2f4373 /llvm/cmake/modules
parent7e6606f4f1ee5e6a9cddced7c8572d6f55cf8cbe (diff)
downloadbcm5719-llvm-18bf626cf7fb7635c06f69c3a0f6323722c34041.tar.gz
bcm5719-llvm-18bf626cf7fb7635c06f69c3a0f6323722c34041.zip
llvm-config: Add --has-rtti option
Summary: This prints NO if LLVM was built with -fno-rtti or an equivalent flag and YES otherwise. The reasons to add -has-rtti rather than adding -fno-rtti to --cxxflags are: 1. Building LLVM with -fno-rtti does not always mean that client applications need this flag. 2. Some compilers have a different flag for disabling rtti, and the compiler being used to build LLVM may not be the compiler being used to build the application. Reviewers: echristo, chandlerc, beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11849 llvm-svn: 252075
Diffstat (limited to 'llvm/cmake/modules')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index c3e1679bdb5..8d0cf7c5615 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -26,7 +26,9 @@ function(llvm_update_compile_flags name)
# LLVM_REQUIRES_RTTI is an internal flag that individual
# targets can use to force RTTI
+ set(LLVM_CONFIG_HAS_RTTI YES CACHE INTERNAL "")
if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
+ set(LLVM_CONFIG_HAS_RTTI NO CACHE INTERNAL "")
list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
list(APPEND LLVM_COMPILE_FLAGS "-fno-rtti")
OpenPOWER on IntegriCloud