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"', {
181 './deps/openssl/openssl.gyp:openssl',
184 './deps/openssl/openssl.gyp:openssl-cli'
188 'defines': [ 'HAVE_OPENSSL=0' ]
190 [ 'node_use_dtrace=="true"', {
191 'defines': [ 'HAVE_DTRACE=1' ],
192 'dependencies': [ 'node_dtrace_header' ],
193 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
195 # DTrace is supported on linux, solaris, mac, and bsd. There are
196 # three object files associated with DTrace support, but they're
197 # not all used all the time:
199 # node_dtrace.o all configurations
200 # node_dtrace_ustack.o not supported on mac and linux
201 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
204 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
205 # actually exist. They're listed here to trick GYP into linking the
206 # corresponding object files into the final "node" executable. These
207 # object files are generated by "dtrace -G" using custom actions
208 # below, and the GYP-generated Makefiles will properly build them when
211 'sources': [ 'src/node_dtrace.cc' ],
215 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o',
216 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o',
219 [ 'OS!="mac" and OS!="linux"', {
221 'src/node_dtrace_ustack.cc',
222 'src/node_dtrace_provider.cc',
227 [ 'node_use_mdb=="true"', {
228 'dependencies': [ 'node_mdb' ],
229 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
234 [ 'node_use_etw=="true"', {
235 'defines': [ 'HAVE_ETW=1' ],
236 'dependencies': [ 'node_etw' ],
238 'src/node_win32_etw_provider.h',
239 'src/node_win32_etw_provider-inl.h',
240 'src/node_win32_etw_provider.cc',
241 'src/node_dtrace.cc',
242 'tools/msvs/genfiles/node_etw_provider.h',
243 'tools/msvs/genfiles/node_etw_provider.rc',
246 [ 'node_use_perfctr=="true"', {
247 'defines': [ 'HAVE_PERFCTR=1' ],
248 'dependencies': [ 'node_perfctr' ],
250 'src/node_win32_perfctr_provider.h',
251 'src/node_win32_perfctr_provider.cc',
252 'src/node_counters.cc',
253 'src/node_counters.h',
254 'tools/msvs/genfiles/node_perfctr_provider.rc',
257 [ 'v8_postmortem_support=="true"', {
258 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
260 [ 'node_shared_v8=="false"', {
262 'deps/v8/include/v8.h',
263 'deps/v8/include/v8-debug.h',
265 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
268 [ 'node_shared_zlib=="false"', {
269 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
272 [ 'node_shared_http_parser=="false"', {
273 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
276 [ 'node_shared_cares=="false"', {
277 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
280 [ 'node_shared_libuv=="false"', {
281 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
290 # we need to use node's preferred "win32" rather than gyp's preferred "win"
294 'libraries': [ '-lpsapi.lib' ]
296 'defines': [ '__POSIX__' ],
303 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
319 'PLATFORM="solaris"',
322 # we need to use node's preferred "sunos"
323 # rather than gyp's preferred "solaris"
328 'OS=="linux" and node_shared_v8=="false"', {
330 '-Wl,--whole-archive <(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a -Wl,--no-whole-archive',
336 'SubSystem': 1, # /subsystem:console
340 # generate ETW header and resource files
342 'target_name': 'node_etw',
345 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
348 'action_name': 'node_etw',
349 'inputs': [ 'src/res/node_etw_provider.man' ],
351 'tools/msvs/genfiles/node_etw_provider.rc',
352 'tools/msvs/genfiles/node_etw_provider.h',
353 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
355 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
361 # generate perf counter header and resource files
363 'target_name': 'node_perfctr',
366 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
369 'action_name': 'node_perfctr_man',
370 'inputs': [ 'src/res/node_perfctr_provider.man' ],
372 'tools/msvs/genfiles/node_perfctr_provider.h',
373 'tools/msvs/genfiles/node_perfctr_provider.rc',
374 'tools/msvs/genfiles/MSG00001.BIN',
376 'action': [ 'ctrpp <@(_inputs) '
377 '-o tools/msvs/genfiles/node_perfctr_provider.h '
378 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
386 'target_name': 'node_js2c',
388 'toolsets': ['host'],
391 'action_name': 'node_js2c',
397 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
400 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
401 'inputs': [ 'src/notrace_macros.py' ]
403 [ 'node_use_perfctr=="false"', {
404 'inputs': [ 'src/perfctr_macros.py' ]
417 'target_name': 'node_dtrace_header',
420 [ 'node_use_dtrace=="true"', {
423 'action_name': 'node_dtrace_header',
424 'inputs': [ 'src/node_provider.d' ],
425 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
426 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
427 '-o', '<@(_outputs)' ]
434 'target_name': 'node_mdb',
437 [ 'node_use_mdb=="true"',
439 'dependencies': [ 'deps/mdb_v8/mdb_v8.gyp:mdb_v8' ],
442 'action_name': 'node_mdb',
443 'inputs': [ '<(PRODUCT_DIR)/obj.target/deps/mdb_v8/mdb_v8.so' ],
444 'outputs': [ '<(PRODUCT_DIR)/obj.target/node/src/node_mdb.o' ],
446 [ 'target_arch=="ia32"', {
447 'action': [ 'elfwrap', '-o', '<@(_outputs)', '<@(_inputs)' ],
449 [ 'target_arch=="x64"', {
450 'action': [ 'elfwrap', '-64', '-o', '<@(_outputs)', '<@(_inputs)' ],
460 'target_name': 'node_dtrace_provider',
463 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
466 'action_name': 'node_dtrace_provider_o',
468 '<(PRODUCT_DIR)/obj.target/libuv/deps/uv/src/unix/core.o',
469 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o',
472 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
474 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
475 '-s', 'deps/uv/src/unix/uv-dtrace.d', '<@(_inputs)',
476 '-o', '<@(_outputs)' ]
480 [ 'node_use_dtrace=="true" and OS=="linux"', {
483 'action_name': 'node_dtrace_provider_o',
484 'inputs': [ 'src/node_provider.d' ],
486 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
489 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
493 'action_name': 'libuv_dtrace_provider_o',
494 'inputs': [ 'deps/uv/src/unix/uv-dtrace.d' ],
496 '<(SHARED_INTERMEDIATE_DIR)/libuv_dtrace_provider.o'
499 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
507 'target_name': 'node_dtrace_ustack',
510 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
513 'action_name': 'node_dtrace_ustack_constants',
515 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.<(target_arch).a'
518 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
521 'tools/genv8constants.py',
527 'action_name': 'node_dtrace_ustack',
530 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
533 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
536 [ 'target_arch=="ia32"', {
538 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
539 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
542 [ 'target_arch=="x64"', {
544 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
545 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',