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'
255 [ 'OS!="mac" and OS!="linux"', {
257 'src/node_dtrace_ustack.cc',
258 'src/node_dtrace_provider.cc',
263 [ 'node_use_mdb=="true"', {
264 'dependencies': [ 'node_mdb' ],
265 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
270 [ 'node_use_etw=="true"', {
271 'defines': [ 'HAVE_ETW=1' ],
272 'dependencies': [ 'node_etw' ],
274 'src/node_win32_etw_provider.h',
275 'src/node_win32_etw_provider-inl.h',
276 'src/node_win32_etw_provider.cc',
277 'src/node_dtrace.cc',
278 'tools/msvs/genfiles/node_etw_provider.h',
279 'tools/msvs/genfiles/node_etw_provider.rc',
282 [ 'node_use_perfctr=="true"', {
283 'defines': [ 'HAVE_PERFCTR=1' ],
284 'dependencies': [ 'node_perfctr' ],
286 'src/node_win32_perfctr_provider.h',
287 'src/node_win32_perfctr_provider.cc',
288 'src/node_counters.cc',
289 'src/node_counters.h',
290 'tools/msvs/genfiles/node_perfctr_provider.rc',
293 [ 'v8_postmortem_support=="true"', {
294 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
297 '-Wl,-force_load,<(V8_BASE)',
301 [ 'node_shared_v8=="false"', {
303 'deps/v8/include/v8.h',
304 'deps/v8/include/v8-debug.h',
306 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
309 [ 'node_shared_zlib=="false"', {
310 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
313 [ 'node_shared_http_parser=="false"', {
314 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
317 [ 'node_shared_libuv=="false"', {
318 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
327 # we need to use node's preferred "win32" rather than gyp's preferred "win"
331 'libraries': [ '-lpsapi.lib' ]
333 'defines': [ '__POSIX__' ],
336 # linking Corefoundation is needed since certain OSX debugging tools
337 # like Instruments require it for some features
338 'libraries': [ '-framework CoreFoundation' ],
343 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
359 'PLATFORM="solaris"',
362 # we need to use node's preferred "sunos"
363 # rather than gyp's preferred "solaris"
367 [ 'OS=="freebsd" or OS=="linux"', {
368 'ldflags': [ '-Wl,-z,noexecstack' ],
371 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
374 'OS in "linux freebsd" and node_shared_v8=="false"', {
376 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
382 'SubSystem': 1, # /subsystem:console
385 'EmbedManifest': 'true',
386 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
390 # generate ETW header and resource files
392 'target_name': 'node_etw',
395 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
398 'action_name': 'node_etw',
399 'inputs': [ 'src/res/node_etw_provider.man' ],
401 'tools/msvs/genfiles/node_etw_provider.rc',
402 'tools/msvs/genfiles/node_etw_provider.h',
403 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
405 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
411 # generate perf counter header and resource files
413 'target_name': 'node_perfctr',
416 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
419 'action_name': 'node_perfctr_man',
420 'inputs': [ 'src/res/node_perfctr_provider.man' ],
422 'tools/msvs/genfiles/node_perfctr_provider.h',
423 'tools/msvs/genfiles/node_perfctr_provider.rc',
424 'tools/msvs/genfiles/MSG00001.BIN',
426 'action': [ 'ctrpp <@(_inputs) '
427 '-o tools/msvs/genfiles/node_perfctr_provider.h '
428 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
436 'target_name': 'node_js2c',
438 'toolsets': ['host'],
441 'action_name': 'node_js2c',
447 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
450 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
451 'inputs': [ 'src/notrace_macros.py' ]
453 [ 'node_use_perfctr=="false"', {
454 'inputs': [ 'src/perfctr_macros.py' ]
467 'target_name': 'node_dtrace_header',
470 [ 'node_use_dtrace=="true" and OS!="linux"', {
473 'action_name': 'node_dtrace_header',
474 'inputs': [ 'src/node_provider.d' ],
475 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
476 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
477 '-o', '<@(_outputs)' ]
481 [ 'node_use_dtrace=="true" and OS=="linux"', {
484 'action_name': 'node_dtrace_header',
485 'inputs': [ 'src/node_provider.d' ],
486 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
487 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
488 '-o', '<@(_outputs)' ]
495 'target_name': 'node_mdb',
498 [ 'node_use_mdb=="true"',
500 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
503 'action_name': 'node_mdb',
504 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
505 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
507 [ 'target_arch=="ia32"', {
508 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
510 [ 'target_arch=="x64"', {
511 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
521 'target_name': 'node_dtrace_provider',
524 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
527 'action_name': 'node_dtrace_provider_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 '<@(_inputs)', '-o', '<@(_outputs)' ]
539 [ 'node_use_dtrace=="true" and OS=="linux"', {
542 'action_name': 'node_dtrace_provider_o',
543 'inputs': [ 'src/node_provider.d' ],
545 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
548 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
556 'target_name': 'node_dtrace_ustack',
559 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
562 'action_name': 'node_dtrace_ustack_constants',
567 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
570 'tools/genv8constants.py',
576 'action_name': 'node_dtrace_ustack',
579 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
582 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
585 [ 'target_arch=="ia32"', {
587 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
588 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
591 [ 'target_arch=="x64"', {
593 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
594 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
604 'target_name': 'specialize_node_d',
607 [ 'node_use_dtrace=="true"', {
610 'action_name': 'specialize_node_d',
615 '<(PRODUCT_DIR)/node.d',
618 'tools/specialize_node_d.py',