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',
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',
74 'target_name': 'node',
79 'deps/cares/cares.gyp:cares'
84 'tools/msvs/genfiles',
86 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
92 'src/fs_event_wrap.cc',
97 'src/node_constants.cc',
98 'src/node_contextify.cc',
100 'src/node_http_parser.cc',
101 'src/node_javascript.cc',
105 'src/node_v8_platform.cc',
106 'src/node_stat_watcher.cc',
107 'src/node_watchdog.cc',
111 'src/signal_wrap.cc',
114 'src/string_bytes.cc',
115 'src/stream_wrap.cc',
119 'src/process_wrap.cc',
122 # headers to make for a more pleasant IDE experience
124 'src/async-wrap-inl.h',
126 'src/base-object-inl.h',
133 'src/node_constants.h',
135 'src/node_http_parser.h',
136 'src/node_internals.h',
137 'src/node_javascript.h',
138 'src/node_root_certs.h',
139 'src/node_version.h',
140 'src/node_watchdog.h',
150 'src/string_bytes.h',
156 'deps/http_parser/http_parser.h',
157 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
158 # javascript files to make for an even more pleasant IDE experience
160 # node.gyp is added to the project by default.
165 'NODE_WANT_INTERNALS=1',
166 'ARCH="<(target_arch)"',
168 'NODE_TAG="<(node_tag)"',
169 'NODE_V8_OPTIONS="<(node_v8_options)"',
173 [ 'v8_enable_i18n_support==1', {
174 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
176 '<(icu_gyp_path):icui18n',
177 '<(icu_gyp_path):icuuc',
180 [ 'icu_small=="true"', {
181 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
184 [ 'node_use_openssl=="true"', {
185 'defines': [ 'HAVE_OPENSSL=1' ],
187 'src/node_crypto.cc',
188 'src/node_crypto_bio.cc',
189 'src/node_crypto_clienthello.cc',
191 'src/node_crypto_bio.h',
192 'src/node_crypto_clienthello.h',
197 [ 'node_shared_openssl=="false"', {
199 './deps/openssl/openssl.gyp:openssl',
202 './deps/openssl/openssl.gyp:openssl-cli',
204 # Do not let unused OpenSSL symbols to slip away
207 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
211 ['OS in "linux freebsd"', {
213 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
219 'defines': [ 'HAVE_OPENSSL=0' ]
221 [ 'node_use_dtrace=="true"', {
222 'defines': [ 'HAVE_DTRACE=1' ],
224 'node_dtrace_header',
227 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
230 # DTrace is supported on linux, solaris, mac, and bsd. There are
231 # three object files associated with DTrace support, but they're
232 # not all used all the time:
234 # node_dtrace.o all configurations
235 # node_dtrace_ustack.o not supported on mac and linux
236 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
239 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
240 # actually exist. They're listed here to trick GYP into linking the
241 # corresponding object files into the final "node" executable. These
242 # object files are generated by "dtrace -G" using custom actions
243 # below, and the GYP-generated Makefiles will properly build them when
246 'sources': [ 'src/node_dtrace.cc' ],
250 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
251 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
254 [ 'OS!="mac" and OS!="linux"', {
256 'src/node_dtrace_ustack.cc',
257 'src/node_dtrace_provider.cc',
262 [ 'node_use_mdb=="true"', {
263 'dependencies': [ 'node_mdb' ],
264 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
269 [ 'node_use_etw=="true"', {
270 'defines': [ 'HAVE_ETW=1' ],
271 'dependencies': [ 'node_etw' ],
273 'src/node_win32_etw_provider.h',
274 'src/node_win32_etw_provider-inl.h',
275 'src/node_win32_etw_provider.cc',
276 'src/node_dtrace.cc',
277 'tools/msvs/genfiles/node_etw_provider.h',
278 'tools/msvs/genfiles/node_etw_provider.rc',
281 [ 'node_use_perfctr=="true"', {
282 'defines': [ 'HAVE_PERFCTR=1' ],
283 'dependencies': [ 'node_perfctr' ],
285 'src/node_win32_perfctr_provider.h',
286 'src/node_win32_perfctr_provider.cc',
287 'src/node_counters.cc',
288 'src/node_counters.h',
289 'tools/msvs/genfiles/node_perfctr_provider.rc',
292 [ 'v8_postmortem_support=="true"', {
293 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
296 '-Wl,-force_load,<(V8_BASE)',
300 [ 'node_shared_v8=="false"', {
302 'deps/v8/include/v8.h',
303 'deps/v8/include/v8-debug.h',
305 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
308 [ 'node_shared_zlib=="false"', {
309 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
312 [ 'node_shared_http_parser=="false"', {
313 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
316 [ 'node_shared_libuv=="false"', {
317 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
326 # we need to use node's preferred "win32" rather than gyp's preferred "win"
330 'libraries': [ '-lpsapi.lib' ]
332 'defines': [ '__POSIX__' ],
335 # linking Corefoundation is needed since certain OSX debugging tools
336 # like Instruments require it for some features
337 'libraries': [ '-framework CoreFoundation' ],
342 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
358 'PLATFORM="solaris"',
361 # we need to use node's preferred "sunos"
362 # rather than gyp's preferred "solaris"
366 [ 'OS=="freebsd" or OS=="linux"', {
367 'ldflags': [ '-Wl,-z,noexecstack' ],
370 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
373 'OS in "linux freebsd" and node_shared_v8=="false"', {
375 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
381 'SubSystem': 1, # /subsystem:console
384 'EmbedManifest': 'true',
385 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
389 # generate ETW header and resource files
391 'target_name': 'node_etw',
394 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
397 'action_name': 'node_etw',
398 'inputs': [ 'src/res/node_etw_provider.man' ],
400 'tools/msvs/genfiles/node_etw_provider.rc',
401 'tools/msvs/genfiles/node_etw_provider.h',
402 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
404 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
410 # generate perf counter header and resource files
412 'target_name': 'node_perfctr',
415 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
418 'action_name': 'node_perfctr_man',
419 'inputs': [ 'src/res/node_perfctr_provider.man' ],
421 'tools/msvs/genfiles/node_perfctr_provider.h',
422 'tools/msvs/genfiles/node_perfctr_provider.rc',
423 'tools/msvs/genfiles/MSG00001.BIN',
425 'action': [ 'ctrpp <@(_inputs) '
426 '-o tools/msvs/genfiles/node_perfctr_provider.h '
427 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
435 'target_name': 'node_js2c',
437 'toolsets': ['host'],
440 'action_name': 'node_js2c',
446 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
449 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
450 'inputs': [ 'src/notrace_macros.py' ]
452 [ 'node_use_perfctr=="false"', {
453 'inputs': [ 'src/perfctr_macros.py' ]
466 'target_name': 'node_dtrace_header',
469 [ 'node_use_dtrace=="true" and OS!="linux"', {
472 'action_name': 'node_dtrace_header',
473 'inputs': [ 'src/node_provider.d' ],
474 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
475 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
476 '-o', '<@(_outputs)' ]
480 [ 'node_use_dtrace=="true" and OS=="linux"', {
483 'action_name': 'node_dtrace_header',
484 'inputs': [ 'src/node_provider.d' ],
485 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
486 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
487 '-o', '<@(_outputs)' ]
494 'target_name': 'node_mdb',
497 [ 'node_use_mdb=="true"',
499 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
502 'action_name': 'node_mdb',
503 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
504 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
506 [ 'target_arch=="ia32"', {
507 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
509 [ 'target_arch=="x64"', {
510 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
520 'target_name': 'node_dtrace_provider',
523 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
526 'action_name': 'node_dtrace_provider_o',
528 '<(OBJ_DIR)/libuv/deps/uv/src/unix/core.o',
529 '<(OBJ_DIR)/node/src/node_dtrace.o',
532 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
534 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
535 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
536 '-o', '<@(_outputs)' ]
540 [ 'node_use_dtrace=="true" and OS=="linux"', {
543 'action_name': 'node_dtrace_provider_o',
544 'inputs': [ 'src/node_provider.d' ],
546 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
549 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
553 'action_name': 'libuv_dtrace_provider_o',
554 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
556 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
559 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
567 'target_name': 'node_dtrace_ustack',
570 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
573 'action_name': 'node_dtrace_ustack_constants',
578 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
581 'tools/genv8constants.py',
587 'action_name': 'node_dtrace_ustack',
590 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
593 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
596 [ 'target_arch=="ia32"', {
598 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
599 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
602 [ 'target_arch=="x64"', {
604 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
605 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
615 'target_name': 'specialize_node_d',
618 [ 'node_use_dtrace=="true"', {
621 'action_name': 'specialize_node_d',
626 '<(PRODUCT_DIR)/node.d',
629 'tools/specialize_node_d.py',