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__' ],
322 # linking Corefoundation is needed since certain OSX debugging tools
323 # like Instruments require it for some features
324 'libraries': [ '-framework CoreFoundation' ],
329 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
345 'PLATFORM="solaris"',
348 # we need to use node's preferred "sunos"
349 # rather than gyp's preferred "solaris"
354 'OS=="linux" and node_shared_v8=="false"', {
356 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
362 'SubSystem': 1, # /subsystem:console
366 # generate ETW header and resource files
368 'target_name': 'node_etw',
371 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
374 'action_name': 'node_etw',
375 'inputs': [ 'src/res/node_etw_provider.man' ],
377 'tools/msvs/genfiles/node_etw_provider.rc',
378 'tools/msvs/genfiles/node_etw_provider.h',
379 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
381 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
387 # generate perf counter header and resource files
389 'target_name': 'node_perfctr',
392 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
395 'action_name': 'node_perfctr_man',
396 'inputs': [ 'src/res/node_perfctr_provider.man' ],
398 'tools/msvs/genfiles/node_perfctr_provider.h',
399 'tools/msvs/genfiles/node_perfctr_provider.rc',
400 'tools/msvs/genfiles/MSG00001.BIN',
402 'action': [ 'ctrpp <@(_inputs) '
403 '-o tools/msvs/genfiles/node_perfctr_provider.h '
404 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
412 'target_name': 'node_js2c',
414 'toolsets': ['host'],
417 'action_name': 'node_js2c',
423 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
426 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
427 'inputs': [ 'src/notrace_macros.py' ]
429 [ 'node_use_perfctr=="false"', {
430 'inputs': [ 'src/perfctr_macros.py' ]
443 'target_name': 'node_dtrace_header',
446 [ 'node_use_dtrace=="true"', {
449 'action_name': 'node_dtrace_header',
450 'inputs': [ 'src/node_provider.d' ],
451 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
452 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
453 '-o', '<@(_outputs)' ]
460 'target_name': 'node_mdb',
463 [ 'node_use_mdb=="true"',
465 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
468 'action_name': 'node_mdb',
469 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
470 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
472 [ 'target_arch=="ia32"', {
473 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
475 [ 'target_arch=="x64"', {
476 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
486 'target_name': 'node_dtrace_provider',
489 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
492 'action_name': 'node_dtrace_provider_o',
494 '<(OBJ_DIR)/libuv/deps/uv/src/unix/core.o',
495 '<(OBJ_DIR)/node/src/node_dtrace.o',
498 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
500 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
501 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
502 '-o', '<@(_outputs)' ]
506 [ 'node_use_dtrace=="true" and OS=="linux"', {
509 'action_name': 'node_dtrace_provider_o',
510 'inputs': [ 'src/node_provider.d' ],
512 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
515 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
519 'action_name': 'libuv_dtrace_provider_o',
520 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
522 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
525 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
533 'target_name': 'node_dtrace_ustack',
536 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
539 'action_name': 'node_dtrace_ustack_constants',
544 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
547 'tools/genv8constants.py',
553 'action_name': 'node_dtrace_ustack',
556 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
559 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
562 [ 'target_arch=="ia32"', {
564 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
565 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
568 [ 'target_arch=="x64"', {
570 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
571 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
581 'target_name': 'specialize_node_d',
584 [ 'node_use_dtrace=="true"', {
587 'action_name': 'specialize_node_d',
592 '<(PRODUCT_DIR)/node.d',
595 'tools/specialize_node_d.py',