mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
7cfc7d65f7
Summary: Added a few FB vs OSS polyfills: * react_native_root_target() to refer to the root FB react-native-github/ dir or repo dir in OSS * react_native_xplat_synced_target() for anything xplat * a few others Changelog: [Internal] Reviewed By: yungsters Differential Revision: D24437245 fbshipit-source-id: ee290a87a98a8e9be67b102a96f2faac2a2cb92b
88 lines
2.6 KiB
Python
88 lines
2.6 KiB
Python
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "FBJNI_TARGET", "OBJC_ARC_PREPROCESSOR_FLAGS", "get_preprocessor_flags_for_build_mode", "get_static_library_ios_flags", "react_native_target", "react_native_xplat_shared_library_target", "react_native_xplat_target", "rn_xplat_cxx_library", "subdir_glob")
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "core",
|
|
srcs = glob(
|
|
["ReactCommon/**/*.cpp"],
|
|
),
|
|
header_namespace = "",
|
|
exported_headers = subdir_glob(
|
|
[
|
|
("ReactCommon", "*.h"),
|
|
],
|
|
prefix = "ReactCommon",
|
|
),
|
|
compiler_flags = [
|
|
"-fexceptions",
|
|
"-frtti",
|
|
"-std=c++14",
|
|
"-Wall",
|
|
"-Wno-global-constructors",
|
|
],
|
|
fbandroid_deps = [
|
|
react_native_target("jni/react/jni:jni"),
|
|
FBJNI_TARGET,
|
|
],
|
|
fbandroid_exported_headers = subdir_glob(
|
|
[
|
|
("platform/android/ReactCommon", "*.h"),
|
|
],
|
|
prefix = "ReactCommon",
|
|
),
|
|
fbandroid_srcs = glob(
|
|
[
|
|
"platform/android/ReactCommon/*.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_preprocessor_flags_for_build_mode(),
|
|
ios_deps = [
|
|
"//xplat/FBBaseLite:FBBaseLite",
|
|
"//xplat/js/react-native-github:RCTCxxModule",
|
|
"//xplat/js/react-native-github:ReactInternal",
|
|
],
|
|
ios_exported_headers = subdir_glob(
|
|
[
|
|
("platform/ios", "*.h"),
|
|
],
|
|
prefix = "ReactCommon",
|
|
),
|
|
ios_frameworks = [
|
|
"$SDKROOT/System/Library/Frameworks/Foundation.framework",
|
|
],
|
|
ios_srcs = glob(
|
|
[
|
|
"platform/ios/**/*.cpp",
|
|
"platform/ios/**/*.mm",
|
|
],
|
|
),
|
|
labels = ["supermodule:xplat/default/public.react_native.infra"],
|
|
platforms = (ANDROID, APPLE),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
"//third-party/glog:glog",
|
|
"//xplat/fbsystrace:fbsystrace",
|
|
"//xplat/folly:headers_only",
|
|
"//xplat/folly:memory",
|
|
"//xplat/folly:molly",
|
|
"//xplat/jsi:JSIDynamic",
|
|
react_native_xplat_target("cxxreact:bridge"),
|
|
react_native_xplat_target("cxxreact:module"),
|
|
react_native_xplat_target("callinvoker:callinvoker"),
|
|
react_native_xplat_target("reactperflogger:reactperflogger"),
|
|
],
|
|
exported_deps = [
|
|
react_native_xplat_shared_library_target("jsi:jsi"),
|
|
],
|
|
)
|