-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinding.gyp
48 lines (48 loc) · 1.52 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
{
"targets": [
{
"target_name": "NodeSegfaultHandler",
"include_dirs": [
"<!(node -e \"require('nan')\")",
"includes"
],
"sources": ["src/segfault-handler.cc", "src/backtrace.cc"],
"cflags": [ "-O0", "-funwind-tables" ],
"cflags_cc!": [ "-fno-exceptions" ],
"variables": {
# "static_libunwind": "<!(pkg-config --libs libunwind 1>/dev/null 2>/dev/null && echo '-fPIC -Bstatic -llibunwind' || echo '')",
# "dynamic_libunwind": "<!(pkg-config --libs libunwind 2> /dev/null || echo '')",
# "use_libunwind": "<!(pkg-config --libs libunwind 1>/dev/null 2>/dev/null && echo 'USE_LIBUNWIND=1' || echo 'USE_LIBUNWIND=0')",
# "use_musl": "<!(ldd --version 2>&1 | grep musl 1>/dev/null && echo '1' || echo '')"
},
"conditions": [
# [
# "use_musl==1", {
# "libraries": [
# "<(dynamic_libunwind)"
# ],
# "defines": [
# "__V8__",
# "<(use_libunwind)"
# ]
# }
# ],
[ 'OS=="linux"', {
"libraries": [
"<!(pkg-config --libs libunwind 2> /dev/null || echo '')",
],
"defines": [
"__V8__",
"<!(pkg-config --libs libunwind 1>/dev/null 2>/dev/null && echo 'USE_LIBUNWIND=1' || echo 'USE_LIBUNWIND=0')"
]
}],
[ 'OS!="linux"', {
"defines": [
"__V8__",
"USE_LIBUNWIND=0"
]
}]
]
}
]
}