-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
61 lines (61 loc) · 1.81 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
{
'targets': [
{
'target_name': 'esqlite3',
'dependencies': [ 'deps/sqlite3/sqlite3.gyp:sqlite3mc' ],
'include_dirs': [
'src',
"<!(node -e \"require('nan')\")",
],
'sources': [
'src/binding.cc'
],
'cflags': [ '-O3' ],
'conditions': [
[ 'OS=="mac"', {
'xcode_settings': {
'OTHER_LDFLAGS': ['-framework Security', '-framework Foundation'],
},
}],
['OS=="linux"', {
'ldflags': [
'-Wl,-Bsymbolic',
'-Wl,--exclude-libs,ALL',
],
}],
['OS=="win"', {
'msvs_settings': {
# These settings from node-gyp need to be reverted because LTCG
# prevents /OPT:NOREF and /OPT:NOREF is needed because we use a V8
# class that has virtual data, which causes a linker error without
# the flag.
'VCCLCompilerTool': {
'WholeProgramOptimization': 'false',
},
'VCLibrarianTool': {
'AdditionalOptions!': [
'/LTCG:INCREMENTAL',
],
'AdditionalOptions': [
'/OPT:NOREF',
],
},
'VCLinkerTool': {
'OptimizeReferences': 1, # /OPT:NOREF
'AdditionalOptions!': [
'/LTCG:INCREMENTAL',
],
'AdditionalOptions': [
# Unfortunately this flag keeps _all_ unused functions and data.
# We could instead use '/INCLUDE:<symbol>' but it appears the
# decorated symbol name changes across node versions which would
# be a pain to maintain here...
'/OPT:NOREF',
],
},
},
}],
],
},
],
}