Skip to content

Commit 6182795

Browse files
neildharfacebook-github-bot
authored andcommitted
Remove usage of HERMES_BUILD_APPLE_DSYM (#50738)
Summary: Pull Request resolved: #50738 The implementation of this in Hermes depends on a deprecated CMake feature. Since it just needs to run a command to generate the dSYM, it seems simpler to eliminate the flag and move the work into the RN build script. ## Changelog: [Internal] - move dsym generation logic from Hermes to RN Reviewed By: cortinico, cipolleschi Differential Revision: D73054511 fbshipit-source-id: 4b8f9d97ef3386154bfe4030e0061f9c0791d7ea
1 parent b743af0 commit 6182795

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ function configure_apple_framework {
102102
-DHERMES_ENABLE_BITCODE:BOOLEAN=false \
103103
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
104104
-DHERMES_BUILD_SHARED_JSI:BOOLEAN=false \
105-
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
105+
-DCMAKE_CXX_FLAGS:STRING="-gdwarf" \
106+
-DCMAKE_C_FLAGS:STRING="-gdwarf" \
106107
-DIMPORT_HERMESC:PATH="$IMPORT_HERMESC_PATH" \
107108
-DJSI_DIR="$JSI_PATH" \
108109
-DHERMES_RELEASE_VERSION="for RN $(get_release_version)" \
@@ -134,6 +135,8 @@ function build_apple_framework {
134135
pushd "$HERMES_PATH" > /dev/null || exit 1
135136
mkdir -p "destroot/Library/Frameworks/$1"
136137
cmake --build "./build_$1" --target libhermes -j "${NUM_CORES}"
138+
# Produce the dSYM.
139+
xcrun dsymutil "./build_$1/API/hermes/hermes.framework/hermes" -o "./build_$1/API/hermes/hermes.framework.dSYM"
137140
cp -R "./build_$1"/API/hermes/hermes.framework* "destroot/Library/Frameworks/$1"
138141

139142
# In a MacOS build, also produce the hermes and hermesc CLI tools.

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ echo "Configure Apple framework"
7878
-DHERMES_ENABLE_BITCODE:BOOLEAN=false \
7979
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
8080
-DHERMES_BUILD_SHARED_JSI:BOOLEAN=false \
81-
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
81+
-DCMAKE_CXX_FLAGS:STRING="-gdwarf" \
82+
-DCMAKE_C_FLAGS:STRING="-gdwarf" \
8283
-DIMPORT_HERMESC:PATH="${hermesc_path}" \
8384
-DJSI_DIR="$jsi_path" \
8485
-DHERMES_RELEASE_VERSION="for RN $release_version" \

0 commit comments

Comments
 (0)