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)
11
12APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
13
14rn_xplat_cxx_library(
15    name = "runtimeexecutor",
16    srcs = glob(
17        [
18            "**/*.cpp",
19            "**/*.mm",
20        ],
21        exclude = glob(["tests/**/*.cpp"]),
22    ),
23    headers = glob(
24        ["**/*.h"],
25        exclude = glob(["tests/**/*.h"]),
26    ),
27    header_namespace = "",
28    exported_headers = {
29        "ReactCommon/RuntimeExecutor.h": "ReactCommon/RuntimeExecutor.h",
30    },
31    compiler_flags_pedantic = True,
32    fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
33    fbobjc_frameworks = ["Foundation"],
34    fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
35    force_static = True,
36    labels = [
37        "pfh:ReactNative_CommonInfrastructurePlaceholder",
38    ],
39    macosx_tests_override = [],
40    platforms = (ANDROID, APPLE, CXX),
41    preprocessor_flags = [
42        "-DLOG_TAG=\"ReactNative\"",
43        "-DWITH_FBSYSTRACE=1",
44    ],
45    tests = [],
46    visibility = ["PUBLIC"],
47    deps = [
48        "//xplat/jsi:jsi",
49    ],
50)
51