Skip to content

Commit bef5cc1

Browse files
WoLewickifacebook-github-bot
authored andcommitted
fix: build proper hermes for all debug variants (#50897)
Summary: When building hermes from source in a project that has a debug scheme not named strictly "Debug", hermes is built with wrong flags which makes the compilation fail. We should use a better check for such cases, analogous to https://github.com/facebook/react-native/blob/ec43150b2a8db3a93137ae69ac414859a2fff73e/packages/react-native/scripts/react-native-xcode.sh#L16. I haven't found any other usages of this pattern: https://github.com/search?q=repo%3Afacebook%2Freact-native%20%24CONFIGURATION&type=code, hopefully other places use the correct semantics already. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [IOS] [FIXED] - properly check for debug schemes when building hermes from source For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - properly check for debug schemes when building hermes from source Pull Request resolved: #50897 Test Plan: Use e.g. https://github.com/martinlAP/keyboardcrash with `Dev-Debug` scheme and try to build hermes from source based on https://github.com/facebook/hermes/blob/rn/0.79-stable/doc/ReactNativeIntegration.md. to see that it fails without this PR. Reviewed By: rshest Differential Revision: D73579031 Pulled By: cortinico fbshipit-source-id: 3a48c6fe63f78fbc9cf566d300b9518aa9abdd89
1 parent 51091d4 commit bef5cc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native/sdks/hermes-engine/utils/build-hermes-xcode.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ function get_deployment_target {
3737
}
3838

3939
enable_debugger="false"
40-
if [[ "$CONFIGURATION" == "Debug" ]]; then
40+
if [[ "$CONFIGURATION" = *Debug* ]]; then
4141
enable_debugger="true"
4242
fi
4343

4444
cmake_build_type=""
45-
if [[ $CONFIGURATION == "Debug" ]]; then
45+
if [[ "$CONFIGURATION" = *Debug* ]]; then
4646
# JS developers aren't VM developers.
4747
# Therefore we're passing as build type Release, to provide a faster build.
4848
cmake_build_type="Release"

0 commit comments

Comments
 (0)