From 73e62f8676a7116580dc909004f234f300f646d1 Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Mon, 1 Jan 2024 19:10:12 +0100 Subject: [PATCH] Keep RTTI for Minetest IPO/LTO Minetest using RTTI, so we cannot apply the flag here if we want to start using IPO/LTO. If we keep `-fno-rtti` here, compiler loses part of informations and cannot do efficient optimizations. The benefit of using RTTI on Irrlicht disappears with IPO/LTO on whole binary. Signed-off-by: David Heidelberg --- source/Irrlicht/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt index 36b102f0..a3abd1b8 100644 --- a/source/Irrlicht/CMakeLists.txt +++ b/source/Irrlicht/CMakeLists.txt @@ -29,7 +29,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|Clang|AppleClang)$") set(CMAKE_CXX_FLAGS_RELEASE "-O3") set(CMAKE_CXX_FLAGS_DEBUG "-g") - add_compile_options(-Wall -pipe -fno-exceptions -fno-rtti) + add_compile_options(-Wall -pipe -fno-exceptions) # Enable SSE for floating point math on 32-bit x86 by default # reasoning see minetest issue #11810 and https://gcc.gnu.org/wiki/FloatingPointMath