1load("//tools/build_defs/oss:rn_defs.bzl", "APPLE", "IOS", "MACOSX", "get_apple_compiler_flags", "get_apple_inspector_flags", "get_preprocessor_flags_for_build_mode", "react_native_xplat_dep", "rn_xplat_cxx_library")
2
3APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
4
5rn_xplat_cxx_library(
6    name = "JSCRuntime",
7    srcs = [
8        "JSCRuntime.cpp",
9    ],
10    header_namespace = "jsc",
11    exported_headers = [
12        "JSCRuntime.h",
13    ],
14    apple_sdks = (IOS, MACOSX),
15    compiler_flags_pedantic = True,
16    fbobjc_compiler_flags = APPLE_COMPILER_FLAGS + [
17        "-Os",
18    ],
19    fbobjc_frameworks = [
20        "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
21    ],
22    fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
23    labels = [
24        "pfh:ReactNative_CommonInfrastructurePlaceholder",
25    ],
26    platforms = APPLE,
27    visibility = ["PUBLIC"],
28    xplat_mangled_args = {
29        "soname": "libjscjsi.$(ext)",
30    },
31    exported_deps = [
32        react_native_xplat_dep("jsi:jsi"),
33    ],
34)
35