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',
21 'cflags': [ '-pthreads' ],
23 ['OS not in "solaris android"', {
24 'cflags': [ '-pthread' ],
33 'target_name': 'libuv',
39 'direct_dependent_settings': {
40 'include_dirs': [ 'include' ],
45 '_FILE_OFFSET_BITS=64',
49 'defines': [ '_DARWIN_USE_64_BIT_INODE=1' ],
52 'defines': [ '_POSIX_C_SOURCE=200112' ],
74 '_WIN32_WINNT=0x0600',
80 'src/win/atomicops-inl.h',
86 'src/win/getaddrinfo.c',
88 'src/win/handle-inl.h',
90 'src/win/loop-watcher.c',
95 'src/win/process-stdio.c',
100 'src/win/stream-inl.h',
103 'src/win/threadpool.c',
121 }, { # Not Windows i.e. POSIX
128 '-Wno-unused-parameter',
132 'include/uv-linux.h',
133 'include/uv-sunos.h',
134 'include/uv-darwin.h',
140 'src/unix/getaddrinfo.c',
141 'src/unix/internal.h',
143 'src/unix/loop-watcher.c',
146 'src/unix/process.c',
151 'src/unix/threadpool.c',
157 'libraries': [ '-lm' ],
160 'ldflags': [ '-pthreads' ],
162 ['OS != "solaris" and OS != "android"', {
163 'ldflags': [ '-pthread' ],
168 ['library=="shared_library"', {
169 'cflags': [ '-fPIC' ],
171 ['library=="shared_library" and OS!="mac"', {
173 # Must correspond with UV_VERSION_MAJOR and UV_VERSION_MINOR
175 'libraries': [ '-Wl,-soname,libuv.so.0.11' ],
180 [ 'OS in "linux mac android"', {
181 'sources': [ 'src/unix/proctitle.c' ],
186 'src/unix/fsevents.c',
187 'src/unix/darwin-proctitle.c',
190 '_DARWIN_USE_64_BIT_INODE=1',
194 # Enable on all platforms except OS X. The antique gcc/clang that
195 # ships with Xcode emits waaaay too many false positives.
196 'cflags': [ '-Wstrict-aliasing' ],
200 'src/unix/linux-core.c',
201 'src/unix/linux-inotify.c',
202 'src/unix/linux-syscalls.c',
203 'src/unix/linux-syscalls.h',
206 'libraries': [ '-ldl', '-lrt' ],
211 'src/unix/linux-core.c',
212 'src/unix/linux-inotify.c',
213 'src/unix/linux-syscalls.c',
214 'src/unix/linux-syscalls.h',
215 'src/unix/pthread-fixes.c',
218 'libraries': [ '-ldl' ],
222 'sources': [ 'src/unix/sunos.c' ],
237 'include_dirs': [ 'src/ares/config_aix' ],
238 'sources': [ 'src/unix/aix.c' ],
249 [ 'OS=="freebsd" or OS=="dragonflybsd"', {
250 'sources': [ 'src/unix/freebsd.c' ],
253 'sources': [ 'src/unix/openbsd.c' ],
256 'sources': [ 'src/unix/netbsd.c' ],
258 [ 'OS in "freebsd dragonflybsd openbsd netbsd".split()', {
260 'libraries': [ '-lkvm' ],
263 [ 'OS in "mac freebsd dragonflybsd openbsd netbsd".split()', {
264 'sources': [ 'src/unix/kqueue.c' ],
266 ['library=="shared_library"', {
267 'defines': [ 'BUILDING_UV_SHARED=1' ]
269 ['uv_use_dtrace=="true"', {
270 'defines': [ 'HAVE_DTRACE=1' ],
271 'dependencies': [ 'uv_dtrace_header' ],
272 'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
275 'sources': ['src/unix/dtrace.c' ],
283 'target_name': 'run-tests',
284 'type': 'executable',
285 'dependencies': [ 'libuv' ],
287 'test/blackhole-server.c',
288 'test/echo-server.c',
292 'test/test-get-loadavg.c',
295 'test/test-active.c',
297 'test/test-async-null-cb.c',
298 'test/test-callback-stack.c',
299 'test/test-callback-order.c',
300 'test/test-connection-fail.c',
301 'test/test-cwd-and-chdir.c',
302 'test/test-delayed-accept.c',
305 'test/test-fail-always.c',
307 'test/test-fs-event.c',
308 'test/test-get-currentexe.c',
309 'test/test-get-memory.c',
310 'test/test-getaddrinfo.c',
311 'test/test-getsockname.c',
312 'test/test-hrtime.c',
315 'test/test-ipc-send-recv.c',
317 'test/test-loop-handles.c',
318 'test/test-loop-stop.c',
319 'test/test-walk-handles.c',
320 'test/test-multiple-listen.c',
321 'test/test-osx-select.c',
322 'test/test-pass-always.c',
323 'test/test-ping-pong.c',
324 'test/test-pipe-bind-error.c',
325 'test/test-pipe-connect-error.c',
326 'test/test-platform-output.c',
328 'test/test-poll-close.c',
329 'test/test-process-title.c',
331 'test/test-run-nowait.c',
332 'test/test-run-once.c',
333 'test/test-semaphore.c',
334 'test/test-shutdown-close.c',
335 'test/test-shutdown-eof.c',
336 'test/test-signal.c',
337 'test/test-signal-multiple-loops.c',
339 'test/test-fs-poll.c',
340 'test/test-stdio-over-pipes.c',
341 'test/test-tcp-bind-error.c',
342 'test/test-tcp-bind6-error.c',
343 'test/test-tcp-close.c',
344 'test/test-tcp-close-while-connecting.c',
345 'test/test-tcp-connect-error-after-write.c',
346 'test/test-tcp-shutdown-after-write.c',
347 'test/test-tcp-flags.c',
348 'test/test-tcp-connect-error.c',
349 'test/test-tcp-connect-timeout.c',
350 'test/test-tcp-connect6-error.c',
351 'test/test-tcp-open.c',
352 'test/test-tcp-write-to-half-open-connection.c',
353 'test/test-tcp-writealot.c',
354 'test/test-tcp-unexpected-read.c',
355 'test/test-tcp-read-stop.c',
356 'test/test-threadpool.c',
357 'test/test-threadpool-cancel.c',
358 'test/test-mutexes.c',
359 'test/test-thread.c',
360 'test/test-barrier.c',
361 'test/test-condvar.c',
362 'test/test-timer-again.c',
363 'test/test-timer-from-check.c',
366 'test/test-udp-dgram-too-big.c',
367 'test/test-udp-ipv6.c',
368 'test/test-udp-open.c',
369 'test/test-udp-options.c',
370 'test/test-udp-send-and-recv.c',
371 'test/test-udp-multicast-join.c',
372 'test/test-dlerror.c',
373 'test/test-udp-multicast-ttl.c',
374 'test/test-ip6-addr.c',
382 'libraries': [ 'ws2_32.lib' ]
384 'defines': [ '_GNU_SOURCE' ],
386 'test/runner-unix.c',
387 'test/runner-unix.h',
390 [ 'OS=="solaris"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
396 [ 'OS=="aix"', { # make test-fs.c compile, needs _POSIX_C_SOURCE
405 'SubSystem': 1, # /subsystem:console
411 'target_name': 'run-benchmarks',
412 'type': 'executable',
413 'dependencies': [ 'libuv' ],
415 'test/benchmark-async.c',
416 'test/benchmark-async-pummel.c',
417 'test/benchmark-fs-stat.c',
418 'test/benchmark-getaddrinfo.c',
419 'test/benchmark-list.h',
420 'test/benchmark-loop-count.c',
421 'test/benchmark-million-async.c',
422 'test/benchmark-million-timers.c',
423 'test/benchmark-multi-accept.c',
424 'test/benchmark-ping-pongs.c',
425 'test/benchmark-pound.c',
426 'test/benchmark-pump.c',
427 'test/benchmark-sizes.c',
428 'test/benchmark-spawn.c',
429 'test/benchmark-thread.c',
430 'test/benchmark-tcp-write-batch.c',
431 'test/benchmark-udp-pummel.c',
433 'test/echo-server.c',
434 'test/blackhole-server.c',
435 'test/run-benchmarks.c',
446 'libraries': [ 'ws2_32.lib' ]
448 'defines': [ '_GNU_SOURCE' ],
450 'test/runner-unix.c',
451 'test/runner-unix.h',
457 'SubSystem': 1, # /subsystem:console
463 'target_name': 'uv_dtrace_header',
466 [ 'uv_use_dtrace=="true"', {
469 'action_name': 'uv_dtrace_header',
470 'inputs': [ 'src/unix/uv-dtrace.d' ],
471 'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/uv-dtrace.h' ],
472 'action': [ 'dtrace', '-h', '-xnolibs', '-s', '<@(_inputs)',
473 '-o', '<@(_outputs)' ],
481 'target_name': 'uv_dtrace_provider',
484 [ 'uv_use_dtrace=="true" and OS!="mac"', {
487 'action_name': 'uv_dtrace_o',
489 'src/unix/uv-dtrace.d',
490 '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/core.o',
493 '<(PRODUCT_DIR)/obj.target/libuv<(uv_parent_path)src/unix/dtrace.o',
495 'action': [ 'dtrace', '-G', '-xnolibs', '-s', '<@(_inputs)',
496 '-o', '<@(_outputs)' ]