forked from lynx-family/primjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBUILD.gn
More file actions
143 lines (121 loc) · 2.74 KB
/
Copy pathBUILD.gn
File metadata and controls
143 lines (121 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Copyright 2024 The Lynx Authors. All rights reserved.
# Licensed under the Apache License Version 2.0 that can be found in the
# LICENSE file in the root directory of this source tree.
import("//Primjs.gni")
import("//testing/test.gni")
config("quickjs_public_config") {
include_dirs = [
".",
"./src/",
"./src/interpreter",
]
defines = [
"PRIMJS_MIN_LOG_LEVEL=5", # disable alog in unittests
"ENABLE_BUILTIN_SERIALIZE=1",
"CONFIG_VERSION=\"2019-09-10\"",
"LYNX_SIMPLIFY=1",
]
if (enable_quickjs_debugger) {
defines += [ "ENABLE_QUICKJS_DEBUGGER=1" ]
include_dirs += [
"./src",
"./src/inspector",
]
}
if (use_lepusng) {
defines += [ "ENABLE_LEPUSNG" ]
}
if (use_bignum) {
defines += [ "CONFIG_BIGNUM" ]
}
if (force_gc) {
defines += [ "FORCE_GC_AT_MALLOC" ]
}
if (dump_bytecode) {
defines += [ "DUMP_BYTECODE" ]
}
if (enable_mem) {
defines += [
"DUMP_LEAKS",
"DEBUG_MEMORY",
"DUMP_LEAKS",
]
}
if (enable_primjs_snapshot) {
defines += [ "ENABLE_PRIMJS_SNAPSHOT" ]
}
if (enable_compatible_mm) {
defines += [ "ENABLE_COMPATIBLE_MM" ]
}
if (enable_force_gc) {
defines += [ "ENABLE_FORCE_GC" ]
}
if (enable_tracing_gc_log) {
defines += [ "ENABLE_TRACING_GC_LOG" ]
}
if (gen_android_embedded) {
defines += [ "GEN_ANDROID_EMBEDDED" ]
}
if (enable_gc_debug_tools) {
defines += [ "ENABLE_GC_DEBUG_TOOLS" ]
}
if (enable_primjs_trace) {
defines += [ "ENABLE_PRIMJS_TRACE" ]
}
if (enable_unittests) {
defines += [
"QJS_UNITTEST",
"HEAPPROFILER_UNITTEST",
]
}
if (enable_tracing_gc) {
defines += [ "ENABLE_TRACING_GC" ]
}
cflags_cc = [
"-Wno-unused-private-field",
"-Wno-unused-variable",
"-Wno-unused-local-typedef",
"-Wno-sometimes-uninitialized",
"-Wno-uninitialized",
"-Wno-unused-function",
"-Wno-format",
"-Wno-unused-but-set-variable",
"-Wno-unknown-warning-option",
"-Wno-sign-compare",
]
if (target_os != "android" || current_toolchain == snapshot_toolchain) {
cflags_cc += [
"-Wno-c99-designator",
"-Wno-reorder-init-list",
]
}
}
config("napi_public_config") {
include_dirs = [
".",
"./src",
"./src/napi",
"./src/napi/common",
"./src/napi/env",
"./src/napi/internal",
"./src/napi/jsc/",
"./src/napi/quickjs",
"./src/napi/v8",
"./src/interpreter",
]
defines = [
"PRIMJS_MIN_LOG_LEVEL=5", # disable alog in unittests
]
if (use_rtti) {
defines += [ "NAPI_CPP_RTTI" ]
} else {
defines += [ "NAPI_DISABLE_CPP_RTTI" ]
}
}
group("all") {
deps = [ "src:src" ]
if (enable_unittests) {
testonly = true
deps += [ "./testing" ]
}
}