mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/29087 D21908523 added an implicit dependency on `jsi.h` to use functions like `asObject`, etc. For some reason this doesn't break the build with BUCK (??) but it does with cocoapods. Adding the dep to the cxxreact podspec and regenerating offline mirrors to unbreak CircleCI. Also adding the BUCK dep and include statement for good measure. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D21924592 fbshipit-source-id: 295c0670c6499e1195ba3c3a3320c6aee13bc025
162 lines
4.4 KiB
Python
162 lines
4.4 KiB
Python
load("@fbsource//tools/build_defs:glob_defs.bzl", "subdir_glob")
|
|
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "get_android_inspector_flags", "get_apple_compiler_flags", "get_apple_inspector_flags", "get_preprocessor_flags_for_build_mode", "react_native_xplat_target", "rn_xplat_cxx_library")
|
|
|
|
CXX_LIBRARY_COMPILER_FLAGS = [
|
|
"-std=c++14",
|
|
"-Wall",
|
|
]
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "module",
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
("", "CxxModule.h"),
|
|
("", "JsArgumentHelpers.h"),
|
|
("", "JsArgumentHelpers-inl.h"),
|
|
],
|
|
prefix = "cxxreact",
|
|
),
|
|
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS,
|
|
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
|
force_static = True,
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
"//xplat/folly:molly",
|
|
],
|
|
)
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "jsbigstring",
|
|
srcs = [
|
|
"JSBigString.cpp",
|
|
],
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[("", "JSBigString.h")],
|
|
prefix = "cxxreact",
|
|
),
|
|
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
|
|
"-fexceptions",
|
|
"-frtti",
|
|
],
|
|
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
|
force_static = True,
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
preprocessor_flags = [
|
|
"-DWITH_FBREMAP=1",
|
|
],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
"//xplat/folly:memory",
|
|
"//xplat/folly:molly",
|
|
"//xplat/folly:scope_guard",
|
|
],
|
|
)
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "samplemodule",
|
|
srcs = ["SampleCxxModule.cpp"],
|
|
header_namespace = "",
|
|
exported_headers = ["SampleCxxModule.h"],
|
|
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
|
|
"-fno-omit-frame-pointer",
|
|
"-fexceptions",
|
|
],
|
|
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
soname = "libxplat_react_module_samplemodule.$(ext)",
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
":module",
|
|
"//third-party/glog:glog",
|
|
"//xplat/folly:memory",
|
|
"//xplat/folly:molly",
|
|
],
|
|
)
|
|
|
|
CXXREACT_PUBLIC_HEADERS = [
|
|
"CxxNativeModule.h",
|
|
"Instance.h",
|
|
"JSBundleType.h",
|
|
"JSDeltaBundleClient.h",
|
|
"JSExecutor.h",
|
|
"JSIndexedRAMBundle.h",
|
|
"JSModulesUnbundle.h",
|
|
"MessageQueueThread.h",
|
|
"MethodCall.h",
|
|
"ModuleRegistry.h",
|
|
"NativeModule.h",
|
|
"NativeToJsBridge.h",
|
|
"RAMBundleRegistry.h",
|
|
"ReactMarker.h",
|
|
"RecoverableError.h",
|
|
"SharedProxyCxxModule.h",
|
|
"SystraceSection.h",
|
|
]
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "bridge",
|
|
srcs = glob(
|
|
["*.cpp"],
|
|
exclude = [
|
|
"JSBigString.cpp",
|
|
"SampleCxxModule.cpp",
|
|
],
|
|
),
|
|
headers = glob(
|
|
["*.h"],
|
|
exclude = CXXREACT_PUBLIC_HEADERS,
|
|
),
|
|
header_namespace = "",
|
|
exported_headers = dict([
|
|
(
|
|
"cxxreact/%s" % header,
|
|
header,
|
|
)
|
|
for header in CXXREACT_PUBLIC_HEADERS
|
|
]),
|
|
compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [
|
|
"-fexceptions",
|
|
"-frtti",
|
|
],
|
|
fbandroid_preprocessor_flags = get_android_inspector_flags(),
|
|
fbobjc_compiler_flags = get_apple_compiler_flags(),
|
|
fbobjc_force_static = True,
|
|
fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
macosx_tests_override = [],
|
|
platforms = (ANDROID, APPLE),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
tests = [
|
|
react_native_xplat_target("cxxreact/tests:tests"),
|
|
],
|
|
visibility = ["PUBLIC"],
|
|
deps = [
|
|
":jsbigstring",
|
|
":module",
|
|
"//xplat/fbsystrace:fbsystrace",
|
|
"//xplat/folly:headers_only",
|
|
"//xplat/folly:memory",
|
|
"//xplat/folly:molly",
|
|
"//xplat/jsi:jsi",
|
|
react_native_xplat_target("callinvoker:callinvoker"),
|
|
react_native_xplat_target("jsinspector:jsinspector"),
|
|
react_native_xplat_target("microprofiler:microprofiler"),
|
|
react_native_xplat_target("runtimeexecutor:runtimeexecutor"),
|
|
react_native_xplat_target("reactperflogger:reactperflogger"),
|
|
"//third-party/glog:glog",
|
|
"//xplat/folly:optional",
|
|
],
|
|
)
|