Skip to content

Commit e3b26dd

Browse files
committed
nwjs master
1 parent 56a0577 commit e3b26dd

File tree

4,029 files changed

+1448
-448563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,029 files changed

+1448
-448563
lines changed

common.gypi

+151-52
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,34 @@
1111
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
1212
'python%': 'python',
1313

14-
'node_shared%': 'false',
14+
'node_shared%': 'true',
1515
'force_dynamic_crt%': 0,
1616
'node_use_v8_platform%': 'true',
1717
'node_use_bundled_v8%': 'true',
1818
'node_module_version%': '',
19+
'mac_product_name': 'nwjs',
1920

2021
'node_tag%': '',
2122
'uv_library%': 'static_library',
2223

23-
'openssl_fips%': '',
24+
'openssl_fips': '',
2425

2526
# Default to -O0 for debug builds.
2627
'v8_optimized_debug%': 0,
2728

2829
# Enable disassembler for `--print-code` v8 options
2930
'v8_enable_disassembler': 1,
31+
'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")',
3032

31-
# Don't bake anything extra into the snapshot.
32-
'v8_use_external_startup_data%': 0,
33+
'v8_use_external_startup_data': 1,
34+
'v8_enable_i18n_support%': 1,
35+
#'icu_use_data_file_flag%': 1,
36+
'win_fastlink': 0,
3337

3438
# Don't use ICU data file (icudtl.dat) from V8, we use our own.
3539
'icu_use_data_file_flag%': 0,
3640

