summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorDave Pacheco <dap@joyent.com>2013-03-28 11:36:00 -0700
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-30 01:04:00 +0100
commitfe7440ce19c2ee406b2895766ff191479bea1014 (patch)
tree5fcc3decd16203adf6ab182bd6b2140f578e3b62 /node.gyp
parent2093e7d91a76f035549cf073b0e5c58ed3265ead (diff)
downloadnode-fe7440ce19c2ee406b2895766ff191479bea1014.tar.gz
build: allow building with dtrace on osx
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp34
1 files changed, 25 insertions, 9 deletions
diff --git a/node.gyp b/node.gyp
index b07a1e0ca..fc7e2153f 100644
--- a/node.gyp
+++ b/node.gyp
@@ -160,17 +160,33 @@
'dependencies': [ 'node_dtrace_header' ],
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)' ],
#
- # node_dtrace_provider.cc and node_dtrace_ustack.cc do not actually
- # exist. They're here to trick GYP into linking the corresponding
- # object files into the final "node" executable. These files are
- # generated by "dtrace -G" using custom actions below, and the
- # GYP-generated Makefiles will properly build them when needed.
+ # DTrace is supported on solaris, mac, and bsd. There are three
+ # object files associated with DTrace support, but they're not all
+ # used all the time:
+ #
+ # node_dtrace.o all configurations
+ # node_dtrace_ustack.o not supported on OS X
+ # node_dtrace_provider.o All except OS X. "dtrace -G" is not
+ # used on OS X.
+ #
+ # Note that node_dtrace_provider.cc and node_dtrace_ustack.cc do not
+ # actually exist. They're listed here to trick GYP into linking the
+ # corresponding object files into the final "node" executable. These
+ # object files are generated by "dtrace -G" using custom actions
+ # below, and the GYP-generated Makefiles will properly build them when
+ # needed.
#
'sources': [
'src/node_dtrace.cc',
- 'src/node_dtrace_provider.cc',
- 'src/node_dtrace_ustack.cc',
],
+ 'conditions': [ [
+ 'OS!="mac"', {
+ 'sources': [
+ 'src/node_dtrace_ustack.cc',
+ 'src/node_dtrace_provider.cc',
+ ]
+ }
+ ] ]
} ],
[ 'node_use_systemtap=="true"', {
'defines': [ 'HAVE_SYSTEMTAP=1', 'STAP_SDT_V1=1' ],
@@ -397,7 +413,7 @@
'target_name': 'node_dtrace_provider',
'type': 'none',
'conditions': [
- [ 'node_use_dtrace=="true"', {
+ [ 'node_use_dtrace=="true" and OS!="mac"', {
'actions': [
{
'action_name': 'node_dtrace_provider_o',
@@ -419,7 +435,7 @@
'target_name': 'node_dtrace_ustack',
'type': 'none',
'conditions': [
- [ 'node_use_dtrace=="true"', {
+ [ 'node_use_dtrace=="true" and OS!="mac"', {
'actions': [
{
'action_name': 'node_dtrace_ustack_constants',