From 15e224dca3f6b7d77b2503edd2764399bce1e79d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Aug 2019 17:07:44 +0200 Subject: Build: disable RTTI for the entire Cycles module, not only the kernel The partial disabling was causing issues with Clang and ASAN, and it seems we don't need to restrict it to the kernel anymore now that we are no longer using boost directly. --- intern/cycles/CMakeLists.txt | 2 ++ intern/cycles/kernel/osl/CMakeLists.txt | 2 -- intern/cycles/render/CMakeLists.txt | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'intern') diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 87f88f7ed34..6a3ebd85378 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -178,11 +178,13 @@ if(CXX_HAS_AVX2) endif() if(WITH_CYCLES_OSL) + # LLVM and OSL need to build without RTTI if(WIN32 AND MSVC) set(RTTI_DISABLE_FLAGS "/GR- -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") elseif(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang")) set(RTTI_DISABLE_FLAGS "-fno-rtti -DBOOST_NO_RTTI -DBOOST_NO_TYPEID") endif() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") endif() # Definitions and Includes diff --git a/intern/cycles/kernel/osl/CMakeLists.txt b/intern/cycles/kernel/osl/CMakeLists.txt index 28d9ca854db..35cca2da8ad 100644 --- a/intern/cycles/kernel/osl/CMakeLists.txt +++ b/intern/cycles/kernel/osl/CMakeLists.txt @@ -29,8 +29,6 @@ set(LIB cycles_render ) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") - include_directories(${INC}) include_directories(SYSTEM ${INC_SYS}) diff --git a/intern/cycles/render/CMakeLists.txt b/intern/cycles/render/CMakeLists.txt index c79e5a23ea1..53196b013f6 100644 --- a/intern/cycles/render/CMakeLists.txt +++ b/intern/cycles/render/CMakeLists.txt @@ -85,8 +85,6 @@ if(WITH_CYCLES_OSL) ) endif() -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RTTI_DISABLE_FLAGS}") - include_directories(${INC}) include_directories(SYSTEM ${INC_SYS}) -- cgit v1.2.3