mirror of
https://github.com/hanzoai/node-dtrace-provider.git
synced 2026-09-23 23:48:45 +00:00
Some platforms may not have a compiler, or be appropriate for use with dtrace-provider. On those environments allow the build to succeed and rely on the stub implementations instead. This will squelch all build output, which may be loud and noisey for end users. If you want to see build output set the environment variable V to anything.
58 lines
1.7 KiB
Python
58 lines
1.7 KiB
Python
{
|
|
'conditions': [
|
|
['OS=="mac" or OS=="solaris"', {
|
|
'variables': {
|
|
'escaped_root': '<!(printf %q "<(module_root_dir)")',
|
|
},
|
|
|
|
# If we are on the Mac, or a Solaris derivative, attempt
|
|
# to build the DTrace provider extension.
|
|
|
|
'targets': [
|
|
{
|
|
'target_name': 'DTraceProviderBindings',
|
|
'sources': [
|
|
'dtrace_provider.cc',
|
|
'dtrace_probe.cc',
|
|
'dtrace_argument.cc'
|
|
],
|
|
'include_dirs': [
|
|
'libusdt'
|
|
],
|
|
'dependencies': [
|
|
'libusdt'
|
|
],
|
|
'libraries': [
|
|
'-L<(escaped_root)/libusdt -l usdt'
|
|
]
|
|
},
|
|
{
|
|
'target_name': 'libusdt',
|
|
'type': 'none',
|
|
'actions': [{
|
|
'inputs': [''],
|
|
'outputs': [''],
|
|
'action_name': 'build_libusdt',
|
|
'action': [
|
|
'sh', 'libusdt-build.sh'
|
|
]
|
|
}]
|
|
}
|
|
]
|
|
},
|
|
|
|
# If we are not on the Mac or Solaris, DTrace is unavailable.
|
|
# This target is necessary because GYP requires at least one
|
|
# target to exist.
|
|
|
|
{
|
|
'targets': [
|
|
{
|
|
'target_name': 'DTraceProviderStub',
|
|
'type': 'none'
|
|
}
|
|
]
|
|
}]
|
|
]
|
|
}
|