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/module.js',
74 'lib/internal/socket_list.js',
75 'lib/internal/repl.js',
76 'lib/internal/util.js',
77 'lib/internal/streams/lazy_transform.js',
83 'target_name': 'node',
84 'type': '<(node_target_type)',
88 'deps/cares/cares.gyp:cares',
89 'deps/v8/tools/gyp/v8.gyp:v8',
90 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
95 'tools/msvs/genfiles',
97 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
98 'deps/v8' # include/v8_platform.h
102 'src/debug-agent.cc',
105 'src/fs_event_wrap.cc',
107 'src/handle_wrap.cc',
110 'src/node_buffer.cc',
111 'src/node_constants.cc',
112 'src/node_contextify.cc',
114 'src/node_http_parser.cc',
115 'src/node_javascript.cc',
119 'src/node_stat_watcher.cc',
120 'src/node_watchdog.cc',
124 'src/signal_wrap.cc',
126 'src/string_bytes.cc',
127 'src/stream_base.cc',
128 'src/stream_wrap.cc',
132 'src/process_wrap.cc',
135 # headers to make for a more pleasant IDE experience
137 'src/async-wrap-inl.h',
139 'src/base-object-inl.h',
147 'src/node_constants.h',
149 'src/node_http_parser.h',
150 'src/node_internals.h',
151 'src/node_javascript.h',
152 'src/node_root_certs.h',
153 'src/node_version.h',
154 'src/node_watchdog.h',
162 'src/req-wrap-inl.h',
163 'src/string_bytes.h',
165 'src/stream_base-inl.h',
171 'deps/http_parser/http_parser.h',
172 'deps/v8/include/v8.h',
173 'deps/v8/include/v8-debug.h',
174 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
175 # javascript files to make for an even more pleasant IDE experience
177 # node.gyp is added to the project by default.
182 'NODE_ARCH="<(target_arch)"',
183 'NODE_PLATFORM="<(OS)"',
184 'NODE_WANT_INTERNALS=1',
185 # Warn when using deprecated V8 APIs.
186 'V8_DEPRECATION_WARNINGS=1',
192 'defines': [ 'NODE_TAG="<(node_tag)"' ],
194 [ 'node_v8_options!=""', {
195 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
197 # No node_main.cc for anything except executable
198 [ 'node_target_type!="executable"', {
203 [ 'node_release_urlbase!=""', {
205 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
208 [ 'v8_enable_i18n_support==1', {
209 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
211 '<(icu_gyp_path):icui18n',
212 '<(icu_gyp_path):icuuc',
215 [ 'icu_small=="true"', {
216 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
219 [ 'node_use_openssl=="true"', {
220 'defines': [ 'HAVE_OPENSSL=1' ],
222 'src/node_crypto.cc',
223 'src/node_crypto_bio.cc',
224 'src/node_crypto_clienthello.cc',
226 'src/node_crypto_bio.h',
227 'src/node_crypto_clienthello.h',
232 ['openssl_fips != ""', {
233 'defines': [ 'NODE_FIPS_MODE' ],
235 [ 'node_shared_openssl=="false"', {
237 './deps/openssl/openssl.gyp:openssl',
240 './deps/openssl/openssl.gyp:openssl-cli',
242 # Do not let unused OpenSSL symbols to slip away
244 # -force_load or --whole-archive are not applicable for
246 [ 'node_target_type!="static_library"', {
249 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
253 ['OS in "linux freebsd"', {
255 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
256 '-Wl,--no-whole-archive',
264 'defines': [ 'HAVE_OPENSSL=0' ]
266 [ 'node_use_dtrace=="true"', {
267 'defines': [ 'HAVE_DTRACE=1' ],
269 'node_dtrace_header',
272 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
275 # DTrace is supported on linux, solaris, mac, and bsd. There are
276 # three object files associated with DTrace support, but they're
277 # not all used all the time:
279 # node_dtrace.o all configurations
280 # node_dtrace_ustack.o not supported on mac and linux
281 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
284 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
285 # actually exist. They're listed here to trick GYP into linking the
286 # corresponding object files into the final "node" executable. These
287 # object files are generated by "dtrace -G" using custom actions
288 # below, and the GYP-generated Makefiles will properly build them when
291 'sources': [ 'src/node_dtrace.cc' ],
295 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
298 [ 'OS!="mac" and OS!="linux"', {
300 'src/node_dtrace_ustack.cc',
301 'src/node_dtrace_provider.cc',
306 [ 'node_use_lttng=="true"', {
307 'defines': [ 'HAVE_LTTNG=1' ],
308 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
309 'libraries': [ '-llttng-ust' ],
314 [ 'node_use_etw=="true"', {
315 'defines': [ 'HAVE_ETW=1' ],
316 'dependencies': [ 'node_etw' ],
318 'src/node_win32_etw_provider.h',
319 'src/node_win32_etw_provider-inl.h',
320 'src/node_win32_etw_provider.cc',
321 'src/node_dtrace.cc',
322 'tools/msvs/genfiles/node_etw_provider.h',
323 'tools/msvs/genfiles/node_etw_provider.rc',
326 [ 'node_use_perfctr=="true"', {
327 'defines': [ 'HAVE_PERFCTR=1' ],
328 'dependencies': [ 'node_perfctr' ],
330 'src/node_win32_perfctr_provider.h',
331 'src/node_win32_perfctr_provider.cc',
332 'src/node_counters.cc',
333 'src/node_counters.h',
334 'tools/msvs/genfiles/node_perfctr_provider.rc',
337 [ 'v8_postmortem_support=="true"', {
338 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
340 # -force_load is not applicable for the static library
341 [ 'node_target_type!="static_library"', {
344 '-Wl,-force_load,<(V8_BASE)',
350 [ 'node_shared_zlib=="false"', {
351 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
354 [ 'node_shared_http_parser=="false"', {
355 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
358 [ 'node_shared_libuv=="false"', {
359 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
367 'NODE_PLATFORM="win"',
371 # we need to use node's preferred "win32" rather than gyp's preferred "win"
372 'NODE_PLATFORM="win32"',
375 'libraries': [ '-lpsapi.lib' ]
377 'defines': [ '__POSIX__' ],
380 # linking Corefoundation is needed since certain OSX debugging tools
381 # like Instruments require it for some features
382 'libraries': [ '-framework CoreFoundation' ],
384 'NODE_PLATFORM="mac"',
387 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
388 'NODE_PLATFORM="darwin"',
399 '_LINUX_SOURCE_COMPAT',
408 'NODE_PLATFORM="solaris"',
411 # we need to use node's preferred "sunos"
412 # rather than gyp's preferred "solaris"
413 'NODE_PLATFORM="sunos"',
416 [ 'OS=="freebsd" or OS=="linux"', {
417 'ldflags': [ '-Wl,-z,noexecstack',
418 '-Wl,--whole-archive <(V8_BASE)',
419 '-Wl,--no-whole-archive' ]
422 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
427 'EmbedManifest': 'true',
428 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
432 # generate ETW header and resource files
434 'target_name': 'node_etw',
437 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
440 'action_name': 'node_etw',
441 'inputs': [ 'src/res/node_etw_provider.man' ],
443 'tools/msvs/genfiles/node_etw_provider.rc',
444 'tools/msvs/genfiles/node_etw_provider.h',
445 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
447 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
453 # generate perf counter header and resource files
455 'target_name': 'node_perfctr',
458 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
461 'action_name': 'node_perfctr_man',
462 'inputs': [ 'src/res/node_perfctr_provider.man' ],
464 'tools/msvs/genfiles/node_perfctr_provider.h',
465 'tools/msvs/genfiles/node_perfctr_provider.rc',
466 'tools/msvs/genfiles/MSG00001.BIN',
468 'action': [ 'ctrpp <@(_inputs) '
469 '-o tools/msvs/genfiles/node_perfctr_provider.h '
470 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
478 'target_name': 'node_js2c',
480 'toolsets': ['host'],
483 'action_name': 'node_js2c',
489 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
492 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
493 'inputs': [ 'src/notrace_macros.py' ]
495 ['node_use_lttng=="false"', {
496 'inputs': [ 'src/nolttng_macros.py' ]
498 [ 'node_use_perfctr=="false"', {
499 'inputs': [ 'src/perfctr_macros.py' ]
512 'target_name': 'node_dtrace_header',
515 [ 'node_use_dtrace=="true" and OS!="linux"', {
518 'action_name': 'node_dtrace_header',
519 'inputs': [ 'src/node_provider.d' ],
520 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
521 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
522 '-o', '<@(_outputs)' ]
526 [ 'node_use_dtrace=="true" and OS=="linux"', {
529 'action_name': 'node_dtrace_header',
530 'inputs': [ 'src/node_provider.d' ],
531 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
532 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
533 '-o', '<@(_outputs)' ]
540 'target_name': 'node_dtrace_provider',
543 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
546 'action_name': 'node_dtrace_provider_o',
548 '<(OBJ_DIR)/node/src/node_dtrace.o',
551 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
553 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
554 '<@(_inputs)', '-o', '<@(_outputs)' ]
558 [ 'node_use_dtrace=="true" and OS=="linux"', {
561 'action_name': 'node_dtrace_provider_o',
562 'inputs': [ 'src/node_provider.d' ],
564 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
567 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
575 'target_name': 'node_dtrace_ustack',
578 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
581 'action_name': 'node_dtrace_ustack_constants',
586 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
589 'tools/genv8constants.py',
595 'action_name': 'node_dtrace_ustack',
598 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
601 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
604 [ 'target_arch=="ia32"', {
606 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
607 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
610 [ 'target_arch=="x64"', {
612 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
613 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
623 'target_name': 'specialize_node_d',
626 [ 'node_use_dtrace=="true"', {
629 'action_name': 'specialize_node_d',
634 '<(PRODUCT_DIR)/node.d',
637 'tools/specialize_node_d.py',
649 'target_name': 'cctest',
650 'type': 'executable',
652 'deps/gtest/gtest.gyp:gtest',
653 'deps/v8/tools/gyp/v8.gyp:v8',
654 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
661 # gtest's ASSERT macros conflict with our own.
662 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
663 'GTEST_DONT_DEFINE_ASSERT_GE=1',
664 'GTEST_DONT_DEFINE_ASSERT_GT=1',
665 'GTEST_DONT_DEFINE_ASSERT_LE=1',
666 'GTEST_DONT_DEFINE_ASSERT_LT=1',
667 'GTEST_DONT_DEFINE_ASSERT_NE=1',
670 'test/cctest/util.cc',