Skip to content

Commit de6bfec

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Disable bitcode from Hermes (#37868)
Summary: Pull Request resolved: #37868 Thanks to the help of the community, we discovered that we can safely disable the bitcode setting in Hermes. Community testing reported that the tarball size get reduced from ~500 Mb to ~25 Mb, a x20 reduction ## Changelog: [iOS][Changed] - Disabled bitcode for Hermes prebuilts Reviewed By: dmytrorykun Differential Revision: D46704633 fbshipit-source-id: a6624110f27eb9f18e6b57ed28aa2f86804d45e7
1 parent be34852 commit de6bfec

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ references:
6060
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
6161
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "packages/react-native/ReactAndroid/gradle.properties" }}
6262
hermes_workspace_cache_key: &hermes_workspace_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
63-
hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
64-
hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
63+
hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
64+
hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
6565
hermes_linux_cache_key: &hermes_linux_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
6666
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
6767
hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v4-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}

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

+2-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@ function build_host_hermesc {
5252

5353
# Utility function to configure an Apple framework
5454
function configure_apple_framework {
55-
local enable_bitcode enable_debugger cmake_build_type
55+
local enable_debugger cmake_build_type
5656

57-
if [[ $1 == iphoneos || $1 == catalyst ]]; then
58-
enable_bitcode="true"
59-
else
60-
enable_bitcode="false"
61-
fi
6257
if [[ $BUILD_TYPE == "Debug" ]]; then
6358
enable_debugger="true"
6459
else
@@ -82,7 +77,7 @@ function configure_apple_framework {
8277
-DHERMES_ENABLE_LIBFUZZER:BOOLEAN=false \
8378
-DHERMES_ENABLE_FUZZILLI:BOOLEAN=false \
8479
-DHERMES_ENABLE_TEST_SUITE:BOOLEAN=false \
85-
-DHERMES_ENABLE_BITCODE:BOOLEAN="$enable_bitcode" \
80+
-DHERMES_ENABLE_BITCODE:BOOLEAN=false \
8681
-DHERMES_BUILD_APPLE_FRAMEWORK:BOOLEAN=true \
8782
-DHERMES_BUILD_APPLE_DSYM:BOOLEAN=true \
8883
-DIMPORT_HERMESC:PATH="$IMPORT_HERMESC_PATH" \

0 commit comments

Comments
 (0)