blob: 630c45e84a176af4d7c5fe60842626cab25e5417 [file] [log] [blame]
Ben Murdoch3ef787d2012-04-12 10:51:47 +01001# Copyright 2012 the V8 project authors. All rights reserved.
Ben Murdoch69a99ed2011-11-30 16:03:39 +00002# Redistribution and use in source and binary forms, with or without
3# modification, are permitted provided that the following conditions are
4# met:
5#
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of Google Inc. nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28# Definitions to be used when building stand-alone V8 binaries.
29
30{
Ben Murdochb8a8cc12014-11-26 15:28:44 +000031 # We need to include toolchain.gypi here for third-party sources that don't
32 # directly include it themselves.
33 'includes': ['toolchain.gypi'],
Ben Murdoch69a99ed2011-11-30 16:03:39 +000034 'variables': {
Ben Murdoch69a99ed2011-11-30 16:03:39 +000035 'component%': 'static_library',
Emily Bernierd0a1eb72015-03-24 16:35:39 -040036 'clang_xcode%': 0,
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000037 # Track where uninitialized memory originates from. From fastest to
38 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
39 # - track the chain of stores leading from allocation site to use site.
40 'msan_track_origins%': 2,
Ben Murdoch69a99ed2011-11-30 16:03:39 +000041 'visibility%': 'hidden',
Ben Murdochb8a8cc12014-11-26 15:28:44 +000042 'v8_enable_backtrace%': 0,
43 'v8_enable_i18n_support%': 1,
44 'v8_deprecation_warnings': 1,
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000045 'v8_imminent_deprecation_warnings': 1,
Ben Murdoch69a99ed2011-11-30 16:03:39 +000046 'msvs_multi_core_compile%': '1',
Ben Murdochda12d292016-06-02 14:46:10 +010047 'mac_deployment_target%': '10.7',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000048 'release_extra_cflags%': '',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000049 'variables': {
50 'variables': {
Ben Murdoch3ef787d2012-04-12 10:51:47 +010051 'variables': {
52 'conditions': [
Ben Murdochb8a8cc12014-11-26 15:28:44 +000053 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or \
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000054 OS=="netbsd" or OS=="mac" or OS=="qnx" or OS=="aix"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000055 # This handles the Unix platforms we generally deal with.
Ben Murdoch3ef787d2012-04-12 10:51:47 +010056 # Anything else gets passed through, which probably won't work
57 # very well; such hosts should pass an explicit target_arch
58 # to gyp.
Ben Murdochb8a8cc12014-11-26 15:28:44 +000059 'host_arch%': '<!pymod_do_main(detect_v8_host_arch)',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010060 }, {
Ben Murdochb8a8cc12014-11-26 15:28:44 +000061 # OS!="linux" and OS!="freebsd" and OS!="openbsd" and
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000062 # OS!="netbsd" and OS!="mac" and OS!="aix"
Ben Murdoch3ef787d2012-04-12 10:51:47 +010063 'host_arch%': 'ia32',
64 }],
65 ],
66 },
67 'host_arch%': '<(host_arch)',
68 'target_arch%': '<(host_arch)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000069 'base_dir%': '<!(cd <(DEPTH) && python -c "import os; print os.getcwd()")',
70
Ben Murdochda12d292016-06-02 14:46:10 +010071 # Instrument for code coverage and use coverage wrapper to exclude some
72 # files. Uses gcov if clang=0 is set explicitly. Otherwise,
73 # sanitizer_coverage must be set too.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000074 'coverage%': 0,
Ben Murdoch69a99ed2011-11-30 16:03:39 +000075 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000076 'base_dir%': '<(base_dir)',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000077 'host_arch%': '<(host_arch)',
Ben Murdoch3ef787d2012-04-12 10:51:47 +010078 'target_arch%': '<(target_arch)',
Ben Murdoch69a99ed2011-11-30 16:03:39 +000079 'v8_target_arch%': '<(target_arch)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000080 'coverage%': '<(coverage)',
81 'asan%': 0,
82 'lsan%': 0,
83 'msan%': 0,
84 'tsan%': 0,
85 # Enable coverage gathering instrumentation in sanitizer tools. This flag
86 # also controls coverage granularity (1 for function-level, 2 for
87 # block-level, 3 for edge-level).
88 'sanitizer_coverage%': 0,
89 # Use libc++ (buildtools/third_party/libc++ and
90 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard
91 # library. This is intended to be used for instrumented builds.
92 'use_custom_libcxx%': 0,
93
94 'clang_dir%': '<(base_dir)/third_party/llvm-build/Release+Asserts',
95
96 'use_lto%': 0,
97
98 # Control Flow Integrity for virtual calls and casts.
99 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
100 'cfi_vptr%': 0,
101 'cfi_diag%': 0,
102
103 'cfi_blacklist%': '<(base_dir)/tools/cfi/blacklist.txt',
104
105 # Set to 1 to enable fast builds.
106 # TODO(machenbach): Only configured for windows.
107 'fastbuild%': 0,
108
109 # goma settings.
110 # 1 to use goma.
111 # If no gomadir is set, it uses the default gomadir.
112 'use_goma%': 0,
113 'gomadir%': '',
114
Ben Murdoch097c5b22016-05-18 11:27:45 +0100115 # Check if valgrind directories are present.
116 'has_valgrind%': '<!pymod_do_main(has_valgrind)',
117
Ben Murdochda12d292016-06-02 14:46:10 +0100118 'test_isolation_mode%': 'noop',
119
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000120 'conditions': [
121 # Set default gomadir.
122 ['OS=="win"', {
123 'gomadir': 'c:\\goma\\goma-win',
124 }, {
125 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
126 }],
Ben Murdochda12d292016-06-02 14:46:10 +0100127 ['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and host_arch!="s390" and host_arch!="s390x"', {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000128 'host_clang%': 1,
129 }, {
130 'host_clang%': 0,
131 }],
132 # linux_use_bundled_gold: whether to use the gold linker binary checked
133 # into third_party/binutils. Force this off via GYP_DEFINES when you
134 # are using a custom toolchain and need to control -B in ldflags.
135 # Do not use 32-bit gold on 32-bit hosts as it runs out address space
136 # for component=static_library builds.
137 ['(OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm" or (target_arch=="ia32" and host_arch=="x64"))', {
138 'linux_use_bundled_gold%': 1,
139 }, {
140 'linux_use_bundled_gold%': 0,
141 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000142 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000143 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000144 'base_dir%': '<(base_dir)',
145 'clang_dir%': '<(clang_dir)',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000146 'host_arch%': '<(host_arch)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000147 'host_clang%': '<(host_clang)',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000148 'target_arch%': '<(target_arch)',
149 'v8_target_arch%': '<(v8_target_arch)',
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100150 'werror%': '-Werror',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000151 'use_goma%': '<(use_goma)',
152 'gomadir%': '<(gomadir)',
153 'asan%': '<(asan)',
154 'lsan%': '<(lsan)',
155 'msan%': '<(msan)',
156 'tsan%': '<(tsan)',
157 'sanitizer_coverage%': '<(sanitizer_coverage)',
158 'use_custom_libcxx%': '<(use_custom_libcxx)',
159 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
160 'use_lto%': '<(use_lto)',
161 'cfi_vptr%': '<(cfi_vptr)',
162 'cfi_diag%': '<(cfi_diag)',
163 'cfi_blacklist%': '<(cfi_blacklist)',
164 'test_isolation_mode%': '<(test_isolation_mode)',
165 'fastbuild%': '<(fastbuild)',
166 'coverage%': '<(coverage)',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100167 'has_valgrind%': '<(has_valgrind)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000168
169 # Add a simple extras solely for the purpose of the cctests
170 'v8_extra_library_files': ['../test/cctest/test-extra.js'],
171 'v8_experimental_extra_library_files': ['../test/cctest/test-experimental-extra.js'],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000172
173 # .gyp files or targets should set v8_code to 1 if they build V8 specific
174 # code, as opposed to external code. This variable is used to control such
175 # things as the set of warnings to enable, and whether warnings are treated
176 # as errors.
177 'v8_code%': 0,
178
179 # Speeds up Debug builds:
180 # 0 - Compiler optimizations off (debuggable) (default). This may
181 # be 5x slower than Release (or worse).
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000182 # 1 - Turn on optimizations and disable slow DCHECKs, but leave
183 # V8_ENABLE_CHECKS and most other assertions enabled. This may cause
184 # some v8 tests to fail in the Debug configuration. This roughly
185 # matches the performance of a Release build and can be used by
186 # embedders that need to build their own code as debug but don't want
187 # or need a debug version of V8. This should produce near-release
188 # speeds.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000189 'v8_optimized_debug%': 0,
190
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400191 # Use external files for startup data blobs:
192 # the JS builtins sources and the start snapshot.
193 # Embedders that don't use standalone.gypi will need to add
194 # their own default value.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000195 'v8_use_external_startup_data%': 1,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400196
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000197 # Relative path to icu.gyp from this file.
198 'icu_gyp_path': '../third_party/icu/icu.gyp',
199
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000200 'conditions': [
201 ['(v8_target_arch=="arm" and host_arch!="arm") or \
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000202 (v8_target_arch=="arm64" and host_arch!="arm64") or \
203 (v8_target_arch=="mipsel" and host_arch!="mipsel") or \
204 (v8_target_arch=="mips64el" and host_arch!="mips64el") or \
205 (v8_target_arch=="x64" and host_arch!="x64") or \
206 (OS=="android" or OS=="qnx")', {
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000207 'want_separate_host_toolset': 1,
208 }, {
209 'want_separate_host_toolset': 0,
210 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000211 ['OS == "win"', {
212 'os_posix%': 0,
213 }, {
214 'os_posix%': 1,
215 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000216 ['OS=="win" and use_goma==1', {
217 # goma doesn't support pch yet.
218 'chromium_win_pch': 0,
219 # goma doesn't support PDB yet.
220 'fastbuild%': 1,
221 }],
222 ['((v8_target_arch=="ia32" or v8_target_arch=="x64" or v8_target_arch=="x87") and \
223 (OS=="linux" or OS=="mac")) or (v8_target_arch=="ppc64" and OS=="linux")', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000224 'v8_enable_gdbjit%': 1,
225 }, {
226 'v8_enable_gdbjit%': 0,
227 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000228 ['(OS=="linux" or OS=="mac") and (target_arch=="ia32" or target_arch=="x64") and \
Ben Murdochda12d292016-06-02 14:46:10 +0100229 (v8_target_arch!="x87" and v8_target_arch!="x32")', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000230 'clang%': 1,
231 }, {
232 'clang%': 0,
233 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000234 ['asan==1 or lsan==1 or msan==1 or tsan==1', {
235 'clang%': 1,
236 'use_allocator%': 'none',
237 }],
238 ['asan==1 and OS=="linux"', {
239 'use_custom_libcxx%': 1,
240 }],
241 ['tsan==1', {
242 'use_custom_libcxx%': 1,
243 }],
244 ['msan==1', {
245 # Use a just-built, MSan-instrumented libc++ instead of the system-wide
246 # libstdc++. This is required to avoid false positive reports whenever
247 # the C++ standard library is used.
248 'use_custom_libcxx%': 1,
249 }],
250 ['cfi_vptr==1', {
251 'use_lto%': 1,
252 }],
253 ['OS=="android"', {
254 # Location of Android NDK.
255 'variables': {
256 'variables': {
257 # The Android toolchain needs to use the absolute path to the NDK
258 # because it is used at different levels in the GYP files.
259 'android_ndk_root%': '<(base_dir)/third_party/android_tools/ndk/',
260 'android_host_arch%': "<!(uname -m | sed -e 's/i[3456]86/x86/')",
261 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
Ben Murdochc5610432016-08-08 18:44:38 +0100262 'os_folder_name%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/darwin/')",
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000263 },
264
265 # Copy conditionally-set variables out one scope.
266 'android_ndk_root%': '<(android_ndk_root)',
267 'host_os%': '<(host_os)',
Ben Murdochc5610432016-08-08 18:44:38 +0100268 'os_folder_name%': '<(os_folder_name)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000269
270 'conditions': [
271 ['target_arch == "ia32"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100272 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000273 'android_target_arch%': 'x86',
274 'android_target_platform%': '16',
Ben Murdochc5610432016-08-08 18:44:38 +0100275 'arm_version%': 'default',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000276 }],
277 ['target_arch == "x64"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100278 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000279 'android_target_arch%': 'x86_64',
280 'android_target_platform%': '21',
Ben Murdochc5610432016-08-08 18:44:38 +0100281 'arm_version%': 'default',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000282 }],
283 ['target_arch=="arm"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100284 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000285 'android_target_arch%': 'arm',
286 'android_target_platform%': '16',
287 'arm_version%': 7,
288 }],
289 ['target_arch == "arm64"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100290 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000291 'android_target_arch%': 'arm64',
292 'android_target_platform%': '21',
293 'arm_version%': 'default',
294 }],
295 ['target_arch == "mipsel"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100296 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000297 'android_target_arch%': 'mips',
298 'android_target_platform%': '16',
Ben Murdochc5610432016-08-08 18:44:38 +0100299 'arm_version%': 'default',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000300 }],
301 ['target_arch == "mips64el"', {
Ben Murdochc5610432016-08-08 18:44:38 +0100302 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(os_folder_name)-<(android_host_arch)/bin',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000303 'android_target_arch%': 'mips64',
304 'android_target_platform%': '21',
Ben Murdochc5610432016-08-08 18:44:38 +0100305 'arm_version%': 'default',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000306 }],
307 ],
308 },
309
310 # Copy conditionally-set variables out one scope.
311 'android_target_arch%': '<(android_target_arch)',
312 'android_target_platform%': '<(android_target_platform)',
313 'android_toolchain%': '<(android_toolchain)',
314 'arm_version%': '<(arm_version)',
315 'host_os%': '<(host_os)',
316
317 'conditions': [
318 ['android_ndk_root==""', {
319 'variables': {
320 'android_sysroot': '<(android_toolchain)/sysroot/',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100321 'android_stl': '<(android_toolchain)/sources/cxx-stl/',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000322 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000323 'conditions': [
324 ['target_arch=="x64"', {
325 'android_lib': '<(android_sysroot)/usr/lib64',
326 }, {
327 'android_lib': '<(android_sysroot)/usr/lib',
328 }],
329 ],
Ben Murdoch097c5b22016-05-18 11:27:45 +0100330 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
331 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
332 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
333 'android_support_include': '<(android_toolchain)/sources/android/support/include',
334 'android_sysroot': '<(android_sysroot)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000335 }, {
336 'variables': {
337 'android_sysroot': '<(android_ndk_root)/platforms/android-<(android_target_platform)/arch-<(android_target_arch)',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100338 'android_stl': '<(android_ndk_root)/sources/cxx-stl/',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000339 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000340 'conditions': [
341 ['target_arch=="x64"', {
342 'android_lib': '<(android_sysroot)/usr/lib64',
343 }, {
344 'android_lib': '<(android_sysroot)/usr/lib',
345 }],
346 ],
Ben Murdoch097c5b22016-05-18 11:27:45 +0100347 'android_libcpp_include': '<(android_stl)/llvm-libc++/libcxx/include',
348 'android_libcpp_abi_include': '<(android_stl)/llvm-libc++abi/libcxxabi/include',
349 'android_libcpp_libs': '<(android_stl)/llvm-libc++/libs',
350 'android_support_include': '<(android_ndk_root)/sources/android/support/include',
351 'android_sysroot': '<(android_sysroot)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000352 }],
353 ],
Ben Murdoch097c5b22016-05-18 11:27:45 +0100354 'android_libcpp_library': 'c++_static',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000355 }], # OS=="android"
356 ['host_clang==1', {
Ben Murdochc5610432016-08-08 18:44:38 +0100357 'conditions':[
358 ['OS=="android"', {
359 'host_ld': '<!(which ld)',
360 'host_ranlib': '<!(which ranlib)',
361 }],
362 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000363 'host_cc': '<(clang_dir)/bin/clang',
364 'host_cxx': '<(clang_dir)/bin/clang++',
365 }, {
366 'host_cc': '<!(which gcc)',
367 'host_cxx': '<!(which g++)',
368 }],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000369 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000370 # Default ARM variable settings.
371 'arm_version%': 'default',
372 'arm_fpu%': 'vfpv3',
373 'arm_float_abi%': 'default',
374 'arm_thumb': 'default',
Paul Lind18a7ebb2014-12-17 22:29:32 -0800375
376 # Default MIPS variable settings.
377 'mips_arch_variant%': 'r2',
378 # Possible values fp32, fp64, fpxx.
379 # fp32 - 32 32-bit FPU registers are available, doubles are placed in
380 # register pairs.
381 # fp64 - 32 64-bit FPU registers are available.
382 # fpxx - compatibility mode, it chooses fp32 or fp64 depending on runtime
383 # detection
384 'mips_fpu_mode%': 'fp32',
Ben Murdoch097c5b22016-05-18 11:27:45 +0100385
386 # Indicates if gcmole tools are downloaded by a hook.
387 'gcmole%': 0,
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000388 },
389 'target_defaults': {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000390 'variables': {
391 'v8_code%': '<(v8_code)',
Ben Murdochc5610432016-08-08 18:44:38 +0100392 'clang_warning_flags': [
393 # TODO(thakis): https://crbug.com/604888
394 '-Wno-undefined-var-template',
395 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000396 'conditions':[
397 ['OS=="android"', {
398 'host_os%': '<(host_os)',
399 }],
400 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000401 },
Ben Murdochc5610432016-08-08 18:44:38 +0100402 'includes': [ 'set_clang_warning_flags.gypi', ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000403 'default_configuration': 'Debug',
404 'configurations': {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000405 'DebugBaseCommon': {
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400406 'conditions': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000407 ['OS=="aix"', {
408 'cflags': [ '-g', '-Og', '-gxcoff' ],
409 }, {
410 'cflags': [ '-g', '-O0' ],
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400411 }],
412 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000413 },
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000414 'Optdebug': {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000415 'inherit_from': [ 'DebugBaseCommon', 'DebugBase1' ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000416 },
417 'Debug': {
418 # Xcode insists on this empty entry.
419 },
420 'Release': {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000421 'cflags+': ['<@(release_extra_cflags)'],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000422 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000423 'conditions': [
424 ['OS=="win"', {
425 'Optdebug_x64': {
426 'inherit_from': ['Optdebug'],
427 },
428 'Debug_x64': {
429 'inherit_from': ['Debug'],
430 },
431 'Release_x64': {
432 'inherit_from': ['Release'],
433 },
434 }],
435 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000436 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000437 'conditions':[
438 ['clang==0', {
439 'cflags+': ['-Wno-sign-compare',],
440 }],
441 ['clang==1 or host_clang==1', {
442 # This is here so that all files get recompiled after a clang roll and
443 # when turning clang on or off.
444 # (defines are passed via the command line, and build systems rebuild
445 # things when their commandline changes). Nothing should ever read this
446 # define.
447 'defines': ['CR_CLANG_REVISION=<!(python <(DEPTH)/tools/clang/scripts/update.py --print-revision)'],
448 'conditions': [
449 ['host_clang==1', {
450 'target_conditions': [
451 ['_toolset=="host"', {
452 'cflags+': [
453 '-Wno-format-pedantic',
454 ],
455 }],
456 ],
457 }],
458 ['clang==1', {
459 'target_conditions': [
460 ['_toolset=="target"', {
461 'cflags+': [
462 '-Wno-format-pedantic',
463 ],
464 }],
465 ],
466 }],
467 ],
468 }],
Ben Murdochc5610432016-08-08 18:44:38 +0100469 ['clang==1 and target_arch=="ia32"', {
470 'cflags': ['-mstack-alignment=16', '-mstackrealign'],
471 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000472 ['fastbuild!=0', {
473 'conditions': [
474 ['OS=="win" and fastbuild==1', {
475 'msvs_settings': {
476 'VCLinkerTool': {
477 # This tells the linker to generate .pdbs, so that
478 # we can get meaningful stack traces.
479 'GenerateDebugInformation': 'true',
480 },
481 'VCCLCompilerTool': {
482 # No debug info to be generated by compiler.
483 'DebugInformationFormat': '0',
484 },
485 },
486 }],
487 ],
488 }], # fastbuild!=0
489 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000490 'target_conditions': [
491 ['v8_code == 0', {
492 'defines!': [
493 'DEBUG',
494 ],
495 'conditions': [
496 ['os_posix == 1 and OS != "mac"', {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000497 # We don't want to get warnings from third-party code,
498 # so remove any existing warning-enabling flags like -Wall.
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000499 'cflags!': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000500 '-pedantic',
501 '-Wall',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000502 '-Werror',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000503 '-Wextra',
504 '-Wshorten-64-to-32',
505 ],
506 'cflags+': [
507 # Clang considers the `register` keyword as deprecated, but
508 # ICU uses it all over the place.
509 '-Wno-deprecated-register',
510 # ICU uses its own deprecated functions.
511 '-Wno-deprecated-declarations',
512 # ICU prefers `a && b || c` over `(a && b) || c`.
513 '-Wno-logical-op-parentheses',
514 # ICU has some `unsigned < 0` checks.
515 '-Wno-tautological-compare',
516 # uresdata.c has switch(RES_GET_TYPE(x)) code. The
517 # RES_GET_TYPE macro returns an UResType enum, but some switch
518 # statement contains case values that aren't part of that
519 # enum (e.g. URES_TABLE32 which is in UResInternalType). This
520 # is on purpose.
521 '-Wno-switch',
522 ],
523 'cflags_cc!': [
524 '-Wnon-virtual-dtor',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000525 ],
526 }],
527 ['OS == "mac"', {
528 'xcode_settings': {
529 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
530 },
531 }],
532 ['OS == "win"', {
533 'msvs_settings': {
534 'VCCLCompilerTool': {
535 'WarnAsError': 'false',
536 },
537 },
538 }],
539 ],
540 }],
541 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000542 },
543 'conditions': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000544 ['os_posix==1 and OS!="mac"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000545 'target_defaults': {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000546 'conditions': [
547 # Common options for AddressSanitizer, LeakSanitizer,
548 # ThreadSanitizer, MemorySanitizer and CFI builds.
549 ['asan==1 or lsan==1 or tsan==1 or msan==1 or cfi_vptr==1', {
550 'target_conditions': [
551 ['_toolset=="target"', {
552 'cflags': [
553 '-fno-omit-frame-pointer',
554 '-gline-tables-only',
555 ],
556 'cflags!': [
557 '-fomit-frame-pointer',
558 ],
559 }],
560 ],
561 }],
562 ['asan==1', {
563 'target_conditions': [
564 ['_toolset=="target"', {
565 'cflags': [
566 '-fsanitize=address',
567 ],
568 'ldflags': [
569 '-fsanitize=address',
570 ],
571 'defines': [
572 'ADDRESS_SANITIZER',
573 ],
574 }],
575 ],
576 }],
577 ['lsan==1', {
578 'target_conditions': [
579 ['_toolset=="target"', {
580 'cflags': [
581 '-fsanitize=leak',
582 ],
583 'ldflags': [
584 '-fsanitize=leak',
585 ],
586 'defines': [
587 'LEAK_SANITIZER',
588 ],
589 }],
590 ],
591 }],
592 ['tsan==1', {
593 'target_conditions': [
594 ['_toolset=="target"', {
595 'cflags': [
596 '-fsanitize=thread',
597 ],
598 'ldflags': [
599 '-fsanitize=thread',
600 ],
601 'defines': [
602 'THREAD_SANITIZER',
603 ],
604 }],
605 ],
606 }],
607 ['msan==1', {
608 'target_conditions': [
609 ['_toolset=="target"', {
610 'cflags': [
611 '-fsanitize=memory',
612 '-fsanitize-memory-track-origins=<(msan_track_origins)',
613 '-fPIC',
614 ],
615 'ldflags': [
616 '-fsanitize=memory',
617 '-pie',
618 ],
619 'defines': [
620 'MEMORY_SANITIZER',
621 ],
622 }],
623 ],
624 }],
625 ['use_custom_libcxx==1', {
626 'dependencies': [
627 '<(DEPTH)/buildtools/third_party/libc++/libc++.gyp:libcxx_proxy',
628 ],
629 }],
630 ['sanitizer_coverage!=0', {
631 'target_conditions': [
632 ['_toolset=="target"', {
633 'cflags': [
634 '-fsanitize-coverage=<(sanitizer_coverage)',
635 ],
636 'defines': [
637 'SANITIZER_COVERAGE',
638 ],
639 }],
640 ],
641 }],
642 ['linux_use_bundled_gold==1 and not (clang==0 and use_lto==1)', {
643 # Put our binutils, which contains gold in the search path. We pass
644 # the path to gold to the compiler. gyp leaves unspecified what the
645 # cwd is when running the compiler, so the normal gyp path-munging
646 # fails us. This hack gets the right path.
647 #
648 # Disabled when using GCC LTO because GCC also uses the -B search
649 # path at link time to find "as", and our bundled "as" can only
650 # target x86.
651 'ldflags': [
652 # Note, Chromium allows ia32 host arch as well, we limit this to
653 # x64 in v8.
654 '-B<(base_dir)/third_party/binutils/Linux_x64/Release/bin',
655 ],
656 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000657 ],
658 },
659 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000660 ['OS=="mac"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000661 'target_defaults': {
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000662 'conditions': [
663 ['asan==1', {
664 'xcode_settings': {
665 # FIXME(machenbach): This is outdated compared to common.gypi.
666 'OTHER_CFLAGS+': [
667 '-fno-omit-frame-pointer',
668 '-gline-tables-only',
669 '-fsanitize=address',
670 '-w', # http://crbug.com/162783
671 ],
672 'OTHER_CFLAGS!': [
673 '-fomit-frame-pointer',
674 ],
675 'defines': [
676 'ADDRESS_SANITIZER',
677 ],
678 },
679 'dependencies': [
Ben Murdochc5610432016-08-08 18:44:38 +0100680 '<(DEPTH)/gypfiles/mac/asan.gyp:asan_dynamic_runtime',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000681 ],
682 'target_conditions': [
683 ['_type!="static_library"', {
684 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']},
685 }],
686 ],
687 }],
688 ['sanitizer_coverage!=0', {
689 'target_conditions': [
690 ['_toolset=="target"', {
691 'cflags': [
692 '-fsanitize-coverage=<(sanitizer_coverage)',
693 ],
694 'defines': [
695 'SANITIZER_COVERAGE',
696 ],
697 }],
698 ],
699 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000700 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000701 }, # target_defaults
702 }], # OS=="mac"
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100703 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000704 or OS=="netbsd" or OS=="aix"', {
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000705 'target_defaults': {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000706 'cflags': [
707 '-Wall',
708 '<(werror)',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000709 '-Wno-unused-parameter',
710 '-Wno-long-long',
711 '-pthread',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000712 '-pedantic',
Ben Murdochc5610432016-08-08 18:44:38 +0100713 '-Wmissing-field-initializers',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000714 '-Wno-gnu-zero-variadic-macro-arguments',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000715 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000716 'cflags_cc': [
717 '-Wnon-virtual-dtor',
718 '-fno-exceptions',
719 '-fno-rtti',
Ben Murdochda12d292016-06-02 14:46:10 +0100720 '-std=gnu++11',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000721 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000722 'ldflags': [ '-pthread', ],
723 'conditions': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000724 # Don't warn about TRACE_EVENT_* macros with zero arguments passed to
725 # ##__VA_ARGS__. C99 strict mode prohibits having zero variadic macro
726 # arguments in gcc.
727 [ 'clang==0', {
728 'cflags!' : [
729 '-pedantic' ,
730 # Don't warn about unrecognized command line option.
731 '-Wno-gnu-zero-variadic-macro-arguments',
732 ],
733 }],
734 [ 'clang==1 and (v8_target_arch=="x64" or v8_target_arch=="arm64" \
735 or v8_target_arch=="mips64el")', {
736 'cflags': [ '-Wshorten-64-to-32' ],
737 }],
738 [ 'host_arch=="ppc64" and OS!="aix"', {
739 'cflags': [ '-mminimal-toc' ],
740 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000741 [ 'visibility=="hidden" and v8_enable_backtrace==0', {
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000742 'cflags': [ '-fvisibility=hidden' ],
743 }],
744 [ 'component=="shared_library"', {
745 'cflags': [ '-fPIC', ],
746 }],
Ben Murdochda12d292016-06-02 14:46:10 +0100747 [ 'clang==0 and coverage==1', {
Ben Murdoch097c5b22016-05-18 11:27:45 +0100748 'cflags': [ '-fprofile-arcs', '-ftest-coverage'],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000749 'ldflags': [ '-fprofile-arcs'],
750 }],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000751 ],
752 },
Ben Murdoch3ef787d2012-04-12 10:51:47 +0100753 }],
754 # 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"
755 # or OS=="netbsd"'
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000756 ['OS=="qnx"', {
757 'target_defaults': {
758 'cflags': [
759 '-Wall',
760 '<(werror)',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000761 '-Wno-unused-parameter',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000762 # Don't warn about the "struct foo f = {0};" initialization pattern.
763 '-Wno-missing-field-initializers',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000764 '-Wno-gnu-zero-variadic-macro-arguments',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000765 ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000766 'cflags_cc': [
767 '-Wnon-virtual-dtor',
768 '-fno-exceptions',
769 '-fno-rtti',
Ben Murdochda12d292016-06-02 14:46:10 +0100770 '-std=gnu++11',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000771 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000772 'conditions': [
773 [ 'visibility=="hidden"', {
774 'cflags': [ '-fvisibility=hidden' ],
775 }],
776 [ 'component=="shared_library"', {
777 'cflags': [ '-fPIC' ],
778 }],
779 ],
780 'target_conditions': [
781 [ '_toolset=="host" and host_os=="linux"', {
782 'cflags': [ '-pthread' ],
783 'ldflags': [ '-pthread' ],
784 'libraries': [ '-lrt' ],
785 }],
786 [ '_toolset=="target"', {
787 'cflags': [ '-Wno-psabi' ],
788 'libraries': [ '-lbacktrace', '-lsocket', '-lm' ],
789 }],
790 ],
791 },
792 }], # OS=="qnx"
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000793 ['OS=="win"', {
794 'target_defaults': {
795 'defines': [
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000796 '_CRT_SECURE_NO_DEPRECATE',
797 '_CRT_NONSTDC_NO_DEPRECATE',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000798 '_USING_V110_SDK71_',
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000799 ],
800 'conditions': [
801 ['component=="static_library"', {
802 'defines': [
803 '_HAS_EXCEPTIONS=0',
804 ],
805 }],
806 ],
807 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000808 'msvs_disabled_warnings': [
809 # C4091: 'typedef ': ignored on left of 'X' when no variable is
810 # declared.
811 # This happens in a number of Windows headers. Dumb.
812 4091,
813
814 # C4127: conditional expression is constant
815 # This warning can in theory catch dead code and other problems, but
816 # triggers in far too many desirable cases where the conditional
817 # expression is either set by macros or corresponds some legitimate
818 # compile-time constant expression (due to constant template args,
819 # conditionals comparing the sizes of different types, etc.). Some of
820 # these can be worked around, but it's not worth it.
821 4127,
822
823 # C4351: new behavior: elements of array 'array' will be default
824 # initialized
825 # This is a silly "warning" that basically just alerts you that the
826 # compiler is going to actually follow the language spec like it's
827 # supposed to, instead of not following it like old buggy versions
828 # did. There's absolutely no reason to turn this on.
829 4351,
830
831 # C4355: 'this': used in base member initializer list
832 # It's commonly useful to pass |this| to objects in a class'
833 # initializer list. While this warning can catch real bugs, most of
834 # the time the constructors in question don't attempt to call methods
835 # on the passed-in pointer (until later), and annotating every legit
836 # usage of this is simply more hassle than the warning is worth.
837 4355,
838
839 # C4503: 'identifier': decorated name length exceeded, name was
840 # truncated
841 # This only means that some long error messages might have truncated
842 # identifiers in the presence of lots of templates. It has no effect
843 # on program correctness and there's no real reason to waste time
844 # trying to prevent it.
845 4503,
846
847 # Warning C4589 says: "Constructor of abstract class ignores
848 # initializer for virtual base class." Disable this warning because it
849 # is flaky in VS 2015 RTM. It triggers on compiler generated
850 # copy-constructors in some cases.
851 4589,
852
853 # C4611: interaction between 'function' and C++ object destruction is
854 # non-portable
855 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN
856 # suggests using exceptions instead of setjmp/longjmp for C++, but
857 # Chromium code compiles without exception support. We therefore have
858 # to use setjmp/longjmp for e.g. JPEG decode error handling, which
859 # means we have to turn off this warning (and be careful about how
860 # object destruction happens in such cases).
861 4611,
862
863 # TODO(jochen): These warnings are level 4. They will be slowly
864 # removed as code is fixed.
865 4100, # Unreferenced formal parameter
866 4121, # Alignment of a member was sensitive to packing
867 4244, # Conversion from 'type1' to 'type2', possible loss of data
868 4302, # Truncation from 'type 1' to 'type 2'
869 4309, # Truncation of constant value
870 4311, # Pointer truncation from 'type' to 'type'
871 4312, # Conversion from 'type1' to 'type2' of greater size
872 4505, # Unreferenced local function has been removed
873 4510, # Default constructor could not be generated
874 4512, # Assignment operator could not be generated
875 4610, # Object can never be instantiated
876 4800, # Forcing value to bool.
877 4838, # Narrowing conversion. Doesn't seem to be very useful.
878 4995, # 'X': name was marked as #pragma deprecated
879 4996, # 'X': was declared deprecated (for GetVersionEx).
880
881 # These are variable shadowing warnings that are new in VS2015. We
882 # should work through these at some point -- they may be removed from
883 # the RTM release in the /W4 set.
884 4456, 4457, 4458, 4459,
885 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000886 'msvs_settings': {
887 'VCCLCompilerTool': {
888 'MinimalRebuild': 'false',
889 'BufferSecurityCheck': 'true',
890 'EnableFunctionLevelLinking': 'true',
891 'RuntimeTypeInfo': 'false',
892 'WarningLevel': '3',
893 'WarnAsError': 'true',
894 'DebugInformationFormat': '3',
895 'Detect64BitPortabilityProblems': 'false',
896 'conditions': [
897 [ 'msvs_multi_core_compile', {
898 'AdditionalOptions': ['/MP'],
899 }],
900 ['component=="shared_library"', {
901 'ExceptionHandling': '1', # /EHsc
902 }, {
903 'ExceptionHandling': '0',
904 }],
905 ],
906 },
907 'VCLibrarianTool': {
908 'AdditionalOptions': ['/ignore:4221'],
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400909 'conditions': [
910 ['v8_target_arch=="x64"', {
911 'TargetMachine': '17', # x64
912 }, {
913 'TargetMachine': '1', # ia32
914 }],
915 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000916 },
917 'VCLinkerTool': {
918 'AdditionalDependencies': [
919 'ws2_32.lib',
920 ],
921 'GenerateDebugInformation': 'true',
922 'MapFileName': '$(OutDir)\\$(TargetName).map',
923 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
924 'FixedBaseAddress': '1',
925 # LinkIncremental values:
926 # 0 == default
927 # 1 == /INCREMENTAL:NO
928 # 2 == /INCREMENTAL
929 'LinkIncremental': '1',
930 # SubSystem values:
931 # 0 == not set
932 # 1 == /SUBSYSTEM:CONSOLE
933 # 2 == /SUBSYSTEM:WINDOWS
934 'SubSystem': '1',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000935
936 'conditions': [
937 ['v8_enable_i18n_support==1', {
938 'AdditionalDependencies': [
939 'advapi32.lib',
940 ],
941 }],
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400942 ['v8_target_arch=="x64"', {
943 'MinimumRequiredVersion': '5.02', # Server 2003.
944 'TargetMachine': '17', # x64
945 }, {
946 'MinimumRequiredVersion': '5.01', # XP.
947 'TargetMachine': '1', # ia32
948 }],
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000949 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000950 },
Ben Murdochc5610432016-08-08 18:44:38 +0100951 'conditions': [
952 ['clang==1', {
953 'VCCLCompilerTool': {
954 'AdditionalOptions': [
955 # Don't warn about unused function parameters.
956 # (This is also used on other platforms.)
957 '-Wno-unused-parameter',
958 # Don't warn about the "struct foo f = {0};" initialization
959 # pattern.
960 '-Wno-missing-field-initializers',
961
962 # Many files use intrinsics without including this header.
963 # TODO(hans): Fix those files, or move this to sub-GYPs.
964 '/FIIntrin.h',
965
966 # TODO(hans): Make this list shorter eventually, http://crbug.com/504657
967 '-Qunused-arguments', # http://crbug.com/504658
968 '-Wno-microsoft-enum-value', # http://crbug.com/505296
969 '-Wno-unknown-pragmas', # http://crbug.com/505314
970 '-Wno-microsoft-cast', # http://crbug.com/550065
971 ],
972 },
973 }],
974 ['clang==1 and MSVS_VERSION == "2013"', {
975 'VCCLCompilerTool': {
976 'AdditionalOptions': [
977 '-fmsc-version=1800',
978 ],
979 },
980 }],
981 ['clang==1 and MSVS_VERSION == "2015"', {
982 'VCCLCompilerTool': {
983 'AdditionalOptions': [
984 '-fmsc-version=1900',
985 ],
986 },
987 }],
988 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000989 },
990 },
991 }], # OS=="win"
992 ['OS=="mac"', {
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000993 'xcode_settings': {
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400994 'SDKROOT': 'macosx',
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000995 'SYMROOT': '<(DEPTH)/xcodebuild',
996 },
Ben Murdoch69a99ed2011-11-30 16:03:39 +0000997 'target_defaults': {
998 'xcode_settings': {
999 'ALWAYS_SEARCH_USER_PATHS': 'NO',
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001000 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001001 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1002 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1003 # (Equivalent to -fPIC)
1004 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1005 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1006 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
1007 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1008 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
1009 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1010 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001011 'GCC_WARN_NON_VIRTUAL_DESTRUCTOR': 'YES', # -Wnon-virtual-dtor
1012 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1013 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001014 'PREBINDING': 'NO', # No -Wl,-prebind
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001015 'SYMROOT': '<(DEPTH)/xcodebuild',
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001016 'USE_HEADERMAP': 'NO',
1017 'OTHER_CFLAGS': [
1018 '-fno-strict-aliasing',
1019 ],
1020 'WARNING_CFLAGS': [
1021 '-Wall',
1022 '-Wendif-labels',
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001023 '-Wno-unused-parameter',
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001024 # Don't warn about the "struct foo f = {0};" initialization pattern.
1025 '-Wno-missing-field-initializers',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001026 '-Wno-gnu-zero-variadic-macro-arguments',
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001027 ],
1028 },
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001029 'conditions': [
1030 ['werror==""', {
1031 'xcode_settings': {'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO'},
1032 }, {
1033 'xcode_settings': {'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES'},
1034 }],
1035 ['clang==1', {
1036 'xcode_settings': {
1037 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
Ben Murdochda12d292016-06-02 14:46:10 +01001038 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001039 },
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001040 'conditions': [
Ben Murdochc5610432016-08-08 18:44:38 +01001041 ['clang_xcode==0', {
1042 'xcode_settings': {
1043 'CC': '<(clang_dir)/bin/clang',
1044 'LDPLUSPLUS': '<(clang_dir)/bin/clang++',
1045 'CLANG_CXX_LIBRARY': 'libc++'
1046 },
1047 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001048 ['v8_target_arch=="x64" or v8_target_arch=="arm64" \
1049 or v8_target_arch=="mips64el"', {
1050 'xcode_settings': {'WARNING_CFLAGS': ['-Wshorten-64-to-32']},
1051 }],
1052 ],
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001053 }],
1054 ],
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001055 'target_conditions': [
1056 ['_type!="static_library"', {
1057 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1058 }],
1059 ], # target_conditions
1060 }, # target_defaults
1061 }], # OS=="mac"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001062 ['OS=="android"', {
1063 'target_defaults': {
1064 'defines': [
1065 'ANDROID',
1066 'V8_ANDROID_LOG_STDOUT',
1067 ],
1068 'configurations': {
1069 'Release': {
1070 'cflags': [
1071 '-fomit-frame-pointer',
1072 ],
1073 }, # Release
1074 }, # configurations
1075 'cflags': [ '-Wno-abi', '-Wall', '-W', '-Wno-unused-parameter'],
1076 'cflags_cc': [ '-Wnon-virtual-dtor', '-fno-rtti', '-fno-exceptions',
Ben Murdoch097c5b22016-05-18 11:27:45 +01001077 '-std=gnu++11' ],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001078 'target_conditions': [
1079 ['_toolset=="target"', {
1080 'cflags!': [
1081 '-pthread', # Not supported by Android toolchain.
1082 ],
1083 'cflags': [
1084 '-ffunction-sections',
1085 '-funwind-tables',
1086 '-fstack-protector',
1087 '-fno-short-enums',
1088 '-finline-limit=64',
1089 '-Wa,--noexecstack',
Ben Murdoch097c5b22016-05-18 11:27:45 +01001090 '--sysroot=<(android_sysroot)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001091 ],
1092 'cflags_cc': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001093 '-isystem<(android_libcpp_include)',
1094 '-isystem<(android_libcpp_abi_include)',
1095 '-isystem<(android_support_include)',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001096 ],
1097 'defines': [
1098 'ANDROID',
1099 #'__GNU_SOURCE=1', # Necessary for clone()
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001100 'HAVE_OFF64_T',
1101 'HAVE_SYS_UIO_H',
1102 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
1103 ],
1104 'ldflags!': [
1105 '-pthread', # Not supported by Android toolchain.
1106 ],
1107 'ldflags': [
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001108 '-Wl,--no-undefined',
Ben Murdoch097c5b22016-05-18 11:27:45 +01001109 '--sysroot=<(android_sysroot)',
1110 '-nostdlib',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001111 ],
1112 'libraries!': [
1113 '-lrt', # librt is built into Bionic.
1114 # Not supported by Android toolchain.
1115 # Where do these come from? Can't find references in
1116 # any Chromium gyp or gypi file. Maybe they come from
1117 # gyp itself?
1118 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
1119 ],
1120 'libraries': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001121 '-l<(android_libcpp_library)',
1122 '-latomic',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001123 # Manually link the libgcc.a that the cross compiler uses.
1124 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
1125 '-lc',
1126 '-ldl',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001127 '-lm',
1128 ],
1129 'conditions': [
1130 ['target_arch == "arm"', {
1131 'ldflags': [
1132 # Enable identical code folding to reduce size.
1133 '-Wl,--icf=safe',
1134 ],
1135 }],
1136 ['target_arch=="arm" and arm_version==7', {
1137 'cflags': [
1138 '-march=armv7-a',
1139 '-mtune=cortex-a8',
1140 '-mfpu=vfp3',
1141 ],
1142 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001143 '-L<(android_libcpp_libs)/armeabi-v7a',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001144 ],
1145 }],
1146 ['target_arch=="arm" and arm_version < 7', {
1147 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001148 '-L<(android_libcpp_libs)/armeabi',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001149 ],
1150 }],
1151 ['target_arch=="x64"', {
1152 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001153 '-L<(android_libcpp_libs)/x86_64',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001154 ],
1155 }],
1156 ['target_arch=="arm64"', {
1157 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001158 '-L<(android_libcpp_libs)/arm64-v8a',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001159 ],
1160 }],
1161 ['target_arch=="ia32" or target_arch=="x87"', {
1162 # The x86 toolchain currently has problems with stack-protector.
1163 'cflags!': [
1164 '-fstack-protector',
1165 ],
1166 'cflags': [
1167 '-fno-stack-protector',
1168 ],
1169 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001170 '-L<(android_libcpp_libs)/x86',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001171 ],
1172 }],
1173 ['target_arch=="mipsel"', {
1174 # The mips toolchain currently has problems with stack-protector.
1175 'cflags!': [
1176 '-fstack-protector',
1177 '-U__linux__'
1178 ],
1179 'cflags': [
1180 '-fno-stack-protector',
1181 ],
1182 'ldflags': [
Ben Murdoch097c5b22016-05-18 11:27:45 +01001183 '-L<(android_libcpp_libs)/mips',
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001184 ],
1185 }],
1186 ['(target_arch=="arm" or target_arch=="arm64" or target_arch=="x64" or target_arch=="ia32") and component!="shared_library"', {
1187 'cflags': [
1188 '-fPIE',
1189 ],
1190 'ldflags': [
1191 '-pie',
1192 ],
1193 }],
1194 ],
1195 'target_conditions': [
1196 ['_type=="executable"', {
1197 'conditions': [
1198 ['target_arch=="arm64" or target_arch=="x64"', {
1199 'ldflags': [
1200 '-Wl,-dynamic-linker,/system/bin/linker64',
1201 ],
1202 }, {
1203 'ldflags': [
1204 '-Wl,-dynamic-linker,/system/bin/linker',
1205 ],
1206 }]
1207 ],
1208 'ldflags': [
1209 '-Bdynamic',
1210 '-Wl,-z,nocopyreloc',
1211 # crtbegin_dynamic.o should be the last item in ldflags.
1212 '<(android_lib)/crtbegin_dynamic.o',
1213 ],
1214 'libraries': [
1215 # crtend_android.o needs to be the last item in libraries.
1216 # Do not add any libraries after this!
1217 '<(android_lib)/crtend_android.o',
1218 ],
1219 }],
1220 ['_type=="shared_library"', {
1221 'ldflags': [
1222 '-Wl,-shared,-Bsymbolic',
1223 '<(android_lib)/crtbegin_so.o',
1224 ],
1225 }],
1226 ['_type=="static_library"', {
1227 'ldflags': [
1228 # Don't export symbols from statically linked libraries.
1229 '-Wl,--exclude-libs=ALL',
1230 ],
1231 }],
1232 ],
1233 }], # _toolset=="target"
1234 # Settings for building host targets using the system toolchain.
1235 ['_toolset=="host"', {
1236 'cflags': [ '-pthread' ],
1237 'ldflags': [ '-pthread' ],
1238 'ldflags!': [
1239 '-Wl,-z,noexecstack',
1240 '-Wl,--gc-sections',
1241 '-Wl,-O1',
1242 '-Wl,--as-needed',
1243 ],
1244 }],
1245 ], # target_conditions
1246 }, # target_defaults
1247 }], # OS=="android"
1248 ['OS=="android" and clang==0', {
1249 # Hardcode the compiler names in the Makefile so that
1250 # it won't depend on the environment at make time.
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001251 'make_global_settings': [
Ben Murdochc5610432016-08-08 18:44:38 +01001252 ['LD', '<!(/bin/echo -n <(android_toolchain)/../*/bin/ld)'],
1253 ['RANLIB', '<!(/bin/echo -n <(android_toolchain)/../*/bin/ranlib)'],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001254 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
1255 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
Ben Murdochc5610432016-08-08 18:44:38 +01001256 ['LD.host', '<(host_ld)'],
1257 ['RANLIB.host', '<(host_ranlib)'],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001258 ['CC.host', '<(host_cc)'],
1259 ['CXX.host', '<(host_cxx)'],
1260 ],
1261 }],
1262 ['clang!=1 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"', {
1263 'make_global_settings': [
1264 ['CC.host', '<(clang_dir)/bin/clang'],
1265 ['CXX.host', '<(clang_dir)/bin/clang++'],
1266 ],
1267 }],
1268 ['clang==0 and host_clang==1 and target_arch!="ia32" and target_arch!="x64"', {
1269 'target_conditions': [
1270 ['_toolset=="host"', {
1271 'cflags_cc': [ '-std=gnu++11', ],
1272 }],
1273 ],
1274 'target_defaults': {
1275 'target_conditions': [
1276 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
1277 ],
1278 },
1279 }],
1280 ['clang==1 and "<(GENERATOR)"=="ninja"', {
1281 # See http://crbug.com/110262
1282 'target_defaults': {
1283 'cflags': [ '-fcolor-diagnostics' ],
1284 'xcode_settings': { 'OTHER_CFLAGS': [ '-fcolor-diagnostics' ] },
1285 },
1286 }],
1287 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1288 'and OS!="win" and "<(GENERATOR)"=="make"', {
1289 'make_global_settings': [
1290 ['CC', '<(clang_dir)/bin/clang'],
1291 ['CXX', '<(clang_dir)/bin/clang++'],
1292 ['CC.host', '$(CC)'],
1293 ['CXX.host', '$(CXX)'],
1294 ],
1295 }],
1296 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
1297 'and OS!="win" and "<(GENERATOR)"=="ninja"', {
1298 'make_global_settings': [
1299 ['CC', '<(clang_dir)/bin/clang'],
1300 ['CXX', '<(clang_dir)/bin/clang++'],
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001301 ['CC.host', '$(CC)'],
1302 ['CXX.host', '$(CXX)'],
1303 ],
1304 }],
1305 ['clang==1 and OS=="win"', {
1306 'make_global_settings': [
1307 # On Windows, gyp's ninja generator only looks at CC.
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001308 ['CC', '<(clang_dir)/bin/clang-cl'],
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001309 ],
1310 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001311 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and clang==0 and "<(GENERATOR)"=="ninja"', {
1312 # Set default ARM cross tools on linux. These can be overridden
1313 # using CC,CXX,CC.host and CXX.host environment variables.
1314 'make_global_settings': [
1315 ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
1316 ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
1317 ['CC.host', '<(host_cc)'],
1318 ['CXX.host', '<(host_cxx)'],
1319 ],
1320 }],
1321 # TODO(yyanagisawa): supports GENERATOR==make
1322 # make generator doesn't support CC_wrapper without CC
1323 # in make_global_settings yet.
1324 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
Ben Murdochda12d292016-06-02 14:46:10 +01001325 'conditions': [
1326 ['coverage==1', {
1327 # Wrap goma with coverage wrapper.
1328 'make_global_settings': [
Ben Murdochc5610432016-08-08 18:44:38 +01001329 ['CC_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
1330 ['CXX_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
1331 ['CC.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
1332 ['CXX.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py <(gomadir)/gomacc'],
Ben Murdochda12d292016-06-02 14:46:10 +01001333 ],
1334 }, {
1335 # Use only goma wrapper.
1336 'make_global_settings': [
1337 ['CC_wrapper', '<(gomadir)/gomacc'],
1338 ['CXX_wrapper', '<(gomadir)/gomacc'],
1339 ['CC.host_wrapper', '<(gomadir)/gomacc'],
1340 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
1341 ],
1342 }],
1343 ],
1344 }, {
1345 'conditions': [
1346 ['coverage==1', {
1347 # Use only coverage wrapper.
1348 'make_global_settings': [
Ben Murdochc5610432016-08-08 18:44:38 +01001349 ['CC_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
1350 ['CXX_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
1351 ['CC.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
1352 ['CXX.host_wrapper', '<(base_dir)/gypfiles/coverage_wrapper.py'],
Ben Murdochda12d292016-06-02 14:46:10 +01001353 ],
1354 }],
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001355 ],
1356 }],
1357 ['use_lto==1', {
1358 'target_defaults': {
1359 'target_conditions': [
1360 ['_toolset=="target"', {
1361 'cflags': [
1362 '-flto',
1363 ],
1364 }],
1365 ],
1366 },
1367 }],
1368 ['use_lto==1 and clang==0', {
1369 'target_defaults': {
1370 'target_conditions': [
1371 ['_toolset=="target"', {
1372 'cflags': [
1373 '-ffat-lto-objects',
1374 ],
1375 }],
1376 ],
1377 },
1378 }],
1379 ['use_lto==1 and clang==1', {
1380 'target_defaults': {
1381 'target_conditions': [
1382 ['_toolset=="target"', {
1383 'arflags': [
1384 '--plugin', '<(clang_dir)/lib/LLVMgold.so',
1385 ],
1386 # Apply a lower optimization level with lto. Chromium does this
1387 # for non-official builds only - a differentiation that doesn't
1388 # exist in v8.
1389 'ldflags': [
1390 '-Wl,--plugin-opt,O1',
1391 ],
1392 }],
1393 ],
1394 },
1395 }],
1396 ['use_lto==1 and clang==0', {
1397 'target_defaults': {
1398 'target_conditions': [
1399 ['_toolset=="target"', {
1400 'ldflags': [
1401 '-flto=32',
1402 ],
1403 }],
1404 ],
1405 },
1406 }],
1407 ['use_lto==1 and clang==1', {
1408 'target_defaults': {
1409 'target_conditions': [
1410 ['_toolset=="target"', {
1411 'ldflags': [
1412 '-flto',
1413 ],
1414 }],
1415 ],
1416 },
1417 }],
1418 ['cfi_diag==1', {
1419 'target_defaults': {
1420 'target_conditions': [
1421 ['_toolset=="target"', {
1422 'cflags': [
1423 '-fno-sanitize-trap=cfi',
1424 '-fno-sanitize-recover=cfi',
1425 ],
1426 'cflags_cc!': [
1427 '-fno-rtti',
1428 ],
1429 'cflags!': [
1430 '-fno-rtti',
1431 ],
1432 'ldflags': [
1433 '-fno-sanitize-trap=cfi',
1434 '-fno-sanitize-recover=cfi',
1435 ],
1436 }],
1437 ],
1438 },
1439 }],
1440 ['cfi_vptr==1', {
1441 'target_defaults': {
1442 'target_conditions': [
1443 ['_toolset=="target"', {
1444 'cflags': [
1445 '-fsanitize=cfi-vcall',
1446 '-fsanitize=cfi-derived-cast',
1447 '-fsanitize=cfi-unrelated-cast',
1448 '-fsanitize-blacklist=<(cfi_blacklist)',
1449 ],
1450 'ldflags': [
1451 '-fsanitize=cfi-vcall',
1452 '-fsanitize=cfi-derived-cast',
1453 '-fsanitize=cfi-unrelated-cast',
1454 ],
1455 }],
1456 ],
1457 },
1458 }],
Ben Murdoch69a99ed2011-11-30 16:03:39 +00001459 ],
1460}