mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TurboModule Android: compile TurboModule C++ Core into ReactAndroid
Summary: This is to prepare for enabling TurboModule on Android. This commit compiles in all the core files (C++) into the ReactAndroid NDK build step. This doesn't yet enable TurboModule by default, just compiling in the infra, just like for iOS. New shared libs: * libreact_nativemodule_core.so: The TurboModule Android core * libreact_nativemodule_manager.so: The TurboModule manager/delegate To be compatible with `<ReactCommon/` .h include prefix, the files had to move to local `ReactCommon` subdirs. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D23805717 fbshipit-source-id: b41c392a592dd095ae003f7b2a689f4add2c37a9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
412fc7d324
commit
5be44456f2
@@ -5,6 +5,10 @@
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
#########################
|
||||
### callinvokerholder ###
|
||||
#########################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Header search path for all source files in this module.
|
||||
@@ -15,10 +19,10 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_CFLAGS += -fexceptions -frtti -std=c++14 -Wall
|
||||
|
||||
LOCAL_STATIC_LIBRARIES = libcallinvoker libreactperfloggerjni
|
||||
|
||||
LOCAL_SHARED_LIBRARIES = libfb libfbjni
|
||||
|
||||
LOCAL_STATIC_LIBRARIES = libcallinvoker libreactperfloggerjni
|
||||
|
||||
# Name of this module.
|
||||
LOCAL_MODULE := callinvokerholder
|
||||
|
||||
@@ -27,3 +31,30 @@ LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/CallInvokerHolder.cpp
|
||||
|
||||
# Build the files in this directory as a shared library
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
##################################
|
||||
### react_nativemodule_manager ###
|
||||
##################################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Name of this module.
|
||||
LOCAL_MODULE := react_nativemodule_manager
|
||||
|
||||
# Header search path for all source files in this module.
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ReactCommon
|
||||
|
||||
# Header search path for modules that depend on this module
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
LOCAL_CFLAGS += -fexceptions -frtti -std=c++14 -Wall
|
||||
|
||||
LOCAL_SHARED_LIBRARIES = libfb libfbjni libreact_nativemodule_core
|
||||
|
||||
LOCAL_STATIC_LIBRARIES = libcallinvokerholder libreactperfloggerjni
|
||||
|
||||
# Compile all local c++ files
|
||||
LOCAL_SRC_FILES := $(LOCAL_PATH)/ReactCommon/TurboModuleManager.cpp $(LOCAL_PATH)/ReactCommon/OnLoad.cpp
|
||||
|
||||
# Build the files in this directory as a shared library
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -80,7 +80,7 @@ LOCAL_LDLIBS += -landroid
|
||||
LOCAL_SHARED_LIBRARIES := libreactnativeutilsjni libfolly_json libfb libfbjni libglog_init libyoga
|
||||
|
||||
# The static libraries (.a files) that this module depends on.
|
||||
LOCAL_STATIC_LIBRARIES := libreactnative libcallinvokerholder libruntimeexecutor
|
||||
LOCAL_STATIC_LIBRARIES := libreactnative libruntimeexecutor libcallinvokerholder
|
||||
|
||||
# Name of this module.
|
||||
#
|
||||
@@ -128,8 +128,11 @@ $(call import-module,callinvoker)
|
||||
$(call import-module,reactperflogger)
|
||||
$(call import-module,hermes)
|
||||
$(call import-module,runtimeexecutor)
|
||||
$(call import-module,react/nativemodule/core)
|
||||
|
||||
include $(REACT_SRC_DIR)/reactperflogger/jni/Android.mk
|
||||
# TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
|
||||
# Note: Update this only when ready to minimize breaking changes.
|
||||
include $(REACT_SRC_DIR)/turbomodule/core/jni/Android.mk
|
||||
|
||||
ifeq ($(BUILD_FABRIC),true)
|
||||
|
||||
Reference in New Issue
Block a user