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',
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',
73 'lib/internal/child_process.js',
74 'lib/internal/freelist.js',
75 'lib/internal/smalloc.js',
76 'lib/internal/socket_list.js',
77 'lib/internal/repl.js',
83 'target_name': 'iojs',
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',
127 'src/string_bytes.cc',
128 'src/stream_base.cc',
129 'src/stream_wrap.cc',
133 'src/process_wrap.cc',
136 # headers to make for a more pleasant IDE experience
138 'src/async-wrap-inl.h',
140 'src/base-object-inl.h',
148 'src/node_constants.h',
150 'src/node_http_parser.h',
151 'src/node_internals.h',
152 'src/node_javascript.h',
153 'src/node_root_certs.h',
154 'src/node_version.h',
155 'src/node_watchdog.h',
164 'src/req-wrap-inl.h',
165 'src/string_bytes.h',
167 'src/stream_base-inl.h',
173 'deps/http_parser/http_parser.h',
174 'deps/v8/include/v8.h',
175 'deps/v8/include/v8-debug.h',
176 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
177 # javascript files to make for an even more pleasant IDE experience
179 # node.gyp is added to the project by default.
184 'NODE_ARCH="<(target_arch)"',
185 'NODE_PLATFORM="<(OS)"',
186 'NODE_TAG="<(node_tag)"',
187 'NODE_V8_OPTIONS="<(node_v8_options)"',
188 'NODE_WANT_INTERNALS=1',
192 # No node_main.cc for anything except executable
193 [ 'node_target_type!="executable"', {
198 [ 'v8_enable_i18n_support==1', {
199 'defines': [ 'NODE_HAVE_I18N_SUPPORT=1' ],
201 '<(icu_gyp_path):icui18n',
202 '<(icu_gyp_path):icuuc',
205 [ 'icu_small=="true"', {
206 'defines': [ 'NODE_HAVE_SMALL_ICU=1' ],
209 [ 'node_use_openssl=="true"', {
210 'defines': [ 'HAVE_OPENSSL=1' ],
212 'src/node_crypto.cc',
213 'src/node_crypto_bio.cc',
214 'src/node_crypto_clienthello.cc',
216 'src/node_crypto_bio.h',
217 'src/node_crypto_clienthello.h',
222 [ 'node_shared_openssl=="false"', {
224 './deps/openssl/openssl.gyp:openssl',
227 './deps/openssl/openssl.gyp:openssl-cli',
229 # Do not let unused OpenSSL symbols to slip away
231 # -force_load or --whole-archive are not applicable for
233 [ 'node_target_type!="static_library"', {
236 '-Wl,-force_load,<(PRODUCT_DIR)/libopenssl.a',
240 ['OS in "linux freebsd"', {
242 '-Wl,--whole-archive <(PRODUCT_DIR)/libopenssl.a',
243 '-Wl,--no-whole-archive',
251 'defines': [ 'HAVE_OPENSSL=0' ]
253 [ 'node_use_dtrace=="true"', {
254 'defines': [ 'HAVE_DTRACE=1' ],
256 'node_dtrace_header',
259 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
262 # DTrace is supported on linux, solaris, mac, and bsd. There are
263 # three object files associated with DTrace support, but they're
264 # not all used all the time:
266 # node_dtrace.o all configurations
267 # node_dtrace_ustack.o not supported on mac and linux
268 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
271 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
272 # actually exist. They're listed here to trick GYP into linking the
273 # corresponding object files into the final "node" executable. These
274 # object files are generated by "dtrace -G" using custom actions
275 # below, and the GYP-generated Makefiles will properly build them when
278 'sources': [ 'src/node_dtrace.cc' ],
282 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
285 [ 'OS!="mac" and OS!="linux"', {
287 'src/node_dtrace_ustack.cc',
288 'src/node_dtrace_provider.cc',
293 [ 'node_use_lttng=="true"', {
294 'defines': [ 'HAVE_LTTNG=1' ],
295 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
296 'libraries': [ '-llttng-ust' ],
301 [ 'node_use_etw=="true"', {
302 'defines': [ 'HAVE_ETW=1' ],
303 'dependencies': [ 'node_etw' ],
305 'src/node_win32_etw_provider.h',
306 'src/node_win32_etw_provider-inl.h',
307 'src/node_win32_etw_provider.cc',
308 'src/node_dtrace.cc',
309 'tools/msvs/genfiles/node_etw_provider.h',
310 'tools/msvs/genfiles/node_etw_provider.rc',
313 [ 'node_use_perfctr=="true"', {
314 'defines': [ 'HAVE_PERFCTR=1' ],
315 'dependencies': [ 'node_perfctr' ],
317 'src/node_win32_perfctr_provider.h',
318 'src/node_win32_perfctr_provider.cc',
319 'src/node_counters.cc',
320 'src/node_counters.h',
321 'tools/msvs/genfiles/node_perfctr_provider.rc',
324 [ 'v8_postmortem_support=="true"', {
325 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:postmortem-metadata' ],
327 # -force_load is not applicable for the static library
328 [ 'node_target_type!="static_library"', {
331 '-Wl,-force_load,<(V8_BASE)',
337 [ 'node_shared_zlib=="false"', {
338 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
341 [ 'node_shared_http_parser=="false"', {
342 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
345 [ 'node_shared_libuv=="false"', {
346 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
354 'NODE_PLATFORM="win"',
358 # we need to use node's preferred "win32" rather than gyp's preferred "win"
359 'NODE_PLATFORM="win32"',
362 'libraries': [ '-lpsapi.lib' ]
364 'defines': [ '__POSIX__' ],
367 # linking Corefoundation is needed since certain OSX debugging tools
368 # like Instruments require it for some features
369 'libraries': [ '-framework CoreFoundation' ],
371 'NODE_PLATFORM="mac"',
374 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
375 'NODE_PLATFORM="darwin"',
390 'NODE_PLATFORM="solaris"',
393 # we need to use node's preferred "sunos"
394 # rather than gyp's preferred "solaris"
395 'NODE_PLATFORM="sunos"',
398 [ 'OS=="freebsd" or OS=="linux"', {
399 'ldflags': [ '-Wl,-z,noexecstack',
400 '-Wl,--whole-archive <(V8_BASE)',
401 '-Wl,--no-whole-archive' ]
404 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
409 'EmbedManifest': 'true',
410 'AdditionalManifestFiles': 'src/res/node.exe.extra.manifest'
414 # generate ETW header and resource files
416 'target_name': 'node_etw',
419 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
422 'action_name': 'node_etw',
423 'inputs': [ 'src/res/node_etw_provider.man' ],
425 'tools/msvs/genfiles/node_etw_provider.rc',
426 'tools/msvs/genfiles/node_etw_provider.h',
427 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
429 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
435 # generate perf counter header and resource files
437 'target_name': 'node_perfctr',
440 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
443 'action_name': 'node_perfctr_man',
444 'inputs': [ 'src/res/node_perfctr_provider.man' ],
446 'tools/msvs/genfiles/node_perfctr_provider.h',
447 'tools/msvs/genfiles/node_perfctr_provider.rc',
448 'tools/msvs/genfiles/MSG00001.BIN',
450 'action': [ 'ctrpp <@(_inputs) '
451 '-o tools/msvs/genfiles/node_perfctr_provider.h '
452 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
460 'target_name': 'node_js2c',
462 'toolsets': ['host'],
465 'action_name': 'node_js2c',
471 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
474 [ 'node_use_dtrace=="false" and node_use_etw=="false"', {
475 'inputs': [ 'src/notrace_macros.py' ]
477 ['node_use_lttng=="false"', {
478 'inputs': [ 'src/nolttng_macros.py' ]
480 [ 'node_use_perfctr=="false"', {
481 'inputs': [ 'src/perfctr_macros.py' ]
494 'target_name': 'node_dtrace_header',
497 [ 'node_use_dtrace=="true" and OS!="linux"', {
500 'action_name': 'node_dtrace_header',
501 'inputs': [ 'src/node_provider.d' ],
502 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
503 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
504 '-o', '<@(_outputs)' ]
508 [ 'node_use_dtrace=="true" and OS=="linux"', {
511 'action_name': 'node_dtrace_header',
512 'inputs': [ 'src/node_provider.d' ],
513 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
514 'action': [ 'dtrace', '-h', '-s', '<@(_inputs)',
515 '-o', '<@(_outputs)' ]
522 'target_name': 'node_dtrace_provider',
525 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
528 'action_name': 'node_dtrace_provider_o',
530 '<(OBJ_DIR)/iojs/src/node_dtrace.o',
533 '<(OBJ_DIR)/iojs/src/node_dtrace_provider.o'
535 'action': [ 'dtrace', '-G', '-xnolibs', '-s', 'src/node_provider.d',
536 '<@(_inputs)', '-o', '<@(_outputs)' ]
540 [ 'node_use_dtrace=="true" and OS=="linux"', {
543 'action_name': 'node_dtrace_provider_o',
544 'inputs': [ 'src/node_provider.d' ],
546 '<(SHARED_INTERMEDIATE_DIR)/node_dtrace_provider.o'
549 'dtrace', '-C', '-G', '-s', '<@(_inputs)', '-o', '<@(_outputs)'
557 'target_name': 'node_dtrace_ustack',
560 [ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
563 'action_name': 'node_dtrace_ustack_constants',
568 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
571 'tools/genv8constants.py',
577 'action_name': 'node_dtrace_ustack',
580 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
583 '<(OBJ_DIR)/iojs/src/node_dtrace_ustack.o'
586 [ 'target_arch=="ia32"', {
588 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
589 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
592 [ 'target_arch=="x64"', {
594 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
595 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
605 'target_name': 'specialize_node_d',
608 [ 'node_use_dtrace=="true"', {
611 'action_name': 'specialize_node_d',
616 '<(PRODUCT_DIR)/node.d',
619 'tools/specialize_node_d.py',
631 'target_name': 'cctest',
632 'type': 'executable',
634 'deps/gtest/gtest.gyp:gtest',
635 'deps/v8/tools/gyp/v8.gyp:v8',
636 'deps/v8/tools/gyp/v8.gyp:v8_libplatform'
643 # gtest's ASSERT macros conflict with our own.
644 'GTEST_DONT_DEFINE_ASSERT_EQ=1',
645 'GTEST_DONT_DEFINE_ASSERT_GE=1',
646 'GTEST_DONT_DEFINE_ASSERT_GT=1',
647 'GTEST_DONT_DEFINE_ASSERT_LE=1',
648 'GTEST_DONT_DEFINE_ASSERT_LT=1',
649 'GTEST_DONT_DEFINE_ASSERT_NE=1',
652 'test/cctest/util.cc',