3 'v8_use_snapshot%': 'false',
4 'node_use_dtrace%': 'false',
5 'node_use_lttng%': 'false',
6 'node_use_etw%': 'false',
7 'node_use_perfctr%': 'false',
8 'node_has_winsdk%': '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_v8_options%': '',
15 'node_target_type%': 'executable',
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/_stream_wrap.js',
58 'lib/string_decoder.js',
71 'lib/internal/child_process.js',
72 'lib/internal/freelist.js',
73 'lib/internal/socket_list.js',
74 'lib/internal/repl.js',
75 'lib/internal/util.js',
76 'lib/internal/streams/lazy_transform.js',
82 'target_name': 'node',
83 'type': '<(node_target_type)',
87 'deps/cares/cares.gyp:cares',
88 'deps/v8/tools/gyp/v8.gyp:v8',
89 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
94 'tools/msvs/genfiles',
96 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
97 'deps/v8' # include/v8_platform.h
101 'src/debug-agent.cc',
104 'src/fs_event_wrap.cc',
106 'src/handle_wrap.cc',
109 'src/node_buffer.cc',
110 'src/node_constants.cc',
111 'src/node_contextify.cc',
113 'src/node_http_parser.cc',
114 'src/node_javascript.cc',
118 'src/node_stat_watcher.cc',
119 'src/node_watchdog.cc',
123 'src/signal_wrap.cc',
125 'src/string_bytes.cc',
126 'src/stream_base.cc',
127 'src/stream_wrap.cc',
131 'src/process_wrap.cc',
134 # headers to make for a more pleasant IDE experience
136 'src/async-wrap-inl.h',
138 'src/base-object-inl.h',
146 'src/node_constants.h',
148 'src/node_http_parser.h',
149 'src/node_internals.h',
150 'src/node_javascript.h',
151 'src/node_root_certs.h',
152 'src/node_version.h',
153 'src/node_watchdog.h',
161 'src/req-wrap-inl.h',
162 'src/string_bytes.h',
164 'src/stream_base-inl.h',
170 'deps/http_parser/http_parser.h',
171 'deps/v8/include/v8.h',
172 'deps/v8/include/v8-debug.h',
173 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
174 # javascript files to make for an even more pleasant IDE experience
176 # node.gyp is added to the project by default.
181 'NODE_ARCH="<(target_arch)"',
182 'NODE_PLATFORM="<(OS)"',
183 'NODE_WANT_INTERNALS=1',
184 # Warn when using deprecated V8 APIs.
185 'V8_DEPRECATION_WARNINGS=1',
191 'defines': [ 'NODE_TAG="<(node_tag)"' ],
193 [ 'node_v8_options!=""', {
194 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
196 # No node_main.cc for anything except executable
197 [ 'node_target_type!="executable"', {
202 [ 'node_release_urlbase!=""', {
204 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
207 [ 'v8_enable_i18n_support==1', {
208 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
210 '<(icu_gyp_path):icui18n',
211 '<(icu_gyp_path):icuuc',
214 [ 'icu_small=="true"', {
215 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
218 [ 'node_use_openssl=="true"', {
219 'defines': [ 'HAVE_OPENSSL=1' ],
221 'src/node_crypto.cc',
222 'src/node_crypto_bio.cc',
223 'src/node_crypto_clienthello.cc',
225 'src/node_crypto_bio.h',
226 'src/node_crypto_clienthello.h',
231 [ 'node_shared_openssl=="false"', {
233 './deps/openssl/openssl.gyp:openssl',
236 './deps/openssl/openssl.gyp:openssl-cli',
238 # Do not let unused OpenSSL symbols to slip away
240 # -force_load or --whole-archive are not applicable for
242 [ 'node_target_type!="static_library"', {
245 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
249 ['OS in "linux freebsd"', {
251 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
252 '-Wl,--no-whole-archive',
260 'defines': [ 'HAVE_OPENSSL=0' ]
262 [ 'node_use_dtrace=="true"', {
263 'defines': [ 'HAVE_DTRACE=1' ],
265 'node_dtrace_header',
268 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
271 # DTrace is supported on linux, solaris, mac, and bsd. There are
272 # three object files associated with DTrace support, but they're
273 # not all used all the time:
275 # node_dtrace.o all configurations
276 # node_dtrace_ustack.o not supported on mac and linux
277 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
280 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
281 # actually exist. They're listed here to trick GYP into linking the
282 # corresponding object files into the final "node" executable. These
283 # object files are generated by "dtrace -G" using custom actions
284 # below, and the GYP-generated Makefiles will properly build them when
287 'sources': [ 'src/node_dtrace.cc' ],
291 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
294 [ 'OS!="mac" and OS!="linux"', {
296 'src/node_dtrace_ustack.cc',
297 'src/node_dtrace_provider.cc',
302 [ 'node_use_lttng=="true"', {
303 'defines': [ 'HAVE_LTTNG=1' ],
304 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
305 'libraries': [ '-llttng-ust' ],
310 [ 'node_use_etw=="true"', {
311 'defines': [ 'HAVE_ETW=1' ],
312 'dependencies': [ 'node_etw' ],
314 'src/node_win32_etw_provider.h',
315 'src/node_win32_etw_provider-inl.h',
316 'src/node_win32_etw_provider.cc',
317 'src/node_dtrace.cc',
318 'tools/msvs/genfiles/node_etw_provider.h',
319 'tools/msvs/genfiles/node_etw_provider.rc',
322 [ 'node_use_perfctr=="true"', {
323 'defines': [ 'HAVE_PERFCTR=1' ],
324 'dependencies': [ 'node_perfctr' ],
326 'src/node_win32_perfctr_provider.h',
327 'src/node_win32_perfctr_provider.cc',
328 'src/node_counters.cc',
329 'src/node_counters.h',
330 'tools/msvs/genfiles/node_perfctr_provider.rc',
333 [ 'v8_postmortem_support=="true"', {
334 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
336 # -force_load is not applicable for the static library
337 [ 'node_target_type!="static_library"', {
340 '-Wl,-force_load,<(V8_BASE)',
346 [ 'node_shared_zlib=="false"', {
347 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
350 [ 'node_shared_http_parser=="false"', {
351 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
354 [ 'node_shared_libuv=="false"', {
355 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
363 'NODE_PLATFORM="win"',
367 # we need to use node's preferred "win32" rather than gyp's preferred "win"
368 'NODE_PLATFORM="win32"',
371 'libraries': [ '-lpsapi.lib' ]
373 'defines': [ '__POSIX__' ],
376 # linking Corefoundation is needed since certain OSX debugging tools
377 # like Instruments require it for some features
378 'libraries': [ '-framework CoreFoundation' ],
380 'NODE_PLATFORM="mac"',
383 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
384 'NODE_PLATFORM="darwin"',
399 'NODE_PLATFORM="solaris"',
402 # we need to use node's preferred "sunos"
403 # rather than gyp's preferred "solaris"
404 'NODE_PLATFORM="sunos"',
407 [ 'OS=="freebsd" or OS=="linux"', {
408 'ldflags': [ '-Wl,-z,noexecstack',
409 '-Wl,--whole-archive <(V8_BASE)',
410 '-Wl,--no-whole-archive' ]
413 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
418 'EmbedManifest': 'true',
419 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
423 # generate ETW header and resource files
425 'target_name': 'node_etw',
428 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
431 'action_name': 'node_etw',
432 'inputs': [ 'src/res/node_etw_provider.man' ],
434 'tools/msvs/genfiles/node_etw_provider.rc',
435 'tools/msvs/genfiles/node_etw_provider.h',
436 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
438 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
444 # generate perf counter header and resource files
446 'target_name': 'node_perfctr',
449 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
452 'action_name': 'node_perfctr_man',
453 'inputs': [ 'src/res/node_perfctr_provider.man' ],
455 'tools/msvs/genfiles/node_perfctr_provider.h',
456 'tools/msvs/genfiles/node_perfctr_provider.rc',
457 'tools/msvs/genfiles/MSG00001.BIN',
459 'action': [ 'ctrpp <@(_inputs) '
460 '-o tools/msvs/genfiles/node_perfctr_provider.h '
461 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
469 'target_name': 'node_js2c',
471 'toolsets': ['host'],
474 'action_name': 'node_js2c',
480 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
483 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
484 'inputs': [ 'src/notrace_macros.py' ]
486 ['node_use_lttng=="false"', {
487 'inputs': [ 'src/nolttng_macros.py' ]
489 [ 'node_use_perfctr=="false"', {
490 'inputs': [ 'src/perfctr_macros.py' ]
503 'target_name': 'node_dtrace_header',
506 [ 'node_use_dtrace=="true" and OS!="linux"', {
509 'action_name': 'node_dtrace_header',
510 'inputs': [ 'src/node_provider.d' ],
511 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
512 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
513 '-o', '<@(_outputs)' ]
517 [ 'node_use_dtrace=="true" and OS=="linux"', {
520 'action_name': 'node_dtrace_header',
521 'inputs': [ 'src/node_provider.d' ],
522 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
523 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
524 '-o', '<@(_outputs)' ]
531 'target_name': 'node_dtrace_provider',
534 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
537 'action_name': 'node_dtrace_provider_o',
539 '<(OBJ_DIR)/node/src/node_dtrace.o',
542 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
544 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
545 '<@(_inputs)', '-o', '<@(_outputs)' ]
549 [ 'node_use_dtrace=="true" and OS=="linux"', {
552 'action_name': 'node_dtrace_provider_o',
553 'inputs': [ 'src/node_provider.d' ],
555 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
558 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
566 'target_name': 'node_dtrace_ustack',
569 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
572 'action_name': 'node_dtrace_ustack_constants',
577 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
580 'tools/genv8constants.py',
586 'action_name': 'node_dtrace_ustack',
589 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
592 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
595 [ 'target_arch=="ia32"', {
597 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
598 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
601 [ 'target_arch=="x64"', {
603 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
604 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
614 'target_name': 'specialize_node_d',
617 [ 'node_use_dtrace=="true"', {
620 'action_name': 'specialize_node_d',
625 '<(PRODUCT_DIR)/node.d',
628 'tools/specialize_node_d.py',
640 'target_name': 'cctest',
641 'type': 'executable',
643 'deps/gtest/gtest.gyp:gtest',
644 'deps/v8/tools/gyp/v8.gyp:v8',
645 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
652 # gtest's ASSERT macros conflict with our own.
653 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
654 'GTEST_DONT_DEFINE_ASSERT_GE=1',
655 'GTEST_DONT_DEFINE_ASSERT_GT=1',
656 'GTEST_DONT_DEFINE_ASSERT_LE=1',
657 'GTEST_DONT_DEFINE_ASSERT_LT=1',
658 'GTEST_DONT_DEFINE_ASSERT_NE=1',
661 'test/cctest/util.cc',