|
11 | 11 | 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
|
12 | 12 | 'python%': 'python',
|
13 | 13 |
|
14 |
| - 'node_shared%': 'false', |
| 14 | + 'node_shared%': 'true', |
15 | 15 | 'force_dynamic_crt%': 0,
|
16 | 16 | 'node_use_v8_platform%': 'true',
|
17 | 17 | 'node_use_bundled_v8%': 'true',
|
18 | 18 | 'node_module_version%': '',
|
| 19 | + 'mac_product_name': 'nwjs', |
19 | 20 |
|
20 | 21 | 'node_tag%': '',
|
21 | 22 | 'uv_library%': 'static_library',
|
22 | 23 |
|
23 |
| - 'openssl_fips%': '', |
| 24 | + 'openssl_fips': '', |
24 | 25 |
|
25 | 26 | # Default to -O0 for debug builds.
|
26 | 27 | 'v8_optimized_debug%': 0,
|
27 | 28 |
|
28 | 29 | # Enable disassembler for `--print-code` v8 options
|
29 | 30 | 'v8_enable_disassembler': 1,
|
| 31 | + 'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")', |
30 | 32 |
|
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, |
33 | 37 |
|
34 | 38 | # Don't use ICU data file (icudtl.dat) from V8, we use our own.
|
35 | 39 | 'icu_use_data_file_flag%': 0,
|
36 | 40 |
|
37 | 41 | '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 |
| - }], |
45 | 42 | ['OS == "win"', {
|
46 | 43 | 'os_posix': 0,
|
47 | 44 | 'v8_postmortem_support%': 'false',
|
|
50 | 47 | }, {
|
51 | 48 | 'os_posix': 1,
|
52 | 49 | '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', |
53 | 57 | }],
|
54 | 58 | ['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 | + ], |
57 | 71 | }],
|
58 | 72 | ['openssl_fips != ""', {
|
59 | 73 | 'OPENSSL_PRODUCT': 'libcrypto.a',
|
|
68 | 82 | ],
|
69 | 83 | },
|
70 | 84 |
|
| 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 | + ], |
71 | 95 | 'target_defaults': {
|
72 | 96 | '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 | + }, |
73 | 110 | '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, |
75 | 187 | 'variables': {
|
76 | 188 | 'v8_enable_handle_zapping': 1,
|
77 | 189 | },
|
|
89 | 201 | 'cflags': [ '-fPIE' ],
|
90 | 202 | 'ldflags': [ '-fPIE', '-pie' ]
|
91 | 203 | }],
|
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 |
| - }] |
106 | 204 | ],
|
107 | 205 | 'msvs_settings': {
|
108 | 206 | 'VCCLCompilerTool': {
|
| 207 | + 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug |
109 | 208 | 'Optimization': 0, # /Od, no optimization
|
110 | 209 | 'MinimalRebuild': 'false',
|
111 | 210 | 'OmitFramePointers': 'false',
|
|
119 | 218 | 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os
|
120 | 219 | },
|
121 | 220 | },
|
122 |
| - 'Release': { |
| 221 | + 'Release_Base': { |
| 222 | + 'abstract': 1, |
123 | 223 | 'variables': {
|
124 | 224 | 'v8_enable_handle_zapping': 0,
|
125 | 225 | },
|
|
139 | 239 | 'cflags': [ '-fPIE' ],
|
140 | 240 | 'ldflags': [ '-fPIE', '-pie' ]
|
141 | 241 | }],
|
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 |
| - }] |
156 | 242 | ],
|
157 | 243 | 'msvs_settings': {
|
158 | 244 | 'VCCLCompilerTool': {
|
| 245 | + 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release |
159 | 246 | 'Optimization': 3, # /Ox, full optimization
|
160 | 247 | 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size
|
161 | 248 | 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible
|
|
180 | 267 | 'LinkIncremental': 1, # disable incremental linking
|
181 | 268 | },
|
182 | 269 | },
|
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 | + ], |
184 | 283 | },
|
185 | 284 | # Forcibly disable -Werror. We support a wide range of compilers, it's
|
186 | 285 | # simply not feasible to squelch all warnings, never mind that the
|
|
230 | 329 | 'SuppressStartupBanner': 'true',
|
231 | 330 | },
|
232 | 331 | },
|
233 |
| - 'msvs_disabled_warnings': [4351, 4355, 4800], |
| 332 | + 'msvs_disabled_warnings': [4351, 4355, 4800, 4595], |
234 | 333 | 'conditions': [
|
235 | 334 | ['asan == 1 and OS != "mac"', {
|
236 | 335 | 'cflags+': [
|
|
271 | 370 | '_CRT_NONSTDC_NO_DEPRECATE',
|
272 | 371 | # Make sure the STL doesn't try to use exceptions
|
273 | 372 | '_HAS_EXCEPTIONS=0',
|
274 |
| - 'BUILDING_V8_SHARED=1', |
| 373 | + #'BUILDING_V8_SHARED=1', |
275 | 374 | 'BUILDING_UV_SHARED=1',
|
276 | 375 | ],
|
277 | 376 | }],
|
278 | 377 | [ 'OS in "linux freebsd openbsd solaris aix"', {
|
279 |
| - 'cflags': [ '-pthread', ], |
280 |
| - 'ldflags': [ '-pthread' ], |
| 378 | + 'cflags': [ '-pthread'], |
| 379 | + 'ldflags': [ '-pthread'], |
281 | 380 | }],
|
282 | 381 | [ 'OS in "linux freebsd openbsd solaris android aix"', {
|
283 | 382 | 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
|
|
294 | 393 | ],
|
295 | 394 | 'conditions': [
|
296 | 395 | [ '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))' ], |
299 | 398 | }],
|
300 | 399 | [ 'target_arch=="x32"', {
|
301 | 400 | 'cflags': [ '-mx32' ],
|
302 | 401 | 'ldflags': [ '-mx32' ],
|
303 | 402 | }],
|
304 | 403 | [ '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))' ], |
307 | 406 | }],
|
308 | 407 | [ 'target_arch=="ppc" and OS!="aix"', {
|
309 | 408 | 'cflags': [ '-m32' ],
|
|
0 commit comments