3 'v8_use_snapshot%': 'true',
4 'node_use_dtrace%': 'false',
5 'node_use_etw%': 'false',
6 'node_use_perfctr%': 'false',
7 'node_has_winsdk%': 'false',
8 'node_shared_v8%': 'false',
9 'node_shared_zlib%': 'false',
10 'node_shared_http_parser%': 'false',
11 'node_shared_cares%': 'false',
12 'node_shared_libuv%': 'false',
13 'node_use_openssl%': 'true',
14 'node_shared_openssl%': 'false',
15 'node_use_mdb%': 'false',
16 'node_v8_options%': '',
23 'lib/child_process.js',
36 'lib/_http_client.js',
37 'lib/_http_common.js',
38 'lib/_http_incoming.js',
39 'lib/_http_outgoing.js',
40 'lib/_http_server.js',
52 'lib/_stream_readable.js',
53 'lib/_stream_writable.js',
54 'lib/_stream_duplex.js',
55 'lib/_stream_transform.js',
56 'lib/_stream_passthrough.js',
57 'lib/string_decoder.js',
75 'target_name': 'node',
84 'tools/msvs/genfiles',
86 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
90 'src/fs_event_wrap.cc',
95 'src/node_constants.cc',
96 'src/node_contextify.cc',
98 'src/node_http_parser.cc',
99 'src/node_javascript.cc',
103 'src/node_stat_watcher.cc',
104 'src/node_watchdog.cc',
107 'src/signal_wrap.cc',
110 'src/string_bytes.cc',
111 'src/stream_wrap.cc',
115 'src/process_wrap.cc',
118 # headers to make for a more pleasant IDE experience
120 'src/async-wrap-inl.h',
122 'src/base-object-inl.h',
128 'src/node_constants.h',
130 'src/node_http_parser.h',
131 'src/node_internals.h',
132 'src/node_javascript.h',
133 'src/node_root_certs.h',
134 'src/node_version.h',
135 'src/node_watchdog.h',
144 'src/string_bytes.h',
150 'deps/http_parser/http_parser.h',
151 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
152 # javascript files to make for an even more pleasant IDE experience
154 # node.gyp is added to the project by default.
159 'NODE_WANT_INTERNALS=1',
160 'ARCH="<(target_arch)"',
162 'NODE_TAG="<(node_tag)"',
163 'NODE_V8_OPTIONS="<(node_v8_options)"',
167 [ 'node_use_openssl=="true"', {
168 'defines': [ 'HAVE_OPENSSL=1' ],
170 'src/node_crypto.cc',
171 'src/node_crypto_bio.cc',
172 'src/node_crypto_clienthello.cc',
174 'src/node_crypto_bio.h',
175 'src/node_crypto_clienthello.h',
180 [ 'node_shared_openssl=="false"', {
182 './deps/openssl/openssl.gyp:openssl',
185 './deps/openssl/openssl.gyp:openssl-cli',
187 # Do not let unused OpenSSL symbols to slip away
190 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
196 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
202 'defines': [ 'HAVE_OPENSSL=0' ]
204 [ 'node_use_dtrace=="true"', {
205 'defines': [ 'HAVE_DTRACE=1' ],
207 'node_dtrace_header',
210 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
213 # DTrace is supported on linux, solaris, mac, and bsd. There are
214 # three object files associated with DTrace support, but they're
215 # not all used all the time:
217 # node_dtrace.o all configurations
218 # node_dtrace_ustack.o not supported on mac and linux
219 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
222 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
223 # actually exist. They're listed here to trick GYP into linking the
224 # corresponding object files into the final "node" executable. These
225 # object files are generated by "dtrace -G" using custom actions
226 # below, and the GYP-generated Makefiles will properly build them when
229 'sources': [ 'src/node_dtrace.cc' ],
233 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
234 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
237 [ 'OS!="mac" and OS!="linux"', {
239 'src/node_dtrace_ustack.cc',
240 'src/node_dtrace_provider.cc',
245 [ 'node_use_mdb=="true"', {
246 'dependencies': [ 'node_mdb' ],
247 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
252 [ 'node_use_etw=="true"', {
253 'defines': [ 'HAVE_ETW=1' ],
254 'dependencies': [ 'node_etw' ],
256 'src/node_win32_etw_provider.h',
257 'src/node_win32_etw_provider-inl.h',
258 'src/node_win32_etw_provider.cc',
259 'src/node_dtrace.cc',
260 'tools/msvs/genfiles/node_etw_provider.h',
261 'tools/msvs/genfiles/node_etw_provider.rc',
264 [ 'node_use_perfctr=="true"', {
265 'defines': [ 'HAVE_PERFCTR=1' ],
266 'dependencies': [ 'node_perfctr' ],
268 'src/node_win32_perfctr_provider.h',
269 'src/node_win32_perfctr_provider.cc',
270 'src/node_counters.cc',
271 'src/node_counters.h',
272 'tools/msvs/genfiles/node_perfctr_provider.rc',
275 [ 'v8_postmortem_support=="true"', {
276 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
279 '-Wl,-force_load,<(V8_BASE)',
283 [ 'node_shared_v8=="false"', {
285 'deps/v8/include/v8.h',
286 'deps/v8/include/v8-debug.h',
288 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
291 [ 'node_shared_zlib=="false"', {
292 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
295 [ 'node_shared_http_parser=="false"', {
296 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
299 [ 'node_shared_cares=="false"', {
300 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
303 [ 'node_shared_libuv=="false"', {
304 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
313 # we need to use node's preferred "win32" rather than gyp's preferred "win"
317 'libraries': [ '-lpsapi.lib' ]
319 'defines': [ '__POSIX__' ],
326 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
342 'PLATFORM="solaris"',
345 # we need to use node's preferred "sunos"
346 # rather than gyp's preferred "solaris"
351 'OS=="linux" and node_shared_v8=="false"', {
353 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
359 'SubSystem': 1, # /subsystem:console
363 # generate ETW header and resource files
365 'target_name': 'node_etw',
368 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
371 'action_name': 'node_etw',
372 'inputs': [ 'src/res/node_etw_provider.man' ],
374 'tools/msvs/genfiles/node_etw_provider.rc',
375 'tools/msvs/genfiles/node_etw_provider.h',
376 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
378 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
384 # generate perf counter header and resource files
386 'target_name': 'node_perfctr',
389 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
392 'action_name': 'node_perfctr_man',
393 'inputs': [ 'src/res/node_perfctr_provider.man' ],
395 'tools/msvs/genfiles/node_perfctr_provider.h',
396 'tools/msvs/genfiles/node_perfctr_provider.rc',
397 'tools/msvs/genfiles/MSG00001.BIN',
399 'action': [ 'ctrpp <@(_inputs) '
400 '-o tools/msvs/genfiles/node_perfctr_provider.h '
401 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
409 'target_name': 'node_js2c',
411 'toolsets': ['host'],
414 'action_name': 'node_js2c',
420 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
423 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
424 'inputs': [ 'src/notrace_macros.py' ]
426 [ 'node_use_perfctr=="false"', {
427 'inputs': [ 'src/perfctr_macros.py' ]
440 'target_name': 'node_dtrace_header',
443 [ 'node_use_dtrace=="true"', {
446 'action_name': 'node_dtrace_header',
447 'inputs': [ 'src/node_provider.d' ],
448 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
449 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
450 '-o', '<@(_outputs)' ]
457 'target_name': 'node_mdb',
460 [ 'node_use_mdb=="true"',
462 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
465 'action_name': 'node_mdb',
466 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
467 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
469 [ 'target_arch=="ia32"', {
470 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
472 [ 'target_arch=="x64"', {
473 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
483 'target_name': 'node_dtrace_provider',
486 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
489 'action_name': 'node_dtrace_provider_o',
491 '<(OBJ_DIR)/libuv/deps/uv/src/unix/core.o',
492 '<(OBJ_DIR)/node/src/node_dtrace.o',
495 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
497 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
498 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
499 '-o', '<@(_outputs)' ]
503 [ 'node_use_dtrace=="true" and OS=="linux"', {
506 'action_name': 'node_dtrace_provider_o',
507 'inputs': [ 'src/node_provider.d' ],
509 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
512 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
516 'action_name': 'libuv_dtrace_provider_o',
517 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
519 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
522 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
530 'target_name': 'node_dtrace_ustack',
533 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
536 'action_name': 'node_dtrace_ustack_constants',
541 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
544 'tools/genv8constants.py',
550 'action_name': 'node_dtrace_ustack',
553 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
556 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
559 [ 'target_arch=="ia32"', {
561 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
562 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
565 [ 'target_arch=="x64"', {
567 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
568 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
578 'target_name': 'specialize_node_d',
581 [ 'node_use_dtrace=="true"', {
584 'action_name': 'specialize_node_d',
589 '<(PRODUCT_DIR)/node.d',
592 'tools/specialize_node_d.py',