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' ],
162 'dependencies': [ 'node_dtrace_header' ],
163 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
165 # DTrace is supported on solaris, mac, and bsd. There are three
166 # object files associated with DTrace support, but they're not all
169 # node_dtrace.o all configurations
170 # node_dtrace_ustack.o not supported on OS X
171 # node_dtrace_provider.o All except OS X. "dtrace -G" is not
174 # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
175 # actually exist. They're listed here to trick GYP into linking the
176 # corresponding object files into the final "node" executable. These
177 # object files are generated by "dtrace -G" using custom actions
178 # below, and the GYP-generated Makefiles will properly build them when
182 'src/node_dtrace.cc',
187 'src/node_dtrace_ustack.cc',
188 'src/node_dtrace_provider.cc',
193 [ 'node_use_systemtap=="true"', {
194 'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ],
195 'dependencies': [ 'node_systemtap_header' ],
196 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
198 'src/node_dtrace.cc',
199 '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h',
202 [ 'node_use_etw=="true"', {
203 'defines': [ 'HAVE_ETW=1' ],
204 'dependencies': [ 'node_etw' ],
206 'src/node_win32_etw_provider.h',
207 'src/node_win32_etw_provider-inl.h',
208 'src/node_win32_etw_provider.cc',
209 'src/node_dtrace.cc',
210 'tools/msvs/genfiles/node_etw_provider.h',
211 'tools/msvs/genfiles/node_etw_provider.rc',
214 [ 'node_use_perfctr=="true"', {
215 'defines': [ 'HAVE_PERFCTR=1' ],
216 'dependencies': [ 'node_perfctr' ],
218 'src/node_win32_perfctr_provider.h',
219 'src/node_win32_perfctr_provider.cc',
220 'src/node_counters.cc',
221 'src/node_counters.h',
222 'tools/msvs/genfiles/node_perfctr_provider.rc',
225 [ 'node_shared_v8=="false"', {
227 'deps/v8/include/v8.h',
228 'deps/v8/include/v8-debug.h',
230 'dependencies': [ 'deps/v8/tools/gyp/v8.gyp:v8' ],
233 [ 'node_shared_zlib=="false"', {
234 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ],
237 [ 'node_shared_http_parser=="false"', {
238 'dependencies': [ 'deps/http_parser/http_parser.gyp:http_parser' ],
241 [ 'node_shared_cares=="false"', {
242 'dependencies': [ 'deps/cares/cares.gyp:cares' ],
245 [ 'node_shared_libuv=="false"', {
246 'dependencies': [ 'deps/uv/uv.gyp:libuv' ],
255 # we need to use node's preferred "win32" rather than gyp's preferred "win"
259 'libraries': [ '-lpsapi.lib' ]
261 'defines': [ '__POSIX__' ],
264 'libraries': [ '-framework Carbon' ],
269 # we need to use node's preferred "darwin" rather than gyp's preferred "mac"
285 'PLATFORM="solaris"',
288 # we need to use node's preferred "sunos"
289 # rather than gyp's preferred "solaris"
296 '-Wl,--whole-archive <(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a -Wl,--no-whole-archive',
302 'SubSystem': 1, # /subsystem:console
306 # generate ETW header and resource files
308 'target_name': 'node_etw',
311 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
314 'action_name': 'node_etw',
315 'inputs': [ 'src/res/node_etw_provider.man' ],
317 'tools/msvs/genfiles/node_etw_provider.rc',
318 'tools/msvs/genfiles/node_etw_provider.h',
319 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
321 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
327 # generate perf counter header and resource files
329 'target_name': 'node_perfctr',
332 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
335 'action_name': 'node_perfctr_man',
336 'inputs': [ 'src/res/node_perfctr_provider.man' ],
338 'tools/msvs/genfiles/node_perfctr_provider.h',
339 'tools/msvs/genfiles/node_perfctr_provider.rc',
340 'tools/msvs/genfiles/MSG00001.BIN',
342 'action': [ 'ctrpp <@(_inputs) '
343 '-o tools/msvs/genfiles/node_perfctr_provider.h '
344 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
352 'target_name': 'node_js2c',
354 'toolsets': ['host'],
357 'action_name': 'node_js2c',
363 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
366 [ 'node_use_dtrace=="false"'
367 ' and node_use_etw=="false"'
368 ' and node_use_systemtap=="false"',
370 'inputs': ['src/macros.py']
373 [ 'node_use_perfctr=="false"', {
374 'inputs': [ 'src/perfctr_macros.py' ]
387 'target_name': 'node_dtrace_header',
390 [ 'node_use_dtrace=="true"', {
393 'action_name': 'node_dtrace_header',
394 'inputs': [ 'src/node_provider.d' ],
395 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
396 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
397 '-o', '<@(_outputs)' ]
404 'target_name': 'node_systemtap_header',
407 [ 'node_use_systemtap=="true"', {
410 'action_name': 'node_systemtap_header',
411 'inputs': [ 'src/node_systemtap.d' ],
412 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ],
413 'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)',
414 '-o', '<@(_outputs)' ]
421 'target_name': 'node_dtrace_provider',
424 [ 'node_use_dtrace=="true" and OS!="mac"', {
427 'action_name': 'node_dtrace_provider_o',
429 'src/node_provider.d',
430 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o'
433 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
435 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
436 '-o', '<@(_outputs)' ]
443 'target_name': 'node_dtrace_ustack',
446 [ 'node_use_dtrace=="true" and OS!="mac"', {
449 'action_name': 'node_dtrace_ustack_constants',
451 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a'
454 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
457 'tools/genv8constants.py',
463 'action_name': 'node_dtrace_ustack',
466 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
469 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
472 [ 'target_arch=="ia32"', {
474 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
475 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
478 [ 'target_arch=="x64"', {
480 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
481 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',