3 'uv_use_dtrace%': 'false',
4 # uv_parent_path is the relative path to libuv in the parent project
5 # this is only relevant when dtrace is enabled and libuv is a child project
6 # as it's necessary to correctly locate the object files for post
8 # XXX gyp is quite sensitive about paths with double / they don't normalize
17 '_FILE_OFFSET_BITS=64',
22 'cflags': [ '-pthreads' ],
24 ['OS not in "solaris android"', {
25 'cflags': [ '-pthread' ],
34 'target_name': 'libuv',
40 'direct_dependent_settings': {
41 'include_dirs': [ 'include' ],
46 '_FILE_OFFSET_BITS=64',
50 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
53 'defines': [ '_POSIX_C_SOURCE=200112' ],
75 '_WIN32_WINNT=0x0600',
81 'src/win/atomicops-inl.h',
87 'src/win/getaddrinfo.c',
89 'src/win/handle-inl.h',
91 'src/win/loop-watcher.c',
96 'src/win/process-stdio.c',
101 'src/win/stream-inl.h',
104 'src/win/threadpool.c',
122 }, { # Not Windows i.e. POSIX
129 '-Wno-unused-parameter',
133 'include/uv-linux.h',
134 'include/uv-sunos.h',
135 'include/uv-darwin.h',
141 'src/unix/getaddrinfo.c',
142 'src/unix/internal.h',
144 'src/unix/loop-watcher.c',
147 'src/unix/process.c',
152 'src/unix/threadpool.c',
158 'libraries': [ '-lm' ],
161 'ldflags': [ '-pthreads' ],
163 ['OS != "solaris" and OS != "android"', {
164 'ldflags': [ '-pthread' ],
169 ['library=="shared_library"', {
170 'cflags': [ '-fPIC' ],
172 ['library=="shared_library" and OS!="mac"', {
174 # Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
176 'libraries': [ '-Wl,-soname,libuv.so.0.11' ],
181 [ 'OS in "linux mac android"', {
182 'sources': [ 'src/unix/proctitle.c' ],
187 'src/unix/fsevents.c',
188 'src/unix/darwin-proctitle.c',
192 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
193 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
194 '$(SDKROOT)/System/Library/Frameworks/ApplicationServices.framework',
198 '_DARWIN_USE_64_BIT_INODE=1',
202 # Enable on all platforms except OS X. The antique gcc/clang that
203 # ships with Xcode emits waaaay too many false positives.
204 'cflags': [ '-Wstrict-aliasing' ],
208 'src/unix/linux-core.c',
209 'src/unix/linux-inotify.c',
210 'src/unix/linux-syscalls.c',
211 'src/unix/linux-syscalls.h',
214 'libraries': [ '-ldl', '-lrt' ],
219 'src/unix/linux-core.c',
220 'src/unix/linux-inotify.c',
221 'src/unix/linux-syscalls.c',
222 'src/unix/linux-syscalls.h',
223 'src/unix/pthread-fixes.c',
226 'libraries': [ '-ldl' ],
230 'sources': [ 'src/unix/sunos.c' ],
245 'include_dirs': [ 'src/ares/config_aix' ],
246 'sources': [ 'src/unix/aix.c' ],
257 [ 'OS=="freebsd" or OS=="dragonflybsd"', {
258 'sources': [ 'src/unix/freebsd.c' ],
261 'sources': [ 'src/unix/openbsd.c' ],
264 'sources': [ 'src/unix/netbsd.c' ],
266 [ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
268 'libraries': [ '-lkvm' ],
271 [ 'OS in "mac freebsd dragonflybsd openbsd netbsd".split()', {
272 'sources': [ 'src/unix/kqueue.c' ],
274 ['library=="shared_library"', {
275 'defines': [ 'BUILDING_UV_SHARED=1' ]
277 ['uv_use_dtrace=="true"', {
278 'defines': [ 'HAVE_DTRACE=1' ],
279 'dependencies': [ 'uv_dtrace_header' ],
280 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
283 'sources': ['src/unix/dtrace.c' ],
291 'target_name': 'run-tests',
292 'type': 'executable',
293 'dependencies': [ 'libuv' ],
295 'test/blackhole-server.c',
296 'test/echo-server.c',
300 'test/test-get-loadavg.c',
303 'test/test-active.c',
305 'test/test-callback-stack.c',
306 'test/test-callback-order.c',
307 'test/test-connection-fail.c',
308 'test/test-cwd-and-chdir.c',
309 'test/test-delayed-accept.c',
312 'test/test-fail-always.c',
314 'test/test-fs-event.c',
315 'test/test-get-currentexe.c',
316 'test/test-get-memory.c',
317 'test/test-getaddrinfo.c',
318 'test/test-getsockname.c',
319 'test/test-hrtime.c',
322 'test/test-ipc-send-recv.c',
324 'test/test-loop-handles.c',
325 'test/test-loop-stop.c',
326 'test/test-walk-handles.c',
327 'test/test-multiple-listen.c',
328 'test/test-osx-select.c',
329 'test/test-pass-always.c',
330 'test/test-ping-pong.c',
331 'test/test-pipe-bind-error.c',
332 'test/test-pipe-connect-error.c',
333 'test/test-platform-output.c',
335 'test/test-poll-close.c',
336 'test/test-process-title.c',
338 'test/test-run-nowait.c',
339 'test/test-run-once.c',
340 'test/test-semaphore.c',
341 'test/test-shutdown-close.c',
342 'test/test-shutdown-eof.c',
343 'test/test-signal.c',
344 'test/test-signal-multiple-loops.c',
346 'test/test-fs-poll.c',
347 'test/test-stdio-over-pipes.c',
348 'test/test-tcp-bind-error.c',
349 'test/test-tcp-bind6-error.c',
350 'test/test-tcp-close.c',
351 'test/test-tcp-close-while-connecting.c',
352 'test/test-tcp-connect-error-after-write.c',
353 'test/test-tcp-shutdown-after-write.c',
354 'test/test-tcp-flags.c',
355 'test/test-tcp-connect-error.c',
356 'test/test-tcp-connect-timeout.c',
357 'test/test-tcp-connect6-error.c',
358 'test/test-tcp-open.c',
359 'test/test-tcp-write-to-half-open-connection.c',
360 'test/test-tcp-writealot.c',
361 'test/test-tcp-unexpected-read.c',
362 'test/test-tcp-read-stop.c',
363 'test/test-threadpool.c',
364 'test/test-threadpool-cancel.c',
365 'test/test-mutexes.c',
366 'test/test-thread.c',
367 'test/test-barrier.c',
368 'test/test-condvar.c',
369 'test/test-timer-again.c',
370 'test/test-timer-from-check.c',
373 'test/test-udp-dgram-too-big.c',
374 'test/test-udp-ipv6.c',
375 'test/test-udp-open.c',
376 'test/test-udp-options.c',
377 'test/test-udp-send-and-recv.c',
378 'test/test-udp-multicast-join.c',
379 'test/test-dlerror.c',
380 'test/test-udp-multicast-ttl.c',
381 'test/test-ip6-addr.c',
389 'libraries': [ 'ws2_32.lib' ]
391 'defines': [ '_GNU_SOURCE' ],
393 'test/runner-unix.c',
394 'test/runner-unix.h',
397 [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
403 [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
412 'SubSystem': 1, # /subsystem:console
418 'target_name': 'run-benchmarks',
419 'type': 'executable',
420 'dependencies': [ 'libuv' ],
422 'test/benchmark-async.c',
423 'test/benchmark-async-pummel.c',
424 'test/benchmark-fs-stat.c',
425 'test/benchmark-getaddrinfo.c',
426 'test/benchmark-list.h',
427 'test/benchmark-loop-count.c',
428 'test/benchmark-million-async.c',
429 'test/benchmark-million-timers.c',
430 'test/benchmark-multi-accept.c',
431 'test/benchmark-ping-pongs.c',
432 'test/benchmark-pound.c',
433 'test/benchmark-pump.c',
434 'test/benchmark-sizes.c',
435 'test/benchmark-spawn.c',
436 'test/benchmark-thread.c',
437 'test/benchmark-tcp-write-batch.c',
438 'test/benchmark-udp-pummel.c',
440 'test/echo-server.c',
441 'test/blackhole-server.c',
442 'test/run-benchmarks.c',
453 'libraries': [ 'ws2_32.lib' ]
455 'defines': [ '_GNU_SOURCE' ],
457 'test/runner-unix.c',
458 'test/runner-unix.h',
464 'SubSystem': 1, # /subsystem:console
470 'target_name': 'uv_dtrace_header',
473 [ 'uv_use_dtrace=="true"', {
476 'action_name': 'uv_dtrace_header',
477 'inputs': [ 'src/unix/uv-dtrace.d' ],
478 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/uv-dtrace.h' ],
479 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
480 '-o', '<@(_outputs)' ],
488 'target_name': 'uv_dtrace_provider',
491 [ 'uv_use_dtrace=="true" and OS!="mac"', {
494 'action_name': 'uv_dtrace_o',
496 'src/unix/uv-dtrace.d',
497 '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/core.o',
500 '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/dtrace.o',
502 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
503 '-o', '<@(_outputs)' ]