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_libuv%': 'false',
12 'node_use_openssl%': 'true',
13 'node_shared_openssl%': 'false',
14 'node_use_mdb%': 'false',
15 'node_v8_options%': '',
18 'lib/_debug_agent.js',
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',
53 'lib/_stream_readable.js',
54 'lib/_stream_writable.js',
55 'lib/_stream_duplex.js',
56 'lib/_stream_transform.js',
57 'lib/_stream_passthrough.js',
58 'lib/string_decoder.js',
76 'target_name': 'node',
81 'deps/cares/cares.gyp:cares'
86 'tools/msvs/genfiles',
88 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
94 'src/fs_event_wrap.cc',
99 'src/node_constants.cc',
100 'src/node_contextify.cc',
102 'src/node_http_parser.cc',
103 'src/node_javascript.cc',
107 'src/node_v8_platform.cc',
108 'src/node_stat_watcher.cc',
109 'src/node_watchdog.cc',
113 'src/signal_wrap.cc',
116 'src/string_bytes.cc',
117 'src/stream_wrap.cc',
121 'src/process_wrap.cc',
124 # headers to make for a more pleasant IDE experience
126 'src/async-wrap-inl.h',
128 'src/base-object-inl.h',
135 'src/node_constants.h',
137 'src/node_http_parser.h',
138 'src/node_internals.h',
139 'src/node_javascript.h',
140 'src/node_root_certs.h',
141 'src/node_version.h',
142 'src/node_watchdog.h',
152 'src/string_bytes.h',
158 'deps/http_parser/http_parser.h',
159 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
160 # javascript files to make for an even more pleasant IDE experience
162 # node.gyp is added to the project by default.
167 'NODE_WANT_INTERNALS=1',
168 'ARCH="<(target_arch)"',
170 'NODE_TAG="<(node_tag)"',
171 'NODE_V8_OPTIONS="<(node_v8_options)"',
175 [ 'v8_enable_i18n_support==1', {
176 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
178 '<(icu_gyp_path):icui18n',
179 '<(icu_gyp_path):icuuc',
182 [ 'icu_small=="true"', {
183 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
186 [ 'node_use_openssl=="true"', {
187 'defines': [ 'HAVE_OPENSSL=1' ],
189 'src/node_crypto.cc',
190 'src/node_crypto_bio.cc',
191 'src/node_crypto_clienthello.cc',
193 'src/node_crypto_bio.h',
194 'src/node_crypto_clienthello.h',
199 [ 'node_shared_openssl=="false"', {
201 './deps/openssl/openssl.gyp:openssl',
204 './deps/openssl/openssl.gyp:openssl-cli',
206 # Do not let unused OpenSSL symbols to slip away
209 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
213 ['OS in "linux freebsd"', {
215 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
221 'defines': [ 'HAVE_OPENSSL=0' ]
223 [ 'node_use_dtrace=="true"', {
224 'defines': [ 'HAVE_DTRACE=1' ],
226 'node_dtrace_header',
229 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
232 # DTrace is supported on linux, solaris, mac, and bsd. There are
233 # three object files associated with DTrace support, but they're
234 # not all used all the time:
236 # node_dtrace.o all configurations
237 # node_dtrace_ustack.o not supported on mac and linux
238 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
241 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
242 # actually exist. They're listed here to trick GYP into linking the
243 # corresponding object files into the final "node" executable. These
244 # object files are generated by "dtrace -G" using custom actions
245 # below, and the GYP-generated Makefiles will properly build them when
248 'sources': [ 'src/node_dtrace.cc' ],
252 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
253 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
256 [ 'OS!="mac" and OS!="linux"', {
258 'src/node_dtrace_ustack.cc',
259 'src/node_dtrace_provider.cc',
264 [ 'node_use_mdb=="true"', {
265 'dependencies': [ 'node_mdb' ],
266 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
271 [ 'node_use_etw=="true"', {
272 'defines': [ 'HAVE_ETW=1' ],
273 'dependencies': [ 'node_etw' ],
275 'src/node_win32_etw_provider.h',
276 'src/node_win32_etw_provider-inl.h',
277 'src/node_win32_etw_provider.cc',
278 'src/node_dtrace.cc',
279 'tools/msvs/genfiles/node_etw_provider.h',
280 'tools/msvs/genfiles/node_etw_provider.rc',
283 [ 'node_use_perfctr=="true"', {
284 'defines': [ 'HAVE_PERFCTR=1' ],
285 'dependencies': [ 'node_perfctr' ],
287 'src/node_win32_perfctr_provider.h',
288 'src/node_win32_perfctr_provider.cc',
289 'src/node_counters.cc',
290 'src/node_counters.h',
291 'tools/msvs/genfiles/node_perfctr_provider.rc',
294 [ 'v8_postmortem_support=="true"', {
295 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
298 '-Wl,-force_load,<(V8_BASE)',
302 [ 'node_shared_v8=="false"', {
304 'deps/v8/include/v8.h',
305 'deps/v8/include/v8-debug.h',
307 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
310 [ 'node_shared_zlib=="false"', {
311 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
314 [ 'node_shared_http_parser=="false"', {
315 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
318 [ 'node_shared_libuv=="false"', {
319 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
328 # we need to use node's preferred "win32" rather than gyp's preferred "win"
332 'libraries': [ '-lpsapi.lib' ]
334 'defines': [ '__POSIX__' ],
337 # linking Corefoundation is needed since certain OSX debugging tools
338 # like Instruments require it for some features
339 'libraries': [ '-framework CoreFoundation' ],
344 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
360 'PLATFORM="solaris"',
363 # we need to use node's preferred "sunos"
364 # rather than gyp's preferred "solaris"
368 [ 'OS=="freebsd" or OS=="linux"', {
369 'ldflags': [ '-Wl,-z,noexecstack' ],
372 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
375 'OS in "linux freebsd" and node_shared_v8=="false"', {
377 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
383 'SubSystem': 1, # /subsystem:console
386 'EmbedManifest': 'true',
387 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
391 # generate ETW header and resource files
393 'target_name': 'node_etw',
396 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
399 'action_name': 'node_etw',
400 'inputs': [ 'src/res/node_etw_provider.man' ],
402 'tools/msvs/genfiles/node_etw_provider.rc',
403 'tools/msvs/genfiles/node_etw_provider.h',
404 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
406 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
412 # generate perf counter header and resource files
414 'target_name': 'node_perfctr',
417 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
420 'action_name': 'node_perfctr_man',
421 'inputs': [ 'src/res/node_perfctr_provider.man' ],
423 'tools/msvs/genfiles/node_perfctr_provider.h',
424 'tools/msvs/genfiles/node_perfctr_provider.rc',
425 'tools/msvs/genfiles/MSG00001.BIN',
427 'action': [ 'ctrpp <@(_inputs) '
428 '-o tools/msvs/genfiles/node_perfctr_provider.h '
429 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
437 'target_name': 'node_js2c',
439 'toolsets': ['host'],
442 'action_name': 'node_js2c',
448 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
451 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
452 'inputs': [ 'src/notrace_macros.py' ]
454 [ 'node_use_perfctr=="false"', {
455 'inputs': [ 'src/perfctr_macros.py' ]
468 'target_name': 'node_dtrace_header',
471 [ 'node_use_dtrace=="true" and OS!="linux"', {
474 'action_name': 'node_dtrace_header',
475 'inputs': [ 'src/node_provider.d' ],
476 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
477 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
478 '-o', '<@(_outputs)' ]
482 [ 'node_use_dtrace=="true" and OS=="linux"', {
485 'action_name': 'node_dtrace_header',
486 'inputs': [ 'src/node_provider.d' ],
487 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
488 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
489 '-o', '<@(_outputs)' ]
496 'target_name': 'node_mdb',
499 [ 'node_use_mdb=="true"',
501 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
504 'action_name': 'node_mdb',
505 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
506 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
508 [ 'target_arch=="ia32"', {
509 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
511 [ 'target_arch=="x64"', {
512 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
522 'target_name': 'node_dtrace_provider',
525 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
528 'action_name': 'node_dtrace_provider_o',
530 '<(OBJ_DIR)/libuv/deps/uv/src/unix/core.o',
531 '<(OBJ_DIR)/node/src/node_dtrace.o',
534 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
536 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
537 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
538 '-o', '<@(_outputs)' ]
542 [ 'node_use_dtrace=="true" and OS=="linux"', {
545 'action_name': 'node_dtrace_provider_o',
546 'inputs': [ 'src/node_provider.d' ],
548 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
551 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
555 'action_name': 'libuv_dtrace_provider_o',
556 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
558 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
561 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
569 'target_name': 'node_dtrace_ustack',
572 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
575 'action_name': 'node_dtrace_ustack_constants',
580 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
583 'tools/genv8constants.py',
589 'action_name': 'node_dtrace_ustack',
592 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
595 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
598 [ 'target_arch=="ia32"', {
600 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
601 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
604 [ 'target_arch=="x64"', {
606 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
607 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
617 'target_name': 'specialize_node_d',
620 [ 'node_use_dtrace=="true"', {
623 'action_name': 'specialize_node_d',
628 '<(PRODUCT_DIR)/node.d',
631 'tools/specialize_node_d.py',