From 852cd1d6d8cde61638fa38e8a2af88a782fe27f7 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Mon, 18 Jan 2021 08:49:24 +0000 Subject: [PATCH] Explicitly disable rtti --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b74ac751d..5bad1a4fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -135,6 +135,10 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) # When clad is in debug mode the llvm package thinks it is built with -frtti. # For consistency we should set it to the correct value. set(LLVM_CONFIG_HAS_RTTI NO CACHE BOOL "" FORCE) + if (LLVM_COMPILER_IS_GCC_COMPATIBLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif () + ## Init