3 'v8_use_snapshot%': 'true',
4 # Turn off -Werror in V8
5 # See http://codereview.chromium.org/8159015
7 'node_use_dtrace%': 'false',
8 'node_use_etw%': 'false',
9 'node_use_perfctr%': 'false',
10 'node_has_winsdk%': 'false',
11 'node_shared_v8%': 'false',
12 'node_shared_zlib%': 'false',
13 'node_shared_http_parser%': 'false',
14 'node_shared_cares%': 'false',
15 'node_shared_libuv%': 'false',
16 'node_use_openssl%': 'true',
17 'node_shared_openssl%': 'false',
18 'node_use_mdb%': 'false',
25 'lib/child_process.js',
38 'lib/_http_client.js',
39 'lib/_http_common.js',
40 'lib/_http_incoming.js',
41 'lib/_http_outgoing.js',
42 'lib/_http_server.js',
54 'lib/_stream_readable.js',
55 'lib/_stream_writable.js',
56 'lib/_stream_duplex.js',
57 'lib/_stream_transform.js',
58 'lib/_stream_passthrough.js',
59 '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',
97 'src/node_extensions.cc',
99 'src/node_http_parser.cc',
100 'src/node_javascript.cc',
103 'src/node_stat_watcher.cc',
104 'src/node_watchdog.cc',
107 'src/signal_wrap.cc',
109 'src/string_bytes.cc',
110 'src/stream_wrap.cc',
114 'src/process_wrap.cc',
117 # headers to make for a more pleasant IDE experience
119 'src/async-wrap-inl.h',
121 'src/base-object-inl.h',
127 'src/node_constants.h',
128 'src/node_contextify.h',
129 'src/node_extensions.h',
131 'src/node_http_parser.h',
132 'src/node_internals.h',
133 'src/node_javascript.h',
134 'src/node_root_certs.h',
135 'src/node_version.h',
136 'src/node_watchdog.h',
145 '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)"',
166 [ 'node_use_openssl=="true"', {
167 'defines': [ 'HAVE_OPENSSL=1' ],
169 'src/node_crypto.cc',
170 'src/node_crypto_bio.cc',
171 'src/node_crypto_clienthello.cc',
173 'src/node_crypto_bio.h',
174 'src/node_crypto_clienthello.h',
179 [ 'node_shared_openssl=="false"', {
180 'dependencies': [ './deps/openssl/openssl.gyp:openssl' ],
183 'defines': [ 'HAVE_OPENSSL=0' ]
185 [ 'node_use_dtrace=="true"', {
186 'defines': [ 'HAVE_DTRACE=1' ],
187 'dependencies': [ 'node_dtrace_header' ],
188 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
190 # DTrace is supported on linux, solaris, mac, and bsd. There are
191 # three object files associated with DTrace support, but they're
192 # not all used all the time:
194 # node_dtrace.o all configurations
195 # node_dtrace_ustack.o not supported on mac and linux
196 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
199 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
200 # actually exist. They're listed here to trick GYP into linking the
201 # corresponding object files into the final "node" executable. These
202 # object files are generated by "dtrace -G" using custom actions
203 # below, and the GYP-generated Makefiles will properly build them when
206 'sources': [ 'src/node_dtrace.cc' ],
210 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
211 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
214 [ 'OS!="mac" and OS!="linux"', {
216 'src/node_dtrace_ustack.cc',
217 'src/node_dtrace_provider.cc',
222 [ 'node_use_mdb=="true"', {
223 'dependencies': [ 'node_mdb' ],
224 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
229 [ 'node_use_etw=="true"', {
230 'defines': [ 'HAVE_ETW=1' ],
231 'dependencies': [ 'node_etw' ],
233 'src/node_win32_etw_provider.h',
234 'src/node_win32_etw_provider-inl.h',
235 'src/node_win32_etw_provider.cc',
236 'src/node_dtrace.cc',
237 'tools/msvs/genfiles/node_etw_provider.h',
238 'tools/msvs/genfiles/node_etw_provider.rc',
241 [ 'node_use_perfctr=="true"', {
242 'defines': [ 'HAVE_PERFCTR=1' ],
243 'dependencies': [ 'node_perfctr' ],
245 'src/node_win32_perfctr_provider.h',
246 'src/node_win32_perfctr_provider.cc',
247 'src/node_counters.cc',
248 'src/node_counters.h',
249 'tools/msvs/genfiles/node_perfctr_provider.rc',
252 [ 'v8_postmortem_support=="true"', {
253 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
255 [ 'node_shared_v8=="false"', {
257 'deps/v8/include/v8.h',
258 'deps/v8/include/v8-debug.h',
260 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
263 [ 'node_shared_zlib=="false"', {
264 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
267 [ 'node_shared_http_parser=="false"', {
268 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
271 [ 'node_shared_cares=="false"', {
272 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
275 [ 'node_shared_libuv=="false"', {
276 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
285 # we need to use node's preferred "win32" rather than gyp's preferred "win"
289 'libraries': [ '-lpsapi.lib' ]
291 'defines': [ '__POSIX__' ],
298 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
314 'PLATFORM="solaris"',
317 # we need to use node's preferred "sunos"
318 # rather than gyp's preferred "solaris"
323 'OS=="linux" and node_shared_v8=="false"', {
325 '-Wl,--whole-archive <(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a -Wl,--no-whole-archive',
331 'SubSystem': 1, # /subsystem:console
335 # generate ETW header and resource files
337 'target_name': 'node_etw',
340 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
343 'action_name': 'node_etw',
344 'inputs': [ 'src/res/node_etw_provider.man' ],
346 'tools/msvs/genfiles/node_etw_provider.rc',
347 'tools/msvs/genfiles/node_etw_provider.h',
348 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
350 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
356 # generate perf counter header and resource files
358 'target_name': 'node_perfctr',
361 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
364 'action_name': 'node_perfctr_man',
365 'inputs': [ 'src/res/node_perfctr_provider.man' ],
367 'tools/msvs/genfiles/node_perfctr_provider.h',
368 'tools/msvs/genfiles/node_perfctr_provider.rc',
369 'tools/msvs/genfiles/MSG00001.BIN',
371 'action': [ 'ctrpp <@(_inputs) '
372 '-o tools/msvs/genfiles/node_perfctr_provider.h '
373 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
381 'target_name': 'node_js2c',
383 'toolsets': ['host'],
386 'action_name': 'node_js2c',
392 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
395 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
396 'inputs': [ 'src/notrace_macros.py' ]
398 [ 'node_use_perfctr=="false"', {
399 'inputs': [ 'src/perfctr_macros.py' ]
412 'target_name': 'node_dtrace_header',
415 [ 'node_use_dtrace=="true"', {
418 'action_name': 'node_dtrace_header',
419 'inputs': [ 'src/node_provider.d' ],
420 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
421 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
422 '-o', '<@(_outputs)' ]
429 'target_name': 'node_mdb',
432 [ 'node_use_mdb=="true"',
434 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
437 'action_name': 'node_mdb',
438 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
439 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
441 [ 'target_arch=="ia32"', {
442 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
444 [ 'target_arch=="x64"', {
445 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
455 'target_name': 'node_dtrace_provider',
458 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
461 'action_name': 'node_dtrace_provider_o',
463 '<(PRODUCT_DIR)/obj.target/libuv/deps/uv/src/unix/core.o',
464 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o',
467 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
469 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
470 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
471 '-o', '<@(_outputs)' ]
475 [ 'node_use_dtrace=="true" and OS=="linux"', {
478 'action_name': 'node_dtrace_provider_o',
479 'inputs': [ 'src/node_provider.d' ],
481 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
484 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
488 'action_name': 'libuv_dtrace_provider_o',
489 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
491 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
494 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
502 'target_name': 'node_dtrace_ustack',
505 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
508 'action_name': 'node_dtrace_ustack_constants',
510 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a'
513 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
516 'tools/genv8constants.py',
522 'action_name': 'node_dtrace_ustack',
525 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
528 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
531 [ 'target_arch=="ia32"', {
533 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
534 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
537 [ 'target_arch=="x64"', {
539 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
540 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',