mirror of
https://github.com/status-im/react-native.git
synced 2025-02-24 15:18:10 +00:00
Summary: This commit moves all the turbo module files for Android to Github. Note that gradle build is not yet enabled. Sample Turbo Modules will be added in a later commit. Other missing features - Support for `CxxModule` - Remove usage of folly::dynamic for arguments and result conversion - Support for Promise return types. Reviewed By: mdvacca Differential Revision: D13647438 fbshipit-source-id: 5f1188556d6c64bfa2b2fd2146ac72b0fb456891
84 lines
2.3 KiB
Python
84 lines
2.3 KiB
Python
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "OBJC_ARC_PREPROCESSOR_FLAGS", "get_debug_preprocessor_flags", "get_static_library_ios_flags")
|
|
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "react_native_target", "react_native_xplat_target", "rn_xplat_cxx_library", "subdir_glob")
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "core",
|
|
srcs = glob(["*.cpp"]),
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
("", "*.h"),
|
|
],
|
|
prefix = "jsireact",
|
|
),
|
|
compiler_flags = [
|
|
"-fexceptions",
|
|
"-frtti",
|
|
"-std=c++14",
|
|
"-Wall",
|
|
],
|
|
fbandroid_deps = [
|
|
react_native_target("jni/react/jni:jni"),
|
|
],
|
|
fbandroid_exported_headers = subdir_glob(
|
|
[
|
|
("platform/android", "*.h"),
|
|
],
|
|
prefix = "jsireact",
|
|
),
|
|
fbandroid_srcs = glob(
|
|
[
|
|
"platform/android/**/*.cpp",
|
|
],
|
|
),
|
|
fbobjc_compiler_flags = [
|
|
"-Wall",
|
|
"-fobjc-arc-exceptions",
|
|
],
|
|
fbobjc_inherited_buck_flags = get_static_library_ios_flags(),
|
|
fbobjc_preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + get_debug_preprocessor_flags(),
|
|
force_static = True,
|
|
ios_deps = [
|
|
"xplat//FBBaseLite:FBBaseLite",
|
|
"xplat//js/react-native-github:RCTCxxBridge",
|
|
"xplat//js/react-native-github:RCTCxxModule",
|
|
"xplat//js/react-native-github:ReactInternal",
|
|
],
|
|
ios_exported_headers = subdir_glob(
|
|
[
|
|
("platform/ios", "*.h"),
|
|
],
|
|
prefix = "jsireact",
|
|
),
|
|
ios_frameworks = [
|
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
|
],
|
|
ios_srcs = glob(
|
|
[
|
|
"platform/ios/**/*.cpp",
|
|
"platform/ios/**/*.mm",
|
|
],
|
|
),
|
|
platforms = (ANDROID, APPLE),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
"xplat//fbsystrace:fbsystrace",
|
|
"xplat//folly:headers_only",
|
|
"xplat//folly:memory",
|
|
"xplat//folly:molly",
|
|
"xplat//jsi:JSIDynamic",
|
|
"xplat//third-party/glog:glog",
|
|
react_native_xplat_target("cxxreact:bridge"),
|
|
react_native_xplat_target("cxxreact:module"),
|
|
],
|
|
exported_deps = [
|
|
"xplat//jsi:jsi",
|
|
],
|
|
)
|