-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
66 lines (66 loc) · 1.58 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
{
"variables": {
"os_linux_compiler%": "gcc",
"enable_v8%": "true",
"enable_pointer_compression%": "false",
"build_v8_with_gn": "false"
},
"conditions": [
['OS=="win"', {
"variables": {
"enable_v8%": "<!(echo %ENABLE_V8_FUNCTIONS%)",
}
}],
['OS!="win"', {
"variables": {
"enable_v8%": "<!(echo $ENABLE_V8_FUNCTIONS)",
}
}]
],
"targets": [
{
"target_name": "apw",
"sources": [
"src/apw.cpp",
],
"include_dirs": [
"<!(node -p \"require('node-addon-api').include_dir\")"
],
"defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
"conditions": [
["OS=='linux'", {
"variables": {
"gcc_version" : "<!(<(os_linux_compiler) -dumpversion | cut -d '.' -f 1)",
},
"cflags_cc": [
"-fPIC",
"-fvisibility=hidden",
"-fvisibility-inlines-hidden",
],
"conditions": [
["gcc_version>=7", {
"cflags": [
"-Wimplicit-fallthrough=2",
],
}],
],
"ldflags": [
"-fPIC",
"-fvisibility=hidden"
],
"cflags": [
"-fPIC",
"-fvisibility=hidden",
"-O3"
],
}],
["enable_v8!='false'", {
"defines": ["ENABLE_V8_API=1"]
}],
["enable_pointer_compression=='true'", {
"defines": ["V8_COMPRESS_POINTERS", "V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE"],
}],
],
}
]
}