From 1b7d2c8d48e83fb136eccc5215faeb8d54da9c3e Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 4 Mar 2025 04:51:38 -0800 Subject: [PATCH] Enable RTTI to fix exception pointer issue on React Native (#1791) Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1791 Disabling RTTI for Yoga is causing std::exception to don't work properly in OSS. Fixes: https://github.com/facebook/react-native/issues/48027 Not sure why we originally disabled RTTI for Yoga, but we have it enable for the whole React Native build so it probably makes sense to have it enabled for Yoga as well. Changelog: [Internal] [Changed] - Enable RTTI to fix exception pointer issue on React Native bypass-github-export-checks Reviewed By: javache, NickGerleman Differential Revision: D70386744 fbshipit-source-id: 36e3a1ddb38346d31979d5c1b77d6e9796d6a855 --- cmake/project-defaults.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/project-defaults.cmake b/cmake/project-defaults.cmake index 987529c549..a6960bb629 100644 --- a/cmake/project-defaults.cmake +++ b/cmake/project-defaults.cmake @@ -19,8 +19,8 @@ add_compile_options( # Enable warnings and warnings as errors /W4 /WX - # Disable RTTI - $<$:/GR-> + # Enable RTTI + $<$:/GR> # Use /O2 (Maximize Speed) $<$:/O2>) @@ -34,8 +34,8 @@ add_compile_options( # Enable warnings and warnings as errors -Wall -Werror - # Disable RTTI - $<$:-fno-rtti> + # Enable RTTI + $<$:-frtti> # Use -O2 (prioritize speed) $<$:-O2> # Enable separate sections per function/data item