3 'v8_use_snapshot%': 'true',
4 # Turn off -Werror in V8
5 # See http://codereview.chromium.org/8159015
7 'node_use_dtrace%': 'false',
8 'node_use_etw%': 'false',
9 'node_use_perfctr%': 'false',
10 'node_has_winsdk%': 'false',
11 'node_shared_v8%': 'false',
12 'node_shared_zlib%': 'false',
13 'node_shared_http_parser%': 'false',
14 'node_shared_cares%': 'false',
15 'node_shared_libuv%': 'false',
16 'node_use_openssl%': 'true',
17 'node_use_systemtap%': 'false',
18 'node_shared_openssl%': 'false',
25 'lib/child_process.js',
47 'lib/_stream_readable.js',
48 'lib/_stream_writable.js',
49 'lib/_stream_duplex.js',
50 'lib/_stream_transform.js',
51 'lib/_stream_passthrough.js',
52 'lib/string_decoder.js',
66 'target_name': 'node',
75 'tools/msvs/genfiles',
77 '<(SHARED_INTERMEDIATE_DIR)' # for node_natives.h
81 'src/fs_event_wrap.cc',
86 'src/node_constants.cc',
87 'src/node_extensions.cc',
89 'src/node_http_parser.cc',
90 'src/node_javascript.cc',
94 'src/node_stat_watcher.cc',
99 'src/string_bytes.cc',
100 'src/stream_wrap.cc',
101 'src/slab_allocator.cc',
105 'src/process_wrap.cc',
106 'src/v8_typed_array.cc',
108 # headers to make for a more pleasant IDE experience
112 'src/node_constants.h',
114 'src/node_extensions.h',
116 'src/node_http_parser.h',
117 'src/node_javascript.h',
119 'src/node_root_certs.h',
122 'src/node_version.h',
129 'src/slab_allocator.h',
130 'src/string_bytes.h',
133 'src/v8_typed_array.h',
134 'deps/http_parser/http_parser.h',
135 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
136 # javascript files to make for an even more pleasant IDE experience
138 # node.gyp is added to the project by default.
143 'NODE_WANT_INTERNALS=1',
144 'ARCH="<(target_arch)"',
146 'NODE_TAG="<(node_tag)"',
150 [ 'node_use_openssl=="true"', {
151 'defines': [ 'HAVE_OPENSSL=1' ],
152 'sources': [ 'src/node_crypto.cc' ],
154 [ 'node_shared_openssl=="false"', {
155 'dependencies': [ './deps/openssl/openssl.gyp:openssl' ],
158 'defines': [ 'HAVE_OPENSSL=0' ]
160 [ 'node_use_dtrace=="true"', {
161 'defines': [ 'HAVE_DTRACE=1' ],
163 'node_dtrace_header',
166 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
169 # DTrace is supported on solaris, mac, and bsd. There are three
170 # object files associated with DTrace support, but they're not all
173 # node_dtrace.o all configurations
174 # node_dtrace_ustack.o not supported on OS X
175 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
178 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
179 # actually exist. They're listed here to trick GYP into linking the
180 # corresponding object files into the final "node" executable. These
181 # object files are generated by "dtrace -G" using custom actions
182 # below, and the GYP-generated Makefiles will properly build them when
186 'src/node_dtrace.cc',
191 'src/node_dtrace_ustack.cc',
192 'src/node_dtrace_provider.cc',
197 [ 'node_use_systemtap=="true"', {
198 'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ],
199 'dependencies': [ 'node_systemtap_header' ],
200 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
202 'src/node_dtrace.cc',
203 '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h',
206 [ 'node_use_etw=="true"', {
207 'defines': [ 'HAVE_ETW=1' ],
208 'dependencies': [ 'node_etw' ],
210 'src/node_win32_etw_provider.h',
211 'src/node_win32_etw_provider-inl.h',
212 'src/node_win32_etw_provider.cc',
213 'src/node_dtrace.cc',
214 'tools/msvs/genfiles/node_etw_provider.h',
215 'tools/msvs/genfiles/node_etw_provider.rc',
218 [ 'node_use_perfctr=="true"', {
219 'defines': [ 'HAVE_PERFCTR=1' ],
220 'dependencies': [ 'node_perfctr' ],
222 'src/node_win32_perfctr_provider.h',
223 'src/node_win32_perfctr_provider.cc',
224 'src/node_counters.cc',
225 'src/node_counters.h',
226 'tools/msvs/genfiles/node_perfctr_provider.rc',
229 [ 'node_shared_v8=="false"', {
231 'deps/v8/include/v8.h',
232 'deps/v8/include/v8-debug.h',
234 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
237 [ 'node_shared_zlib=="false"', {
238 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
241 [ 'node_shared_http_parser=="false"', {
242 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
245 [ 'node_shared_cares=="false"', {
246 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
249 [ 'node_shared_libuv=="false"', {
250 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
259 # we need to use node's preferred "win32" rather than gyp's preferred "win"
263 'libraries': [ '-lpsapi.lib' ]
265 'defines': [ '__POSIX__' ],
268 'libraries': [ '-framework Carbon' ],
273 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
289 'PLATFORM="solaris"',
292 # we need to use node's preferred "sunos"
293 # rather than gyp's preferred "solaris"
298 'OS=="linux" and node_shared_v8=="false"', {
300 '-Wl,--whole-archive <(V8_BASE) -Wl,--no-whole-archive',
306 'SubSystem': 1, # /subsystem:console
310 # generate ETW header and resource files
312 'target_name': 'node_etw',
315 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
318 'action_name': 'node_etw',
319 'inputs': [ 'src/res/node_etw_provider.man' ],
321 'tools/msvs/genfiles/node_etw_provider.rc',
322 'tools/msvs/genfiles/node_etw_provider.h',
323 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
325 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
331 # generate perf counter header and resource files
333 'target_name': 'node_perfctr',
336 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
339 'action_name': 'node_perfctr_man',
340 'inputs': [ 'src/res/node_perfctr_provider.man' ],
342 'tools/msvs/genfiles/node_perfctr_provider.h',
343 'tools/msvs/genfiles/node_perfctr_provider.rc',
344 'tools/msvs/genfiles/MSG00001.BIN',
346 'action': [ 'ctrpp <@(_inputs) '
347 '-o tools/msvs/genfiles/node_perfctr_provider.h '
348 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
356 'target_name': 'node_js2c',
358 'toolsets': ['host'],
361 'action_name': 'node_js2c',
367 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
370 [ 'node_use_dtrace=="false"'
371 ' and node_use_etw=="false"'
372 ' and node_use_systemtap=="false"',
374 'inputs': ['src/macros.py']
377 [ 'node_use_perfctr=="false"', {
378 'inputs': [ 'src/perfctr_macros.py' ]
391 'target_name': 'node_dtrace_header',
394 [ 'node_use_dtrace=="true"', {
397 'action_name': 'node_dtrace_header',
398 'inputs': [ 'src/node_provider.d' ],
399 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
400 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
401 '-o', '<@(_outputs)' ]
408 'target_name': 'node_systemtap_header',
411 [ 'node_use_systemtap=="true"', {
414 'action_name': 'node_systemtap_header',
415 'inputs': [ 'src/node_systemtap.d' ],
416 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ],
417 'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)',
418 '-o', '<@(_outputs)' ]
425 'target_name': 'node_dtrace_provider',
428 [ 'node_use_dtrace=="true" and OS!="mac"', {
431 'action_name': 'node_dtrace_provider_o',
433 'src/node_provider.d',
434 '<(OBJ_DIR)/node/src/node_dtrace.o'
437 '<(OBJ_DIR)/node/src/node_dtrace_provider.o'
439 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
440 '-o', '<@(_outputs)' ]
447 'target_name': 'node_dtrace_ustack',
450 [ 'node_use_dtrace=="true" and OS!="mac"', {
453 'action_name': 'node_dtrace_ustack_constants',
458 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
461 'tools/genv8constants.py',
467 'action_name': 'node_dtrace_ustack',
470 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
473 '<(OBJ_DIR)/node/src/node_dtrace_ustack.o'
476 [ 'target_arch=="ia32"', {
478 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
479 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
482 [ 'target_arch=="x64"', {
484 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
485 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
495 'target_name': 'specialize_node_d',
498 [ 'node_use_dtrace=="true"', {
501 'action_name': 'specialize_node_d',
506 '<(PRODUCT_DIR)/node.d',
509 'tools/specialize_node_d.py',