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/cluster.js',
73 'lib/internal/freelist.js',
74 'lib/internal/module.js',
75 'lib/internal/socket_list.js',
76 'lib/internal/repl.js',
77 'lib/internal/util.js',
78 'lib/internal/streams/lazy_transform.js',
84 'target_name': 'node',
85 'type': '<(node_target_type)',
89 'deps/cares/cares.gyp:cares',
90 'deps/v8/tools/gyp/v8.gyp:v8',
91 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
96 'tools/msvs/genfiles',
98 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
99 'deps/v8' # include/v8_platform.h
103 'src/debug-agent.cc',
106 'src/fs_event_wrap.cc',
108 'src/handle_wrap.cc',
111 'src/node_buffer.cc',
112 'src/node_constants.cc',
113 'src/node_contextify.cc',
115 'src/node_http_parser.cc',
116 'src/node_javascript.cc',
121 'src/node_stat_watcher.cc',
122 'src/node_watchdog.cc',
126 'src/signal_wrap.cc',
128 'src/string_bytes.cc',
129 'src/stream_base.cc',
130 'src/stream_wrap.cc',
134 'src/process_wrap.cc',
137 # headers to make for a more pleasant IDE experience
139 'src/async-wrap-inl.h',
141 'src/base-object-inl.h',
149 'src/node_constants.h',
151 'src/node_http_parser.h',
152 'src/node_internals.h',
153 'src/node_javascript.h',
154 'src/node_root_certs.h',
155 'src/node_version.h',
156 'src/node_watchdog.h',
164 'src/req-wrap-inl.h',
165 'src/string_bytes.h',
167 'src/stream_base-inl.h',
173 'src/string_search.cc',
174 'deps/http_parser/http_parser.h',
175 'deps/v8/include/v8.h',
176 'deps/v8/include/v8-debug.h',
177 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
178 # javascript files to make for an even more pleasant IDE experience
180 # node.gyp is added to the project by default.
185 'NODE_ARCH="<(target_arch)"',
186 'NODE_PLATFORM="<(OS)"',
187 'NODE_WANT_INTERNALS=1',
188 # Warn when using deprecated V8 APIs.
189 'V8_DEPRECATION_WARNINGS=1',
195 'defines': [ 'NODE_TAG="<(node_tag)"' ],
197 [ 'node_v8_options!=""', {
198 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
200 # No node_main.cc for anything except executable
201 [ 'node_target_type!="executable"', {
206 [ 'node_release_urlbase!=""', {
208 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
211 [ 'v8_enable_i18n_support==1', {
212 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
214 '<(icu_gyp_path):icui18n',
215 '<(icu_gyp_path):icuuc',
218 [ 'icu_small=="true"', {
219 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
222 [ 'node_use_openssl=="true"', {
223 'defines': [ 'HAVE_OPENSSL=1' ],
225 'src/node_crypto.cc',
226 'src/node_crypto_bio.cc',
227 'src/node_crypto_clienthello.cc',
229 'src/node_crypto_bio.h',
230 'src/node_crypto_clienthello.h',
235 ['openssl_fips != ""', {
236 'defines': [ 'NODE_FIPS_MODE' ],
238 [ 'node_shared_openssl=="false"', {
240 './deps/openssl/openssl.gyp:openssl',
243 './deps/openssl/openssl.gyp:openssl-cli',
245 # Do not let unused OpenSSL symbols to slip away
247 # -force_load or --whole-archive are not applicable for
249 [ 'node_target_type!="static_library"', {
252 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
256 ['OS in "linux freebsd"', {
258 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
259 '-Wl,--no-whole-archive',
267 'defines': [ 'HAVE_OPENSSL=0' ]
269 [ 'node_use_dtrace=="true"', {
270 'defines': [ 'HAVE_DTRACE=1' ],
272 'node_dtrace_header',
275 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
278 # DTrace is supported on linux, solaris, mac, and bsd. There are
279 # three object files associated with DTrace support, but they're
280 # not all used all the time:
282 # node_dtrace.o all configurations
283 # node_dtrace_ustack.o not supported on mac and linux
284 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
287 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
288 # actually exist. They're listed here to trick GYP into linking the
289 # corresponding object files into the final "node" executable. These
290 # object files are generated by "dtrace -G" using custom actions
291 # below, and the GYP-generated Makefiles will properly build them when
294 'sources': [ 'src/node_dtrace.cc' ],
298 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
301 [ 'OS!="mac" and OS!="linux"', {
303 'src/node_dtrace_ustack.cc',
304 'src/node_dtrace_provider.cc',
309 [ 'node_use_lttng=="true"', {
310 'defines': [ 'HAVE_LTTNG=1' ],
311 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
312 'libraries': [ '-llttng-ust' ],
317 [ 'node_use_etw=="true"', {
318 'defines': [ 'HAVE_ETW=1' ],
319 'dependencies': [ 'node_etw' ],
321 'src/node_win32_etw_provider.h',
322 'src/node_win32_etw_provider-inl.h',
323 'src/node_win32_etw_provider.cc',
324 'src/node_dtrace.cc',
325 'tools/msvs/genfiles/node_etw_provider.h',
326 'tools/msvs/genfiles/node_etw_provider.rc',
329 [ 'node_use_perfctr=="true"', {
330 'defines': [ 'HAVE_PERFCTR=1' ],
331 'dependencies': [ 'node_perfctr' ],
333 'src/node_win32_perfctr_provider.h',
334 'src/node_win32_perfctr_provider.cc',
335 'src/node_counters.cc',
336 'src/node_counters.h',
337 'tools/msvs/genfiles/node_perfctr_provider.rc',
340 [ 'v8_postmortem_support=="true"', {
341 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
343 # -force_load is not applicable for the static library
344 [ 'node_target_type!="static_library"', {
347 '-Wl,-force_load,<(V8_BASE)',
353 [ 'node_shared_zlib=="false"', {
354 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
357 [ 'node_shared_http_parser=="false"', {
358 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
361 [ 'node_shared_libuv=="false"', {
362 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
370 'NODE_PLATFORM="win"',
374 # we need to use node's preferred "win32" rather than gyp's preferred "win"
375 'NODE_PLATFORM="win32"',
378 'libraries': [ '-lpsapi.lib' ]
380 'defines': [ '__POSIX__' ],
383 # linking Corefoundation is needed since certain OSX debugging tools
384 # like Instruments require it for some features
385 'libraries': [ '-framework CoreFoundation' ],
387 'NODE_PLATFORM="mac"',
390 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
391 'NODE_PLATFORM="darwin"',
402 '_LINUX_SOURCE_COMPAT',
411 'NODE_PLATFORM="solaris"',
414 # we need to use node's preferred "sunos"
415 # rather than gyp's preferred "solaris"
416 'NODE_PLATFORM="sunos"',
419 [ 'OS=="freebsd" or OS=="linux"', {
420 'ldflags': [ '-Wl,-z,noexecstack',
421 '-Wl,--whole-archive <(V8_BASE)',
422 '-Wl,--no-whole-archive' ]
425 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
430 'EmbedManifest': 'true',
431 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
435 # generate ETW header and resource files
437 'target_name': 'node_etw',
440 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
443 'action_name': 'node_etw',
444 'inputs': [ 'src/res/node_etw_provider.man' ],
446 'tools/msvs/genfiles/node_etw_provider.rc',
447 'tools/msvs/genfiles/node_etw_provider.h',
448 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
450 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
456 # generate perf counter header and resource files
458 'target_name': 'node_perfctr',
461 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
464 'action_name': 'node_perfctr_man',
465 'inputs': [ 'src/res/node_perfctr_provider.man' ],
467 'tools/msvs/genfiles/node_perfctr_provider.h',
468 'tools/msvs/genfiles/node_perfctr_provider.rc',
469 'tools/msvs/genfiles/MSG00001.BIN',
471 'action': [ 'ctrpp <@(_inputs) '
472 '-o tools/msvs/genfiles/node_perfctr_provider.h '
473 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
481 'target_name': 'node_js2c',
483 'toolsets': ['host'],
486 'action_name': 'node_js2c',
492 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
495 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
496 'inputs': [ 'src/notrace_macros.py' ]
498 ['node_use_lttng=="false"', {
499 'inputs': [ 'src/nolttng_macros.py' ]
501 [ 'node_use_perfctr=="false"', {
502 'inputs': [ 'src/perfctr_macros.py' ]
515 'target_name': 'node_dtrace_header',
518 [ 'node_use_dtrace=="true" and OS!="linux"', {
521 'action_name': 'node_dtrace_header',
522 'inputs': [ 'src/node_provider.d' ],
523 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
524 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
525 '-o', '<@(_outputs)' ]
529 [ 'node_use_dtrace=="true" and OS=="linux"', {
532 'action_name': 'node_dtrace_header',
533 'inputs': [ 'src/node_provider.d' ],
534 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
535 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
536 '-o', '<@(_outputs)' ]
543 'target_name': 'node_dtrace_provider',
546 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
549 'action_name': 'node_dtrace_provider_o',
551 '<(OBJ_DIR)/node/src/node_dtrace.o',
554 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
556 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
557 '<@(_inputs)', '-o', '<@(_outputs)' ]
561 [ 'node_use_dtrace=="true" and OS=="linux"', {
564 'action_name': 'node_dtrace_provider_o',
565 'inputs': [ 'src/node_provider.d' ],
567 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
570 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
578 'target_name': 'node_dtrace_ustack',
581 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
584 'action_name': 'node_dtrace_ustack_constants',
589 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
592 'tools/genv8constants.py',
598 'action_name': 'node_dtrace_ustack',
601 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
604 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
607 [ 'target_arch=="ia32"', {
609 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
610 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
613 [ 'target_arch=="x64"', {
615 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
616 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
626 'target_name': 'specialize_node_d',
629 [ 'node_use_dtrace=="true"', {
632 'action_name': 'specialize_node_d',
637 '<(PRODUCT_DIR)/node.d',
640 'tools/specialize_node_d.py',
652 'target_name': 'cctest',
653 'type': 'executable',
655 'deps/gtest/gtest.gyp:gtest',
656 'deps/v8/tools/gyp/v8.gyp:v8',
657 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
664 # gtest's ASSERT macros conflict with our own.
665 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
666 'GTEST_DONT_DEFINE_ASSERT_GE=1',
667 'GTEST_DONT_DEFINE_ASSERT_GT=1',
668 'GTEST_DONT_DEFINE_ASSERT_LE=1',
669 'GTEST_DONT_DEFINE_ASSERT_LT=1',
670 'GTEST_DONT_DEFINE_ASSERT_NE=1',
673 'test/cctest/util.cc',