@@ -98,12 +98,7 @@ chdir_action("node_js2c") {
98
98
args += rebase_path (macro_inputs + config_gypi )
99
99
}
100
100
101
- config (" node_lib_config" ) {
102
- include_dirs = [ " src" ]
103
-
104
- # FIXME(deepak1556): include paths should be corrected,
105
- # refer https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.g71ecd450e_2_702
106
- cflags = [ " -Wno-microsoft-include" ]
101
+ config (" node_features" ) {
107
102
defines = []
108
103
if (node_enable_inspector ) {
109
104
defines += [ " HAVE_INSPECTOR=1" ]
@@ -120,41 +115,32 @@ config("node_lib_config") {
120
115
} else {
121
116
defines += [ " NODE_HAVE_I18N_SUPPORT=0" ]
122
117
}
118
+ if (node_use_v8_platform ) {
119
+ defines += [ " NODE_USE_V8_PLATFORM=1" ]
120
+ } else {
121
+ defines += [ " NODE_USE_V8_PLATFORM=0" ]
122
+ }
123
123
}
124
124
125
- component (" node_lib" ) {
126
- deps = [
127
- " :node_js2c" ,
128
- " deps/cares" ,
129
- " deps/http_parser" ,
130
- " deps/llhttp" ,
131
- " deps/nghttp2" ,
132
- " deps/zlib" ,
133
- " //v8:v8_libplatform" ,
134
- ]
135
- public_deps = [
136
- " deps/uv" ,
137
- " //electron:atom_js2c" ,
138
- " //v8" ,
139
- ]
140
- public_configs = [ " :node_lib_config" ]
125
+ config (" node_lib_config" ) {
141
126
include_dirs = [ " src" ]
142
- libs = []
143
- cflags_cc = [
144
- " -Wno-deprecated-declarations" ,
145
- " -Wno-implicit-fallthrough" ,
146
- " -Wno-return-type" ,
147
- " -Wno-sometimes-uninitialized" ,
148
- " -Wno-string-plus-int" ,
149
- " -Wno-unused-label" ,
150
- " -Wno-unused-private-field" ,
151
- " -Wno-unused-variable" ,
127
+
128
+ # FIXME(deepak1556): include paths should be corrected,
129
+ # refer https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.g71ecd450e_2_702
130
+ cflags = [ " -Wno-microsoft-include" ]
131
+
132
+ configs = [ " :node_features" ]
133
+ }
134
+
135
+ config (" node_internal_config" ) {
136
+ visibility = [
137
+ " :*" ,
138
+ " src/inspector:*" ,
152
139
]
153
140
defines = [
154
141
" NODE_WANT_INTERNALS=1" ,
155
142
" NODE_IMPLEMENTATION" ,
156
143
]
157
-
158
144
if (is_component_build ) {
159
145
defines += [
160
146
" BUILDING_V8_SHARED" ,
@@ -199,6 +185,44 @@ component("node_lib") {
199
185
defines += [ " NODE_RELEASE_URLBASE=\" $node_release_urlbase \" " ]
200
186
}
201
187
188
+ if (node_use_openssl ) {
189
+ defines += [
190
+ " NODE_OPENSSL_SYSTEM_CERT_PATH=\" $node_openssl_system_ca_path \" " ,
191
+ " EVP_CTRL_CCM_SET_TAG=EVP_CTRL_GCM_SET_TAG" ,
192
+ ]
193
+ }
194
+ }
195
+
196
+ component (" node_lib" ) {
197
+ deps = [
198
+ " :node_js2c" ,
199
+ " deps/cares" ,
200
+ " deps/http_parser" ,
201
+ " deps/llhttp" ,
202
+ " deps/nghttp2" ,
203
+ " deps/zlib" ,
204
+ " //v8:v8_libplatform" ,
205
+ ]
206
+ public_deps = [
207
+ " deps/uv" ,
208
+ " //electron:atom_js2c" ,
209
+ " //v8" ,
210
+ ]
211
+ configs += [ " :node_internal_config" ]
212
+ public_configs = [ " :node_lib_config" ]
213
+ include_dirs = [ " src" ]
214
+ libs = []
215
+ cflags_cc = [
216
+ " -Wno-deprecated-declarations" ,
217
+ " -Wno-implicit-fallthrough" ,
218
+ " -Wno-return-type" ,
219
+ " -Wno-sometimes-uninitialized" ,
220
+ " -Wno-string-plus-int" ,
221
+ " -Wno-unused-label" ,
222
+ " -Wno-unused-private-field" ,
223
+ " -Wno-unused-variable" ,
224
+ ]
225
+
202
226
if (v8_enable_i18n_support ) {
203
227
deps += [ " //third_party/icu" ]
204
228
}
@@ -246,17 +270,8 @@ component("node_lib") {
246
270
" src/tls_wrap.cc" ,
247
271
" src/tls_wrap.h" ,
248
272
]
249
- defines += [
250
- " NODE_OPENSSL_SYSTEM_CERT_PATH=\" $node_openssl_system_ca_path \" " ,
251
- " EVP_CTRL_CCM_SET_TAG=EVP_CTRL_GCM_SET_TAG" ,
252
- ]
253
273
cflags_cc += [ " -Wno-sign-compare" ]
254
274
}
255
- if (node_use_v8_platform ) {
256
- defines += [ " NODE_USE_V8_PLATFORM=1" ]
257
- } else {
258
- defines += [ " NODE_USE_V8_PLATFORM=0" ]
259
- }
260
275
}
261
276
262
277
# #### node_headers
0 commit comments