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',
16 'node_core_target_name%': 'node',
19 'lib/_debug_agent.js',
24 'lib/child_process.js',
37 'lib/_http_client.js',
38 'lib/_http_common.js',
39 'lib/_http_incoming.js',
40 'lib/_http_outgoing.js',
41 'lib/_http_server.js',
53 'lib/_stream_readable.js',
54 'lib/_stream_writable.js',
55 'lib/_stream_duplex.js',
56 'lib/_stream_transform.js',
57 'lib/_stream_passthrough.js',
58 'lib/_stream_wrap.js',
59 'lib/string_decoder.js',
72 'lib/internal/child_process.js',
73 'lib/internal/cluster.js',
74 'lib/internal/freelist.js',
75 'lib/internal/net.js',
76 'lib/internal/module.js',
77 'lib/internal/socket_list.js',
78 'lib/internal/repl.js',
79 'lib/internal/util.js',
80 'lib/internal/v8_prof_polyfill.js',
81 'lib/internal/v8_prof_processor.js',
82 'lib/internal/streams/lazy_transform.js',
83 'deps/v8/tools/splaytree.js',
84 'deps/v8/tools/codemap.js',
85 'deps/v8/tools/consarray.js',
86 'deps/v8/tools/csvparser.js',
87 'deps/v8/tools/profile.js',
88 'deps/v8/tools/profile_view.js',
89 'deps/v8/tools/logreader.js',
90 'deps/v8/tools/tickprocessor.js',
91 'deps/v8/tools/SourceMap.js',
92 'deps/v8/tools/tickprocessor-driver.js',
93 'deps/v8/tools/mac-nm',
99 'target_name': '<(node_core_target_name)',
100 'type': '<(node_target_type)',
104 'deps/cares/cares.gyp:cares',
105 'deps/v8/tools/gyp/v8.gyp:v8',
106 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
111 'tools/msvs/genfiles',
113 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
114 'deps/v8' # include/v8_platform.h
118 'src/debug-agent.cc',
121 'src/fs_event_wrap.cc',
123 'src/handle_wrap.cc',
126 'src/node_buffer.cc',
127 'src/node_constants.cc',
128 'src/node_contextify.cc',
130 'src/node_http_parser.cc',
131 'src/node_javascript.cc',
134 'src/node_revert.cc',
137 'src/node_stat_watcher.cc',
138 'src/node_watchdog.cc',
142 'src/signal_wrap.cc',
144 'src/string_bytes.cc',
145 'src/stream_base.cc',
146 'src/stream_wrap.cc',
150 'src/process_wrap.cc',
153 # headers to make for a more pleasant IDE experience
155 'src/async-wrap-inl.h',
157 'src/base-object-inl.h',
165 'src/node_constants.h',
167 'src/node_http_parser.h',
168 'src/node_internals.h',
169 'src/node_javascript.h',
170 'src/node_root_certs.h',
171 'src/node_version.h',
172 'src/node_watchdog.h',
181 'src/req-wrap-inl.h',
182 'src/string_bytes.h',
184 'src/stream_base-inl.h',
190 'src/string_search.cc',
191 'deps/http_parser/http_parser.h',
192 'deps/v8/include/v8.h',
193 'deps/v8/include/v8-debug.h',
194 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
195 # javascript files to make for an even more pleasant IDE experience
197 # node.gyp is added to the project by default.
202 'NODE_ARCH="<(target_arch)"',
203 'NODE_PLATFORM="<(OS)"',
204 'NODE_WANT_INTERNALS=1',
205 # Warn when using deprecated V8 APIs.
206 'V8_DEPRECATION_WARNINGS=1',
212 'defines': [ 'NODE_TAG="<(node_tag)"' ],
214 [ 'node_v8_options!=""', {
215 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
217 # No node_main.cc for anything except executable
218 [ 'node_target_type!="executable"', {
223 [ 'node_release_urlbase!=""', {
225 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
228 [ 'v8_enable_i18n_support==1', {
229 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
231 '<(icu_gyp_path):icui18n',
232 '<(icu_gyp_path):icuuc',
235 [ 'icu_small=="true"', {
236 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
239 [ 'node_use_openssl=="true"', {
240 'defines': [ 'HAVE_OPENSSL=1' ],
242 'src/node_crypto.cc',
243 'src/node_crypto_bio.cc',
244 'src/node_crypto_clienthello.cc',
246 'src/node_crypto_bio.h',
247 'src/node_crypto_clienthello.h',
252 ['openssl_fips != ""', {
253 'defines': [ 'NODE_FIPS_MODE' ],
255 [ 'node_shared_openssl=="false"', {
257 './deps/openssl/openssl.gyp:openssl',
260 './deps/openssl/openssl.gyp:openssl-cli',
262 # Do not let unused OpenSSL symbols to slip away
264 # -force_load or --whole-archive are not applicable for
266 [ 'node_target_type!="static_library"', {
269 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
273 ['OS in "linux freebsd"', {
275 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
276 '-Wl,--no-whole-archive',
284 'defines': [ 'HAVE_OPENSSL=0' ]
286 [ 'node_use_dtrace=="true"', {
287 'defines': [ 'HAVE_DTRACE=1' ],
289 'node_dtrace_header',
292 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
295 # DTrace is supported on linux, solaris, mac, and bsd. There are
296 # three object files associated with DTrace support, but they're
297 # not all used all the time:
299 # node_dtrace.o all configurations
300 # node_dtrace_ustack.o not supported on mac and linux
301 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
304 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
305 # actually exist. They're listed here to trick GYP into linking the
306 # corresponding object files into the final "node" executable. These
307 # object files are generated by "dtrace -G" using custom actions
308 # below, and the GYP-generated Makefiles will properly build them when
311 'sources': [ 'src/node_dtrace.cc' ],
315 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
318 [ 'OS!="mac" and OS!="linux"', {
320 'src/node_dtrace_ustack.cc',
321 'src/node_dtrace_provider.cc',
326 [ 'node_use_lttng=="true"', {
327 'defines': [ 'HAVE_LTTNG=1' ],
328 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
329 'libraries': [ '-llttng-ust' ],
334 [ 'node_use_etw=="true"', {
335 'defines': [ 'HAVE_ETW=1' ],
336 'dependencies': [ 'node_etw' ],
338 'src/node_win32_etw_provider.h',
339 'src/node_win32_etw_provider-inl.h',
340 'src/node_win32_etw_provider.cc',
341 'src/node_dtrace.cc',
342 'tools/msvs/genfiles/node_etw_provider.h',
343 'tools/msvs/genfiles/node_etw_provider.rc',
346 [ 'node_use_perfctr=="true"', {
347 'defines': [ 'HAVE_PERFCTR=1' ],
348 'dependencies': [ 'node_perfctr' ],
350 'src/node_win32_perfctr_provider.h',
351 'src/node_win32_perfctr_provider.cc',
352 'src/node_counters.cc',
353 'src/node_counters.h',
354 'tools/msvs/genfiles/node_perfctr_provider.rc',
357 [ 'v8_postmortem_support=="true"', {
358 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
360 # -force_load is not applicable for the static library
361 [ 'node_target_type!="static_library"', {
364 '-Wl,-force_load,<(V8_BASE)',
370 [ 'node_shared_zlib=="false"', {
371 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
374 [ 'node_shared_http_parser=="false"', {
375 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
378 [ 'node_shared_libuv=="false"', {
379 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
387 'NODE_PLATFORM="win"',
391 # we need to use node's preferred "win32" rather than gyp's preferred "win"
392 'NODE_PLATFORM="win32"',
395 'libraries': [ '-lpsapi.lib' ]
397 'defines': [ '__POSIX__' ],
400 # linking Corefoundation is needed since certain OSX debugging tools
401 # like Instruments require it for some features
402 'libraries': [ '-framework CoreFoundation' ],
404 'NODE_PLATFORM="mac"',
407 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
408 'NODE_PLATFORM="darwin"',
419 '_LINUX_SOURCE_COMPAT',
428 'NODE_PLATFORM="solaris"',
431 # we need to use node's preferred "sunos"
432 # rather than gyp's preferred "solaris"
433 'NODE_PLATFORM="sunos"',
436 [ 'OS=="freebsd" or OS=="linux"', {
437 'ldflags': [ '-Wl,-z,noexecstack',
438 '-Wl,--whole-archive <(V8_BASE)',
439 '-Wl,--no-whole-archive' ]
442 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
447 'EmbedManifest': 'true',
448 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
452 # generate ETW header and resource files
454 'target_name': 'node_etw',
457 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
460 'action_name': 'node_etw',
461 'inputs': [ 'src/res/node_etw_provider.man' ],
463 'tools/msvs/genfiles/node_etw_provider.rc',
464 'tools/msvs/genfiles/node_etw_provider.h',
465 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
467 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
473 # generate perf counter header and resource files
475 'target_name': 'node_perfctr',
478 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
481 'action_name': 'node_perfctr_man',
482 'inputs': [ 'src/res/node_perfctr_provider.man' ],
484 'tools/msvs/genfiles/node_perfctr_provider.h',
485 'tools/msvs/genfiles/node_perfctr_provider.rc',
486 'tools/msvs/genfiles/MSG00001.BIN',
488 'action': [ 'ctrpp <@(_inputs) '
489 '-o tools/msvs/genfiles/node_perfctr_provider.h '
490 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
498 'target_name': 'node_js2c',
500 'toolsets': ['host'],
503 'action_name': 'node_js2c',
509 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
512 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
513 'inputs': [ 'src/notrace_macros.py' ]
515 ['node_use_lttng=="false"', {
516 'inputs': [ 'src/nolttng_macros.py' ]
518 [ 'node_use_perfctr=="false"', {
519 'inputs': [ 'src/perfctr_macros.py' ]
532 'target_name': 'node_dtrace_header',
535 [ 'node_use_dtrace=="true" and OS!="linux"', {
538 'action_name': 'node_dtrace_header',
539 'inputs': [ 'src/node_provider.d' ],
540 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
541 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
542 '-o', '<@(_outputs)' ]
546 [ 'node_use_dtrace=="true" and OS=="linux"', {
549 'action_name': 'node_dtrace_header',
550 'inputs': [ 'src/node_provider.d' ],
551 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
552 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
553 '-o', '<@(_outputs)' ]
560 'target_name': 'node_dtrace_provider',
563 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
566 'action_name': 'node_dtrace_provider_o',
568 '<(OBJ_DIR)/node/src/node_dtrace.o',
571 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
573 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
574 '<@(_inputs)', '-o', '<@(_outputs)' ]
578 [ 'node_use_dtrace=="true" and OS=="linux"', {
581 'action_name': 'node_dtrace_provider_o',
582 'inputs': [ 'src/node_provider.d' ],
584 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
587 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
595 'target_name': 'node_dtrace_ustack',
598 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
601 'action_name': 'node_dtrace_ustack_constants',
606 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
609 'tools/genv8constants.py',
615 'action_name': 'node_dtrace_ustack',
618 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
621 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
624 [ 'target_arch=="ia32"', {
626 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
627 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
630 [ 'target_arch=="x64"', {
632 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
633 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
643 'target_name': 'specialize_node_d',
646 [ 'node_use_dtrace=="true"', {
649 'action_name': 'specialize_node_d',
654 '<(PRODUCT_DIR)/node.d',
657 'tools/specialize_node_d.py',
669 'target_name': 'cctest',
670 'type': 'executable',
672 'deps/gtest/gtest.gyp:gtest',
673 'deps/v8/tools/gyp/v8.gyp:v8',
674 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
681 # gtest's ASSERT macros conflict with our own.
682 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
683 'GTEST_DONT_DEFINE_ASSERT_GE=1',
684 'GTEST_DONT_DEFINE_ASSERT_GT=1',
685 'GTEST_DONT_DEFINE_ASSERT_LE=1',
686 'GTEST_DONT_DEFINE_ASSERT_LT=1',
687 'GTEST_DONT_DEFINE_ASSERT_NE=1',
690 'test/cctest/util.cc',
699 'target_name': 'node',
700 'type': 'executable',
701 'dependencies': ['<(node_core_target_name)', 'node_exp'],
711 # node.gyp is added to the project by default.
715 'ldflags': ['-Wl,-bbigtoc,-bE:<(PRODUCT_DIR)/node.exp'],
718 'target_name': 'node_exp',
721 '<(node_core_target_name)',
725 'action_name': 'expfile',
730 '<(PRODUCT_DIR)/node.exp'
733 'sh', 'tools/create_expfile.sh',
734 '<@(_inputs)', '<@(_outputs)'
740 }], # end aix section
741 ], # end conditions block