Commit a24f1d8
fix(hermes-inspector-modern): Apply HERMES_V1_ENABLED define to all build types (#55312)
Summary:
The HERMES_V1_ENABLED compile option was incorrectly scoped inside the else() block, meaning it only applied to Release builds. This caused Debug builds to fail with missing header errors:
fatal error: 'hermes/inspector/RuntimeAdapter.h' file not found
This happens when Expo builds Hermes in release mode but WITH the debugger enabled.
Moved the HERMES_V1_ENABLED compile definition into the centralized target_compile_reactnative_options function in react-native-flags.cmake, eliminating duplicate conditional blocks across 7 CMakeLists.txt files.
This ensures the define is consistently applied to all targets that use
target_compile_reactnative_options when HERMES_V1_ENABLED is set, and makes the codebase easier to maintain.
Files cleaned up:
- ReactCommon/cmake-utils/react-native-flags.cmake (added centralized logic)
- ReactCommon/hermes/inspector-modern/CMakeLists.txt
- ReactCommon/hermes/executor/CMakeLists.txt
- ReactCommon/react/runtime/CMakeLists.txt
- ReactCommon/react/runtime/hermes/CMakeLists.txt
- ReactAndroid/.../hermes/reactexecutor/CMakeLists.txt
- ReactAndroid/.../runtime/hermes/jni/CMakeLists.txt
- ReactAndroid/.../runtime/jni/CMakeLists.txt
## Changelog:
[ANDROID] [FIXED] - Fixed so that all build types get the HERMES_V1_ENABLED flag
Pull Request resolved: #55312
Test Plan: Build RN Tester with HERMES_V1
Reviewed By: cipolleschi
Differential Revision: D91581367
Pulled By: cortinico
fbshipit-source-id: fa39158009dadda32438bc04a59579459da2cf7d1 parent 8d561b0 commit a24f1d8
8 files changed
Lines changed: 3 additions & 28 deletions
File tree
- packages/react-native
- ReactAndroid/src/main/jni/react
- hermes/reactexecutor
- runtime
- hermes/jni
- jni
- ReactCommon
- cmake-utils
- hermes
- executor
- inspector-modern
- react/runtime
- hermes
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 30 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | 32 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | 23 | | |
28 | 24 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 26 | | |
31 | 27 | | |
32 | 28 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 21 | | |
26 | 22 | | |
27 | 23 | | |
| |||
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 38 | | |
0 commit comments