|
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': '', |
| 25 | + 'llvm_version': '6.0', |
24 | 26 |
|
25 | 27 | # Default to -O0 for debug builds. |
26 | 28 | 'v8_optimized_debug%': 0, |
|
31 | 33 |
|
32 | 34 | # Enable disassembler for `--print-code` v8 options |
33 | 35 | 'v8_enable_disassembler': 1, |
| 36 | + 'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")', |
34 | 37 |
|
35 | | - # Don't bake anything extra into the snapshot. |
36 | | - 'v8_use_external_startup_data%': 0, |
| 38 | + 'v8_use_external_startup_data': 1, |
| 39 | + 'v8_enable_i18n_support%': 1, |
| 40 | + #'icu_use_data_file_flag%': 1, |
| 41 | + 'win_fastlink': 0, |
37 | 42 |
|
38 | 43 | # Some STL containers (e.g. std::vector) do not preserve ABI compatibility |
39 | 44 | # between debug and non-debug mode. |
40 | 45 | 'disable_glibcxx_debug': 1, |
41 | 46 |
|
42 | 47 | # Don't use ICU data file (icudtl.dat) from V8, we use our own. |
43 | 48 | 'icu_use_data_file_flag%': 0, |
| 49 | + 'variables': { |
| 50 | + 'building_nw%' : 0, |
| 51 | + }, |
| 52 | + 'building_nw%' : '<(building_nw)', |
44 | 53 |
|
45 | 54 | 'conditions': [ |
46 | | - ['GENERATOR=="ninja"', { |
47 | | - 'obj_dir': '<(PRODUCT_DIR)/obj', |
48 | | - 'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a', |
49 | | - }, { |
50 | | - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', |
51 | | - 'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', |
52 | | - }], |
53 | 55 | ['OS == "win"', { |
54 | 56 | 'os_posix': 0, |
55 | 57 | 'v8_postmortem_support%': 'false', |
|
58 | 60 | }, { |
59 | 61 | 'os_posix': 1, |
60 | 62 | 'v8_postmortem_support%': 'true', |
| 63 | + 'clang_dir': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts', |
| 64 | + }], |
| 65 | + ['OS=="linux" and target_arch=="ia32" and <(building_nw)==1', { |
| 66 | + 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot', |
| 67 | + }], |
| 68 | + ['OS=="linux" and target_arch=="x64" and <(building_nw)==1', { |
| 69 | + 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot', |
61 | 70 | }], |
62 | 71 | ['OS== "mac"', { |
63 | | - 'obj_dir%': '<(PRODUCT_DIR)/obj.target', |
64 | | - 'v8_base': '<(PRODUCT_DIR)/libv8_base.a', |
| 72 | + 'obj_dir': '<(PRODUCT_DIR)/obj.target', |
| 73 | + #'v8_base': '<(PRODUCT_DIR)/libv8_base.a', |
| 74 | + }, { |
| 75 | + 'conditions': [ |
| 76 | + ['GENERATOR=="ninja"', { |
| 77 | + 'obj_dir': '<(PRODUCT_DIR)/obj', |
| 78 | + 'v8_base': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a', |
| 79 | + }, { |
| 80 | + 'obj_dir%': '<(PRODUCT_DIR)/obj.target', |
| 81 | + 'v8_base%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', |
| 82 | + }], |
| 83 | + ], |
65 | 84 | }], |
66 | 85 | ['openssl_fips != ""', { |
67 | 86 | 'openssl_product': '<(STATIC_LIB_PREFIX)crypto<(STATIC_LIB_SUFFIX)', |
|
76 | 95 | ], |
77 | 96 | }, |
78 | 97 |
|
| 98 | + 'conditions': [ |
| 99 | + [ 'clang==1 and OS != "mac" and building_nw==1', { |
| 100 | + 'make_global_settings': [ |
| 101 | + ['CC', '<(clang_dir)/bin/clang'], |
| 102 | + ['CXX', '<(clang_dir)/bin/clang++'], |
| 103 | + ['CC.host', '$(CC)'], |
| 104 | + ['CXX.host', '$(CXX)'], |
| 105 | + ], |
| 106 | + }], |
| 107 | + ], |
79 | 108 | 'target_defaults': { |
80 | 109 | 'default_configuration': 'Release', |
| 110 | + 'variables': { |
| 111 | + 'conditions': [ |
| 112 | + ['OS=="win" and component=="shared_library"', { |
| 113 | + # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 114 | + 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 115 | + 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
| 116 | + }, { |
| 117 | + # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 118 | + 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 119 | + 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 120 | + }], |
| 121 | + ], |
| 122 | + }, |
81 | 123 | 'configurations': { |
82 | | - 'Debug': { |
| 124 | + 'Common_Base': { |
| 125 | + 'abstract': 1, |
| 126 | + 'msvs_settings':{ |
| 127 | + 'VCCLCompilerTool': { |
| 128 | + 'AdditionalOptions': [ |
| 129 | + '/bigobj', |
| 130 | + # Tell the compiler to crash on failures. This is undocumented |
| 131 | + # and unsupported but very handy. |
| 132 | + '/d2FastFail', |
| 133 | + ], |
| 134 | + }, |
| 135 | + 'VCLinkerTool': { |
| 136 | + # Add the default import libs. |
| 137 | + 'AdditionalDependencies': [ |
| 138 | + 'kernel32.lib', |
| 139 | + 'gdi32.lib', |
| 140 | + 'winspool.lib', |
| 141 | + 'comdlg32.lib', |
| 142 | + 'advapi32.lib', |
| 143 | + 'shell32.lib', |
| 144 | + 'ole32.lib', |
| 145 | + 'oleaut32.lib', |
| 146 | + 'user32.lib', |
| 147 | + 'uuid.lib', |
| 148 | + 'odbc32.lib', |
| 149 | + 'odbccp32.lib', |
| 150 | + 'delayimp.lib', |
| 151 | + 'credui.lib', |
| 152 | + 'dbghelp.lib', |
| 153 | + 'shlwapi.lib', |
| 154 | + 'winmm.lib', |
| 155 | + ], |
| 156 | + 'AdditionalOptions': [ |
| 157 | + # Suggested by Microsoft Devrel to avoid |
| 158 | + # LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000) |
| 159 | + # which started happening more regularly after VS2013 Update 4. |
| 160 | + # Needs to be a bit lower for VS2015, or else errors out. |
| 161 | + '/maxilksize:0x7ff00000', |
| 162 | + # Tell the linker to crash on failures. |
| 163 | + '/fastfail', |
| 164 | + ], |
| 165 | + }, |
| 166 | + }, |
| 167 | + 'conditions': [ |
| 168 | + ['OS=="win" and win_fastlink==1 and MSVS_VERSION != "2013"', { |
| 169 | + 'msvs_settings': { |
| 170 | + 'VCLinkerTool': { |
| 171 | + # /PROFILE is incompatible with /debug:fastlink |
| 172 | + 'Profile': 'false', |
| 173 | + 'AdditionalOptions': [ |
| 174 | + # Tell VS 2015+ to create a PDB that references debug |
| 175 | + # information in .obj and .lib files instead of copying |
| 176 | + # it all. |
| 177 | + '/DEBUG:FASTLINK', |
| 178 | + ], |
| 179 | + }, |
| 180 | + }, |
| 181 | + }], |
| 182 | + ['OS=="win" and MSVS_VERSION == "2015"', { |
| 183 | + 'msvs_settings': { |
| 184 | + 'VCCLCompilerTool': { |
| 185 | + 'AdditionalOptions': [ |
| 186 | + # Work around crbug.com/526851, bug in VS 2015 RTM compiler. |
| 187 | + '/Zc:sizedDealloc-', |
| 188 | + # Disable thread-safe statics to avoid overhead and because |
| 189 | + # they are disabled on other platforms. See crbug.com/587210 |
| 190 | + # and -fno-threadsafe-statics. |
| 191 | + '/Zc:threadSafeInit-', |
| 192 | + ], |
| 193 | + }, |
| 194 | + }, |
| 195 | + }], |
| 196 | + ], |
| 197 | + }, |
| 198 | + 'Debug_Base': { |
| 199 | + 'abstract': 1, |
83 | 200 | 'variables': { |
84 | 201 | 'v8_enable_handle_zapping': 1, |
85 | 202 | }, |
|
97 | 214 | 'cflags': [ '-fPIE' ], |
98 | 215 | 'ldflags': [ '-fPIE', '-pie' ] |
99 | 216 | }], |
100 | | - ['node_shared=="true"', { |
101 | | - 'msvs_settings': { |
102 | | - 'VCCLCompilerTool': { |
103 | | - 'RuntimeLibrary': 3, # MultiThreadedDebugDLL (/MDd) |
104 | | - } |
105 | | - } |
106 | | - }], |
107 | | - ['node_shared=="false"', { |
108 | | - 'msvs_settings': { |
109 | | - 'VCCLCompilerTool': { |
110 | | - 'RuntimeLibrary': 1 # MultiThreadedDebug (/MTd) |
111 | | - } |
112 | | - } |
113 | | - }] |
114 | 217 | ], |
115 | 218 | 'msvs_settings': { |
116 | 219 | 'VCCLCompilerTool': { |
| 220 | + 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug |
117 | 221 | 'Optimization': 0, # /Od, no optimization |
118 | 222 | 'MinimalRebuild': 'false', |
119 | 223 | 'OmitFramePointers': 'false', |
|
131 | 235 | 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os |
132 | 236 | }, |
133 | 237 | }, |
134 | | - 'Release': { |
| 238 | + 'Release_Base': { |
| 239 | + 'abstract': 1, |
135 | 240 | 'variables': { |
136 | 241 | 'v8_enable_handle_zapping': 0, |
137 | 242 | }, |
|
151 | 256 | 'cflags': [ '-fPIE' ], |
152 | 257 | 'ldflags': [ '-fPIE', '-pie' ] |
153 | 258 | }], |
154 | | - ['node_shared=="true"', { |
155 | | - 'msvs_settings': { |
156 | | - 'VCCLCompilerTool': { |
157 | | - 'RuntimeLibrary': 2 # MultiThreadedDLL (/MD) |
158 | | - } |
159 | | - } |
160 | | - }], |
161 | | - ['node_shared=="false"', { |
162 | | - 'msvs_settings': { |
163 | | - 'VCCLCompilerTool': { |
164 | | - 'RuntimeLibrary': 0 # MultiThreaded (/MT) |
165 | | - } |
166 | | - } |
167 | | - }] |
168 | 259 | ], |
169 | 260 | 'msvs_settings': { |
170 | 261 | 'VCCLCompilerTool': { |
| 262 | + 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release |
171 | 263 | 'Optimization': 3, # /Ox, full optimization |
172 | 264 | 'FavorSizeOrSpeed': 1, # /Ot, favor speed over size |
173 | 265 | 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible |
|
194 | 286 | ], |
195 | 287 | }, |
196 | 288 | }, |
197 | | - } |
| 289 | + }, |
| 290 | + 'Debug': { |
| 291 | + 'inherit_from': ['Common_Base', 'Debug_Base'], |
| 292 | + }, |
| 293 | + 'Release': { |
| 294 | + 'inherit_from': ['Common_Base', 'Release_Base'], |
| 295 | + }, |
| 296 | + 'conditions': [ |
| 297 | + [ 'OS=="win"', { |
| 298 | + 'Debug_x64': { 'inherit_from': ['Debug'] }, |
| 299 | + 'Release_x64': { 'inherit_from': ['Release'], }, |
| 300 | + }], |
| 301 | + ], |
198 | 302 | }, |
199 | 303 | # Forcibly disable -Werror. We support a wide range of compilers, it's |
200 | 304 | # simply not feasible to squelch all warnings, never mind that the |
|
242 | 346 | 'SuppressStartupBanner': 'true', |
243 | 347 | }, |
244 | 348 | }, |
245 | | - 'msvs_disabled_warnings': [4351, 4355, 4800], |
| 349 | + 'msvs_disabled_warnings': [4351, 4355, 4800, 4595], |
246 | 350 | 'conditions': [ |
247 | 351 | ['asan == 1 and OS != "mac"', { |
248 | 352 | 'cflags+': [ |
|
283 | 387 | '_CRT_NONSTDC_NO_DEPRECATE', |
284 | 388 | # Make sure the STL doesn't try to use exceptions |
285 | 389 | '_HAS_EXCEPTIONS=0', |
286 | | - 'BUILDING_V8_SHARED=1', |
| 390 | + #'BUILDING_V8_SHARED=1', |
287 | 391 | 'BUILDING_UV_SHARED=1', |
288 | 392 | ], |
289 | 393 | }], |
|
318 | 422 | 'cflags': [ '-m64' ], |
319 | 423 | 'ldflags': [ '-m64' ], |
320 | 424 | }], |
| 425 | + [ 'building_nw==1', { |
| 426 | + 'cflags': [ '--sysroot=<(sysroot)' ], |
| 427 | + 'ldflags': [ '--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ], |
| 428 | + }], |
321 | 429 | [ 'target_arch=="ppc" and OS!="aix"', { |
322 | 430 | 'cflags': [ '-m32' ], |
323 | 431 | 'ldflags': [ '-m32' ], |
|
0 commit comments