From f9d69da4322610abbf17ca9f7b7253a999643ef8 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 11 Dec 2023 14:42:51 +0100 Subject: [PATCH] Build: remove Cycles build options to disable RTTI This was required for OSL, which used to be compiled entirely without RTTI for LLVM. However OSL now only compiles a private part of its code without RTTI, so this no longer necessary. Pull Request: https://projects.blender.org/blender/blender/pulls/116035 --- intern/cycles/CMakeLists.txt | 7 ------- intern/cycles/kernel/osl/CMakeLists.txt | 3 --- intern/cycles/scene/CMakeLists.txt | 2 -- 3 files changed, 12 deletions(-) diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 192b4e3c55d..2047a6fc98a 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -191,13 +191,6 @@ if(CXX_HAS_AVX2) add_definitions(-DWITH_KERNEL_AVX2) endif() -# 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() - # Definitions and Includes add_definitions( diff --git a/intern/cycles/kernel/osl/CMakeLists.txt b/intern/cycles/kernel/osl/CMakeLists.txt index e0231796c90..653ed660dc7 100644 --- a/intern/cycles/kernel/osl/CMakeLists.txt +++ b/intern/cycles/kernel/osl/CMakeLists.txt @@ -36,9 +36,6 @@ set(LIB ${LLVM_LIBRARY} ) -# OSL and LLVM are built without RTTI -string(APPEND CMAKE_CXX_FLAGS " ${RTTI_DISABLE_FLAGS}") - if(APPLE) # Disable allocation warning on macOS prior to 10.14: the OSLRenderServices # contains member which is 64 bytes aligned (cache inside of OIIO's diff --git a/intern/cycles/scene/CMakeLists.txt b/intern/cycles/scene/CMakeLists.txt index 92b19303c94..ce4093cdf03 100644 --- a/intern/cycles/scene/CMakeLists.txt +++ b/intern/cycles/scene/CMakeLists.txt @@ -108,8 +108,6 @@ if(WITH_CYCLES_OSL) list(APPEND LIB cycles_kernel_osl ) - - set_property(SOURCE osl.cpp PROPERTY COMPILE_FLAGS ${RTTI_DISABLE_FLAGS}) endif() if(WITH_OPENCOLORIO)