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/streams/lazy_transform.js',
86 'target_name': '<(node_core_target_name)',
87 'type': '<(node_target_type)',
91 'deps/cares/cares.gyp:cares',
92 'deps/v8/tools/gyp/v8.gyp:v8',
93 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
98 'tools/msvs/genfiles',
100 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
101 'deps/v8' # include/v8_platform.h
105 'src/debug-agent.cc',
108 'src/fs_event_wrap.cc',
110 'src/handle_wrap.cc',
113 'src/node_buffer.cc',
114 'src/node_constants.cc',
115 'src/node_contextify.cc',
117 'src/node_http_parser.cc',
118 'src/node_javascript.cc',
121 'src/node_revert.cc',
124 'src/node_stat_watcher.cc',
125 'src/node_watchdog.cc',
129 'src/signal_wrap.cc',
131 'src/string_bytes.cc',
132 'src/stream_base.cc',
133 'src/stream_wrap.cc',
137 'src/process_wrap.cc',
140 # headers to make for a more pleasant IDE experience
142 'src/async-wrap-inl.h',
144 'src/base-object-inl.h',
152 'src/node_constants.h',
154 'src/node_http_parser.h',
155 'src/node_internals.h',
156 'src/node_javascript.h',
157 'src/node_root_certs.h',
158 'src/node_version.h',
159 'src/node_watchdog.h',
168 'src/req-wrap-inl.h',
169 'src/string_bytes.h',
171 'src/stream_base-inl.h',
177 'src/string_search.cc',
178 'deps/http_parser/http_parser.h',
179 'deps/v8/include/v8.h',
180 'deps/v8/include/v8-debug.h',
181 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
182 # javascript files to make for an even more pleasant IDE experience
184 # node.gyp is added to the project by default.
189 'NODE_ARCH="<(target_arch)"',
190 'NODE_PLATFORM="<(OS)"',
191 'NODE_WANT_INTERNALS=1',
192 # Warn when using deprecated V8 APIs.
193 'V8_DEPRECATION_WARNINGS=1',
199 'defines': [ 'NODE_TAG="<(node_tag)"' ],
201 [ 'node_v8_options!=""', {
202 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
204 # No node_main.cc for anything except executable
205 [ 'node_target_type!="executable"', {
210 [ 'node_release_urlbase!=""', {
212 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
215 [ 'v8_enable_i18n_support==1', {
216 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
218 '<(icu_gyp_path):icui18n',
219 '<(icu_gyp_path):icuuc',
222 [ 'icu_small=="true"', {
223 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
226 [ 'node_use_openssl=="true"', {
227 'defines': [ 'HAVE_OPENSSL=1' ],
229 'src/node_crypto.cc',
230 'src/node_crypto_bio.cc',
231 'src/node_crypto_clienthello.cc',
233 'src/node_crypto_bio.h',
234 'src/node_crypto_clienthello.h',
239 ['openssl_fips != ""', {
240 'defines': [ 'NODE_FIPS_MODE' ],
242 [ 'node_shared_openssl=="false"', {
244 './deps/openssl/openssl.gyp:openssl',
247 './deps/openssl/openssl.gyp:openssl-cli',
249 # Do not let unused OpenSSL symbols to slip away
251 # -force_load or --whole-archive are not applicable for
253 [ 'node_target_type!="static_library"', {
256 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
260 ['OS in "linux freebsd"', {
262 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
263 '-Wl,--no-whole-archive',
271 'defines': [ 'HAVE_OPENSSL=0' ]
273 [ 'node_use_dtrace=="true"', {
274 'defines': [ 'HAVE_DTRACE=1' ],
276 'node_dtrace_header',
279 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
282 # DTrace is supported on linux, solaris, mac, and bsd. There are
283 # three object files associated with DTrace support, but they're
284 # not all used all the time:
286 # node_dtrace.o all configurations
287 # node_dtrace_ustack.o not supported on mac and linux
288 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
291 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
292 # actually exist. They're listed here to trick GYP into linking the
293 # corresponding object files into the final "node" executable. These
294 # object files are generated by "dtrace -G" using custom actions
295 # below, and the GYP-generated Makefiles will properly build them when
298 'sources': [ 'src/node_dtrace.cc' ],
302 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
305 [ 'OS!="mac" and OS!="linux"', {
307 'src/node_dtrace_ustack.cc',
308 'src/node_dtrace_provider.cc',
313 [ 'node_use_lttng=="true"', {
314 'defines': [ 'HAVE_LTTNG=1' ],
315 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
316 'libraries': [ '-llttng-ust' ],
321 [ 'node_use_etw=="true"', {
322 'defines': [ 'HAVE_ETW=1' ],
323 'dependencies': [ 'node_etw' ],
325 'src/node_win32_etw_provider.h',
326 'src/node_win32_etw_provider-inl.h',
327 'src/node_win32_etw_provider.cc',
328 'src/node_dtrace.cc',
329 'tools/msvs/genfiles/node_etw_provider.h',
330 'tools/msvs/genfiles/node_etw_provider.rc',
333 [ 'node_use_perfctr=="true"', {
334 'defines': [ 'HAVE_PERFCTR=1' ],
335 'dependencies': [ 'node_perfctr' ],
337 'src/node_win32_perfctr_provider.h',
338 'src/node_win32_perfctr_provider.cc',
339 'src/node_counters.cc',
340 'src/node_counters.h',
341 'tools/msvs/genfiles/node_perfctr_provider.rc',
344 [ 'v8_postmortem_support=="true"', {
345 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
347 # -force_load is not applicable for the static library
348 [ 'node_target_type!="static_library"', {
351 '-Wl,-force_load,<(V8_BASE)',
357 [ 'node_shared_zlib=="false"', {
358 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
361 [ 'node_shared_http_parser=="false"', {
362 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
365 [ 'node_shared_libuv=="false"', {
366 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
374 'NODE_PLATFORM="win"',
378 # we need to use node's preferred "win32" rather than gyp's preferred "win"
379 'NODE_PLATFORM="win32"',
382 'libraries': [ '-lpsapi.lib' ]
384 'defines': [ '__POSIX__' ],
387 # linking Corefoundation is needed since certain OSX debugging tools
388 # like Instruments require it for some features
389 'libraries': [ '-framework CoreFoundation' ],
391 'NODE_PLATFORM="mac"',
394 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
395 'NODE_PLATFORM="darwin"',
406 '_LINUX_SOURCE_COMPAT',
415 'NODE_PLATFORM="solaris"',
418 # we need to use node's preferred "sunos"
419 # rather than gyp's preferred "solaris"
420 'NODE_PLATFORM="sunos"',
423 [ 'OS=="freebsd" or OS=="linux"', {
424 'ldflags': [ '-Wl,-z,noexecstack',
425 '-Wl,--whole-archive <(V8_BASE)',
426 '-Wl,--no-whole-archive' ]
429 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
434 'EmbedManifest': 'true',
435 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
439 # generate ETW header and resource files
441 'target_name': 'node_etw',
444 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
447 'action_name': 'node_etw',
448 'inputs': [ 'src/res/node_etw_provider.man' ],
450 'tools/msvs/genfiles/node_etw_provider.rc',
451 'tools/msvs/genfiles/node_etw_provider.h',
452 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
454 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
460 # generate perf counter header and resource files
462 'target_name': 'node_perfctr',
465 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
468 'action_name': 'node_perfctr_man',
469 'inputs': [ 'src/res/node_perfctr_provider.man' ],
471 'tools/msvs/genfiles/node_perfctr_provider.h',
472 'tools/msvs/genfiles/node_perfctr_provider.rc',
473 'tools/msvs/genfiles/MSG00001.BIN',
475 'action': [ 'ctrpp <@(_inputs) '
476 '-o tools/msvs/genfiles/node_perfctr_provider.h '
477 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
485 'target_name': 'node_js2c',
487 'toolsets': ['host'],
490 'action_name': 'node_js2c',
496 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
499 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
500 'inputs': [ 'src/notrace_macros.py' ]
502 ['node_use_lttng=="false"', {
503 'inputs': [ 'src/nolttng_macros.py' ]
505 [ 'node_use_perfctr=="false"', {
506 'inputs': [ 'src/perfctr_macros.py' ]
519 'target_name': 'node_dtrace_header',
522 [ 'node_use_dtrace=="true" and OS!="linux"', {
525 'action_name': 'node_dtrace_header',
526 'inputs': [ 'src/node_provider.d' ],
527 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
528 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
529 '-o', '<@(_outputs)' ]
533 [ 'node_use_dtrace=="true" and OS=="linux"', {
536 'action_name': 'node_dtrace_header',
537 'inputs': [ 'src/node_provider.d' ],
538 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
539 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
540 '-o', '<@(_outputs)' ]
547 'target_name': 'node_dtrace_provider',
550 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
553 'action_name': 'node_dtrace_provider_o',
555 '<(OBJ_DIR)/node/src/node_dtrace.o',
558 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
560 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
561 '<@(_inputs)', '-o', '<@(_outputs)' ]
565 [ 'node_use_dtrace=="true" and OS=="linux"', {
568 'action_name': 'node_dtrace_provider_o',
569 'inputs': [ 'src/node_provider.d' ],
571 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
574 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
582 'target_name': 'node_dtrace_ustack',
585 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
588 'action_name': 'node_dtrace_ustack_constants',
593 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
596 'tools/genv8constants.py',
602 'action_name': 'node_dtrace_ustack',
605 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
608 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
611 [ 'target_arch=="ia32"', {
613 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
614 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
617 [ 'target_arch=="x64"', {
619 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
620 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
630 'target_name': 'specialize_node_d',
633 [ 'node_use_dtrace=="true"', {
636 'action_name': 'specialize_node_d',
641 '<(PRODUCT_DIR)/node.d',
644 'tools/specialize_node_d.py',
656 'target_name': 'cctest',
657 'type': 'executable',
659 'deps/gtest/gtest.gyp:gtest',
660 'deps/v8/tools/gyp/v8.gyp:v8',
661 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
668 # gtest's ASSERT macros conflict with our own.
669 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
670 'GTEST_DONT_DEFINE_ASSERT_GE=1',
671 'GTEST_DONT_DEFINE_ASSERT_GT=1',
672 'GTEST_DONT_DEFINE_ASSERT_LE=1',
673 'GTEST_DONT_DEFINE_ASSERT_LT=1',
674 'GTEST_DONT_DEFINE_ASSERT_NE=1',
677 'test/cctest/util.cc',
686 'target_name': 'node',
687 'type': 'executable',
688 'dependencies': ['<(node_core_target_name)', 'node_exp'],
698 # node.gyp is added to the project by default.
702 'ldflags': ['-Wl,-bbigtoc,-bE:<(PRODUCT_DIR)/node.exp'],
705 'target_name': 'node_exp',
708 '<(node_core_target_name)',
712 'action_name': 'expfile',
717 '<(PRODUCT_DIR)/node.exp'
720 'sh', 'tools/create_expfile.sh',
721 '<@(_inputs)', '<@(_outputs)'
727 }], # end aix section
728 ], # end conditions block