Files
react-native/ReactCommon/jsi/Android.mk
T
empyrical 300df59c77 Android: Ensure RN_FABRIC_ENABLED is defined when building with Fabric (#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: https://github.com/facebook/react-native/pull/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
2020-09-14 10:08:51 -07:00

40 lines
881 B
Makefile

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := jsi
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/jsi/*.cpp)
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS := -fexceptions -frtti -O3
LOCAL_SHARED_LIBRARIES := libfolly_json glog
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := jscruntime
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS := -fexceptions -frtti -O3
LOCAL_SHARED_LIBRARIES := libfolly_json libjsc glog
ifeq ($(BUILD_FABRIC),true)
LOCAL_CFLAGS += -DRN_FABRIC_ENABLED
endif
include $(BUILD_STATIC_LIBRARY)