This repository has been archived by the owner on Jan 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
/
node.gypi
235 lines (233 loc) · 8.57 KB
/
node.gypi
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
{
'includes': [ 'v8.gypi' ],
'variables': {
'win_release_RuntimeLibrary': '2',
'clang_use_chrome_plugins': 0,
'openssl_fips': '',
'openssl_no_asm': 0,
'use_openssl_def': 0,
'OPENSSL_PRODUCT': 'libopenssl.a',
'node_release_urlbase': '',
'node_byteorder': '<!(node <(DEPTH)/electron/tools/get-endianness.js)',
'node_target_type': 'static_library',
'node_install_npm': 'false',
'node_prefix': '',
'node_shared': 'false',
'node_shared_cares': 'false',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'true',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_mdb': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'node_use_v8_platform': 'false',
'node_use_bundled_v8': 'false',
'node_use_boringssl': 'true',
'node_enable_d8': 'false',
'uv_library': 'static_library',
'uv_parent_path': 'vendor/node/deps/uv',
'uv_use_dtrace': 'false',
'V8_BASE': '',
'v8_postmortem_support': 'false',
'v8_inspector': 'true',
'library': 'static_library',
'msvs_use_common_release': 0,
'icu_small': 'false',
'v8_enable_inspector': 1,
},
'target_defaults': {
'default_configuration': 'Release',
'configurations': {
'Release': {
'conditions': [
['target_arch == "x64"', {
'inherit_from': ['x64_Base'],
}]
]
},
'Debug': {
'conditions': [
['target_arch == "x64"', {
'inherit_from': ['x64_Base'],
}]
]
}
},
'target_conditions': [
['_target_name in ["libuv", "http_parser", "cares", "node", "zlib", "v8_libbase", "v8_base", "v8_external_snapshot"]', {
'msvs_disabled_warnings': [
4003, # not enough actual parameters for macro 'V'
4013, # 'free' undefined; assuming extern returning int
4018, # signed/unsigned mismatch
4054, #
4055, # 'type cast' : from data pointer 'void *' to function pointer
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
4065, # switch statement contains 'default' but no 'case' labels
4189, #
4131, # uses old-style declarator
4133, # incompatible types
4146, # unary minus operator applied to unsigned type, result still unsigned
4164, # intrinsic function not declared
4152, # function/data pointer conversion in expression
4206, # translation unit is empty
4204, # non-constant aggregate initializer
4210, # nonstandard extension used : function given file scope
4214, # bit field types other than int
4232, # address of dllimport 'free' is not static, identity not guaranteed
4291, # no matching operator delete found
4295, # array is too small to include a terminating null character
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
4389, # '==' : signed/unsigned mismatch
4456, # declaration of 'm' hides previous local declaration
4457, # declaration of 'message' hides function parameter
4459, # declaration of 'wq' hides global declaration
4477, # format string '%.*s' requires an argument of type 'int'
4505, # unreferenced local function has been removed
4701, # potentially uninitialized local variable 'sizew' used
4703, # potentially uninitialized local pointer variable 'req' used
4706, # assignment within conditional expression
4804, # unsafe use of type 'bool' in operation
4996, # this function or variable may be unsafe.
4716, # not returning a value
],
'msvs_settings': {
'VCCLCompilerTool': {
'WarnAsError': 'false',
},
},
'xcode_settings': {
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
'WARNING_CFLAGS': [
'-Wno-unknown-warning-option',
'-Wno-parentheses-equality',
'-Wno-unused-function',
'-Wno-sometimes-uninitialized',
'-Wno-pointer-sign',
'-Wno-sign-compare',
'-Wno-string-plus-int',
'-Wno-unused-variable',
'-Wno-deprecated-declarations',
'-Wno-return-type',
'-Wno-gnu-folding-constant',
'-Wno-shift-negative-value',
'-Wno-unused-private-field',
'-Wno-varargs', # https://git.io/v6Olj
],
},
'conditions': [
['OS=="linux"', {
'cflags': [
'-Wno-parentheses-equality',
'-Wno-unused-function',
'-Wno-sometimes-uninitialized',
'-Wno-pointer-sign',
'-Wno-string-plus-int',
'-Wno-unused-variable',
'-Wno-unused-value',
'-Wno-deprecated-declarations',
'-Wno-return-type',
'-Wno-shift-negative-value',
'-Wno-varargs', # https://git.io/v6Olj
'-Wno-string-conversion',
'-Wno-unused-private-field',
# Required when building as shared library.
'-fPIC',
],
}],
],
}],
['_target_name=="node"', {
'cflags!': [
'-fvisibility=hidden',
'-fdata-sections',
'-ffunction-sections',
],
'cflags_cc!': ['-fvisibility-inlines-hidden'],
'cflags': [
'-fvisibility=default',
],
'defines': [
'NODE_SHARED_MODE',
],
'ldflags!': [
'-Wl,--gc-sections',
],
'include_dirs': [
'../../../v8',
'../../../v8/include',
],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
},
}],
['OS=="mac" and node_target_type=="shared_library"', {
# -all_load is the "whole-archive" on macOS.
'xcode_settings': {
'LD_DYLIB_INSTALL_NAME': '@rpath/libnode.dylib',
# 'DYLIB_INSTALL_NAME_BASE': '@loader_path',
'OTHER_LDFLAGS': [ '-Wl,-all_load' ],
},
}],
['OS=="win"', {
'defines': [
'WIN32',
# we don't really want VC++ warning us about
# how dangerous C functions are...
'_CRT_SECURE_NO_DEPRECATE',
# ... or that C implementations shouldn't use
# POSIX names
'_CRT_NONSTDC_NO_DEPRECATE',
# Make sure the STL doesn't try to use exceptions
'_HAS_EXCEPTIONS=0',
'BUILDING_UV_SHARED=1',
],
# Node is using networking API but linking with this itself.
'libraries': [ '-lwinmm.lib' ],
}],
],
}],
['_target_name=="libuv"', {
'conditions': [
['OS=="win"', {
# Expose libuv's symbols.
'defines': [
'BUILDING_UV_SHARED=1',
],
}], # OS=="win"
],
}],
],
'msvs_cygwin_shell': 0, # Strangely setting it to 1 would make building under cygwin fail.
'msvs_disabled_warnings': [
4005, # (node.h) macro redefinition
4091, # (node_extern.h) '__declspec(dllimport)' : ignored on left of 'node::Environment' when no variable is declared
4189, # local variable is initialized but not referenced
4201, # (uv.h) nameless struct/union
4267, # conversion from 'size_t' to 'int', possible loss of data
4273, # http://crbug.com/154421
4302, # (atldlgs.h) 'type cast': truncation from 'LPCTSTR' to 'WORD'
4456,
4457, # http://crbug.com/154421
4458, # (atldlgs.h) declaration of 'dwCommonButtons' hides class member
4503, # decorated name length exceeded, name was truncated
4800, # (v8.h) forcing value to bool 'true' or 'false'
4819, # The file contains a character that cannot be represented in the current code page
4838, # (atlgdi.h) conversion from 'int' to 'UINT' requires a narrowing conversion
4996, # (atlapp.h) 'GetVersionExW': was declared deprecated
4716, # 'function' must return a value,
4251, # class 'std::xx' needs to have dll-interface.
# icu
4005,
4068,
4267,
4333,
],
},
}