3741
'conditions': [
38-
['GENERATOR=="ninja"', {
39-
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
40-
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
41-
}, {
42-
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
43-
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
44-
}],
4542
['OS == "win"', {
4643
'os_posix': 0,
4744
'v8_postmortem_support%': 'false',
@@ -50,10 +47,27 @@
5047
}, {
5148
'os_posix': 1,
5249
'v8_postmortem_support%': 'true',
50+
'clang_dir': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts',
51+
}],
52+
['OS=="linux" and target_arch=="ia32"', {
53+
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot',
54+
}],
55+
['OS=="linux" and target_arch=="x64"', {
56+
'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot',
5357
}],
5458
['OS== "mac"', {
55-
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
56-
'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
59+
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
60+
#'V8_BASE': '<(PRODUCT_DIR)/libv8_base.a',
61+
}, {
62+
'conditions': [
63+
['GENERATOR=="ninja"', {
64+
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
65+
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
66+
}, {
67+
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
68+
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
69+
}],
70+
],
5771
}],
5872
['openssl_fips != ""', {
5973
'OPENSSL_PRODUCT': 'libcrypto.a',
@@ -68,10 +82,108 @@
6882
],
6983
},
7084

85+
'conditions': [
86+
[ 'clang==1 and OS != "mac"', {
87+
'make_global_settings': [
88+
['CC', '<(clang_dir)/bin/clang'],
89+
['CXX', '<(clang_dir)/bin/clang++'],
90+
['CC.host', '$(CC)'],
91+
['CXX.host', '$(CXX)'],
92+
],
93+
}],
94+
],
7195
'target_defaults': {
7296
'default_configuration': 'Release',
97+
'variables': {
98+
'conditions': [
99+
['OS=="win" and component=="shared_library"', {
100+
# See http://msdn.microsoft.com/en-us/library/aa652367.aspx
101+
'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
102+
'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
103+
}, {
104+
# See http://msdn.microsoft.com/en-us/library/aa652367.aspx
105+
'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
106+
'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
107+
}],
108+
],
109+
},
73110
'configurations': {
74-
'Debug': {
111+
'Common_Base': {
112+
'abstract': 1,
113+
'msvs_settings':{
114+
'VCCLCompilerTool': {
115+
'AdditionalOptions': [
116+
'/bigobj',
117+
# Tell the compiler to crash on failures. This is undocumented
118+
# and unsupported but very handy.
119+
'/d2FastFail',
120+
],
121+
},
122+
'VCLinkerTool': {
123+
# Add the default import libs.
124+
'AdditionalDependencies': [
125+
'kernel32.lib',
126+
'gdi32.lib',
127+
'winspool.lib',
128+
'comdlg32.lib',
129+
'advapi32.lib',
130+
'shell32.lib',
131+
'ole32.lib',
132+
'oleaut32.lib',
133+
'user32.lib',
134+
'uuid.lib',
135+
'odbc32.lib',
136+
'odbccp32.lib',
137+
'delayimp.lib',
138+
'credui.lib',
139+
'dbghelp.lib',
140+
'shlwapi.lib',
141+
'winmm.lib',
142+
],
143+
'AdditionalOptions': [
144+
# Suggested by Microsoft Devrel to avoid
145+
# LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000)
146+
# which started happening more regularly after VS2013 Update 4.
147+
# Needs to be a bit lower for VS2015, or else errors out.
148+
'/maxilksize:0x7ff00000',
149+
# Tell the linker to crash on failures.
150+
'/fastfail',
151+
],
152+
},
153+
},
154+
'conditions': [
155+
['OS=="win" and win_fastlink==1 and MSVS_VERSION != "2013"', {
156+
'msvs_settings': {
157+
'VCLinkerTool': {
158+
# /PROFILE is incompatible with /debug:fastlink
159+
'Profile': 'false',
160+
'AdditionalOptions': [
161+
# Tell VS 2015+ to create a PDB that references debug
162+
# information in .obj and .lib files instead of copying
163+
# it all.
164+
'/DEBUG:FASTLINK',
165+
],
166+
},
167+
},
168+
}],
169+
['OS=="win" and MSVS_VERSION == "2015"', {
170+
'msvs_settings': {
171+
'VCCLCompilerTool': {
172+
'AdditionalOptions': [
173+
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
174+
'/Zc:sizedDealloc-',
175+
# Disable thread-safe statics to avoid overhead and because
176+
# they are disabled on other platforms. See crbug.com/587210
177+
# and -fno-threadsafe-statics.
178+
'/Zc:threadSafeInit-',
179+
],
180+
},
181+
},
182+
}],
183+
],
184+
},
185+
'Debug_Base': {
186+
'abstract': 1,
75187
'variables': {
76188
'v8_enable_handle_zapping': 1,
77189
},
@@ -89,23 +201,10 @@
89201
'cflags': [ '-fPIE' ],
90202
'ldflags': [ '-fPIE', '-pie' ]
91203
}],
92-
['node_shared=="true"', {
93-
'msvs_settings': {
94-
'VCCLCompilerTool': {
95-
'RuntimeLibrary': 3, # MultiThreadedDebugDLL (/MDd)
96-
}
97-
}
98-
}],
99-
['node_shared=="false"', {
100-
'msvs_settings': {
101-
'VCCLCompilerTool': {
102-
'RuntimeLibrary': 1 # MultiThreadedDebug (/MTd)
103-
}
104-
}
105-
}]
106204
],
107205
'msvs_settings': {
108206
'VCCLCompilerTool': {
207+
'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug
109208
'Optimization': 0, # /Od, no optimization
110209
'MinimalRebuild': 'false',
111210
'OmitFramePointers': 'false',
@@ -119,7 +218,8 @@
119218
'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
120219
},
121220
},
122-
'Release': {
221+
'Release_Base': {
222+
'abstract': 1,
123223
'variables': {
124224
'v8_enable_handle_zapping': 0,
125225
},
@@ -139,23 +239,10 @@
139239
'cflags': [ '-fPIE' ],
140240
'ldflags': [ '-fPIE', '-pie' ]
141241
}],
142-
['node_shared=="true"', {
143-
'msvs_settings': {
144-
'VCCLCompilerTool': {
145-
'RuntimeLibrary': 2 # MultiThreadedDLL (/MD)
146-
}
147-
}
148-
}],
149-
['node_shared=="false"', {
150-
'msvs_settings': {
151-
'VCCLCompilerTool': {
152-
'RuntimeLibrary': 0 # MultiThreaded (/MT)
153-
}
154-
}
155-
}]
156242
],
157243
'msvs_settings': {
158244
'VCCLCompilerTool': {
245+
'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release
159246
'Optimization': 3, # /Ox, full optimization
160247
'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
161248
'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
@@ -180,7 +267,19 @@
180267
'LinkIncremental': 1, # disable incremental linking
181268
},
182269
},
183-
}
270+
},
271+
'Debug': {
272+
'inherit_from': ['Common_Base', 'Debug_Base'],
273+
},
274+
'Release': {
275+
'inherit_from': ['Common_Base', 'Release_Base'],
276+
},
277+
'conditions': [
278+
[ 'OS=="win"', {
279+
'Debug_x64': { 'inherit_from': ['Debug'] },
280+
'Release_x64': { 'inherit_from': ['Release'], },
281+
}],
282+
],
184283
},
185284
# Forcibly disable -Werror. We support a wide range of compilers, it's
186285
# simply not feasible to squelch all warnings, never mind that the
@@ -230,7 +329,7 @@
230329
'SuppressStartupBanner': 'true',
231330
},
232331
},
233-
'msvs_disabled_warnings': [4351, 4355, 4800],
332+
'msvs_disabled_warnings': [4351, 4355, 4800, 4595],
234333
'conditions': [
235334
['asan == 1 and OS != "mac"', {
236335
'cflags+': [
@@ -271,13 +370,13 @@
271370
'_CRT_NONSTDC_NO_DEPRECATE',
272371
# Make sure the STL doesn't try to use exceptions
273372
'_HAS_EXCEPTIONS=0',
274-
'BUILDING_V8_SHARED=1',
373+
#'BUILDING_V8_SHARED=1',
275374
'BUILDING_UV_SHARED=1',
276375
],
277376
}],
278377
[ 'OS in "linux freebsd openbsd solaris aix"', {
279-
'cflags': [ '-pthread', ],
280-
'ldflags': [ '-pthread' ],
378+
'cflags': [ '-pthread'],
379+
'ldflags': [ '-pthread'],
281380
}],
282381
[ 'OS in "linux freebsd openbsd solaris android aix"', {
283382
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
@@ -294,16 +393,16 @@
294393
],
295394
'conditions': [
296395
[ 'target_arch=="ia32"', {
297-
'cflags': [ '-m32' ],
298-
'ldflags': [ '-m32' ],
396+
'cflags': [ '-m32', '--sysroot=<(sysroot)' ],
397+
'ldflags': [ '-m32','--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ],
299398
}],
300399
[ 'target_arch=="x32"', {
301400
'cflags': [ '-mx32' ],
302401
'ldflags': [ '-mx32' ],
303402
}],
304403
[ 'target_arch=="x64"', {
305-
'cflags': [ '-m64' ],
306-
'ldflags': [ '-m64' ],
404+
'cflags': [ '-m64', '--sysroot=<(sysroot)' ],
405+
'ldflags': [ '-m64', '--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ],
307406
}],
308407
[ 'target_arch=="ppc" and OS!="aix"', {
309408
'cflags': [ '-m32' ],

config.gypi

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Do not edit. Generated by the configure script.
2+
{ 'target_defaults': { 'cflags': [],
3+
'default_configuration': 'Release',
4+
'defines': ['OPENSSL_NO_SSL2=1'],
5+
'include_dirs': [],
6+
'libraries': []},
7+
'variables': { 'clang': 1,
8+
'gcc_version': 49,
9+
'host_arch': 'x64',
10+
'icu_small': 'false',
11+
'node_install_npm': 'true',
12+
'node_prefix': '',
13+
'node_shared': 'true',
14+
'node_shared_http_parser': 'false',
15+
'node_shared_libuv': 'false',
16+
'debug_http2': 0,
17+
'debug_nghttp2': 0,
18+
'node_shared_openssl': 'false',
19+
'node_shared_v8': 'false',
20+
'node_shared_zlib': 'false',
21+
'node_tag': '',
22+
'node_release_urlbase': '',
23+
'node_byteorder': 'little',
24+
'node_use_dtrace': 'false',
25+
'node_use_etw': 'false',
26+
'node_use_mdb': 'false',
27+
'node_use_openssl': 'true',
28+
'node_use_perfctr': 'false',
29+
'openssl_no_asm': 0,
30+
'python': '/usr/bin/python',
31+
'target_arch': 'x64',
32+
'uv_library': 'static_library',
33+
'uv_parent_path': '/deps/uv/',
34+
'uv_use_dtrace': 'false',
35+
'v8_enable_gdbjit': 0,
36+
'v8_enable_i18n_support': 0,
37+
'v8_no_strict_aliasing': 1,
38+
'v8_optimized_debug': 0,
39+
'v8_random_seed': 0,
40+
'v8_use_snapshot': 'true',
41+
'want_separate_host_toolset': 0}}

deps/cares/cares.gyp

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
'variables': {
3+
'library%': 'static_library',
4+
},
25
'target_defaults': {
36
'conditions': [
47
['OS!="win"', {
@@ -112,6 +115,7 @@
112115
}],
113116
[ 'OS=="win"', {
114117
'include_dirs': [ 'config/win32' ],
118+
'msvs_disabled_warnings': [4133],
115119
'sources': [
116120
'src/config-win32.h',
117121
'src/windows_port.c',

deps/cares/src/ares_create_query.c

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
#include "ares_setup.h"
1818

19+
#ifndef _WIN32
20+
#pragma clang diagnostic push
21+
#pragma clang diagnostic ignored "-Warray-bounds"
22+
#endif
23+
1924
#ifdef HAVE_NETINET_IN_H
2025
# include <netinet/in.h>
2126
#endif
@@ -200,3 +205,7 @@ int ares_create_query(const char *name, int dnsclass, int type,
200205

201206
return ARES_SUCCESS;
202207
}
208+
209+
#ifndef _WIN32
210+
#pragma clang diagnostic pop
211+
#endif

0 commit comments

Comments
 (0)