Skip to content

Commit b2cf24f

Browse files
janicduplessisfacebook-github-bot
authored andcommitted
Make hermes-executor-common a static lib (#32683)
Summary: I've been seeing a couple crashes related to missing hermes-executor-common.so, seems to happen on specific android versions, but can't repro. I investigated this so file more and noticed it is incorrectly linked as a static library here https://github.com/facebook/react-native/blob/b8f415eb6cdc0e0e7a7413b6f9defdcee304d9e8/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk#L20. There doesn't seem to be any reason for this to be a shared lib so I changed it to be compiled as a static lib. ## Changelog [Android] [Fixed] - Make hermes-executor-common a static lib Pull Request resolved: #32683 Test Plan: - Verify there is no more hermes-executor-common-{release,debug}.so - Test locally in an app to make sure it build and run properly. - Verify that the crash happening on play store pre-launch report doesn't happen anymore. Reviewed By: ShikaSD Differential Revision: D32754968 Pulled By: cortinico fbshipit-source-id: cb57e2d81edb4cbdb1f003dab45c53e594a5a62a
1 parent cdce733 commit b2cf24f

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

ReactCommon/hermes/executor/Android.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
1919
LOCAL_STATIC_LIBRARIES := libjsireact
2020
LOCAL_SHARED_LIBRARIES := libhermes libjsi
2121

22-
include $(BUILD_SHARED_LIBRARY)
22+
include $(BUILD_STATIC_LIBRARY)
2323

2424
include $(CLEAR_VARS)
2525

@@ -34,4 +34,4 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
3434
LOCAL_STATIC_LIBRARIES := libjsireact libhermes-inspector
3535
LOCAL_SHARED_LIBRARIES := libhermes libjsi
3636

37-
include $(BUILD_SHARED_LIBRARY)
37+
include $(BUILD_STATIC_LIBRARY)

packages/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/TaskConfiguration.kt

-2
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,10 @@ private fun Project.cleanupVMFiles(
233233
// Reduce size by deleting the debugger/inspector
234234
it.include("**/libhermes-inspector.so")
235235
it.include("**/libhermes-executor-debug.so")
236-
it.include("**/libhermes-executor-common-debug.so")
237236
} else {
238237
// Release libs take precedence and must be removed
239238
// to allow debugging
240239
it.include("**/libhermes-executor-release.so")
241-
it.include("**/libhermes-executor-common-release.so")
242240
}
243241
} else {
244242
// For JSC, delete all the libhermes* files

react.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,10 @@ afterEvaluate {
365365
// Reduce size by deleting the debugger/inspector
366366
include '**/libhermes-inspector.so'
367367
include '**/libhermes-executor-debug.so'
368-
include '**/libhermes-executor-common-debug.so'
369368
} else {
370369
// Release libs take precedence and must be removed
371370
// to allow debugging
372371
include '**/libhermes-executor-release.so'
373-
include '**/libhermes-executor-common-release.so'
374372
}
375373
} else {
376374
// For JSC, delete all the libhermes* files

0 commit comments

Comments
 (0)