UNPKG

2.36 kBPlain TextView Raw
1# BUILD FILE SYNTAX: SKYLARK
2
3load("//tools/build_defs/oss:rn_defs.bzl", "react_native_xplat_dep", "rn_xplat_cxx_library")
4
5rn_xplat_cxx_library(
6 name = "jsi",
7 srcs = [
8 "jsi/jsi.cpp",
9 ],
10 header_namespace = "",
11 exported_headers = [
12 "jsi/instrumentation.h",
13 "jsi/jsi.h",
14 "jsi/jsi-inl.h",
15 "jsi/jsilib.h",
16 ],
17 compiler_flags = [
18 "-O3",
19 "-fexceptions",
20 "-frtti",
21 "-std=c++14",
22 "-Wall",
23 "-Werror",
24 "-Wextra",
25 "-Wcast-qual",
26 "-Wdelete-non-virtual-dtor",
27 "-Wwrite-strings",
28 ],
29 cxx_compiler_flags = [
30 "-Wglobal-constructors",
31 "-Wmissing-prototypes",
32 ],
33 fbobjc_compiler_flags = [
34 "-Wglobal-constructors",
35 "-Wmissing-prototypes",
36 ],
37 visibility = ["PUBLIC"],
38)
39
40rn_xplat_cxx_library(
41 name = "JSIDynamic",
42 srcs = [
43 "jsi/JSIDynamic.cpp",
44 ],
45 header_namespace = "",
46 exported_headers = [
47 "jsi/JSIDynamic.h",
48 ],
49 compiler_flags = [
50 "-fexceptions",
51 "-frtti",
52 ],
53 fbobjc_force_static = True,
54 visibility = [
55 "PUBLIC",
56 ],
57 xcode_public_headers_symlinks = True,
58 deps = [
59 "fbsource//xplat/folly:molly",
60 react_native_xplat_dep("jsi:jsi"),
61 ],
62)
63
64rn_xplat_cxx_library(
65 name = "JSCRuntime",
66 srcs = [
67 "JSCRuntime.cpp",
68 ],
69 header_namespace = "jsi",
70 exported_headers = [
71 "JSCRuntime.h",
72 ],
73 cxx_exported_platform_linker_flags = [
74 (
75 "macosx-x86_64",
76 [
77 "-framework",
78 "JavaScriptCore",
79 ],
80 ),
81 ],
82 cxx_platform_deps = [
83 (
84 "^(linux|gcc|platform)",
85 [
86 "fbsource//xplat/jsc:jsc",
87 ],
88 ),
89 ],
90 fbandroid_compiler_flags = [
91 "-fexceptions",
92 "-frtti",
93 "-O3",
94 ],
95 fbandroid_deps = [
96 "fbsource//xplat/jsc:jsc",
97 ],
98 fbobjc_compiler_flags = [
99 "-Os",
100 ],
101 fbobjc_frameworks = [
102 "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework",
103 ],
104 visibility = ["PUBLIC"],
105 xplat_mangled_args = {
106 "soname": "libjscjsi.$(ext)",
107 },
108 exported_deps = [
109 react_native_xplat_dep("jsi:jsi"),
110 ],
111)