forked from lynx-family/lynx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.gni
More file actions
139 lines (103 loc) · 3.83 KB
/
Copy pathconfig.gni
File metadata and controls
139 lines (103 loc) · 3.83 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
# 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.
if (is_android) {
import("//build/config/android/config.gni")
} else if (is_harmony) {
import("//build/config/harmony/config.gni")
}
if (target_cpu == "arm" || target_cpu == "arm64") {
import("//build/config/arm.gni")
}
import("//build_overrides/oliver.gni")
# global configs
declare_args() {
# Whether to enable trace
# There are three modes: "perfetto", "systrace", "none"
# 1. "perfetto" : enable perfetto trace
# 2. "systrace" : enable system trace, only for Android
# 3. "none" : disable trace, default value
enable_trace = "none"
build_number = "1"
build_version = "1.0.0"
# Whether to enable unit tests
enable_unittests = false
build_lynx_lepus_node = false
enable_fuzzertests = false
# Whether to enable encoder unit tests
is_encoder_ut = false
# Whether enable v8 engine.
enable_v8 = true
# Whether enable frozen mode. Frozen mode is used for ut to disable log printing
enable_frozen_mode = false
# Build lite production
enable_lite = false
enable_lite_production = false
# Whether enable recorder.
enable_recorder = is_debug
# Whether enable richtext.
enable_richtext = false
# use napi from primjs with primjs suffix.
use_primjs_napi = false
# enable_lepusng_worklet corresponds the macro of ENABLE_LEPUSNG_WORKLET
enable_lepusng_worklet = false
# enable_inspector corresponds the macro of ENABLE_INSPECTOR
enable_inspector = false
# enable_inspector_test corresponds the macro of INSPECTOR_TEST
enable_inspector_test = false
# in some situation we don't want to build logbox, we can disable this flag
enable_logbox = true
# enable_lepusng_bytecode_opt corresponds the macro of ENABLE_LEPUSNG_BYTECODE_OPT
enable_lepusng_bytecode_opt = false
# disable primjs symbol hidden
disable_primjs_symbol_visibility_hidden = false
# enable primjs prebuilt lib
enable_primjs_prebuilt_lib = false
# Which directory the Node header will be copied into
node_headers_dst_dir = node_headers_dst
# enable lynx clang static checker plugin
enable_lynx_clang_plugin = false
# enable 16kb align for android
enable_16kb_align = false
# Whether enable relocations packing optimization
enable_packrel = false
# compiler optimization level
compiler_optimization_level = "Oz"
enable_harmony_shared = false
# Controls the symbol visibility of the lynx library.
# If true, symbols decorated with `LYNX_EXPORT` are exported.
# Otherwise, no symbols from this library are exported.
lynx_export_symbols = true
# Whether to enable headless engine with host compiling.
is_headless = false
# Whether to enable embedder layer for desktop.
# If true, we can eliminate some unused platform-layer compilation units.
desktop_enable_embedder_layer = false
# Controls whether to use weak_node_api symbols with the _weak suffix. In some cases, this configuration needs to be enabled to avoid conflicts with other NAPI symbols.
use_weak_suffix_napi = true
# Controls whether to enable RTS NG
disable_rts_ng = false
# Controls whether to disable RTS DevTool integration
disable_rts_devtool = false
}
declare_args() {
v8_deps = [ "//third_party/NativeScript:NativeScript" ]
if (is_ios || is_mac) {
v8_headers_search_path = "//$lynx_dir/third_party/NativeScript/include"
} else {
v8_headers_search_path = rebase_path("third_party/v8/11.1.277/include")
}
}
if (is_android) {
if (!is_headless) {
enable_inspector = !enable_lite_production
}
enable_inspector_test = !enable_lite_production
} else if (is_ios || is_mac) {
enable_inspector_test = true
}
if (enable_lite) {
# these args are up to enable_lite arg
enable_v8 = false
enable_lepusng_worklet = false
}