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_use_systemtap%': 'false',
15 'node_shared_openssl%': 'false',
22 'lib/child_process.js',
44 'lib/_stream_readable.js',
45 'lib/_stream_writable.js',
46 'lib/_stream_duplex.js',
47 'lib/_stream_transform.js',
48 'lib/_stream_passthrough.js',
49 'lib/string_decoder.js',
63 'target_name': 'node',
72 'tools/msvs/genfiles',
74 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
78 'src/fs_event_wrap.cc',
83 'src/node_constants.cc',
84 'src/node_extensions.cc',
86 'src/node_http_parser.cc',
87 'src/node_javascript.cc',
91 'src/node_stat_watcher.cc',
96 'src/string_bytes.cc',
98 'src/slab_allocator.cc',
102 'src/process_wrap.cc',
103 'src/v8_typed_array.cc',
105 # headers to make for a more pleasant IDE experience
109 'src/node_constants.h',
111 'src/node_extensions.h',
113 'src/node_http_parser.h',
114 'src/node_javascript.h',
116 'src/node_root_certs.h',
119 'src/node_version.h',
126 'src/slab_allocator.h',
127 'src/string_bytes.h',
130 'src/v8_typed_array.h',
131 'deps/http_parser/http_parser.h',
132 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
133 # javascript files to make for an even more pleasant IDE experience
135 # node.gyp is added to the project by default.
140 'NODE_WANT_INTERNALS=1',
141 'ARCH="<(target_arch)"',
143 'NODE_TAG="<(node_tag)"',
147 [ 'node_use_openssl=="true"', {
148 'defines': [ 'HAVE_OPENSSL=1' ],
149 'sources': [ 'src/node_crypto.cc' ],
151 [ 'node_shared_openssl=="false"', {
153 './deps/openssl/openssl.gyp:openssl',
156 './deps/openssl/openssl.gyp:openssl-cli',
158 # Do not let unused OpenSSL symbols to slip away
161 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
167 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a -Wl,--no-whole-archive',
173 'defines': [ 'HAVE_OPENSSL=0' ]
175 [ 'node_use_dtrace=="true"', {
176 'defines': [ 'HAVE_DTRACE=1' ],
178 'node_dtrace_header',
181 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
184 # DTrace is supported on solaris, mac, and bsd. There are three
185 # object files associated with DTrace support, but they're not all
188 # node_dtrace.o all configurations
189 # node_dtrace_ustack.o not supported on OS X
190 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
193 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
194 # actually exist. They're listed here to trick GYP into linking the
195 # corresponding object files into the final "node" executable. These
196 # object files are generated by "dtrace -G" using custom actions
197 # below, and the GYP-generated Makefiles will properly build them when
201 'src/node_dtrace.cc',
206 'src/node_dtrace_ustack.cc',
207 'src/node_dtrace_provider.cc',
212 [ 'node_use_systemtap=="true"', {
213 'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ],
214 'dependencies': [ 'node_systemtap_header' ],
215 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
217 'src/node_dtrace.cc',
218 '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h',
221 [ 'node_use_etw=="true"', {
222 'defines': [ 'HAVE_ETW=1' ],
223 'dependencies': [ 'node_etw' ],
225 'src/node_win32_etw_provider.h',
226 'src/node_win32_etw_provider-inl.h',
227 'src/node_win32_etw_provider.cc',
228 'src/node_dtrace.cc',
229 'tools/msvs/genfiles/node_etw_provider.h',
230 'tools/msvs/genfiles/node_etw_provider.rc',
233 [ 'node_use_perfctr=="true"', {
234 'defines': [ 'HAVE_PERFCTR=1' ],
235 'dependencies': [ 'node_perfctr' ],
237 'src/node_win32_perfctr_provider.h',
238 'src/node_win32_perfctr_provider.cc',
239 'src/node_counters.cc',
240 'src/node_counters.h',
241 'tools/msvs/genfiles/node_perfctr_provider.rc',
244 [ 'node_shared_v8=="false"', {
246 'deps/v8/include/v8.h',
247 'deps/v8/include/v8-debug.h',
249 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
252 [ 'node_shared_zlib=="false"', {
253 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
256 [ 'node_shared_http_parser=="false"', {
257 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
260 [ 'node_shared_cares=="false"', {
261 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
264 [ 'node_shared_libuv=="false"', {
265 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
274 # we need to use node's preferred "win32" rather than gyp's preferred "win"
278 'libraries': [ '-lpsapi.lib' ]
280 'defines': [ '__POSIX__' ],
283 'libraries': [ '-framework Carbon' ],
288 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
292 [ 'OS=="mac" and v8_postmortem_support=="true"', {
293 # Do not let `v8dbg_` symbols slip away
296 '-Wl,-force_load,<(V8_BASE)',
312 'PLATFORM="solaris"',
315 # we need to use node's preferred "sunos"
316 # rather than gyp's preferred "solaris"
321 'OS=="linux" and node_shared_v8=="false"', {
323 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
329 'SubSystem': 1, # /subsystem:console
333 # generate ETW header and resource files
335 'target_name': 'node_etw',
338 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
341 'action_name': 'node_etw',
342 'inputs': [ 'src/res/node_etw_provider.man' ],
344 'tools/msvs/genfiles/node_etw_provider.rc',
345 'tools/msvs/genfiles/node_etw_provider.h',
346 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
348 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
354 # generate perf counter header and resource files
356 'target_name': 'node_perfctr',
359 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
362 'action_name': 'node_perfctr_man',
363 'inputs': [ 'src/res/node_perfctr_provider.man' ],
365 'tools/msvs/genfiles/node_perfctr_provider.h',
366 'tools/msvs/genfiles/node_perfctr_provider.rc',
367 'tools/msvs/genfiles/MSG00001.BIN',
369 'action': [ 'ctrpp <@(_inputs) '
370 '-o tools/msvs/genfiles/node_perfctr_provider.h '
371 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
379 'target_name': 'node_js2c',
381 'toolsets': ['host'],
384 'action_name': 'node_js2c',
390 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
393 [ 'node_use_dtrace=="false"'
394 ' and node_use_etw=="false"'
395 ' and node_use_systemtap=="false"',
397 'inputs': ['src/macros.py']
400 [ 'node_use_perfctr=="false"', {
401 'inputs': [ 'src/perfctr_macros.py' ]
414 'target_name': 'node_dtrace_header',
417 [ 'node_use_dtrace=="true"', {
420 'action_name': 'node_dtrace_header',
421 'inputs': [ 'src/node_provider.d' ],
422 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
423 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
424 '-o', '<@(_outputs)' ]
431 'target_name': 'node_systemtap_header',
434 [ 'node_use_systemtap=="true"', {
437 'action_name': 'node_systemtap_header',
438 'inputs': [ 'src/node_systemtap.d' ],
439 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ],
440 'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)',
441 '-o', '<@(_outputs)' ]
448 'target_name': 'node_dtrace_provider',
451 [ 'node_use_dtrace=="true" and OS!="mac"', {
454 'action_name': 'node_dtrace_provider_o',
456 'src/node_provider.d',
457 '<(OBJ_DIR)/node/src/node_dtrace.o'
460 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
462 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
463 '-o', '<@(_outputs)' ]
470 'target_name': 'node_dtrace_ustack',
473 [ 'node_use_dtrace=="true" and OS!="mac"', {
476 'action_name': 'node_dtrace_ustack_constants',
481 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
484 'tools/genv8constants.py',
490 'action_name': 'node_dtrace_ustack',
493 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
496 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
499 [ 'target_arch=="ia32"', {
501 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
502 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
505 [ 'target_arch=="x64"', {
507 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
508 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
518 'target_name': 'specialize_node_d',
521 [ 'node_use_dtrace=="true"', {
524 'action_name': 'specialize_node_d',
529 '<(PRODUCT_DIR)/node.d',
532 'tools/specialize_node_d.py',