Files
react-native/ReactCommon/react/bridging/BUCK
T
Michael Lee (Engineering) 2d66bd4851 Rename the folly headers_only target to warn
Summary:
This target is not a good idea for a number of reasons:
1. It groups up multiple targets which breaks the dependency graph
2. It does not handle dependency remapping correctly
3. It has no mirror into fbcode

We should warn people this is a bad idea

Reviewed By: alexmalyshev

Differential Revision: D36519357

fbshipit-source-id: d60ca3237c7710118732578fecd1b2fc8903321b
2022-05-26 08:17:27 -07:00

58 lines
1.7 KiB
Python

load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "CXX", "IOS", "MACOSX", "fb_xplat_cxx_test", "react_native_xplat_shared_library_target", "react_native_xplat_target", "rn_xplat_cxx_library")
rn_xplat_cxx_library(
name = "bridging",
srcs = glob(["*.cpp"]),
header_namespace = "react/bridging",
exported_headers = glob(["*.h"]),
compiler_flags_enable_exceptions = True,
compiler_flags_enable_rtti = True,
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholder",
"supermodule:xplat/default/public.react_native.infra",
],
platforms = (ANDROID, APPLE, CXX),
tests = [":tests"],
visibility = ["PUBLIC"],
deps = [
"//xplat/folly:headers_only_do_not_use",
],
exported_deps = [
react_native_xplat_target("butter:butter"),
react_native_xplat_target("callinvoker:callinvoker"),
react_native_xplat_shared_library_target("jsi:jsi"),
],
)
rn_xplat_cxx_library(
name = "testlib",
header_namespace = "react/bridging",
exported_headers = glob(["tests/*.h"]),
platforms = (ANDROID, APPLE, CXX),
visibility = ["PUBLIC"],
exported_deps = [
":bridging",
"//xplat/third-party/gmock:gtest",
],
)
fb_xplat_cxx_test(
name = "tests",
srcs = glob(["tests/*.cpp"]),
headers = glob(["tests/*.h"]),
apple_sdks = (IOS, MACOSX),
compiler_flags = [
"-fexceptions",
"-frtti",
"-std=c++17",
"-Wall",
],
contacts = ["oncall+react_native@xmail.facebook.com"],
platforms = (ANDROID, APPLE, CXX),
deps = [
":bridging",
"//xplat/hermes/API:HermesAPI",
"//xplat/third-party/gmock:gtest",
],
)