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 'SubSystem': 1, # /subsystem:console
300 # generate ETW header and resource files
302 'target_name': 'node_etw',
305 [ 'node_use_etw=="true" and node_has_winsdk=="true"', {
308 'action_name': 'node_etw',
309 'inputs': [ 'src/res/node_etw_provider.man' ],
311 'tools/msvs/genfiles/node_etw_provider.rc',
312 'tools/msvs/genfiles/node_etw_provider.h',
313 'tools/msvs/genfiles/node_etw_providerTEMP.BIN',
315 'action': [ 'mc <@(_inputs) -h tools/msvs/genfiles -r tools/msvs/genfiles' ]
321 # generate perf counter header and resource files
323 'target_name': 'node_perfctr',
326 [ 'node_use_perfctr=="true" and node_has_winsdk=="true"', {
329 'action_name': 'node_perfctr_man',
330 'inputs': [ 'src/res/node_perfctr_provider.man' ],
332 'tools/msvs/genfiles/node_perfctr_provider.h',
333 'tools/msvs/genfiles/node_perfctr_provider.rc',
334 'tools/msvs/genfiles/MSG00001.BIN',
336 'action': [ 'ctrpp <@(_inputs) '
337 '-o tools/msvs/genfiles/node_perfctr_provider.h '
338 '-rc tools/msvs/genfiles/node_perfctr_provider.rc'
346 'target_name': 'node_js2c',
348 'toolsets': ['host'],
351 'action_name': 'node_js2c',
357 '<(SHARED_INTERMEDIATE_DIR)/node_natives.h',
360 [ 'node_use_dtrace=="false"'
361 ' and node_use_etw=="false"'
362 ' and node_use_systemtap=="false"',
364 'inputs': ['src/macros.py']
367 [ 'node_use_perfctr=="false"', {
368 'inputs': [ 'src/perfctr_macros.py' ]
381 'target_name': 'node_dtrace_header',
384 [ 'node_use_dtrace=="true"', {
387 'action_name': 'node_dtrace_header',
388 'inputs': [ 'src/node_provider.d' ],
389 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_provider.h' ],
390 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
391 '-o', '<@(_outputs)' ]
398 'target_name': 'node_systemtap_header',
401 [ 'node_use_systemtap=="true"', {
404 'action_name': 'node_systemtap_header',
405 'inputs': [ 'src/node_systemtap.d' ],
406 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/node_systemtap.h' ],
407 'action': [ 'dtrace', '-h', '-C', '-s', '<@(_inputs)',
408 '-o', '<@(_outputs)' ]
415 'target_name': 'node_dtrace_provider',
418 [ 'node_use_dtrace=="true" and OS!="mac"', {
421 'action_name': 'node_dtrace_provider_o',
423 'src/node_provider.d',
424 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace.o'
427 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_provider.o'
429 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
430 '-o', '<@(_outputs)' ]
437 'target_name': 'node_dtrace_ustack',
440 [ 'node_use_dtrace=="true" and OS!="mac"', {
443 'action_name': 'node_dtrace_ustack_constants',
445 '<(PRODUCT_DIR)/obj.target/deps/v8/tools/gyp/libv8_base.a'
448 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
451 'tools/genv8constants.py',
457 'action_name': 'node_dtrace_ustack',
460 '<(SHARED_INTERMEDIATE_DIR)/v8constants.h'
463 '<(PRODUCT_DIR)/obj.target/node/src/node_dtrace_ustack.o'
466 [ 'target_arch=="ia32"', {
468 'dtrace', '-32', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
469 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',
472 [ 'target_arch=="x64"', {
474 'dtrace', '-64', '-I<(SHARED_INTERMEDIATE_DIR)', '-Isrc',
475 '-C', '-G', '-s', 'src/v8ustack.d', '-o', '<@(_outputs)',