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 = "butter",
17    header_namespace = "",
18    exported_headers = subdir_glob(
19        [
20            ("", "*.h"),
21        ],
22        prefix = "butter",
23    ),
24    compiler_flags_pedantic = True,
25    fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
26    fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
27    force_static = True,
28    labels = [
29        "pfh:ReactNative_CommonInfrastructurePlaceholder",
30    ],
31    macosx_tests_override = [],
32    platforms = (ANDROID, APPLE, CXX),
33    preprocessor_flags = [
34        "-DLOG_TAG=\"ReactNative\"",
35        "-DWITH_FBSYSTRACE=1",
36    ],
37    tests = [],
38    visibility = ["PUBLIC"],
39    deps = [
40        "//third-party/glog:glog",
41        "//xplat/fbsystrace:fbsystrace",
42        "//xplat/folly:memory",
43        "//xplat/folly:shared_mutex",
44        "//xplat/folly:small_vector",
45        "//xplat/folly/container:f14_hash",
46    ],
47)
48