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',
98 'target_name': '<(node_core_target_name)',
99 'type': '<(node_target_type)',
103 'deps/cares/cares.gyp:cares',
104 'deps/v8/tools/gyp/v8.gyp:v8',
105 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
110 'tools/msvs/genfiles',
112 '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
113 'deps/v8' # include/v8_platform.h
117 'src/debug-agent.cc',
120 'src/fs_event_wrap.cc',
122 'src/handle_wrap.cc',
125 'src/node_buffer.cc',
126 'src/node_constants.cc',
127 'src/node_contextify.cc',
129 'src/node_http_parser.cc',
130 'src/node_javascript.cc',
133 'src/node_revert.cc',
136 'src/node_stat_watcher.cc',
137 'src/node_watchdog.cc',
141 'src/signal_wrap.cc',
143 'src/string_bytes.cc',
144 'src/stream_base.cc',
145 'src/stream_wrap.cc',
149 'src/process_wrap.cc',
152 # headers to make for a more pleasant IDE experience
154 'src/async-wrap-inl.h',
156 'src/base-object-inl.h',
164 'src/node_constants.h',
166 'src/node_http_parser.h',
167 'src/node_internals.h',
168 'src/node_javascript.h',
169 'src/node_root_certs.h',
170 'src/node_version.h',
171 'src/node_watchdog.h',
180 'src/req-wrap-inl.h',
181 'src/string_bytes.h',
183 'src/stream_base-inl.h',
189 'src/string_search.cc',
190 'deps/http_parser/http_parser.h',
191 'deps/v8/include/v8.h',
192 'deps/v8/include/v8-debug.h',
193 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
194 # javascript files to make for an even more pleasant IDE experience
196 # node.gyp is added to the project by default.
201 'NODE_ARCH="<(target_arch)"',
202 'NODE_PLATFORM="<(OS)"',
203 'NODE_WANT_INTERNALS=1',
204 # Warn when using deprecated V8 APIs.
205 'V8_DEPRECATION_WARNINGS=1',
211 'defines': [ 'NODE_TAG="<(node_tag)"' ],
213 [ 'node_v8_options!=""', {
214 'defines': [ 'NODE_V8_OPTIONS="<(node_v8_options)"'],
216 # No node_main.cc for anything except executable
217 [ 'node_target_type!="executable"', {
222 [ 'node_release_urlbase!=""', {
224 'NODE_RELEASE_URLBASE="<(node_release_urlbase)"',
227 [ 'v8_enable_i18n_support==1', {
228 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
230 '<(icu_gyp_path):icui18n',
231 '<(icu_gyp_path):icuuc',
234 [ 'icu_small=="true"', {
235 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
238 [ 'node_use_openssl=="true"', {
239 'defines': [ 'HAVE_OPENSSL=1' ],
241 'src/node_crypto.cc',
242 'src/node_crypto_bio.cc',
243 'src/node_crypto_clienthello.cc',
245 'src/node_crypto_bio.h',
246 'src/node_crypto_clienthello.h',
251 ['openssl_fips != ""', {
252 'defines': [ 'NODE_FIPS_MODE' ],
254 [ 'node_shared_openssl=="false"', {
256 './deps/openssl/openssl.gyp:openssl',
259 './deps/openssl/openssl.gyp:openssl-cli',
261 # Do not let unused OpenSSL symbols to slip away
263 # -force_load or --whole-archive are not applicable for
265 [ 'node_target_type!="static_library"', {
268 '-Wl,-force_load,<(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
272 ['OS in "linux freebsd"', {
274 '-Wl,--whole-archive <(PRODUCT_DIR)/<(OPENSSL_PRODUCT)',
275 '-Wl,--no-whole-archive',
283 'defines': [ 'HAVE_OPENSSL=0' ]
285 [ 'node_use_dtrace=="true"', {
286 'defines': [ 'HAVE_DTRACE=1' ],
288 'node_dtrace_header',
291 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
294 # DTrace is supported on linux, solaris, mac, and bsd. There are
295 # three object files associated with DTrace support, but they're
296 # not all used all the time:
298 # node_dtrace.o all configurations
299 # node_dtrace_ustack.o not supported on mac and linux
300 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
303 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
304 # actually exist. They're listed here to trick GYP into linking the
305 # corresponding object files into the final "node" executable. These
306 # object files are generated by "dtrace -G" using custom actions
307 # below, and the GYP-generated Makefiles will properly build them when
310 'sources': [ 'src/node_dtrace.cc' ],
314 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
317 [ 'OS!="mac" and OS!="linux"', {
319 'src/node_dtrace_ustack.cc',
320 'src/node_dtrace_provider.cc',
325 [ 'node_use_lttng=="true"', {
326 'defines': [ 'HAVE_LTTNG=1' ],
327 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
328 'libraries': [ '-llttng-ust' ],
333 [ 'node_use_etw=="true"', {
334 'defines': [ 'HAVE_ETW=1' ],
335 'dependencies': [ 'node_etw' ],
337 'src/node_win32_etw_provider.h',
338 'src/node_win32_etw_provider-inl.h',
339 'src/node_win32_etw_provider.cc',
340 'src/node_dtrace.cc',
341 'tools/msvs/genfiles/node_etw_provider.h',
342 'tools/msvs/genfiles/node_etw_provider.rc',
345 [ 'node_use_perfctr=="true"', {
346 'defines': [ 'HAVE_PERFCTR=1' ],
347 'dependencies': [ 'node_perfctr' ],
349 'src/node_win32_perfctr_provider.h',
350 'src/node_win32_perfctr_provider.cc',
351 'src/node_counters.cc',
352 'src/node_counters.h',
353 'tools/msvs/genfiles/node_perfctr_provider.rc',
356 [ 'v8_postmortem_support=="true"', {
357 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
359 # -force_load is not applicable for the static library
360 [ 'node_target_type!="static_library"', {
363 '-Wl,-force_load,<(V8_BASE)',
369 [ 'node_shared_zlib=="false"', {
370 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
373 [ 'node_shared_http_parser=="false"', {
374 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
377 [ 'node_shared_libuv=="false"', {
378 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
386 'NODE_PLATFORM="win"',
390 # we need to use node's preferred "win32" rather than gyp's preferred "win"
391 'NODE_PLATFORM="win32"',
394 'libraries': [ '-lpsapi.lib' ]
396 'defines': [ '__POSIX__' ],
399 # linking Corefoundation is needed since certain OSX debugging tools
400 # like Instruments require it for some features
401 'libraries': [ '-framework CoreFoundation' ],
403 'NODE_PLATFORM="mac"',
406 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
407 'NODE_PLATFORM="darwin"',
418 '_LINUX_SOURCE_COMPAT',
427 'NODE_PLATFORM="solaris"',
430 # we need to use node's preferred "sunos"
431 # rather than gyp's preferred "solaris"
432 'NODE_PLATFORM="sunos"',
435 [ 'OS=="freebsd" or OS=="linux"', {
436 'ldflags': [ '-Wl,-z,noexecstack',
437 '-Wl,--whole-archive <(V8_BASE)',
438 '-Wl,--no-whole-archive' ]
441 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
446 'EmbedManifest': 'true',
447 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
451 # generate ETW header and resource files
453 'target_name': 'node_etw',
456 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
459 'action_name': 'node_etw',
460 'inputs': [ 'src/res/node_etw_provider.man' ],
462 'tools/msvs/genfiles/node_etw_provider.rc',
463 'tools/msvs/genfiles/node_etw_provider.h',
464 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
466 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
472 # generate perf counter header and resource files
474 'target_name': 'node_perfctr',
477 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
480 'action_name': 'node_perfctr_man',
481 'inputs': [ 'src/res/node_perfctr_provider.man' ],
483 'tools/msvs/genfiles/node_perfctr_provider.h',
484 'tools/msvs/genfiles/node_perfctr_provider.rc',
485 'tools/msvs/genfiles/MSG00001.BIN',
487 'action': [ 'ctrpp <@(_inputs) '
488 '-o tools/msvs/genfiles/node_perfctr_provider.h '
489 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
497 'target_name': 'node_js2c',
499 'toolsets': ['host'],
502 'action_name': 'node_js2c',
508 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
511 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
512 'inputs': [ 'src/notrace_macros.py' ]
514 ['node_use_lttng=="false"', {
515 'inputs': [ 'src/nolttng_macros.py' ]
517 [ 'node_use_perfctr=="false"', {
518 'inputs': [ 'src/perfctr_macros.py' ]
531 'target_name': 'node_dtrace_header',
534 [ 'node_use_dtrace=="true" and OS!="linux"', {
537 'action_name': 'node_dtrace_header',
538 'inputs': [ 'src/node_provider.d' ],
539 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
540 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
541 '-o', '<@(_outputs)' ]
545 [ 'node_use_dtrace=="true" and OS=="linux"', {
548 'action_name': 'node_dtrace_header',
549 'inputs': [ 'src/node_provider.d' ],
550 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
551 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
552 '-o', '<@(_outputs)' ]
559 'target_name': 'node_dtrace_provider',
562 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
565 'action_name': 'node_dtrace_provider_o',
567 '<(OBJ_DIR)/node/src/node_dtrace.o',
570 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
572 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
573 '<@(_inputs)', '-o', '<@(_outputs)' ]
577 [ 'node_use_dtrace=="true" and OS=="linux"', {
580 'action_name': 'node_dtrace_provider_o',
581 'inputs': [ 'src/node_provider.d' ],
583 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
586 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
594 'target_name': 'node_dtrace_ustack',
597 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
600 'action_name': 'node_dtrace_ustack_constants',
605 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
608 'tools/genv8constants.py',
614 'action_name': 'node_dtrace_ustack',
617 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
620 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
623 [ 'target_arch=="ia32"', {
625 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
626 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
629 [ 'target_arch=="x64"', {
631 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
632 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
642 'target_name': 'specialize_node_d',
645 [ 'node_use_dtrace=="true"', {
648 'action_name': 'specialize_node_d',
653 '<(PRODUCT_DIR)/node.d',
656 'tools/specialize_node_d.py',
668 'target_name': 'cctest',
669 'type': 'executable',
671 'deps/gtest/gtest.gyp:gtest',
672 'deps/v8/tools/gyp/v8.gyp:v8',
673 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
680 # gtest's ASSERT macros conflict with our own.
681 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
682 'GTEST_DONT_DEFINE_ASSERT_GE=1',
683 'GTEST_DONT_DEFINE_ASSERT_GT=1',
684 'GTEST_DONT_DEFINE_ASSERT_LE=1',
685 'GTEST_DONT_DEFINE_ASSERT_LT=1',
686 'GTEST_DONT_DEFINE_ASSERT_NE=1',
689 'test/cctest/util.cc',
698 'target_name': 'node',
699 'type': 'executable',
700 'dependencies': ['<(node_core_target_name)', 'node_exp'],
710 # node.gyp is added to the project by default.
714 'ldflags': ['-Wl,-bbigtoc,-bE:<(PRODUCT_DIR)/node.exp'],
717 'target_name': 'node_exp',
720 '<(node_core_target_name)',
724 'action_name': 'expfile',
729 '<(PRODUCT_DIR)/node.exp'
732 'sh', 'tools/create_expfile.sh',
733 '<@(_inputs)', '<@(_outputs)'
739 }], # end aix section
740 ], # end conditions block