1load(
2    "//tools/build_defs/oss:rn_defs.bzl",
3    "ANDROID",
4    "APPLE",
5    "CXX",
6    "get_apple_compiler_flags",
7    "get_apple_inspector_flags",
8    "get_preprocessor_flags_for_build_mode",
9    "rn_xplat_cxx_library",
10    "subdir_glob",
11)
12
13APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
14
15rn_xplat_cxx_library(
16    name = "native",
17    srcs = glob(
18        ["**/*.cpp"],
19        exclude = glob(["tests/**/*.cpp"]),
20    ),
21    headers = glob(
22        ["**/*.h"],
23        exclude = glob(["tests/**/*.h"]),
24    ),
25    header_namespace = "",
26    exported_headers = subdir_glob(
27        [
28            ("", "*.h"),
29        ],
30        prefix = "react/renderer/componentregistry/native",
31    ),
32    fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
33    fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
34    force_static = True,
35    labels = [
36        "pfh:ReactNative_CommonInfrastructurePlaceholder",
37        "supermodule:xplat/default/public.react_native.infra",
38    ],
39    macosx_tests_override = [],
40    platforms = (ANDROID, APPLE, CXX),
41    preprocessor_flags = [
42        "-DLOG_TAG=\"ReactNative\"",
43        "-DWITH_FBSYSTRACE=1",
44    ],
45    visibility = ["PUBLIC"],
46    deps = [
47        "//third-party/glog:glog",
48        "//xplat/fbsystrace:fbsystrace",
49        "//xplat/folly:headers_only_do_not_use",
50        "//xplat/folly:memory",
51        "//xplat/folly:molly",
52        "//xplat/jsi:JSIDynamic",
53        "//xplat/jsi:jsi",
54    ],
55)
56