1load("//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_dep", "rn_xplat_cxx_library")
2
3rn_xplat_cxx_library(
4    name = "jsi",
5    srcs = [
6        "jsi/jsi.cpp",
7    ],
8    header_namespace = "",
9    exported_headers = [
10        "jsi/instrumentation.h",
11        "jsi/jsi.h",
12        "jsi/jsi-inl.h",
13        "jsi/jsilib.h",
14    ],
15    compiler_flags = [
16        "-O3",
17        "-Wextra",
18        "-Wcast-qual",
19        "-Wdelete-non-virtual-dtor",
20        "-Wwrite-strings",
21    ],
22    compiler_flags_pedantic = True,
23    cxx_compiler_flags = [
24        "-Wglobal-constructors",
25        "-Wmissing-prototypes",
26    ],
27    fbobjc_compiler_flags = [
28        "-Wglobal-constructors",
29        "-Wmissing-prototypes",
30    ],
31    labels = [
32        "pfh:ReactNative_CommonInfrastructurePlaceholder",
33    ],
34    visibility = ["PUBLIC"],
35)
36
37rn_xplat_cxx_library(
38    name = "JSIDynamic",
39    srcs = [
40        "jsi/JSIDynamic.cpp",
41    ],
42    header_namespace = "",
43    exported_headers = [
44        "jsi/JSIDynamic.h",
45    ],
46    compiler_flags_pedantic = True,
47    fbobjc_force_static = True,
48    labels = [
49        "pfh:ReactNative_CommonInfrastructurePlaceholder",
50    ],
51    visibility = [
52        "PUBLIC",
53    ],
54    xcode_public_headers_symlinks = True,
55    deps = [
56        react_native_xplat_dep("jsi:jsi"),
57    ],
58)
59