Skip to content

Conversation

@tido64
Copy link
Member

@tido64 tido64 commented Nov 10, 2025

Description

Fix compile error in ReactNativeHost.mm when Hermes is not being used. fatal error: 'ReactCommon/RCTHermesInstance.h' file not found

The USE_HERMES preprocessor definition was only being set in GCC_PREPROCESSOR_DEFINITIONS (for C and Objective-C files), but NOT in CPP_PREPROCESSOR_DEFINITIONS (for [Objective] C++) files. This caused ReactNativeHost.mm to NOT receive the USE_HERMES=0 flag, making it incorrectly import Hermes symbols that aren't resolved at link time.

Supersedes #3845.

Test plan

See #3845.

Fix compile error in `ReactNativeHost.mm` when Hermes is not being used.
`fatal error: 'ReactCommon/RCTHermesInstance.h' file not found`

The `USE_HERMES` preprocessor definition was only being set in
`GCC_PREPROCESSOR_DEFINITIONS` (for C and Objective-C files), but NOT
in `CPP_PREPROCESSOR_DEFINITIONS` (for [Objective] C++) files. This
caused `ReactNativeHost.mm` to NOT receive the `USE_HERMES=0` flag,
making it incorrectly import Hermes symbols that aren't resolved at link
time.
@github-actions github-actions bot added the feature: sdk This is related to 1RN SDK label Nov 10, 2025
@tido64 tido64 merged commit e8bbe48 into main Nov 12, 2025
25 of 26 checks passed
@tido64 tido64 deleted the tido/react-native-host/jsc-support branch November 12, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: sdk This is related to 1RN SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants