Skip to content

Commit 300df59

Browse files
empyricalfacebook-github-bot
authored andcommitted
Android: Ensure RN_FABRIC_ENABLED is defined when building with Fabric (facebook#29939)
Summary: This pull request tweaks the build script for `jsiruntime` to ensure that `RN_FABRIC_ENABLED` is defined when building for Android with Fabric enabled, and using the JavascriptCore JS engine. Without it, the `createWeakObject` and `lockWeakObject` methods in `JSCRuntime.cpp` will throw an exception. ## Changelog [Internal] [Changed] - Android: Ensure RN_FABRIC_ENABLED is defined when building with Fabric Pull Request resolved: facebook#29939 Test Plan: RNTester with JSC now builds and runs on Android with Fabric enabled. Reviewed By: hramos Differential Revision: D23671070 Pulled By: fkgozali fbshipit-source-id: 27e69364a9f709615543be7c20b72b5536443cd8
1 parent 6524e61 commit 300df59

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ReactCommon/jsi/Android.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
3232
LOCAL_CFLAGS := -fexceptions -frtti -O3
3333
LOCAL_SHARED_LIBRARIES := libfolly_json libjsc glog
3434

35+
ifeq ($(BUILD_FABRIC),true)
36+
LOCAL_CFLAGS += -DRN_FABRIC_ENABLED
37+
endif
38+
3539
include $(BUILD_STATIC_LIBRARY)

0 commit comments

Comments
 (0)