-
Notifications
You must be signed in to change notification settings - Fork 57
/
binding.gyp
148 lines (148 loc) · 6.33 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"targets": [
{
"target_name": "xprofiler",
"win_delay_load_hook": "false",
"sources": [
"src/environment_data.cc",
"src/environment_registry.cc",
"src/process_data.cc",
"src/xpf_thread.cc",
"src/xprofiler.cc",
"src/logger.cc",
"src/util.cc",
"src/library/json.hpp",
"src/library/error.cc",
"src/library/common.cc",
"src/library/utils.cc",
"src/library/writer.cc",
"src/logbypass/log.cc",
"src/logbypass/cpu.cc",
"src/logbypass/heap.cc",
"src/logbypass/gc.cc",
"src/logbypass/libuv.cc",
"src/logbypass/http.cc",
"src/commands/listener.cc",
"src/commands/send.cc",
"src/commands/parser.cc",
"src/commands/dump.cc",
"src/commands/simple/version.cc",
"src/commands/simple/registry.cc",
"src/commands/simple/config.cc",
"src/commands/cpuprofiler/cpu_profiler.cc",
"src/commands/cpuprofiler/cpu_profile.cc",
"src/commands/cpuprofiler/cpu_profile_node.cc",
"src/commands/heapdump/heap_profiler.cc",
"src/commands/heapdump/heap_snapshot.cc",
"src/commands/heapprofiler/sampling_heap_profiler.cc",
"src/commands/gcprofiler/gc_profiler.cc",
"src/commands/report/node_report.cc",
"src/commands/report/javascript_stack.cc",
"src/commands/report/native_stack.cc",
"src/commands/report/heap_statistics.cc",
"src/commands/report/uv_statistics.cc",
"src/commands/report/system_statistics.cc",
"src/commands/coredumper/coredumper.cc",
"src/hooks/fatal_error.cc",
"src/hooks/heap_limit.cc",
"src/jsapi/export_environment.cc",
"src/jsapi/export_configure.cc",
"src/jsapi/export_logger.cc",
"src/jsapi/export_mallopt.cc",
"src/jsapi/export_hooks.cc",
"src/jsapi/export_http.cc",
"src/jsapi/export_thread_logbypass.cc",
"src/jsapi/export_thread_listener.cc",
],
"include_dirs": [
'src',
'<!(node -e "require(\'nan\')")'
],
"cflags_cc!": ["-fno-exceptions"],
"conditions": [
["OS == 'linux'", {
"cflags": [
"-O3",
"-std=c++17",
"-Wno-sign-compare",
"-Wno-cast-function-type",
],
"defines": [
'XPROFILER_IPC_PATH="<!(node -p \"require(\'./package.json\').xctlIpcPath.unix\")"',
],
"sources": [
"src/platform/unix/cpu.cc",
"src/platform/unix/utils.cc",
"src/platform/unix/ipc.cc",
"src/platform/unix/report.cc",
"src/platform/unix/core/linux/dump.cc",
"src/platform/unix/core/linux/coredumper.cc",
"src/platform/unix/core/linux/elfcore.cc",
"src/platform/unix/core/linux/linuxthreads.cc",
"src/platform/unix/core/linux/thread_lister.cc",
"src/platform/unix/mallopt/linux.cc",
]
}],
["OS == 'mac'", {
"xcode_settings": {
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_OPTIMIZATION_LEVEL": "3",
"OTHER_CFLAGS": [
"-std=c++17",
"-Wconversion",
"-Wno-sign-conversion",
]
},
"defines": [
'XPROFILER_IPC_PATH="<!(node -p \"require(\'./package.json\').xctlIpcPath.unix\")"',
],
"sources": [
"src/platform/unix/cpu.cc",
"src/platform/unix/utils.cc",
"src/platform/unix/ipc.cc",
"src/platform/unix/report.cc",
"src/platform/unix/core/darwin.cc",
"src/platform/unix/mallopt/darwin.cc",
]
}],
["OS == 'win'", {
"libraries": ["dbghelp.lib", "Netapi32.lib", "PsApi.lib", "Ws2_32.lib"],
"dll_files": ["dbghelp.dll", "Netapi32.dll", "PsApi.dll", "Ws2_32.dll"],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": "2",
"Optimization": "3",
},
},
"defines": [
'XPROFILER_IPC_PATH="<!(node -p \"require(\'./package.json\').xctlIpcPath.win32\")"',
"WIN32_LEAN_AND_MEAN=1",
],
"sources": [
"src/platform/win/cpu_win.cc",
"src/platform/win/utils_win.cc",
"src/platform/win/ipc_win.cc",
"src/platform/win/report_win.cc",
"src/platform/win/core_win.cc",
"src/platform/win/mallopt_win.cc",
]
}],
],
"defines": [
'XPROFILER_VERSION="<!(node -p \"require(\'./package.json\').version\")"',
'XPROFILER_BLURRY_TAG="<!(node -p \"require(\'./package.json\').blurryTag\")"',
],
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": ["<(module_name)"],
"copies": [
{
"files": ["<(PRODUCT_DIR)/<(module_name).node"],
"destination": "<(module_path)"
}
]
},
],
}