blob: 1bd4d51e2e0f4f6172dcbf7c8fb6b50647835240 [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
[email protected]8796d922012-08-07 01:23:1120 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
23
24 # Whether or not we are using the Aura windowing framework.
25 'use_aura%': 0,
26
27 # Whether or not we are building the Ash shell.
28 'use_ash%': 0,
[email protected]c335f4802013-04-06 04:51:2129
[email protected]2a76009b2013-08-07 21:02:3130 # Whether or not we are using CRAS, the ChromeOS Audio Server.
31 'use_cras%': 0,
32
[email protected]ff78e4e2013-05-03 19:19:1533 # Use a raw surface abstraction.
34 'use_ozone%': 0,
[email protected]02968b82013-11-14 02:42:4335
36 # Configure the build for small devices. See crbug.com/318413
37 'embedded%': 0,
[email protected]8796d922012-08-07 01:23:1138 },
39 # Copy conditionally-set variables out one scope.
40 'chromeos%': '<(chromeos)',
41 'use_aura%': '<(use_aura)',
42 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:3143 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:1544 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:4345 'embedded%': '<(embedded)',
[email protected]e72e55b2011-01-06 22:19:3046
[email protected]3fa441d2011-09-18 17:28:5047 # Whether we are using Views Toolkit
48 'toolkit_views%': 0,
49
[email protected]e0b85a52011-10-06 03:30:4250 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
51 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2752
[email protected]7ddea9802012-02-22 23:08:0553 # Disable viewport meta tag by default.
54 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2455
56 # Enable HiDPI support.
57 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4058
[email protected]f1f362b42012-05-15 17:46:5859 # Override buildtype to select the desired build flavor.
60 # Dev - everyday build for development/testing
61 # Official - release build (generally implies additional processing)
62 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
63 # conversion is done), some of the things which are now controlled by
64 # 'branding', such as symbol generation, will need to be refactored
65 # based on 'buildtype' (i.e. we don't care about saving symbols for
66 # non-Official # builds).
67 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1168
[email protected]e2aaaac2013-05-08 07:20:0969 # Override branding to select the desired branding flavor.
70 'branding%': 'Chromium',
71
[email protected]8796d922012-08-07 01:23:1172 'conditions': [
[email protected]2d0505202013-09-16 00:22:5273 # ChromeOS and Windows use Aura and Ash.
74 ['chromeos==1 or OS=="win"', {
[email protected]8796d922012-08-07 01:23:1175 'use_ash%': 1,
[email protected]978a2ae2013-09-13 04:28:0176 'use_aura%': 1,
[email protected]8796d922012-08-07 01:23:1177 }],
[email protected]020648aa2013-06-08 17:16:4778
[email protected]02968b82013-11-14 02:42:4379 # Ozone uses Aura.
80 ['use_ozone==1', {
81 'use_aura%': 1,
82 }],
83
[email protected]a7a78c242014-01-21 20:02:5184 # ToT Linux should be aura.
85 #
86 # TODO(erg): Merge this into the previous block once compiling with
87 # aura safely implies including ash capabilities.
88 ['OS=="linux"', {
89 'use_aura%': 1,
90 }],
91
[email protected]7ed44342013-09-30 08:36:1392 # Whether we're a traditional desktop unix.
93 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
94 'desktop_linux%': 1,
95 }, {
96 'desktop_linux%': 0,
97 }],
98
[email protected]94cdbf42012-12-11 19:49:2299 # Compute the architecture that we're building on.
100 ['OS=="win" or OS=="mac" or OS=="ios"', {
101 'host_arch%': 'ia32',
102 }, {
[email protected]25a967e2014-01-31 17:23:56103 'host_arch%': '<!(python <(DEPTH)/build/linux/detect_host_arch.py)',
[email protected]94cdbf42012-12-11 19:49:22104 }],
[email protected]02968b82013-11-14 02:42:43105
106 # Embedded implies ozone.
107 ['embedded==1', {
108 'use_ozone%': 1,
109 }],
[email protected]e71a3622013-12-04 07:32:41110
[email protected]5be60002014-01-13 21:27:42111 ['embedded==1', {
112 'use_system_fontconfig%': 0,
113 }, {
114 'use_system_fontconfig%': 1,
115 }],
[email protected]8796d922012-08-07 01:23:11116 ],
[email protected]bb6aba32011-01-07 19:04:43117 },
118 # Copy conditionally-set variables out one scope.
119 'chromeos%': '<(chromeos)',
[email protected]7ed44342013-09-30 08:36:13120 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58121 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16122 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31123 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15124 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:43125 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42126 'use_openssl%': '<(use_openssl)',
[email protected]5be60002014-01-13 21:27:42127 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]7ddea9802012-02-22 23:08:05128 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24129 'enable_hidpi%': '<(enable_hidpi)',
[email protected]f1f362b42012-05-15 17:46:58130 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09131 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22132 'host_arch%': '<(host_arch)',
133
134 # Default architecture we're building for is the architecture we're
[email protected]ce2cad72014-02-13 18:17:35135 # building on, and possibly sub-architecture (for iOS builds).
[email protected]94cdbf42012-12-11 19:49:22136 'target_arch%': '<(host_arch)',
[email protected]ce2cad72014-02-13 18:17:35137 'target_subarch%': '',
[email protected]f1f362b42012-05-15 17:46:58138
[email protected]d999c3cb2013-03-12 10:22:36139 # This is set when building the Android WebView inside the Android
140 # build system, using the 'android' gyp backend. The WebView code is
141 # still built when this is unset, but builds using the normal chromium
142 # build system.
143 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53144
[email protected]7d6763422013-04-26 12:06:54145 # Set ARM architecture version.
146 'arm_version%': 7,
147
[email protected]89dcd662013-12-12 23:06:50148 # Use aurax11 for clipboard implementation. This is true on linux_aura.
149 'use_clipboard_aurax11%': 0,
150
[email protected]e71a3622013-12-04 07:32:41151 # goma settings.
152 # 1 to use goma.
153 # If no gomadir is set, it uses the default gomadir.
154 'use_goma%': 0,
155 'gomadir%': '',
156
[email protected]e72e55b2011-01-06 22:19:30157 'conditions': [
[email protected]2c858a82013-10-05 01:01:32158 # Ash needs Aura.
159 ['use_aura==0', {
160 'use_ash%': 0,
161 }],
162
[email protected]ab2017e2012-02-07 01:54:50163 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35164 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43165 'toolkit_views%': 1,
166 }, {
167 'toolkit_views%': 0,
168 }],
[email protected]1efbaaa2012-04-24 02:43:24169
[email protected]02968b82013-11-14 02:42:43170 # Embedded builds use aura without ash or views.
171 ['embedded==1', {
172 'use_aura%': 1,
173 'use_ash%': 0,
174 'toolkit_views%': 0,
175 }],
176
[email protected]8796d922012-08-07 01:23:11177 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]7ed44342013-09-30 08:36:13178 ['desktop_linux==1 and use_aura==0 and use_ozone==0', {
[email protected]8796d922012-08-07 01:23:11179 'toolkit_uses_gtk%': 1,
180 }, {
181 'toolkit_uses_gtk%': 0,
182 }],
183
[email protected]3aa8a682012-08-11 00:04:29184 # Enable HiDPI on Mac OS and Chrome OS.
185 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24186 'enable_hidpi%': 1,
187 }],
[email protected]219c7312012-05-10 20:32:40188
[email protected]7ed44342013-09-30 08:36:13189 # Enable App Launcher on ChromeOS, Windows and OSX.
190 # On Linux, enable App Launcher for the Aura build.
191 ['use_ash==1 or OS=="win" or OS=="mac" or (desktop_linux==1 and use_aura==1)', {
[email protected]dc4e8b82012-11-15 03:58:16192 'enable_app_list%': 1,
193 }, {
194 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09195 }],
196
[email protected]cb800562012-11-20 22:36:07197 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26198 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07199 }, {
200 'use_default_render_theme%': 0,
201 }],
[email protected]02968b82013-11-14 02:42:43202
203 ['use_ozone==1', {
204 'use_ozone_evdev%': 1,
205 }, {
206 'use_ozone_evdev%': 0,
[email protected]e71a3622013-12-04 07:32:41207 }],
208
209 # Set default gomadir.
210 ['OS=="win"', {
211 'gomadir': 'c:\\goma\\goma-win',
[email protected]91b91292014-01-18 23:54:41212 }, {
[email protected]e71a3622013-12-04 07:32:41213 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
214 }],
[email protected]ce2cad72014-02-13 18:17:35215
216 # Set the default "target_subarch" on iOS. Valid values are "arm32",
217 # "arm64" and "both" (meaning a fat binary).
218 #
219 # TODO(sdefresne): change the default from "arm32" to "both" for
220 # "target_subarch" once http://crbug.com/339477 is fixed.
221 #
222 # TODO(sdefresne): set the "target_arch" to "arm" once compilation
223 # of skia has been fixed for simulator. http://crbug.com/342377
224 ['OS=="ios"', {
225 'target_subarch%': 'arm32',
226 }],
[email protected]e72e55b2011-01-06 22:19:30227 ],
228 },
229
230 # Copy conditionally-set variables out one scope.
231 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30232 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22233 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:35234 'target_subarch%': '<(target_subarch)',
[email protected]bb6aba32011-01-07 19:04:43235 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11236 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]d628ab412013-09-07 03:26:37237 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58238 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16239 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31240 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15241 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:48242 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:50243 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]02968b82013-11-14 02:42:43244 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42245 'use_openssl%': '<(use_openssl)',
[email protected]5be60002014-01-13 21:27:42246 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]7ddea9802012-02-22 23:08:05247 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24248 'enable_hidpi%': '<(enable_hidpi)',
[email protected]d999c3cb2013-03-12 10:22:36249 'android_webview_build%': '<(android_webview_build)',
[email protected]e71a3622013-12-04 07:32:41250 'use_goma%': '<(use_goma)',
251 'gomadir%': '<(gomadir)',
[email protected]dc4e8b82012-11-15 03:58:16252 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07253 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22254 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09255 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54256 'arm_version%': '<(arm_version)',
[email protected]e14a9f92009-08-05 19:26:07257
[email protected]c86fd472013-04-02 19:42:30258 # Set to 1 to enable fast builds. Set to 2 for even faster builds
259 # (it disables debug info for fastest compilation - only for use
260 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30261 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49262
[email protected]20960e072011-09-20 20:59:01263 # Set to 1 to enable dcheck in release without having to use the flag.
264 'dcheck_always_on%': 0,
265
[email protected]65b0819e2013-06-21 15:24:00266 # Set to 1 to make a build that logs like an official build, but is not
267 # necessarily an official build, ie DCHECK and DLOG are disabled and
268 # removed completely in release builds, to minimize binary footprint.
269 # Note: this setting is ignored if buildtype=="Official".
270 'logging_like_official_build%': 0,
271
[email protected]a1e87422013-07-09 21:47:01272 # Set to 1 to make a build that disables unshipped tracing events.
273 # Note: this setting is ignored if buildtype=="Official".
274 'tracing_like_official_build%': 0,
275
[email protected]77a848262013-02-22 11:17:25276 # Disable image loader component extension by default.
277 'image_loader_extension%': 0,
278
[email protected]e72e55b2011-01-06 22:19:30279 # Python version.
[email protected]a43c5a02011-05-27 06:54:51280 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17281
[email protected]7d6763422013-04-26 12:06:54282 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30283 'arm_neon%': 1,
284
[email protected]7d6763422013-04-26 12:06:54285 # Detect NEON support at run-time.
286 'arm_neon_optional%': 0,
287
[email protected]e72e55b2011-01-06 22:19:30288 # The system root for cross-compiles. Default: none.
289 'sysroot%': '',
[email protected]a23d7142014-02-14 16:58:45290 'chroot_cmd%': '',
[email protected]e72e55b2011-01-06 22:19:30291
[email protected]945361a2011-09-30 04:38:43292 # The system libdir used for this ABI.
293 'system_libdir%': 'lib',
294
[email protected]e72e55b2011-01-06 22:19:30295 # On Linux, we build with sse2 for Chromium builds.
296 'disable_sse2%': 0,
297
298 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03299 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30300
[email protected]d9113542012-07-18 17:11:28301 # Use system libjpeg. Note that the system's libjepg will be used even if
302 # use_libjpeg_turbo is set.
303 'use_system_libjpeg%': 0,
304
[email protected]aa5e01fc2013-03-06 14:06:17305 # By default, component is set to static_library and it can be overriden
306 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53307 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30308
[email protected]bb6aba32011-01-07 19:04:43309 # Set to select the Title Case versions of strings in GRD files.
310 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21311
[email protected]98da0042011-02-02 00:10:27312 # Use translations provided by volunteers at launchpad.net. This
313 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19314 'use_third_party_translations%': 0,
315
[email protected]9a425422011-01-11 00:53:18316 # Remoting compilation is enabled by default. Set to 0 to disable.
317 'remoting%': 1,
318
[email protected]1ec68c42011-06-01 13:56:25319 # Configuration policy is enabled by default. Set to 0 to disable.
320 'configuration_policy%': 1,
321
[email protected]6c521fed2012-11-29 17:00:03322 # Variable safe_browsing is used to control the build time configuration
323 # for safe browsing feature. Safe browsing can be compiled in 3 different
324 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
325 # reporting features without enabling phishing and malware detection. This
326 # is useful to integrate a third party phishing/malware detection to
327 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56328 'safe_browsing%': 1,
329
[email protected]9eb100e2011-10-14 05:08:22330 # Speech input is compiled in by default. Set to 0 to disable.
331 'input_speech%': 1,
332
[email protected]7cce3232011-10-28 10:41:57333 # Notifications are compiled in by default. Set to 0 to disable.
334 'notifications%' : 1,
335
[email protected]970fd4e2012-12-19 11:09:37336 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
337 # regular builds and 1 for ASan builds.
338 'mac_want_real_dsym%': 'default',
339
[email protected]5d451ad2011-02-11 16:43:46340 # If this is set, the clang plugins used on the buildbot will be used.
341 # Run tools/clang/scripts/update.sh to make sure they are compiled.
342 # This causes 'clang_chrome_plugins_flags' to be set.
343 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08344 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46345
[email protected]2e82fa52012-11-27 23:41:44346 # Enable building with ASAN (Clang's -fsanitize=address option).
347 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06348 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
349 'asan%': 0,
[email protected]544a18ed2014-01-17 21:01:36350 # Enable coverage gathering instrumentation in ASan. This flag also
351 # controls coverage granularity (experimental).
[email protected]20a127f2014-01-16 03:25:03352 'asan_coverage%': 0,
[email protected]92799b632011-08-15 14:33:06353
[email protected]1612e552014-02-15 04:49:18354 # Enable building with SyzyAsan.
355 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
356 'syzyasan%': 0,
357
[email protected]062522a2013-06-13 15:49:55358 # Enable building with LSan (Clang's -fsanitize=leak option).
359 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
360 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
361 'lsan%': 0,
362
[email protected]927a9d672012-11-09 11:28:20363 # Enable building with TSAN (Clang's -fsanitize=thread option).
364 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12365 # See http://clang.llvm.org/docs/ThreadSanitizer.html
366 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16367 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12368
[email protected]a10ddd2d2013-02-26 20:06:59369 # Enable building with MSAN (Clang's -fsanitize=memory option).
370 # MemorySanitizer only works with clang, but msan=1 implies clang=1
371 # See http://clang.llvm.org/docs/MemorySanitizer.html
372 'msan%': 0,
[email protected]190d4ce62014-01-17 20:24:53373 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
[email protected]a10ddd2d2013-02-26 20:06:59374
[email protected]c8103a42013-11-12 13:41:30375 # Use the dynamic libraries instrumented by one of the sanitizers
376 # instead of the standard system libraries.
377 'use_instrumented_libraries%': 0,
378
[email protected]22b3f531e2013-12-20 13:07:28379 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
380 # stdlibc++ as standard library. This is intended to use for instrumented
381 # builds.
382 'use_custom_libcxx%': 0,
383
[email protected]7ce58b22012-09-26 05:17:25384 # Use a modified version of Clang to intercept allocated types and sizes
385 # for allocated objects. clang_type_profiler=1 implies clang=1.
386 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
387 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
388 'clang_type_profiler%': 0,
389
[email protected]8a6abd12012-05-16 10:04:44390 # Set to true to instrument the code with function call logger.
391 # See src/third_party/cygprofile/cyg-profile.cc for details.
392 'order_profiling%': 0,
393
[email protected]00b0a7f2012-01-25 15:30:46394 # Use the provided profiled order file to link Chrome image with it.
395 # This makes Chrome faster by better using CPU cache when executing code.
396 # This is known as PGO (profile guided optimization).
397 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
398 'order_text_section%' : "",
399
[email protected]1ad5a7b2011-06-24 03:15:13400 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
401 # libraries on linux x86-64 and arm, plus ASLR.
402 'linux_fpic%': 1,
403
[email protected]bd7b6fe2012-03-05 21:02:40404 # Whether one-click signin is enabled or not.
405 'enable_one_click_signin%': 0,
406
[email protected]6a3cd37e2012-04-17 17:13:34407 # Enable Chrome browser extensions
408 'enable_extensions%': 1,
409
[email protected]658677f2012-06-09 06:04:02410 # Enable browser automation.
411 'enable_automation%': 1,
412
[email protected]6ee43a72012-12-07 22:44:40413 # Enable Google Now.
414 'enable_google_now%': 1,
415
[email protected]1e54c1c2013-08-12 17:16:05416 # Enable printing support and UI. This variable is used to configure
417 # which parts of printing will be built. 0 disables printing completely,
418 # 1 enables it fully, and 2 enables only the codepath to generate a
419 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
420 # print, UI, etc.
[email protected]658677f2012-06-09 06:04:02421 'enable_printing%': 1,
422
[email protected]3b5e88d2013-09-06 11:03:06423 # Set the version of CLD.
424 # 0: Don't specify the version. This option is for the Finch testing.
425 # 1: Use only CLD1.
426 # 2: Use only CLD2.
[email protected]d8ef2362013-10-22 02:10:00427 'cld_version%': 2,
[email protected]3b5e88d2013-09-06 11:03:06428
[email protected]c6ce08072013-07-31 07:48:53429 # Enable spell checker.
430 'enable_spellcheck%': 1,
431
[email protected]dda90ae2011-07-19 22:07:48432 # Webrtc compilation is enabled by default. Set to 0 to disable.
433 'enable_webrtc%': 1,
434
[email protected]cdb756ef2012-04-05 18:34:53435 # Enables use of the session service, which is enabled by default.
436 # Support for disabling depends on the platform.
437 'enable_session_service%': 1,
438
[email protected]6b40bb582012-03-15 20:50:38439 # Enables theme support, which is enabled by default. Support for
440 # disabling depends on the platform.
441 'enable_themes%': 1,
442
[email protected]57e67ac2013-02-22 03:37:22443 # Enables autofill dialog and associated features; disabled by default.
444 'enable_autofill_dialog%' : 0,
445
[email protected]0acdd772012-04-05 22:53:00446 # Enables support for background apps.
447 'enable_background%': 1,
448
[email protected]44879ed2012-04-06 01:11:02449 # Enable the task manager by default.
450 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45451
[email protected]9bfe0ab2012-08-30 13:18:11452 # Enable FTP support by default.
453 'disable_ftp_support%': 0,
454
[email protected]ef4cb642013-09-14 22:48:02455 # XInput2 multitouch support is enabled by default (use_xi2_mt=2).
456 # Setting to zero value disables XI2 MT. When XI2 MT is enabled,
[email protected]22d6dd72012-05-15 07:29:55457 # the input value also defines the required XI2 minor minimum version.
458 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
[email protected]ef4cb642013-09-14 22:48:02459 'use_xi2_mt%': 2,
[email protected]22d6dd72012-05-15 07:29:55460
[email protected]9061bee82012-01-16 11:45:17461 # Use of precompiled headers on Windows.
462 #
[email protected]9061bee82012-01-16 11:45:17463 # This variable may be explicitly set to 1 (enabled) or 0
464 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
465 # This setting will override the default.
466 #
[email protected]c3340fb32012-12-20 20:45:39467 # See
[email protected]9061bee82012-01-16 11:45:17468 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
469 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16470 'chromium_win_pch%': 0,
471
[email protected]3bb37e62012-04-19 03:40:08472 # Set this to true when building with Clang.
473 # See http://code.google.com/p/chromium/wiki/Clang for details.
474 'clang%': 0,
475
[email protected]18e0f39b2012-01-17 16:47:34476 # Enable plug-in installation by default.
477 'enable_plugin_installation%': 1,
478
[email protected]6d17f6392012-12-05 05:24:54479 # Enable PPAPI and NPAPI by default.
480 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
481 # as PPAPI; see crbug.com/162667.
482 'enable_plugins%': 1,
483
[email protected]62424a52012-03-18 03:09:50484 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42485 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35486 # Chrome UI.
487 # TODO(asvitkine): Enable this on all platforms and delete this flag.
488 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50489 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35490
[email protected]a9318c72012-03-01 01:29:47491 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
492 # with one of those tools.
493 'build_for_tool%': '',
494
[email protected]37138132013-01-17 23:08:52495 # If no directory is specified then a temporary directory will be used.
496 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47497 # True if isolate should fail if the isolate files refer to files
498 # that are missing.
499 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56500
[email protected]740ebed2012-06-27 19:14:06501 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12502 'wix_path%': '<(DEPTH)/third_party/wix',
503
[email protected]0850e842013-01-19 03:44:31504 # Managed users are enabled by default.
505 'enable_managed_users%': 1,
506
[email protected]1591c44d2013-07-15 13:28:43507 # Platform natively supports discardable memory.
508 'native_discardable_memory%': 0,
509
510 # Platform sends memory pressure signals natively.
511 'native_memory_pressure_signals%': 0,
512
[email protected]3f0ed2172013-11-04 20:27:29513 'data_reduction_fallback_host%' : '',
[email protected]324856d2014-01-14 11:17:30514 'data_reduction_dev_host%' : '',
[email protected]199def22013-02-21 17:52:29515 'spdy_proxy_auth_origin%' : '',
516 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25517 'spdy_proxy_auth_value%' : '',
[email protected]d8dd60e2013-10-08 00:49:43518 'data_reduction_proxy_probe_url%' : '',
[email protected]5e131c9f2013-07-10 19:21:05519 'enable_mdns%' : 0,
[email protected]b9171622013-10-01 22:05:23520 'enable_enhanced_bookmarks%': 0,
[email protected]754a2002014-02-14 16:40:34521 'enable_hangout_services_extension%': 0,
[email protected]199def22013-02-21 17:52:29522
[email protected]bb6aba32011-01-07 19:04:43523 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34524 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37525 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34526 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37527 }, {
528 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34529 }],
530
[email protected]df9167b2011-11-14 19:15:25531 # A flag for BSD platforms
532 ['OS=="freebsd" or OS=="openbsd"', {
533 'os_bsd%': 1,
534 }, {
535 'os_bsd%': 0,
536 }],
537
[email protected]c329adf82011-10-05 14:34:57538 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42539 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57540 'use_nss%': 1,
541 }, {
542 'use_nss%': 0,
543 }],
[email protected]e0b85a52011-10-06 03:30:42544
[email protected]49513e02013-11-20 08:36:40545 # libudev usage. This currently only affects the content layer.
[email protected]048ab5f2013-11-22 01:42:47546 ['OS=="linux" and embedded==0', {
[email protected]49513e02013-11-20 08:36:40547 'use_udev%': 1,
548 }, {
549 'use_udev%': 0,
550 }],
551
[email protected]c335f4802013-04-06 04:51:21552 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54553 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34554 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37555 }, {
[email protected]c49ab0c2011-05-18 17:25:37556 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34557 }],
[email protected]9a8175892012-03-20 02:11:58558
[email protected]02968b82013-11-14 02:42:43559 # Flags to use glib.
[email protected]b132edd2013-11-22 23:21:55560 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
[email protected]c335f4802013-04-06 04:51:21561 'use_glib%': 0,
562 }, {
563 'use_glib%': 1,
[email protected]02968b82013-11-14 02:42:43564 }],
565
[email protected]928362a2013-11-19 20:17:16566 # Flags to use pango and cairo.
[email protected]02968b82013-11-14 02:42:43567 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
568 'use_pango%': 0,
[email protected]928362a2013-11-19 20:17:16569 'use_cairo%': 0,
[email protected]02968b82013-11-14 02:42:43570 }, {
[email protected]26bade892013-05-23 21:44:15571 'use_pango%': 1,
[email protected]928362a2013-11-19 20:17:16572 'use_cairo%': 1,
[email protected]c335f4802013-04-06 04:51:21573 }],
574
[email protected]61955d92013-11-13 20:44:52575 # DBus usage.
[email protected]02968b82013-11-14 02:42:43576 ['OS=="linux" and embedded==0', {
[email protected]61955d92013-11-13 20:44:52577 'use_dbus%': 1,
578 }, {
579 'use_dbus%': 0,
580 }],
581
[email protected]efadeacf2011-10-27 19:01:00582 # We always use skia text rendering in Aura on Windows, since GDI
583 # doesn't agree with our BackingStore.
584 # TODO(beng): remove once skia text rendering is on by default.
585 ['use_aura==1 and OS=="win"', {
586 'enable_skia_text%': 1,
587 }],
[email protected]9edeb712011-09-20 21:20:33588
[email protected]63692212010-09-16 00:22:21589 # A flag to enable or disable our compile-time dependency
590 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
591 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49592 # for Linux distributions and for Aura.
[email protected]556975ce2013-11-15 22:00:22593 ['OS!="linux" or chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21594 'use_gnome_keyring%': 0,
595 }, {
596 'use_gnome_keyring%': 1,
597 }],
[email protected]0afe5212010-10-01 18:56:11598
[email protected]8796d922012-08-07 01:23:11599 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20600 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43601 'use_titlecase_in_grd_files%': 1,
602 }],
603
[email protected]ff9300872014-01-22 11:09:32604 # Enable loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06605 ['chromeos==1', {
[email protected]77a848262013-02-22 11:17:25606 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50607 }, {
[email protected]77a848262013-02-22 11:17:25608 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51609 }],
[email protected]7de46352011-09-12 15:39:19610
[email protected]c79d1972013-02-06 18:47:29611 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01612 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51613 }],
614
[email protected]da1c8d692011-09-20 20:35:01615 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49616 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46617 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40618 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06619 'cld_version%': 1,
[email protected]c6ce08072013-07-31 07:48:53620 'enable_spellcheck%': 0,
[email protected]55e02302012-08-21 00:50:46621 'enable_themes%': 0,
[email protected]48de0fc2012-08-02 11:03:58622 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54623 'arm_neon%': 0,
624 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43625 'native_discardable_memory%': 1,
626 'native_memory_pressure_signals%': 1,
[email protected]b25f0032013-08-19 22:26:25627 'enable_printing%': 2,
[email protected]25b8cb32014-01-30 11:04:29628 'enable_task_manager%':0,
[email protected]335b6872014-02-13 20:14:13629 # Set to 1 once we have a notification system for Android.
630 # http://crbug.com/115320
631 'notifications%': 0,
[email protected]b25f0032013-08-19 22:26:25632 }],
[email protected]b25f0032013-08-19 22:26:25633
[email protected]0d841b7d2013-08-20 20:22:22634 # Android OS includes support for proprietary codecs regardless of
635 # building Chromium or Google Chrome. We also ship Google Chrome with
636 # proprietary codecs.
637 ['OS=="android" or branding=="Chrome"', {
638 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41639 }, {
640 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22641 }],
642
[email protected]85f29582013-12-16 18:02:04643 ['OS=="mac" or OS=="ios"', {
[email protected]cef6c76f2013-10-30 16:33:30644 'native_discardable_memory%': 1,
645 'native_memory_pressure_signals%': 1,
646 }],
647
[email protected]8f5999e2013-08-10 18:27:05648 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
649 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22650 'enable_autofill_dialog%': 1
651 }],
652
[email protected]d999c3cb2013-03-12 10:22:36653 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43654 'enable_webrtc%': 1,
655 }],
656
657 # Disable WebRTC for building WebView as part of Android system.
658 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
659 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36660 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43661 'enable_webrtc%': 0,
662 }],
663
[email protected]0d16f292012-07-02 22:10:48664 ['OS=="ios"', {
[email protected]9bfe0ab2012-08-30 13:18:11665 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24666 'enable_automation%': 0,
667 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40668 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06669 'cld_version%': 1,
[email protected]c4ac4d12012-09-12 12:02:24670 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44671 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24672 'enable_themes%': 0,
673 'enable_webrtc%': 0,
674 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48675 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44676 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31677 'enable_managed_users%': 0,
[email protected]25b8cb32014-01-30 11:04:29678 'enable_task_manager%': 0,
[email protected]0d16f292012-07-02 22:10:48679 }],
680
[email protected]839d5172011-10-13 17:18:11681 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27682 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01683 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33684 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11685 }, {
[email protected]1ee7c56c2011-10-19 14:51:33686 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11687 }],
[email protected]9061bee82012-01-16 11:45:17688
[email protected]c3340fb32012-12-20 20:45:39689 # Turn precompiled headers on by default.
690 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17691 'chromium_win_pch%': 1
692 }],
[email protected]18e0f39b2012-01-17 16:47:34693
[email protected]deb8b3cd2013-05-07 19:52:10694 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34695 'enable_plugin_installation%': 0,
696 }, {
697 'enable_plugin_installation%': 1,
698 }],
[email protected]b07806c12012-02-03 22:44:59699
[email protected]693f63c2014-01-17 06:52:19700 ['OS=="android" or OS=="ios" or embedded==1', {
[email protected]6d17f6392012-12-05 05:24:54701 'enable_plugins%': 0,
702 }, {
703 'enable_plugins%': 1,
704 }],
705
[email protected]8d726a42012-02-09 03:49:00706 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56707 # third_party/gold. Gold is not used for 32-bit linux builds
708 # as it runs out of address space.
709 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51710 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17711 }, {
[email protected]bd68ea52013-03-26 09:49:37712 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34713 }],
714
715 # linux_use_gold_flags: whether to use build flags that rely on gold.
716 # On by default for x64 Linux. Temporarily off for ChromeOS as
717 # it failed on a buildbot.
718 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
719 'linux_use_gold_flags%': 1,
720 }, {
[email protected]8d726a42012-02-09 03:49:00721 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59722 }],
[email protected]2e22e2f2012-03-15 21:53:10723
[email protected]a95d5302012-11-03 00:02:19724 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32725 'enable_captive_portal_detection%': 0,
726 }, {
727 'enable_captive_portal_detection%': 1,
728 }],
729
[email protected]3bd47e022012-03-22 04:19:12730 # Enable Skia UI text drawing incrementally on different platforms.
731 # http://crbug.com/105550
732 #
733 # On Aura, this allows per-tile painting to be used in the browser
734 # compositor.
[email protected]04b67b62013-09-14 01:32:17735 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12736 'use_canvas_skia%': 1,
737 }],
[email protected]adb44342012-07-23 13:36:12738
[email protected]0753ea42012-08-30 20:15:44739 ['chromeos==1', {
740 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
741 'use_libjpeg_turbo%': 0,
742 }],
743
[email protected]adb44342012-07-23 13:36:12744 ['OS=="android"', {
745 # When building as part of the Android system, use system libraries
746 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36747 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12748 }],
[email protected]8a46f5f2012-12-05 00:47:12749
[email protected]5be161f2013-06-18 11:09:33750 # Do not enable the Settings App on ChromeOS.
751 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12752 'enable_settings_app%': 1,
753 }, {
754 'enable_settings_app%': 0,
755 }],
[email protected]94cdbf42012-12-11 19:49:22756
757 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
758 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22759 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43760 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22761 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43762 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22763 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46764
[email protected]42972b62013-08-28 05:46:42765 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09766 'conditions': [
767 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43768 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09769 }],
770 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43771 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09772 }],
773 ],
[email protected]42972b62013-08-28 05:46:42774 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09775
[email protected]59e85f472013-06-28 18:20:44776 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07777 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28778 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46779 }],
[email protected]5b38a522013-03-20 17:00:47780
781 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01782 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47783 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]10d8ac32013-10-31 13:34:31784 # target always calls tools/swarming_client/isolate.py. See the script's
[email protected]5b38a522013-03-20 17:00:47785 # --help for more information and the valid --mode values. Meant to be
786 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01787 # TODO(maruel): Remove the conditions as more configurations are
788 # supported.
789 # NOTE: The check for disable_nacl==0 and component=="static_library"
790 # can't be used here because these variables are not defined yet, but it
791 # is still not supported.
[email protected]e51e35652013-12-19 02:39:08792 ['OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47793 'test_isolation_mode%': 'check',
794 }, {
795 'test_isolation_mode%': 'noop',
796 }],
[email protected]02211392013-12-09 18:13:14797 # Whether Android ARM or x86 build uses OpenMAX DL FFT.
798 ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', {
799 # Currently only supported on Android ARMv7+, or ia32
800 # without webview. When enabled, this will also enable
801 # WebAudio support on Android ARM and ia32. Default is
802 # enabled. Whether WebAudio is actually available depends
803 # on runtime settings and flags.
[email protected]330f3a32013-04-23 05:47:58804 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53805 }, {
806 'use_openmax_dl_fft%': 0,
807 }],
[email protected]5e131c9f2013-07-10 19:21:05808 ['OS=="win" or OS=="linux"', {
809 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06810 }],
811
812 # Turns on compiler optimizations in V8 in Debug build, except
813 # on android_clang, where we're hitting a weird linker error.
814 # TODO(dpranke): http://crbug.com/266155 .
815 ['OS=="android"', {
[email protected]6268e01b42013-10-19 22:44:19816 'v8_optimized_debug%': 1,
[email protected]2abbc1a2013-08-07 22:09:06817 }, {
[email protected]6268e01b42013-10-19 22:44:19818 'v8_optimized_debug%': 2,
[email protected]2abbc1a2013-08-07 22:09:06819 }],
[email protected]02968b82013-11-14 02:42:43820
821 # Disable various features by default on embedded.
822 ['embedded==1', {
823 'remoting%': 0,
824 'enable_printing%': 0,
825 }],
[email protected]b3f23ba2010-04-26 22:58:17826 ],
[email protected]2b113652012-09-17 17:01:39827
[email protected]a3a720f2013-04-25 19:35:42828 # Set this to 1 to enable use of concatenated impulse responses
829 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26830 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42831
[email protected]f2817cf2013-05-16 11:39:54832 # You can set the variable 'use_official_google_api_keys' to 1
833 # to use the Google-internal file containing official API keys
834 # for Google Chrome even in a developer build. Setting this
835 # variable explicitly to 1 will cause your build to fail if the
836 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39837 #
[email protected]f2817cf2013-05-16 11:39:54838 # The variable is documented here, but not handled in this file;
839 # see //google_apis/determine_use_official_keys.gypi for the
840 # implementation.
[email protected]2b113652012-09-17 17:01:39841 #
[email protected]f2817cf2013-05-16 11:39:54842 # Set the variable to 0 to not use the internal file, even when
843 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39844 #
[email protected]f2817cf2013-05-16 11:39:54845 # Leave it unset in your include.gypi to have the variable
846 # implicitly set to 1 if you have
847 # src/google_apis/internal/google_chrome_api_keys.h in your
848 # checkout, and implicitly set to 0 if not.
849 #
850 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39851 # was explicitly set to 1, i.e. they always use official keys,
852 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54853 #
854 # NOTE: You MUST NOT explicitly set the variable to 2 in your
855 # include.gypi or by other means. Due to subtleties of GYP, this
856 # is not the same as leaving the variable unset, even though its
857 # default value in
858 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39859
860 # Set these to bake the specified API keys and OAuth client
861 # IDs/secrets into your build.
862 #
863 # If you create a build without values baked in, you can instead
864 # set environment variables to provide the keys at runtime (see
865 # src/google_apis/google_api_keys.h for details). Features that
866 # require server-side APIs may fail to work if no keys are
867 # provided.
868 #
869 # Note that if you are building an official build or if
870 # use_official_google_api_keys has been set to 1 (explicitly or
871 # implicitly), these values will be ignored and the official
872 # keys will be used instead.
873 'google_api_key%': '',
874 'google_default_client_id%': '',
875 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07876 },
877
[email protected]e72e55b2011-01-06 22:19:30878 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07879 'branding%': '<(branding)',
880 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27881 'target_arch%': '<(target_arch)',
[email protected]ce2cad72014-02-13 18:17:35882 'target_subarch%': '<(target_subarch)',
[email protected]cf185b32010-01-12 04:29:59883 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44884 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33885 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58886 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16887 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31888 'use_cras%': '<(use_cras)',
[email protected]e0b85a52011-10-06 03:30:42889 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57890 'use_nss%': '<(use_nss)',
[email protected]49513e02013-11-20 08:36:40891 'use_udev%': '<(use_udev)',
[email protected]df9167b2011-11-14 19:15:25892 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34893 'os_posix%': '<(os_posix)',
[email protected]61955d92013-11-13 20:44:52894 'use_dbus%': '<(use_dbus)',
[email protected]258dca42011-09-21 00:17:19895 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15896 'use_pango%': '<(use_pango)',
[email protected]928362a2013-11-19 20:17:16897 'use_cairo%': '<(use_cairo)',
[email protected]ff78e4e2013-05-03 19:19:15898 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:48899 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:50900 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]5be60002014-01-13 21:27:42901 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]79e2336c2011-05-12 18:18:34902 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]d628ab412013-09-07 03:26:37903 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:34904 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21905 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11906 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44907 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05908 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24909 'enable_hidpi%': '<(enable_hidpi)',
[email protected]f56797b2011-09-25 00:04:35910 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]77a848262013-02-22 11:17:25911 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54912 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01913 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]65b0819e2013-06-21 15:24:00914 'logging_like_official_build%': '<(logging_like_official_build)',
[email protected]a1e87422013-07-09 21:47:01915 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]a76fe1a2010-03-01 23:39:36916 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54917 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43918 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54919 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23920 'sysroot%': '<(sysroot)',
[email protected]a23d7142014-02-14 16:58:45921 'chroot_cmd%': '<(chroot_cmd)',
[email protected]945361a2011-09-30 04:38:43922 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52923 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43924 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17925 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18926 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40927 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48928 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16929 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25930 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56931 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22932 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57933 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46934 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37935 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06936 'asan%': '<(asan)',
[email protected]20a127f2014-01-16 03:25:03937 'asan_coverage%': '<(asan_coverage)',
[email protected]1612e552014-02-15 04:49:18938 'syzyasan%': '<(syzyasan)',
[email protected]062522a2013-06-13 15:49:55939 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59940 'msan%': '<(msan)',
[email protected]190d4ce62014-01-17 20:24:53941 'msan_blacklist%': '<(msan_blacklist)',
[email protected]c9a829272012-07-04 07:51:12942 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16943 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]c8103a42013-11-12 13:41:30944 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
[email protected]22b3f531e2013-12-20 13:07:28945 'use_custom_libcxx%': '<(use_custom_libcxx)',
[email protected]7ce58b22012-09-26 05:17:25946 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44947 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46948 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34949 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34950 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54951 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53952 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38953 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22954 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]0acdd772012-04-05 22:53:00955 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59956 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00957 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50958 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33959 'test_isolation_mode%': '<(test_isolation_mode)',
960 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47961 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10962 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02963 'enable_printing%': '<(enable_printing)',
[email protected]c6ce08072013-07-31 07:48:53964 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:40965 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:06966 'cld_version%': '<(cld_version)',
[email protected]e6026962012-06-14 21:28:32967 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11968 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02969 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06970 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12971 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44972 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12973 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36974 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46975 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:07976 'create_standalone_apk%': 1,
[email protected]dc4e8b82012-11-15 03:58:16977 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07978 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16979 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39980 'google_api_key%': '<(google_api_key)',
981 'google_default_client_id%': '<(google_default_client_id)',
982 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31983 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:43984 'native_discardable_memory%': '<(native_discardable_memory)',
985 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]3f0ed2172013-11-04 20:27:29986 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)',
[email protected]324856d2014-01-14 11:17:30987 'data_reduction_dev_host%': '<(data_reduction_dev_host)',
[email protected]199def22013-02-21 17:52:29988 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
989 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25990 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]d8dd60e2013-10-08 00:49:43991 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)',
[email protected]5e131c9f2013-07-10 19:21:05992 'enable_mdns%' : '<(enable_mdns)',
[email protected]b9171622013-10-01 22:05:23993 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)',
[email protected]754a2002014-02-14 16:40:34994 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)',
[email protected]6268e01b42013-10-19 22:44:19995 'v8_optimized_debug%': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:41996 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]e71a3622013-12-04 07:32:41997 'use_goma%': '<(use_goma)',
998 'gomadir%': '<(gomadir)',
[email protected]01971642012-03-07 14:39:56999
[email protected]2f325672012-10-31 23:29:371000 # Use system protobuf instead of bundled one.
1001 'use_system_protobuf%': 0,
1002
[email protected]371e1092011-10-12 20:37:361003 # Use system yasm instead of bundled one.
1004 'use_system_yasm%': 0,
1005
[email protected]ea02e962013-04-26 11:18:161006 # Use system ICU instead of bundled one.
1007 'use_system_icu%' : 0,
1008
[email protected]cd00bd862012-02-29 00:40:361009 # Default to enabled PIE; this is important for ASLR but we may need to be
1010 # able to turn it off for various reasons.
1011 'linux_disable_pie%': 0,
1012
[email protected]caa95c82009-11-23 22:39:321013 # The release channel that this build targets. This is used to restrict
1014 # channel-specific build options, like which installer packages to create.
1015 # The default is 'all', which does no channel-specific filtering.
1016 'channel%': 'all',
1017
[email protected]b3fb8092009-03-12 19:09:241018 # Override chromium_mac_pch and set it to 0 to suppress the use of
1019 # precompiled headers on the Mac. Prefix header injection may still be
1020 # used, but prefix headers will not be precompiled. This is useful when
1021 # using distcc to distribute a build to compile slaves that don't
1022 # share the same compiler executable as the system driving the compilation,
1023 # because precompiled headers rely on pointers into a specific compiler
1024 # executable's image. Setting this to 0 is needed to use an experimental
1025 # Linux-Mac cross compiler distcc farm.
1026 'chromium_mac_pch%': 1,
1027
[email protected]27b687ec42012-03-26 22:22:151028 # The default value for mac_strip in target_defaults. This cannot be
1029 # set there, per the comment about variable% in a target_defaults.
[email protected]70d0f782013-11-14 06:22:291030 'mac_strip_release%': 0,
[email protected]27b687ec42012-03-26 22:22:151031
[email protected]c0a12772013-08-22 00:08:311032 # Set to 1 to enable java code coverage. Instruments classes during build
1033 # to produce .ec files during runtime.
1034 'emma_coverage%': 0,
1035
[email protected]9662d922013-10-04 22:02:441036 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1037 # separated with whitespace and/or comma. Only has effect if
1038 # 'emma_coverage=1'.
1039 'emma_filter%': '',
1040
[email protected]22860352013-12-11 03:02:101041 # Set to 1 to enable running Android lint on java/class files.
[email protected]2219b752014-01-10 22:42:571042 'android_lint%': 0,
[email protected]22860352013-12-11 03:02:101043
[email protected]9619e65d2012-05-23 19:06:521044 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
1045 # This is useful for parallel compilation tools which can't support /Zi.
1046 # Only used on Windows.
1047 'win_z7%' : 0,
1048
[email protected]7477ea6f2009-12-22 23:28:151049 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:471050 # environment variable, the libcmt shim it uses sometimes gets in
1051 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1052 # 'win_use_allocator_shim': 0,
1053 # 'win_release_RuntimeLibrary': 2
1054 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:521055 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:111056
[email protected]e5b2eaa2009-04-14 01:39:121057 # TODO(bradnelson): eliminate this when possible.
1058 # To allow local gyp files to prevent release.vsprops from being included.
1059 # Yes(1) means include release.vsprops.
1060 # Once all vsprops settings are migrated into gyp, this can go away.
1061 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:231062
[email protected]cbd5fd52009-08-26 00:14:271063 # TODO(bradnelson): eliminate this when possible.
1064 # To allow local gyp files to override additional linker options for msvs.
1065 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:191066 'msvs_use_common_linker_extras%': 1,
1067
[email protected]1ffb6502009-06-02 07:46:241068 # TODO(sgk): eliminate this if possible.
1069 # It would be nicer to support this via a setting in 'target_defaults'
1070 # in chrome/app/locales/locales.gypi overriding the setting in the
1071 # 'Debug' configuration in the 'target_defaults' dict below,
1072 # but that doesn't work as we'd like.
1073 'msvs_debug_link_incremental%': '2',
1074
[email protected]1f790ef2011-01-11 20:45:361075 # Needed for some of the largest modules.
1076 'msvs_debug_link_nonincremental%': '1',
1077
[email protected]6f390be2012-08-16 18:57:101078 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:061079 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:261080 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:061081
[email protected]1ff64292013-07-18 20:37:151082 # Experimental setting to break chrome.dll into multiple pieces based on
1083 # process type.
1084 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:021085
[email protected]c54b41cb2012-08-24 20:58:241086 # The default settings for third party code for treating
1087 # warnings-as-errors. Ideally, this would not be required, however there
1088 # is some third party code that takes a long time to fix/roll. So, this
1089 # flag allows us to have warnings as errors in general to prevent
1090 # regressions in most modules, while working on the bits that are
1091 # remaining.
1092 'win_third_party_warn_as_error%': 'true',
1093
[email protected]3bb37e62012-04-19 03:40:081094 # Clang stuff.
1095 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:241096 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:151097
[email protected]ce2cad72014-02-13 18:17:351098 # Control which version of clang to use when 'clang' is set to 1 when
1099 # building for iOS (Apple has not yet open-sourced support for "arm64"
1100 # so when building for that 'target_arch' we have to use clang shipped
1101 # with Xcode that does not supports some flags).
1102 # TODO(sdefresne): remove this once http://crbug.com/341453 is fixed.
1103 'clang_xcode%': 0,
1104
[email protected]5e781232011-01-28 02:57:591105 # These two variables can be set in GYP_DEFINES while running
1106 # |gclient runhooks| to let clang run a plugin in every compilation.
1107 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1108 # Example:
[email protected]93120fe2011-02-03 20:46:421109 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
[email protected]5e781232011-01-28 02:57:591110
1111 'clang_load%': '',
1112 'clang_add_plugin%': '',
1113
[email protected]c9cc9442013-12-28 21:27:441114 # Tell ld64 to write map files describing binary layout. Useful
1115 # for looking at what contributes to binary size, e.g. with
1116 # https://github.com/nico/bloat
1117 'mac_write_linker_maps%': 0,
1118
[email protected]da1c8d692011-09-20 20:35:011119 # The default type of gtest.
1120 'gtest_target_type%': 'executable',
1121
[email protected]7664ab32011-02-01 23:35:251122 # Enable sampling based profiler.
1123 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1124 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581125 # Profile without optimizing out stack frames when profiling==1.
1126 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251127
[email protected]36532f332010-08-25 00:22:011128 # And if we want to dump symbols for Breakpad-enabled builds.
[email protected]8ebfecb2013-11-14 05:30:311129 'linux_dump_symbols%': 0,
[email protected]36532f332010-08-25 00:22:011130 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031131 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:491132 # Strip the test binaries needed for Linux reliability tests.
1133 'linux_strip_reliability_tests%': 0,
[email protected]2578ea12014-01-17 06:02:511134 # If we want stack unwind support for backtrace().
1135 'debug_unwind_tables%': 1,
1136 'release_unwind_tables%': 1,
[email protected]05cb6962009-10-01 23:29:031137
[email protected]46ce5b562010-06-16 18:39:531138 # Enable TCMalloc.
1139 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:031140 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:241141
[email protected]556c5d72010-06-10 05:45:011142 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1143 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351144 # Set to 1 to link against gsettings APIs instead of using dlopen().
1145 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011146
[email protected]23eea4a42013-04-27 04:10:261147 # Default arch variant for MIPS.
[email protected]63c82782014-02-02 16:10:281148 'mips_arch_variant%': 'mips32r1',
[email protected]23eea4a42013-04-27 04:10:261149
[email protected]a63e8d22013-03-23 16:17:081150 # Enable use of OpenMAX DL FFT routines.
1151 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341152
[email protected]9821d0d2010-04-16 22:40:371153 # Enable new NPDevice API.
1154 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501155
1156 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141157 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501158
[email protected]e72e55b2011-01-06 22:19:301159 # .gyp files or targets should set chromium_code to 1 if they build
1160 # Chromium-specific code, as opposed to external code. This variable is
1161 # used to control such things as the set of warnings to enable, and
1162 # whether warnings are treated as errors.
1163 'chromium_code%': 0,
1164
[email protected]8d726a42012-02-09 03:49:001165 'release_valgrind_build%': 0,
1166
[email protected]b1eb341c2011-11-09 18:46:071167 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1168 'enable_wexit_time_destructors%': 0,
1169
[email protected]d69acbc2014-02-10 21:14:461170 # Build libpeerconnection as a static library by default.
1171 'libpeer_target_type%': 'static_library',
1172
[email protected]e72e55b2011-01-06 22:19:301173 # Set to 1 to compile with the built in pdf viewer.
1174 'internal_pdf%': 0,
1175
[email protected]9e1149d72012-07-24 01:27:171176 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1177 'internal_gles2_conform_tests%': 0,
1178
[email protected]5c18edd2013-11-19 22:04:111179 # Set to 1 to compile the filter fuzzer.
1180 'internal_filter_fuzzer%': 0,
1181
[email protected]e72e55b2011-01-06 22:19:301182 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1183 # so Cocoa is happy (http://crbug.com/20441).
1184 'locales': [
1185 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1186 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1187 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411188 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301189 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1190 'vi', 'zh-CN', 'zh-TW',
1191 ],
1192
[email protected]cc0322d2011-07-24 09:29:191193 # Pseudo locales are special locales which are used for testing and
1194 # debugging. They don't get copied to the final app. For more info,
1195 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1196 'pseudo_locales': [
1197 'fake-bidi',
1198 ],
1199
[email protected]bb6aba32011-01-07 19:04:431200 'grit_defines': [],
1201
[email protected]bd3bd442011-03-28 07:58:511202 # If debug_devtools is set to 1, JavaScript files for DevTools are
1203 # stored as is and loaded from disk. Otherwise, a concatenated file
1204 # is stored in resources.pak. It is still possible to load JS files
1205 # from disk by passing --debug-devtools cmdline switch.
1206 'debug_devtools%': 0,
1207
[email protected]464750f2011-10-24 23:16:181208 # The Java Bridge is not compiled in by default.
1209 'java_bridge%': 0,
1210
[email protected]1e013672012-06-29 22:12:201211 # Code signing for iOS binaries. The bots need to be able to disable this.
1212 'chromium_ios_signing%': 1,
1213
[email protected]33e1c372011-12-14 16:32:071214 # This flag is only used when disable_nacl==0 and disables all those
1215 # subcomponents which would require the installation of a native_client
1216 # untrusted toolchain.
1217 'disable_nacl_untrusted%': 0,
1218
[email protected]407dfa632011-12-23 11:59:351219 # Disable Dart by default.
1220 'enable_dart%': 0,
1221
[email protected]836285f22012-04-03 16:19:261222 # Native Client is enabled by default.
1223 'disable_nacl%': 0,
1224
[email protected]1e40ba002013-03-07 22:07:331225 # Portable Native Client is enabled by default.
1226 'disable_pnacl%': 0,
1227
[email protected]fa9d4e262012-08-21 04:39:001228 # Whether to build full debug version for Debug configuration on Android.
1229 # Compared to full debug version, the default Debug configuration on Android
1230 # has no full v8 debug, has size optimization and linker gc section, so that
1231 # we can build a debug version with acceptable size and performance.
1232 'android_full_debug%': 0,
1233
[email protected]65885272012-10-05 23:55:501234 # Sets the default version name and code for Android app, by default we
1235 # do a developer build.
1236 'android_app_version_name%': 'Developer Build',
1237 'android_app_version_code%': 0,
1238
[email protected]014d1ff12013-07-02 01:52:331239 # Contains data about the attached devices for gyp_managed_install.
1240 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1241
[email protected]51528312013-09-24 07:36:191242 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")',
1243 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")',
[email protected]49ae3e52012-04-12 09:50:121244
[email protected]1f8d9402012-07-06 22:47:561245 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1246 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051247
[email protected]fd6d8822012-12-08 06:56:111248 # Whether we are using the rlz library or not. Platforms like Android send
1249 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221250 'enable_rlz%': 0,
1251
[email protected]3b4038e2013-07-28 08:59:541252 # Turns on the i18n support in V8.
1253 'v8_enable_i18n_support': 1,
1254
[email protected]6a694912014-01-17 14:17:401255 # Compile d8 for the host toolset.
1256 'v8_toolset_for_d8': 'host',
1257
[email protected]d98df122013-08-12 13:56:431258 # Use the chromium skia by default.
1259 'use_system_skia%': '0',
1260
[email protected]2c14260f2013-09-11 11:48:221261 # Use brlapi from brltty for braille display support.
1262 'use_brlapi%': 0,
1263
[email protected]c66b5aa2013-09-12 13:29:411264 # Relative path to icu.gyp from this file.
1265 'icu_gyp_path': '../third_party/icu/icu.gyp',
1266
[email protected]8c64e282013-11-28 16:05:141267 # IPC fuzzer is disabled by default.
1268 'enable_ipc_fuzzer%': 0,
1269
[email protected]f35bcea82013-12-04 04:37:061270 # Whether or not to use "icu*.dat" file for ICU data.
1271 # Do not use it by default.
1272 'icu_use_data_file_flag%': 0,
1273
[email protected]1eec679e2013-12-13 22:10:271274 # Force disable libstdc++ debug mode.
1275 'disable_glibcxx_debug%': 0,
1276
[email protected]912c55c2009-07-31 23:33:551277 'conditions': [
[email protected]5f683172013-04-27 01:53:191278 # The version of GCC in use, set later in platforms that use GCC and have
1279 # not explicitly chosen to build with clang. Currently, this means all
1280 # platforms except Windows, Mac and iOS.
1281 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1282 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551283 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
[email protected]ffa01d22014-01-14 00:14:491284 'conditions': [
1285 ['OS=="android"', {
1286 # We directly set the gcc_version since we know what we use.
1287 'gcc_version%': 46,
1288 }, {
1289 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1290 }],
1291 ],
[email protected]5f683172013-04-27 01:53:191292 }, {
1293 'gcc_version%': 0,
1294 }],
[email protected]1f8d9402012-07-06 22:47:561295 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1296 'windows_sdk_path%': '<(windows_sdk_default_path)',
1297 }, {
1298 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1299 }],
1300 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1301 'directx_sdk_path%': '<(directx_sdk_default_path)',
1302 }, {
1303 'directx_sdk_path%': '$(DXSDK_DIR)',
1304 }],
[email protected]54184ce72012-10-18 07:11:261305 ['OS=="win"', {
1306 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]27be5062014-01-24 01:00:411307 'icu_use_data_file_flag%': 1,
[email protected]54184ce72012-10-18 07:11:261308 }],
[email protected]1e013672012-06-29 22:12:201309 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]cbd5fd52009-08-26 00:14:271310 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461311 ['target_arch=="mipsel"', {
1312 'werror%': '',
1313 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461314 'nacl_untrusted_build%': 0,
1315 'linux_use_tcmalloc%': 0,
[email protected]59e85f472013-06-28 18:20:441316 }],
1317 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461318 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281319 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461320 }],
[email protected]4c9cc6c2009-10-01 18:54:571321 # All Chrome builds have breakpad symbols, but only process the
1322 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081323 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571324 'linux_dump_symbols%': 1,
[email protected]2578ea12014-01-17 06:02:511325
1326 # Omit unwind support in official release builds to save space. We
1327 # can use breakpad for these builds.
1328 'release_unwind_tables%': 0,
[email protected]4c9cc6c2009-10-01 18:54:571329 }],
[email protected]f4e1ea242014-02-14 10:22:001330 # TODO(jungshik): Turn this on on Android.
1331 # For ChromeOS, this should be turned on in chromeos-chrome.ebuild
1332 # file as well by adding icu_use_data_file_flag=1 to BUILD_DEFINES.
1333 ['OS!="android"', {
[email protected]b6488672014-01-25 00:58:561334 'icu_use_data_file_flag%': 1,
1335 }],
[email protected]cbd5fd52009-08-26 00:14:271336 ],
[email protected]1e013672012-06-29 22:12:201337 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]30c246bc2014-01-28 06:00:041338 ['OS=="mac"', {
1339 'icu_use_data_file_flag%': 1,
1340 }], # os=="mac"
[email protected]0d16f292012-07-02 22:10:481341 ['OS=="ios"', {
1342 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191343 'enable_background%': 0,
[email protected]abde6732012-08-16 16:10:351344 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131345 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471346 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411347 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391348 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
1349 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb',
1350 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk',
1351 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411352 ],
[email protected]57871bc2012-08-20 16:28:121353
1354 # The Mac SDK is set for iOS builds and passed through to Mac
1355 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1356 # overridden from the command line the same way it is for a Mac build.
1357 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291358
[email protected]523f128d2013-08-06 17:36:111359 # iOS SDK and deployment target support. The |ios_sdk| value is left
1360 # blank so that when it is set in the project files it will be the
1361 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1362 # causes Xcode to spit out a warning for every single project file for
1363 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291364 'ios_sdk%': '',
1365 'ios_sdk_path%': '',
[email protected]523f128d2013-08-06 17:36:111366 'ios_deployment_target%': '6.0',
[email protected]fcd634182012-10-09 10:50:321367
1368 'conditions': [
1369 # ios_product_name is set to the name of the .app bundle as it should
1370 # appear on disk.
1371 ['branding=="Chrome"', {
1372 'ios_product_name%': 'Chrome',
1373 }, { # else: branding!="Chrome"
1374 'ios_product_name%': 'Chromium',
1375 }],
1376 ['branding=="Chrome" and buildtype=="Official"', {
1377 'ios_breakpad%': 1,
1378 }, { # else: branding!="Chrome" or buildtype!="Official"
1379 'ios_breakpad%': 0,
1380 }],
1381 ],
1382 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011383 ['OS=="android"', {
1384 # Location of Android NDK.
1385 'variables': {
1386 'variables': {
[email protected]5061d152013-01-16 17:45:571387 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1388 # they're passed to ant which uses a different relative path from
1389 # gyp.
1390 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1391 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1392 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041393 # Android API-level of the SDK used for compilation.
[email protected]c59b63152014-02-14 16:59:481394 'android_sdk_version%': '19',
[email protected]aeaf01212014-02-19 00:52:521395 'android_sdk_build_tools_version%': '19.0.0',
[email protected]625eb032014-02-13 21:48:251396 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
[email protected]da1c8d692011-09-20 20:35:011397 },
[email protected]5061d152013-01-16 17:45:571398 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011399 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571400 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041401 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221402 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]625eb032014-02-13 21:48:251403 'host_os%': '<(host_os)',
[email protected]5061d152013-01-16 17:45:571404
[email protected]e20a8ad2013-03-18 15:05:041405 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]aeaf01212014-02-19 00:52:521406 # Android SDK build tools (e.g. dx, aapt, aidl)
1407 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)',
[email protected]5061d152013-01-16 17:45:571408
[email protected]5cfec2b2013-03-05 20:54:331409 # Android API level 14 is ICS (Android 4.0) which is the minimum
1410 # platform requirement for Chrome on Android, we use it for native
1411 # code compilation.
[email protected]5061d152013-01-16 17:45:571412 'conditions': [
1413 ['target_arch == "ia32"', {
1414 'android_app_abi%': 'x86',
1415 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331416 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571417 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1418 }],
1419 ['target_arch=="arm"', {
1420 'conditions': [
[email protected]7d6763422013-04-26 12:06:541421 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571422 'android_app_abi%': 'armeabi',
1423 }, {
1424 'android_app_abi%': 'armeabi-v7a',
1425 }],
1426 ],
1427 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331428 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571429 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1430 }],
[email protected]23eea4a42013-04-27 04:10:261431 ['target_arch == "mipsel"', {
1432 'android_app_abi%': 'mips',
1433 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1434 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471435 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
[email protected]23eea4a42013-04-27 04:10:261436 }],
[email protected]5061d152013-01-16 17:45:571437 ],
[email protected]da1c8d692011-09-20 20:35:011438 },
[email protected]5061d152013-01-16 17:45:571439 # Copy conditionally-set variables out one scope.
1440 'android_app_abi%': '<(android_app_abi)',
1441 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011442 'android_ndk_root%': '<(android_ndk_root)',
1443 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571444 'android_sdk_root%': '<(android_sdk_root)',
1445 'android_sdk_version%': '<(android_sdk_version)',
1446 'android_toolchain%': '<(android_toolchain)',
1447
[email protected]da1c8d692011-09-20 20:35:011448 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1449 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]6bfda61f2013-08-09 06:48:181450 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041451 'android_sdk%': '<(android_sdk)',
1452 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011453
[email protected]225ec632013-04-03 18:20:221454 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221455 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221456 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]625eb032014-02-13 21:48:251457 'host_os%': '<(host_os)',
[email protected]225ec632013-04-03 18:20:221458
[email protected]c0f76312012-08-16 13:52:041459 # Location of the "strip" binary, used by both gyp and scripts.
1460 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1461
[email protected]225ec632013-04-03 18:20:221462 # Location of the "readelf" binary.
1463 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1464
[email protected]d8621ce2013-02-22 00:37:331465 # Determines whether we should optimize JNI generation at the cost of
1466 # breaking assumptions in the build system that when inputs have changed
1467 # the outputs should always change as well. This is meant purely for
1468 # developer builds, to avoid spurious re-linking of native files.
1469 'optimize_jni_generation%': 0,
1470
[email protected]da1c8d692011-09-20 20:35:011471 # Always uses openssl.
1472 'use_openssl%': 1,
1473
1474 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]23a30e62012-12-01 03:39:071475 'safe_browsing%': 2,
[email protected]9eb100e2011-10-14 05:08:221476 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021477 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181478 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581479 'build_ffmpegsumo%': 0,
1480 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021481
[email protected]ad17e342012-07-17 20:45:481482 # Disable Native Client.
1483 'disable_nacl%': 1,
1484
[email protected]58242012012-04-12 16:14:311485 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001486 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111487
[email protected]cdb756ef2012-04-05 18:34:531488 # Sessions are store separately in the Java side.
1489 'enable_session_service%': 0,
1490
[email protected]ad17e342012-07-17 20:45:481491 'p2p_apis%' : 0,
1492
[email protected]48de0fc2012-08-02 11:03:581493 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011494
1495 # Uses system APIs for decoding audio and video.
1496 'use_libffmpeg%': '0',
1497
[email protected]adb44342012-07-23 13:36:121498 # When building as part of the Android system, use system libraries
1499 # where possible to reduce ROM size.
1500 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361501 'use_system_sqlite%': 0, # '<(android_webview_build)',
1502 'use_system_expat%': '<(android_webview_build)',
1503 'use_system_icu%': '<(android_webview_build)',
1504 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121505
[email protected]da1c8d692011-09-20 20:35:011506 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361507 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011508 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121509 ['android_webview_build==1', {
1510 # When building the WebView in the Android tree, jarjar will remap all
1511 # the class names, so the JNI generator needs to know this.
1512 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1513 }],
[email protected]e14a9f92009-08-05 19:26:071514 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471515 # Enable clang on mac by default!
1516 'clang%': 1,
[email protected]70d0f782013-11-14 06:22:291517 'conditions': [
1518 # All Chrome builds have breakpad symbols, but only process the
1519 # symbols from official builds.
1520 ['(branding=="Chrome" and buildtype=="Official")', {
1521 'mac_strip_release%': 1,
1522 }],
[email protected]22860352013-12-11 03:02:101523 ],
[email protected]296bc452013-05-13 21:29:471524 }], # OS=="mac"
1525 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291526 'variables': {
1527 # Mac OS X SDK and deployment target support. The SDK identifies
1528 # the version of the system headers that will be used, and
1529 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1530 # macro. "Maximum allowed" refers to the operating system version
1531 # whose APIs are available in the headers. The deployment target
1532 # identifies the minimum system version that the built products are
1533 # expected to function on. It corresponds to the
1534 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1535 # macros are available, #include <AvailabilityMacros.h>. Additional
1536 # documentation on these macros is available at
1537 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1538 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1539 # deployment target to 10.6. Other projects, such as O3D, may
1540 # override these defaults.
1541
1542 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1543 # about that is at least the specified version. In official builds,
1544 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1545 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1546 # path to the SDK; when set to a non-empty string, SDK detection
1547 # based on mac_sdk_min will be bypassed entirely.
1548 'mac_sdk_min%': '10.6',
1549 'mac_sdk_path%': '',
1550
1551 'mac_deployment_target%': '10.6',
1552 },
1553
1554 'mac_sdk_min': '<(mac_sdk_min)',
1555 'mac_sdk_path': '<(mac_sdk_path)',
1556 'mac_deployment_target': '<(mac_deployment_target)',
1557
[email protected]794fb4782011-12-14 19:10:561558 # Compile in Breakpad support by default so that it can be
1559 # tested, even if it is not enabled by default at runtime.
1560 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071561 'conditions': [
1562 # mac_product_name is set to the name of the .app bundle as it should
1563 # appear on disk. This duplicates data from
1564 # chrome/app/theme/chromium/BRANDING and
1565 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1566 # these names into the build system.
1567 ['branding=="Chrome"', {
1568 'mac_product_name%': 'Google Chrome',
1569 }, { # else: branding!="Chrome"
1570 'mac_product_name%': 'Chromium',
1571 }],
1572
[email protected]e14a9f92009-08-05 19:26:071573 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291574 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
[email protected]794fb4782011-12-14 19:10:561575 # Enable uploading crash dumps.
1576 'mac_breakpad_uploads%': 1,
1577 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071578 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561579 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071580 'mac_keystone%': 1,
1581 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291582 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561583 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071584 'mac_breakpad%': 0,
1585 'mac_keystone%': 0,
1586 }],
1587 ],
[email protected]296bc452013-05-13 21:29:471588 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551589 ['OS=="win"', {
1590 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431591 # This is the architecture convention used in WinSDK paths.
1592 ['target_arch=="ia32"', {
1593 'winsdk_arch%': 'x86',
1594 },{
1595 'winsdk_arch%': '<(target_arch)',
1596 }],
[email protected]8974e042010-06-21 18:06:521597 ['component=="shared_library"', {
1598 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221599 },{
1600 # Turn on multiple dll by default on Windows when in static_library.
1601 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521602 }],
[email protected]fa0f16e2012-08-20 22:30:041603 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101604 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041605 # Not enabled for component=static_library because some targets
1606 # are too large and the toolchain fails due to the size of the
1607 # .obj files.
[email protected]6f390be2012-08-16 18:57:101608 'incremental_chrome_dll%': 1,
1609 }],
[email protected]a96cf1422013-11-08 08:55:411610 # Don't do incremental linking for large modules on 32-bit or when
1611 # component=static_library as the toolchain fails due to the size of
1612 # the .ilk files.
1613 ['MSVS_OS_BITS==32 or component=="static_library"', {
[email protected]10bb8c92009-08-07 21:16:031614 'msvs_large_module_debug_link_mode%': '1', # No
1615 },{
1616 'msvs_large_module_debug_link_mode%': '2', # Yes
1617 }],
[email protected]1a52d8022014-02-04 17:50:011618 ['MSVS_VERSION=="2013e" or MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501619 'msvs_express%': 1,
1620 'secure_atl%': 0,
1621 },{
1622 'msvs_express%': 0,
1623 'secure_atl%': 1,
1624 }],
[email protected]912c55c2009-07-31 23:33:551625 ],
[email protected]ef4fa4072009-12-04 22:46:501626 'nacl_win64_defines': [
1627 # This flag is used to minimize dependencies when building
1628 # Native Client loader for 64-bit Windows.
1629 'NACL_WIN64',
1630 ],
[email protected]912c55c2009-07-31 23:33:551631 }],
[email protected]bb6aba32011-01-07 19:04:431632
[email protected]a35aa362012-10-30 13:55:071633 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f492010-10-25 20:05:441634 'use_cups%': 1,
1635 }, {
1636 'use_cups%': 0,
1637 }],
[email protected]bb6aba32011-01-07 19:04:431638
[email protected]693f63c2014-01-17 06:52:191639 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
[email protected]280755c2013-05-23 10:44:351640 'enable_pepper_cdms%': 1,
1641 }, {
1642 'enable_pepper_cdms%': 0,
1643 }],
1644
[email protected]eb5f1672013-01-31 07:56:461645 # Native Client glibc toolchain is enabled
1646 # by default except on arm and mips.
1647 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321648 'disable_glibc%': 1,
1649 }, {
1650 'disable_glibc%': 0,
1651 }],
1652
[email protected]712c3da2012-09-24 21:31:241653 # Disable SSE2 when building for ARM or MIPS.
1654 ['target_arch=="arm" or target_arch=="mipsel"', {
1655 'disable_sse2%': 1,
1656 }, {
1657 'disable_sse2%': '<(disable_sse2)',
1658 }],
1659
[email protected]19fe8f0b2010-12-07 07:27:271660 # Set the relative path from this file to the GYP file of the JPEG
1661 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281662 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1663 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271664 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281665 }, {
1666 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1667 }],
[email protected]bb6aba32011-01-07 19:04:431668
[email protected]abcc9ac2011-05-16 20:04:351669 # Options controlling the use of GConf (the classic GNOME configuration
1670 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]02968b82013-11-14 02:42:431671 ['chromeos==1 or embedded==1', {
[email protected]1c6fe29302011-01-20 22:14:311672 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351673 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311674 }, {
1675 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351676 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311677 }],
1678
[email protected]4de39f82011-03-28 12:01:291679 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291680 ['branding=="Chrome"', {
1681 # TODO(mmoss) The .grd files look for _google_chrome, but for
1682 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291683 'grit_defines': ['-D', '_google_chrome',
1684 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291685 }, {
[email protected]4de39f82011-03-28 12:01:291686 'grit_defines': ['-D', '_chromium',
1687 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291688 }],
[email protected]bb6aba32011-01-07 19:04:431689 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131690 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431691 }],
[email protected]d628ab412013-09-07 03:26:371692 ['desktop_linux==1', {
1693 'grit_defines': ['-D', 'desktop_linux'],
1694 }],
[email protected]bb6aba32011-01-07 19:04:431695 ['toolkit_views==1', {
1696 'grit_defines': ['-D', 'toolkit_views'],
1697 }],
[email protected]df2e196e2014-02-05 19:56:251698 ['toolkit_uses_gtk==1', {
1699 'grit_defines': ['-D', 'toolkit_uses_gtk'],
1700 }],
[email protected]8dd791d2011-09-16 16:37:301701 ['use_aura==1', {
1702 'grit_defines': ['-D', 'use_aura'],
1703 }],
[email protected]ed329be2012-01-03 22:02:161704 ['use_ash==1', {
1705 'grit_defines': ['-D', 'use_ash'],
1706 }],
[email protected]c329adf82011-10-05 14:34:571707 ['use_nss==1', {
1708 'grit_defines': ['-D', 'use_nss'],
1709 }],
[email protected]ff78e4e2013-05-03 19:19:151710 ['use_ozone==1', {
1711 'grit_defines': ['-D', 'use_ozone'],
1712 }],
[email protected]77a848262013-02-22 11:17:251713 ['image_loader_extension==1', {
1714 'grit_defines': ['-D', 'image_loader_extension'],
1715 }],
[email protected]9a425422011-01-11 00:53:181716 ['remoting==1', {
1717 'grit_defines': ['-D', 'remoting'],
1718 }],
[email protected]bb6aba32011-01-07 19:04:431719 ['use_titlecase_in_grd_files==1', {
1720 'grit_defines': ['-D', 'use_titlecase'],
1721 }],
[email protected]02211392013-12-09 18:13:141722 ['OS=="android" and target_arch=="ia32"', {
1723 # WebAudio on Android/x86 is disabled by default, unlike
1724 # everywhere else, so use appropriate message.
1725 'grit_defines': ['-D', 'use_webaudio_enable_message'],
1726 }],
[email protected]00dc155832011-02-01 18:51:191727 ['use_third_party_translations==1', {
1728 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121729 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161730 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1731 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121732 ],
[email protected]00dc155832011-02-01 18:51:191733 }],
[email protected]da1c8d692011-09-20 20:35:011734 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171735 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571736 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011737 }],
[email protected]cc1f0572013-07-31 05:41:031738 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:231739 'grit_defines': ['-D', 'scale_factors=2x'],
1740 }],
[email protected]ad563d02012-10-03 10:37:031741 ['OS == "ios"', {
1742 'grit_defines': [
[email protected]033346902013-08-20 01:01:121743 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:031744 # iOS uses a whitelist to filter resources.
1745 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1746 ],
[email protected]b4530c82013-05-09 09:20:011747
1748 # Enable clang and host builds when generating with ninja-ios.
1749 'conditions': [
1750 ['"<(GENERATOR)"=="ninja"', {
1751 'clang%': 1,
1752 'host_os%': "mac",
[email protected]ce2cad72014-02-13 18:17:351753 }],
1754 # Apple has not upstreamed the support for "arm64" yet, so when
1755 # building for "arm64" or "both", we need to use the clang that
1756 # is provided with Xcode.
1757 ['target_subarch!="arm32"', {
1758 'clang_xcode%': 1,
1759 }],
[email protected]b4530c82013-05-09 09:20:011760 ],
[email protected]ad563d02012-10-03 10:37:031761 }],
[email protected]6a3cd37e2012-04-17 17:13:341762 ['enable_extensions==1', {
1763 'grit_defines': ['-D', 'enable_extensions'],
1764 }],
[email protected]6ab4ef92013-12-09 08:43:171765 ['enable_plugins!=0', {
[email protected]6ab4ef92013-12-09 08:43:171766 'grit_defines': ['-D', 'enable_plugins'],
1767 }],
[email protected]1e54c1c2013-08-12 17:16:051768 ['enable_printing!=0', {
[email protected]658677f2012-06-09 06:04:021769 'grit_defines': ['-D', 'enable_printing'],
1770 }],
[email protected]b429eb19b2014-01-27 21:07:501771 ['enable_printing==1', {
1772 'grit_defines': ['-D', 'enable_full_printing'],
1773 }],
[email protected]c2aad542012-07-31 20:40:331774 ['enable_themes==1', {
1775 'grit_defines': ['-D', 'enable_themes'],
1776 }],
[email protected]ef1dd5062012-12-17 06:41:331777 ['enable_app_list==1', {
1778 'grit_defines': ['-D', 'enable_app_list'],
1779 }],
[email protected]dc4e8b82012-11-15 03:58:161780 ['enable_settings_app==1', {
1781 'grit_defines': ['-D', 'enable_settings_app'],
1782 }],
[email protected]5411d8202013-01-30 01:32:151783 ['enable_google_now==1', {
1784 'grit_defines': ['-D', 'enable_google_now'],
1785 }],
[email protected]a3a720f2013-04-25 19:35:421786 ['use_concatenated_impulse_responses==1', {
1787 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1788 }],
[email protected]f66ddbd2013-06-27 14:17:041789 ['enable_webrtc==1', {
1790 'grit_defines': ['-D', 'enable_webrtc'],
1791 }],
[email protected]2163eb92013-08-27 00:06:241792 ['enable_mdns==1', {
1793 'grit_defines': ['-D', 'enable_mdns'],
1794 }],
[email protected]b9171622013-10-01 22:05:231795 ['enable_enhanced_bookmarks==1', {
1796 'grit_defines': ['-D', 'enable_enhanced_bookmarks'],
1797 }],
[email protected]754a2002014-02-14 16:40:341798 ['enable_hangout_services_extension==1', {
1799 'grit_defines': ['-D', 'enable_hangout_services_extension'],
1800 }],
[email protected]25b8cb32014-01-30 11:04:291801 ['enable_task_manager==1', {
1802 'grit_defines': ['-D', 'enable_task_manager'],
1803 }],
[email protected]335b6872014-02-13 20:14:131804 ['notifications==1', {
1805 'grit_defines': ['-D', 'enable_notifications'],
1806 }],
[email protected]3bb37e62012-04-19 03:40:081807 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071808 'clang_chrome_plugins_flags': [
1809 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311810 ],
[email protected]5d451ad2011-02-11 16:43:461811 }],
[email protected]cfa2e1102011-04-27 22:30:231812
[email protected]1612e552014-02-15 04:49:181813 ['asan==1 and OS=="win"', {
1814 # TODO(hans): Remove once users set syzyasan (crbug.com/343960).
1815 'syzyasan%': 1,
1816 }],
[email protected]696de4e62012-11-21 21:18:541817 ['asan==1 and OS!="win"', {
[email protected]1612e552014-02-15 04:49:181818 # TODO(hans): Windows should use Clang-based ASan (crbug.com/343960).
[email protected]92799b632011-08-15 14:33:061819 'clang%': 1,
1820 }],
[email protected]f5d8c222012-08-29 17:47:021821 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091822 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571823 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091824 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021825 }],
[email protected]062522a2013-06-13 15:49:551826 ['lsan==1', {
1827 'clang%': 1,
1828 }],
[email protected]c9a829272012-07-04 07:51:121829 ['tsan==1', {
1830 'clang%': 1,
1831 }],
[email protected]a10ddd2d2013-02-26 20:06:591832 ['msan==1', {
1833 'clang%': 1,
1834 }],
[email protected]c9a829272012-07-04 07:51:121835
[email protected]7ce58b22012-09-26 05:17:251836 ['OS=="linux" and clang_type_profiler==1', {
1837 'clang%': 1,
1838 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321839 'conditions': [
1840 ['host_arch=="x64"', {
1841 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1842 }],
1843 ['host_arch=="ia32"', {
1844 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1845 # Clang in this directory at your own risk if needed for some
1846 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1847 # usage). Any failure by this compiler should not close the tree.
1848 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1849 }],
1850 ],
[email protected]7ce58b22012-09-26 05:17:251851 }],
1852
[email protected]a9318c72012-03-01 01:29:471853 # On valgrind bots, override the optimizer settings so we don't inline too
1854 # much and make the stacks harder to figure out.
1855 #
1856 # TODO(rnk): Kill off variables that no one else uses and just implement
1857 # them under a build_for_tool== condition.
1858 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1859 # gcc flags
1860 'mac_debug_optimization': '1',
1861 'mac_release_optimization': '1',
1862 'release_optimize': '1',
1863 'no_gc_sections': 1,
1864 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1865 '-fno-builtin -fno-optimize-sibling-calls',
1866 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1867 '-fno-builtin -fno-optimize-sibling-calls',
1868
1869 # MSVS flags for TSan on Pin and Windows.
1870 'win_debug_RuntimeChecks': '0',
1871 'win_debug_disable_iterator_debugging': '1',
1872 'win_debug_Optimization': '1',
1873 'win_debug_InlineFunctionExpansion': '0',
1874 'win_release_InlineFunctionExpansion': '0',
1875 'win_release_OmitFramePointers': '0',
1876
1877 'linux_use_tcmalloc': 1,
1878 'release_valgrind_build': 1,
1879 'werror': '',
1880 'component': 'static_library',
1881 'use_system_zlib': 0,
1882 }],
1883
1884 # Build tweaks for DrMemory.
1885 # TODO(rnk): Combine with tsan config to share the builder.
1886 # http://crbug.com/108155
1887 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471888 # These runtime checks force initialization of stack vars which blocks
1889 # DrMemory's uninit detection.
1890 'win_debug_RuntimeChecks': '0',
[email protected]49605d42013-10-18 13:58:171891 # Iterator debugging is slow.
[email protected]a9318c72012-03-01 01:29:471892 'win_debug_disable_iterator_debugging': '1',
1893 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161894 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1895 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1896 # compiler bug, so we use /Ob1 instead.
1897 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471898 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501899 # Ditto for debug, to support bumping win_debug_Optimization.
1900 'win_debug_InlineFunctionExpansion': 0,
1901 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471902 # Keep the code under #ifndef NVALGRIND.
1903 'release_valgrind_build': 1,
1904 }],
[email protected]b6a5ac92012-10-29 18:17:221905
[email protected]fcc89bf2013-10-30 17:37:211906 # Enable RLZ on Win, Mac, iOS and ChromeOS.
1907 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221908 'enable_rlz%': 1,
1909 }],
[email protected]7d6763422013-04-26 12:06:541910
1911 # Set default compiler flags depending on ARM version.
[email protected]7d6763422013-04-26 12:06:541912 ['arm_version==6 and android_webview_build==0', {
1913 'arm_arch%': 'armv6',
1914 'arm_tune%': '',
[email protected]70f970d2013-12-16 14:11:381915 'arm_fpu%': 'vfp',
1916 'arm_float_abi%': 'softfp',
[email protected]7d6763422013-04-26 12:06:541917 'arm_thumb%': 0,
1918 }],
1919 ['arm_version==7 and android_webview_build==0', {
1920 'arm_arch%': 'armv7-a',
[email protected]f6ebd312014-01-30 07:53:421921 'arm_tune%': '',
[email protected]7d6763422013-04-26 12:06:541922 'conditions': [
1923 ['arm_neon==1', {
1924 'arm_fpu%': 'neon',
1925 }, {
1926 'arm_fpu%': 'vfpv3-d16',
1927 }],
1928 ],
[email protected]3f85dac32013-10-29 02:38:461929 # Change the default to hard once the armhf transition is complete.
[email protected]7d6763422013-04-26 12:06:541930 'arm_float_abi%': 'softfp',
1931 'arm_thumb%': 1,
1932 }],
1933
1934 ['android_webview_build==1', {
1935 # The WebView build gets its cpu-specific flags from the Android build system.
1936 'arm_arch%': '',
1937 'arm_tune%': '',
1938 'arm_fpu%': '',
1939 'arm_float_abi%': '',
1940 'arm_thumb%': 0,
1941 }],
[email protected]5ac4b902013-10-22 17:21:291942
1943 # Enable brlapi by default for chromeos.
1944 [ 'chromeos==1', {
1945 'use_brlapi%': 1,
1946 }],
[email protected]f93c2c92013-10-31 18:22:441947
1948 ['use_ozone==1', {
[email protected]4814ed22013-11-01 05:37:261949 # This is the default platform
[email protected]f93c2c92013-10-31 18:22:441950 'ozone_platform%': "test",
[email protected]4814ed22013-11-01 05:37:261951
1952 # Enable built-in ozone platforms if ozone is enabled.
1953 'ozone_platform_dri%': 1,
1954 'ozone_platform_test%': 1,
[email protected]c64a9d22013-11-07 20:10:441955 }, { # use_ozone==0
1956 'ozone_platform_dri%': 0,
1957 'ozone_platform_test%': 0,
[email protected]f93c2c92013-10-31 18:22:441958 }],
[email protected]da7aed42013-12-17 22:28:311959
1960 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
1961 'use_clipboard_aurax11%': 1,
1962 }],
1963
[email protected]e71a3622013-12-04 07:32:411964 ['OS=="win" and use_goma==1', {
1965 # goma doesn't support pch yet.
1966 'chromium_win_pch': 0,
1967 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
1968 'conditions': [
1969 ['fastbuild==0', {
1970 'win_z7': 1,
1971 }],
1972 ],
1973 }],
[email protected]8efc26082014-01-24 13:26:351974
1975 ['OS=="win" and clang==1', {
1976 'chromium_win_pch': 0,
1977 }],
1978
[email protected]9f7615ee2013-12-19 21:38:381979 # The seccomp-bpf sandbox is only supported on three architectures
1980 # currently.
1981 # Do not disable seccomp_bpf anywhere without talking to
1982 # [email protected]!
1983 ['((OS=="linux" or OS=="android") and '
1984 '(target_arch=="ia32" or target_arch=="x64" or '
1985 'target_arch=="arm"))', {
1986 'use_seccomp_bpf%': 1,
1987 }, {
1988 'use_seccomp_bpf%': 0,
1989 }],
[email protected]912c55c2009-07-31 23:33:551990 ],
[email protected]a9318c72012-03-01 01:29:471991
[email protected]6a502252013-12-13 11:49:091992 # The path to the ANGLE library.
1993 'angle_path': '<(DEPTH)/third_party/angle',
[email protected]c91dc722013-06-12 22:53:011994
[email protected]35958422011-09-28 02:03:591995 # List of default apps to install in new profiles. The first list contains
1996 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061997 # contains the destination location for each of the files. When a crx
1998 # is added or removed from the list, the chrome/browser/resources/
1999 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:592000 'default_apps_list': [
2001 'browser/resources/default_apps/external_extensions.json',
2002 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062003 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592004 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002005 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232006 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592007 ],
2008 'default_apps_list_linux_dest': [
2009 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
2010 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:062011 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:592012 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:002013 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:232014 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:592015 ],
[email protected]2f80c312009-02-25 21:26:552016 },
2017 'target_defaults': {
[email protected]1c966092009-08-20 21:19:262018 'variables': {
[email protected]a6e22132010-02-10 20:43:182019 # The condition that operates on chromium_code is in a target_conditions
2020 # section, and will not have access to the default fallback value of
2021 # chromium_code at the top of this file, or to the chromium_code
2022 # variable placed at the root variables scope of .gyp files, because
2023 # those variables are not set at target scope. As a workaround,
2024 # if chromium_code is not set at target scope, define it in target scope
2025 # to contain whatever value it has during early variable expansion.
2026 # That's enough to make it available during target conditional
2027 # processing.
2028 'chromium_code%': '<(chromium_code)',
2029
[email protected]7e0d664a2009-12-03 21:07:472030 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
2031 'win_release_Optimization%': '2', # 2 = /Os
2032 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:332033
2034 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:242035 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:112036 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:242037 # Tri-state: blank is default, 1 on, 0 off
2038 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:332039
[email protected]6b0507b2010-05-07 07:41:212040 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
2041 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:332042
[email protected]6b0507b2010-05-07 07:41:212043 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:152044 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2045 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:332046
[email protected]fac10d12010-11-08 16:00:312047 # VS inserts quite a lot of extra checks to algorithms like
2048 # std::partial_sort in Debug build which make them O(N^2)
2049 # instead of O(N*logN). This is particularly slow under memory
2050 # tools like ThreadSanitizer so we want it to be disablable.
2051 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
2052 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:472053
[email protected]5d60b0b2013-07-30 20:24:302054 # An application manifest fragment to declare compatibility settings for
2055 # 'executable' targets. Ignored in other target type.
2056 'win_exe_compatibility_manifest%':
2057 '<(DEPTH)\\build\\win\\compatibility.manifest',
2058
2059 # Set to 1 to generate external manifest instead of embedding it for
2060 # 'executable' target. Does nothing for other target type. This flag is
2061 # used to make mini_installer compatible with the component build.
2062 # See http://crbug.com/127233
2063 'win_use_external_manifest%': 0,
2064
[email protected]ffd984b12009-09-11 19:37:002065 'release_extra_cflags%': '',
2066 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:002067
2068 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:522069
[email protected]ef5c5f1b2011-12-17 02:16:242070 # the non-qualified versions are widely assumed to be *nix-only
2071 'win_release_extra_cflags%': '',
2072 'win_debug_extra_cflags%': '',
2073
[email protected]b1eb341c2011-11-09 18:46:072074 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2075 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2076
[email protected]ef3326702011-10-06 18:06:442077 # Only used by Windows build for now. Can be used to build into a
2078 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2079 # output files in src/build/VS2010_{Debug,Release}.
2080 'build_dir_prefix%': '',
2081
[email protected]9ac2db692012-06-08 01:01:572082 # Targets are by default not nacl untrusted code.
2083 'nacl_untrusted_build%': 0,
2084
[email protected]9c55d9d2012-11-15 23:28:442085 'pnacl_compile_flags': [
[email protected]7dcd93c2013-11-02 02:05:532086 # pnacl uses the clang compiler so we need to suppress all the
[email protected]9c55d9d2012-11-15 23:28:442087 # same warnings as we do for clang.
2088 # TODO(sbc): Remove these if/when they are removed from the clang
2089 # build.
2090 '-Wno-unused-function',
2091 '-Wno-char-subscripts',
2092 '-Wno-c++11-extensions',
2093 '-Wno-unnamed-type-template-args',
2094 ],
2095
[email protected]8974e042010-06-21 18:06:522096 'conditions': [
2097 ['OS=="win" and component=="shared_library"', {
2098 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:162099 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2100 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:522101 }, {
2102 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2103 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2104 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2105 }],
[email protected]1e013672012-06-29 22:12:202106 ['OS=="ios"', {
2107 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2108 'mac_release_optimization%': 's', # Use -Os unless overridden
2109 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2110 }, {
2111 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2112 'mac_release_optimization%': '3', # Use -O3 unless overridden
2113 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2114 }],
[email protected]625eb032014-02-13 21:48:252115 ['OS=="android"', {
2116 'host_os%': '<(host_os)', # See comment above chromium_code.
2117 }],
[email protected]8974e042010-06-21 18:06:522118 ],
[email protected]1c966092009-08-20 21:19:262119 },
[email protected]c91dc722013-06-12 22:53:012120 'defines': [
[email protected]6d84e0b2013-12-05 12:16:132121 # Don't use deprecated V8 APIs anywhere.
2122 'V8_DEPRECATION_WARNINGS',
[email protected]c91dc722013-06-12 22:53:012123 ],
[email protected]32aa8cc2009-03-04 21:36:392124 'conditions': [
[email protected]d808e212013-03-12 14:06:162125 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:312126 'dependencies': [
2127 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2128 ],
2129 }],
[email protected]7ce58b22012-09-26 05:17:252130 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
2131 'cflags_cc!': ['-fno-rtti'],
2132 'cflags_cc+': [
2133 '-frtti',
2134 '-gline-tables-only',
2135 '-fintercept-allocation-functions',
2136 ],
2137 'defines': ['TYPE_PROFILING'],
2138 'dependencies': [
2139 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2140 ],
2141 }],
[email protected]b0c45722013-01-23 04:47:322142 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
2143 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
2144 # See http://crbug.com/162818.
2145 'cflags+': ['-Wno-sentinel'],
2146 }],
[email protected]32aa8cc2009-03-04 21:36:392147 ['branding=="Chrome"', {
2148 'defines': ['GOOGLE_CHROME_BUILD'],
2149 }, { # else: branding!="Chrome"
2150 'defines': ['CHROMIUM_BUILD'],
2151 }],
[email protected]286d9a12012-05-30 16:20:382152 ['OS=="mac" and component=="shared_library"', {
2153 'xcode_settings': {
2154 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2155 'LD_RUNPATH_SEARCH_PATHS': [
2156 # For unbundled binaries.
2157 '@loader_path/.',
2158 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2159 '@loader_path/../../..',
2160 ],
2161 },
2162 }],
[email protected]b6a5ac92012-10-29 18:17:222163 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:172164 'defines': ['ENABLE_RLZ'],
2165 }],
[email protected]63e39a282011-07-13 20:41:282166 ['component=="shared_library"', {
2167 'defines': ['COMPONENT_BUILD'],
2168 }],
[email protected]06c756182010-04-27 18:31:312169 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:172170 'defines': ['TOOLKIT_VIEWS=1'],
2171 }],
[email protected]1ee7c56c2011-10-19 14:51:332172 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:112173 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2174 }],
[email protected]41423092011-08-25 15:39:582175 ['use_aura==1', {
2176 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:352177 }],
[email protected]ed329be2012-01-03 22:02:162178 ['use_ash==1', {
2179 'defines': ['USE_ASH=1'],
2180 }],
[email protected]928362a2013-11-19 20:17:162181 ['use_cairo==1', {
2182 'defines': ['USE_CAIRO=1'],
2183 }],
[email protected]2a76009b2013-08-07 21:02:312184 ['use_cras==1', {
2185 'defines': ['USE_CRAS=1'],
2186 }],
[email protected]6ec70cc72013-11-20 05:33:462187 ['use_glib==1', {
2188 'defines': ['USE_GLIB=1'],
2189 }],
[email protected]ff78e4e2013-05-03 19:19:152190 ['use_ozone==1', {
2191 'defines': ['USE_OZONE=1'],
2192 }],
[email protected]cb800562012-11-20 22:36:072193 ['use_default_render_theme==1', {
2194 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2195 }],
[email protected]e190d272012-08-30 17:36:442196 ['use_libjpeg_turbo==1', {
2197 'defines': ['USE_LIBJPEG_TURBO=1'],
2198 }],
[email protected]c329adf82011-10-05 14:34:572199 ['use_nss==1', {
2200 'defines': ['USE_NSS=1'],
2201 }],
[email protected]2fa2f2d82013-04-29 18:13:122202 ['use_x11==1', {
2203 'defines': ['USE_X11=1'],
2204 }],
[email protected]89dcd662013-12-12 23:06:502205 ['use_clipboard_aurax11==1', {
2206 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2207 }],
[email protected]bd7b6fe2012-03-05 21:02:402208 ['enable_one_click_signin==1', {
2209 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2210 }],
[email protected]a47aa892011-11-22 03:12:312211 ['toolkit_uses_gtk==1 and toolkit_views==0', {
2212 # TODO(erg): We are progressively sealing up use of deprecated features
2213 # in gtk in preparation for an eventual porting to gtk3.
2214 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
2215 }],
[email protected]fdc5bed2010-01-09 01:16:572216 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:292217 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:502218 }],
[email protected]23485ba2013-09-15 00:50:002219 ['use_xi2_mt!=0 and use_x11==1', {
[email protected]f56797b2011-09-25 00:04:352220 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
2221 }],
[email protected]77a848262013-02-22 11:17:252222 ['image_loader_extension==1', {
2223 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2224 }],
[email protected]7664ab32011-02-01 23:35:252225 ['profiling==1', {
2226 'defines': ['ENABLE_PROFILING=1'],
2227 }],
[email protected]542bf24a2010-06-11 23:08:172228 ['remoting==1', {
2229 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002230 }],
[email protected]5b87e782012-02-09 18:19:322231 ['enable_webrtc==1', {
2232 'defines': ['ENABLE_WEBRTC=1'],
2233 }],
[email protected]d01120e62010-05-10 17:04:482234 ['proprietary_codecs==1', {
2235 'defines': ['USE_PROPRIETARY_CODECS'],
2236 }],
[email protected]7ddea9802012-02-22 23:08:052237 ['enable_viewport==1', {
2238 'defines': ['ENABLE_VIEWPORT'],
2239 }],
[email protected]280755c2013-05-23 10:44:352240 ['enable_pepper_cdms==1', {
2241 'defines': ['ENABLE_PEPPER_CDMS'],
2242 }],
[email protected]f31e2e52011-07-14 16:01:192243 ['configuration_policy==1', {
2244 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2245 }],
[email protected]9eb100e2011-10-14 05:08:222246 ['input_speech==1', {
2247 'defines': ['ENABLE_INPUT_SPEECH'],
2248 }],
[email protected]7cce3232011-10-28 10:41:572249 ['notifications==1', {
2250 'defines': ['ENABLE_NOTIFICATIONS'],
2251 }],
[email protected]1efbaaa2012-04-24 02:43:242252 ['enable_hidpi==1', {
2253 'defines': ['ENABLE_HIDPI=1'],
2254 }],
[email protected]cef6c76f2013-10-30 16:33:302255 ['native_discardable_memory==1', {
2256 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2257 }],
2258 ['native_memory_pressure_signals==1', {
2259 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2260 }],
[email protected]49513e02013-11-20 08:36:402261 ['use_udev==1', {
2262 'defines': ['USE_UDEV'],
2263 }],
[email protected]9c1949e2009-10-02 19:59:542264 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312265 'xcode_settings': {
2266 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2267 },
[email protected]9c1949e2009-10-02 19:59:542268 'conditions': [
[email protected]7df38122012-11-05 23:54:432269 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:302270 # Clang creates chubby debug information, which makes linking very
2271 # slow. For now, don't create debug information with clang. See
2272 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432273 'conditions': [
2274 ['OS=="linux"', {
2275 'variables': {
2276 'debug_extra_cflags': '-g0',
2277 },
2278 }],
2279 # Android builds symbols on release by default, disable them.
2280 ['OS=="android"', {
2281 'variables': {
2282 'debug_extra_cflags': '-g0',
2283 'release_extra_cflags': '-g0',
2284 },
2285 }],
2286 ],
2287 }, { # else clang!=1
2288 'conditions': [
[email protected]c86fd472013-04-02 19:42:302289 ['OS=="win" and fastbuild==2', {
2290 # Completely disable debug information.
2291 'msvs_settings': {
2292 'VCLinkerTool': {
2293 'GenerateDebugInformation': 'false',
2294 },
2295 'VCCLCompilerTool': {
2296 'DebugInformationFormat': '0',
2297 },
2298 },
2299 }],
2300 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432301 'msvs_settings': {
2302 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312303 # This tells the linker to generate .pdbs, so that
2304 # we can get meaningful stack traces.
2305 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432306 },
2307 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312308 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432309 'DebugInformationFormat': '0',
2310 },
2311 },
2312 }],
[email protected]c86fd472013-04-02 19:42:302313 ['OS=="linux" and fastbuild==2', {
2314 'variables': {
2315 'debug_extra_cflags': '-g0',
2316 },
2317 }],
2318 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432319 'variables': {
2320 'debug_extra_cflags': '-g1',
2321 },
2322 }],
[email protected]c86fd472013-04-02 19:42:302323 ['OS=="android" and fastbuild==2', {
2324 'variables': {
2325 'debug_extra_cflags': '-g0',
2326 'release_extra_cflags': '-g0',
2327 },
2328 }],
2329 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432330 'variables': {
2331 'debug_extra_cflags': '-g1',
2332 'release_extra_cflags': '-g1',
2333 },
2334 }],
2335 ],
2336 }], # clang!=1
2337 ],
[email protected]9c1949e2009-10-02 19:59:542338 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012339 ['dcheck_always_on!=0', {
2340 'defines': ['DCHECK_ALWAYS_ON=1'],
2341 }], # dcheck_always_on!=0
[email protected]65b0819e2013-06-21 15:24:002342 ['logging_like_official_build!=0', {
2343 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2344 }], # logging_like_official_build!=0
[email protected]a1e87422013-07-09 21:47:012345 ['tracing_like_official_build!=0', {
2346 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2347 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472348 ['win_use_allocator_shim==0', {
2349 'conditions': [
2350 ['OS=="win"', {
2351 'defines': ['NO_TCMALLOC'],
2352 }],
2353 ],
2354 }],
[email protected]b1c2a5542010-10-08 12:44:402355 ['use_openssl==1', {
2356 'defines': [
2357 'USE_OPENSSL=1',
2358 ],
2359 }],
[email protected]ed154592010-04-29 00:18:502360 ['enable_eglimage==1', {
2361 'defines': [
2362 'ENABLE_EGLIMAGE=1',
2363 ],
2364 }],
[email protected]1612e552014-02-15 04:49:182365 ['syzyasan==1', {
2366 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
[email protected]696de4e62012-11-21 21:18:542367 'msvs_settings': {
2368 'VCLinkerTool': {
2369 'Profile': 'true',
2370 },
2371 },
[email protected]2f047202013-06-14 06:36:392372 'defines': [
[email protected]bba0fea32013-06-14 12:29:352373 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:392374 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2375 ],
[email protected]1612e552014-02-15 04:49:182376 }],
[email protected]4e4d6042010-08-26 18:34:382377 ['OS=="win"', {
2378 'defines': [
2379 '__STD_C',
2380 '_CRT_SECURE_NO_DEPRECATE',
2381 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102382 # This define is required to pull in the new Win8 interfaces from
2383 # system headers like ShObjIdl.h.
2384 'NTDDI_VERSION=0x06020000',
[email protected]37416742013-11-12 07:13:332385 # This is required for ATL to use XP-safe versions of its functions.
2386 '_USING_V110_SDK71_',
[email protected]4e4d6042010-08-26 18:34:382387 ],
2388 'include_dirs': [
2389 '<(DEPTH)/third_party/wtl/include',
2390 ],
[email protected]9619e65d2012-05-23 19:06:522391 'conditions': [
2392 ['win_z7!=0', {
2393 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092394 # Generates debug info when win_z7=1
2395 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2396 'VCLinkerTool': {
2397 'GenerateDebugInformation': 'true',
2398 },
[email protected]9619e65d2012-05-23 19:06:522399 'VCCLCompilerTool': {
2400 'DebugInformationFormat': '1',
2401 }
2402 }
2403 }],
2404 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382405 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022406 ['enable_task_manager==1', {
2407 'defines': [
2408 'ENABLE_TASK_MANAGER=1',
2409 ],
2410 }],
[email protected]6a3cd37e2012-04-17 17:13:342411 ['enable_extensions==1', {
2412 'defines': [
2413 'ENABLE_EXTENSIONS=1',
2414 ],
2415 }],
[email protected]13eb97d2012-01-05 01:07:122416 ['OS=="win" and branding=="Chrome"', {
2417 'defines': ['ENABLE_SWIFTSHADER'],
2418 }],
[email protected]407dfa632011-12-23 11:59:352419 ['enable_dart==1', {
2420 'defines': ['WEBKIT_USING_DART=1'],
2421 }],
[email protected]18e0f39b2012-01-17 16:47:342422 ['enable_plugin_installation==1', {
2423 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2424 }],
[email protected]6d17f6392012-12-05 05:24:542425 ['enable_plugins==1', {
2426 'defines': ['ENABLE_PLUGINS=1'],
2427 }],
[email protected]cdb756ef2012-04-05 18:34:532428 ['enable_session_service==1', {
2429 'defines': ['ENABLE_SESSION_SERVICE=1'],
2430 }],
[email protected]6b40bb582012-03-15 20:50:382431 ['enable_themes==1', {
2432 'defines': ['ENABLE_THEMES=1'],
2433 }],
[email protected]57e67ac2013-02-22 03:37:222434 ['enable_autofill_dialog==1', {
2435 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2436 }],
[email protected]0acdd772012-04-05 22:53:002437 ['enable_background==1', {
2438 'defines': ['ENABLE_BACKGROUND=1'],
2439 }],
[email protected]2e22e2f2012-03-15 21:53:102440 ['enable_automation==1', {
2441 'defines': ['ENABLE_AUTOMATION=1'],
2442 }],
[email protected]6ee43a72012-12-07 22:44:402443 ['enable_google_now==1', {
2444 'defines': ['ENABLE_GOOGLE_NOW=1'],
2445 }],
[email protected]3b5e88d2013-09-06 11:03:062446 ['cld_version!=0', {
2447 'defines': ['CLD_VERSION=<(cld_version)'],
2448 }],
[email protected]658677f2012-06-09 06:04:022449 ['enable_printing==1', {
[email protected]1e54c1c2013-08-12 17:16:052450 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2451 }],
2452 ['enable_printing==2', {
[email protected]658677f2012-06-09 06:04:022453 'defines': ['ENABLE_PRINTING=1'],
2454 }],
[email protected]c6ce08072013-07-31 07:48:532455 ['enable_spellcheck==1', {
2456 'defines': ['ENABLE_SPELLCHECK=1'],
2457 }],
[email protected]e6026962012-06-14 21:28:322458 ['enable_captive_portal_detection==1', {
2459 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2460 }],
[email protected]dc4e8b82012-11-15 03:58:162461 ['enable_app_list==1', {
2462 'defines': ['ENABLE_APP_LIST=1'],
2463 }],
2464 ['enable_settings_app==1', {
2465 'defines': ['ENABLE_SETTINGS_APP=1'],
2466 }],
[email protected]9bfe0ab2012-08-30 13:18:112467 ['disable_ftp_support==1', {
2468 'defines': ['DISABLE_FTP_SUPPORT=1'],
2469 }],
[email protected]0850e842013-01-19 03:44:312470 ['enable_managed_users==1', {
2471 'defines': ['ENABLE_MANAGED_USERS=1'],
2472 }],
[email protected]3f0ed2172013-11-04 20:27:292473 ['data_reduction_fallback_host != ""', {
2474 'defines': [
2475 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'],
2476 }],
[email protected]324856d2014-01-14 11:17:302477 ['data_reduction_dev_host != ""', {
2478 'defines': [
2479 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'],
2480 }],
[email protected]199def22013-02-21 17:52:292481 ['spdy_proxy_auth_origin != ""', {
2482 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2483 }],
2484 ['spdy_proxy_auth_property != ""', {
2485 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2486 }],
[email protected]f37e9412013-05-27 23:18:252487 ['spdy_proxy_auth_value != ""', {
2488 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2489 }],
[email protected]d8dd60e2013-10-08 00:49:432490 ['data_reduction_proxy_probe_url != ""', {
2491 'defines': [
2492 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'],
2493 }],
[email protected]5cbeb502013-04-23 19:25:272494 ['enable_mdns==1', {
2495 'defines': ['ENABLE_MDNS=1'],
[email protected]b9171622013-10-01 22:05:232496 }],
2497 ['enable_enhanced_bookmarks==1', {
2498 'defines': ['ENABLE_ENHANCED_BOOKMARKS=1'],
[email protected]8c64e282013-11-28 16:05:142499 }],
[email protected]754a2002014-02-14 16:40:342500 ['enable_hangout_services_extension==1', {
2501 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'],
2502 }],
[email protected]8c64e282013-11-28 16:05:142503 ['enable_ipc_fuzzer==1', {
2504 'defines': ['ENABLE_IPC_FUZZER=1'],
2505 }],
[email protected]9d0c62c2014-02-18 20:27:032506 ['OS=="win" and component=="shared_library"', {
2507 'dependencies': [
2508 # All targets in a component build must depend on chrome_redirects,
2509 # to ensure that certain calls go through it.
2510 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_redirects',
2511 ],
2512 }],
[email protected]a6e22132010-02-10 20:43:182513 ], # conditions for 'target_defaults'
2514 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072515 ['enable_wexit_time_destructors==1', {
2516 'conditions': [
2517 [ 'clang==1', {
2518 'cflags': [
2519 '-Wexit-time-destructors',
2520 ],
2521 'xcode_settings': {
2522 'WARNING_CFLAGS': [
2523 '-Wexit-time-destructors',
2524 ],
2525 },
2526 }],
2527 ],
2528 }],
[email protected]c14d8e772010-02-09 22:06:152529 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282530 'conditions': [
[email protected]1e013672012-06-29 22:12:202531 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332532 # We don't want to get warnings from third-party code,
2533 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282534 'cflags!': [
2535 '-Wall',
2536 '-Wextra',
[email protected]d8543312010-02-10 17:43:282537 ],
[email protected]167ec822011-10-24 22:05:272538 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002539 # Don't warn about hash_map in third-party code.
2540 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272541 ],
2542 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332543 # Don't warn about printf format problems.
2544 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222545 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002546 ],
[email protected]d16bd642011-07-25 23:59:182547 'cflags_cc!': [
[email protected]f58fa2c2013-12-06 08:06:202548 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
[email protected]d16bd642011-07-25 23:59:182549 '-Wsign-compare',
2550 ]
[email protected]d8543312010-02-10 17:43:282551 }],
[email protected]82dd5eb32012-08-18 04:24:322552 # TODO: Fix all warnings on chromeos too.
2553 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2554 'cflags!': [
2555 '-Werror',
2556 ],
2557 }],
[email protected]bc073c062012-01-13 06:28:032558 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112559 'cflags': [
2560 # Don't warn about ignoring the return value from e.g. close().
2561 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032562 # BSD systems do not support this option, since they are usually
2563 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112564 '-Wno-unused-result',
2565 ],
2566 }],
[email protected]d8543312010-02-10 17:43:282567 [ 'OS=="win"', {
2568 'defines': [
2569 '_CRT_SECURE_NO_DEPRECATE',
2570 '_CRT_NONSTDC_NO_WARNINGS',
2571 '_CRT_NONSTDC_NO_DEPRECATE',
2572 '_SCL_SECURE_NO_DEPRECATE',
2573 ],
2574 'msvs_disabled_warnings': [4800],
2575 'msvs_settings': {
2576 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112577 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242578 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282579 'Detect64BitPortabilityProblems': 'false',
2580 },
2581 },
[email protected]c54b41cb2012-08-24 20:58:242582 'conditions': [
2583 ['buildtype=="Official"', {
2584 'msvs_settings': {
2585 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2586 }
2587 }],
[email protected]8efc26082014-01-24 13:26:352588 ['clang==1', {
2589 'msvs_settings': {
2590 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2591 }
2592 }],
[email protected]c54b41cb2012-08-24 20:58:242593 ],
[email protected]d8543312010-02-10 17:43:282594 }],
[email protected]0915c3b2012-11-22 17:24:072595 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422596 [ 'OS=="win" and component=="shared_library"', {
2597 'msvs_disabled_warnings': [
2598 4251, # class 'std::xx' needs to have dll-interface.
2599 ],
2600 }],
[email protected]1e013672012-06-29 22:12:202601 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282602 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062603 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282604 },
[email protected]3a352c362012-05-08 19:45:492605 'conditions': [
2606 ['buildtype=="Official"', {
2607 'xcode_settings': {
2608 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2609 },
2610 }],
2611 ],
[email protected]d8543312010-02-10 17:43:282612 }],
[email protected]1e013672012-06-29 22:12:202613 [ 'OS=="ios"', {
2614 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222615 # TODO(ios): Fix remaining warnings in third-party code, then
2616 # remove this; the Mac cleanup didn't get everything that's
2617 # flagged in an iOS build.
2618 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202619 'RUN_CLANG_STATIC_ANALYZER': 'NO',
[email protected]5a2637d02013-11-12 17:01:172620 # Several internal ios directories generate numerous warnings for
2621 # -Wobjc-missing-property-synthesis.
2622 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
[email protected]1e013672012-06-29 22:12:202623 },
2624 }],
[email protected]c14d8e772010-02-09 22:06:152625 ],
2626 }, {
[email protected]a5c598152012-01-27 04:55:132627 'includes': [
2628 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2629 'filename_rules.gypi',
2630 ],
[email protected]41af4f82012-11-08 00:09:312631 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152632 # C99 macros on Mac and Linux.
2633 'defines': [
[email protected]41af4f82012-11-08 00:09:312634 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152635 '__STDC_FORMAT_MACROS',
2636 ],
2637 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152638 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072639 # turn on warnings for signed/unsigned mismatch on chromium code.
2640 'msvs_settings': {
2641 'VCCLCompilerTool': {
2642 'AdditionalOptions': ['/we4389'],
2643 },
2644 },
[email protected]c14d8e772010-02-09 22:06:152645 }],
[email protected]63e39a282011-07-13 20:41:282646 ['OS=="win" and component=="shared_library"', {
2647 'msvs_disabled_warnings': [
2648 4251, # class 'std::xx' needs to have dll-interface.
2649 ],
2650 }],
[email protected]c14d8e772010-02-09 22:06:152651 ],
2652 }],
[email protected]a6e22132010-02-10 20:43:182653 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552654 'default_configuration': 'Debug',
2655 'configurations': {
[email protected]5153767c2009-12-22 01:52:502656 # VCLinkerTool LinkIncremental values below:
2657 # 0 == default
2658 # 1 == /INCREMENTAL:NO
2659 # 2 == /INCREMENTAL
2660 # Debug links incremental, Release does not.
2661 #
[email protected]7b99801e2010-11-03 17:26:232662 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502663 #
2664 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562665 'abstract': 1,
2666 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512667 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562668 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2669 'CharacterSet': '1',
2670 },
[email protected]f59e1302013-02-15 13:48:402671 # Add the default import libs.
2672 'msvs_settings':{
2673 'VCLinkerTool': {
2674 'AdditionalDependencies': [
2675 'kernel32.lib',
2676 'gdi32.lib',
2677 'winspool.lib',
2678 'comdlg32.lib',
2679 'advapi32.lib',
2680 'shell32.lib',
2681 'ole32.lib',
2682 'oleaut32.lib',
2683 'user32.lib',
2684 'uuid.lib',
2685 'odbc32.lib',
2686 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392687 'delayimp.lib',
[email protected]48293fb2013-12-04 04:02:032688 'credui.lib',
2689 'netapi32.lib',
[email protected]f59e1302013-02-15 13:48:402690 ],
2691 },
2692 },
[email protected]5153767c2009-12-22 01:52:502693 },
2694 'x86_Base': {
2695 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502696 'msvs_settings': {
2697 'VCLinkerTool': {
[email protected]388484f02014-02-06 09:49:212698 'MinimumRequiredVersion': '5.01', # XP.
[email protected]ef4fa4072009-12-04 22:46:502699 'TargetMachine': '1',
2700 },
[email protected]2d584a92013-11-12 22:44:392701 'VCLibrarianTool': {
2702 'TargetMachine': '1',
2703 },
[email protected]ef4fa4072009-12-04 22:46:502704 },
[email protected]2fa40782009-11-01 21:17:342705 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562706 },
[email protected]5153767c2009-12-22 01:52:502707 'x64_Base': {
2708 'abstract': 1,
2709 'msvs_configuration_platform': 'x64',
2710 'msvs_settings': {
2711 'VCLinkerTool': {
2712 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502713 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052714 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502715 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052716 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362717 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2718 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502719 },
[email protected]d26b4418ab2010-03-24 22:06:352720 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502721 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052722 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502723 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052724 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]2d584a92013-11-12 22:44:392725 'TargetMachine': '17', # x64
[email protected]5153767c2009-12-22 01:52:502726 },
2727 },
[email protected]5153767c2009-12-22 01:52:502728 },
2729 'Debug_Base': {
2730 'abstract': 1,
[email protected]14339762011-04-05 07:36:582731 'defines': [
2732 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2733 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2734 ],
[email protected]1c966092009-08-20 21:19:262735 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:292736 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492737 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492738 '<@(debug_extra_cflags)',
2739 ],
[email protected]1c966092009-08-20 21:19:262740 },
[email protected]bb05e452009-10-29 21:24:562741 'msvs_settings': {
2742 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472743 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562744 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212745 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472746 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152747 'conditions': [
2748 # According to MSVS, InlineFunctionExpansion=0 means
2749 # "default inlining", not "/Ob0".
2750 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2751 ['win_debug_InlineFunctionExpansion==0', {
2752 'AdditionalOptions': ['/Ob0'],
2753 }],
2754 ['win_debug_InlineFunctionExpansion!=""', {
2755 'InlineFunctionExpansion':
2756 '<(win_debug_InlineFunctionExpansion)',
2757 }],
[email protected]fac10d12010-11-08 16:00:312758 ['win_debug_disable_iterator_debugging==1', {
2759 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2760 }],
[email protected]ef5c5f1b2011-12-17 02:16:242761
2762 # if win_debug_OmitFramePointers is blank, leave as default
2763 ['win_debug_OmitFramePointers==1', {
2764 'OmitFramePointers': 'true',
2765 }],
2766 ['win_debug_OmitFramePointers==0', {
2767 'OmitFramePointers': 'false',
2768 # The above is not sufficient (http://crbug.com/106711): it
2769 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2770 # perform FPO regardless, so we must explicitly disable.
2771 # We still want the false setting above to avoid having
2772 # "/Oy /Oy-" and warnings about overriding.
2773 'AdditionalOptions': ['/Oy-'],
2774 }],
[email protected]2ae6e022010-05-07 13:19:152775 ],
[email protected]ef5c5f1b2011-12-17 02:16:242776 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562777 },
2778 'VCLinkerTool': {
2779 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332780 # ASLR makes debugging with windbg difficult because Chrome.exe and
2781 # Chrome.dll share the same base name. As result, windbg will
2782 # name the Chrome.dll module like chrome_<base address>, where
2783 # <base address> typically changes with each launch. This in turn
2784 # means that breakpoints in Chrome.dll don't stick from one launch
2785 # to the next. For this reason, we turn ASLR off in debug builds.
2786 # Note that this is a three-way bool, where 0 means to pick up
2787 # the default setting, 1 is off and 2 is on.
2788 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562789 },
2790 'VCResourceCompilerTool': {
2791 'PreprocessorDefinitions': ['_DEBUG'],
2792 },
2793 },
[email protected]2f80c312009-02-25 21:26:552794 'conditions': [
[email protected]78204c92012-09-14 04:42:552795 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542796 'target_conditions': [
2797 ['_toolset=="target"', {
2798 'cflags': [
2799 '<@(debug_extra_cflags)',
2800 ],
2801 }],
[email protected]bb05e452009-10-29 21:24:562802 ],
[email protected]2f80c312009-02-25 21:26:552803 }],
[email protected]1eec679e2013-12-13 22:10:272804 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
[email protected]a8d94b42013-12-10 18:52:222805 # Enable libstdc++ debugging facilities to help catch problems
2806 # early, see http://crbug.com/65151 .
2807 # TODO(phajdan.jr): Should we enable this for all of POSIX?
2808 'defines': ['_GLIBCXX_DEBUG=1',],
2809 }],
[email protected]1e013672012-06-29 22:12:202810 # Disabled on iOS because it was causing a crash on startup.
2811 # TODO(michelea): investigate, create a reduced test and possibly
2812 # submit a radar.
2813 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352814 'xcode_settings': {
2815 'OTHER_CFLAGS': [
2816 '-fstack-protector-all', # Implies -fstack-protector
2817 ],
2818 },
2819 }],
[email protected]2f80c312009-02-25 21:26:552820 ],
2821 },
[email protected]5153767c2009-12-22 01:52:502822 'Release_Base': {
2823 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552824 'defines': [
2825 'NDEBUG',
2826 ],
[email protected]1c966092009-08-20 21:19:262827 'xcode_settings': {
2828 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2829 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002830 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262831 },
[email protected]bb05e452009-10-29 21:24:562832 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472833 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472834 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152835 'conditions': [
[email protected]2212d272011-12-20 21:37:372836 # In official builds, each target will self-select
2837 # an optimization level.
2838 ['buildtype!="Official"', {
2839 'Optimization': '<(win_release_Optimization)',
2840 },
2841 ],
[email protected]2ae6e022010-05-07 13:19:152842 # According to MSVS, InlineFunctionExpansion=0 means
2843 # "default inlining", not "/Ob0".
2844 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2845 ['win_release_InlineFunctionExpansion==0', {
2846 'AdditionalOptions': ['/Ob0'],
2847 }],
2848 ['win_release_InlineFunctionExpansion!=""', {
2849 'InlineFunctionExpansion':
2850 '<(win_release_InlineFunctionExpansion)',
2851 }],
[email protected]626d2d22011-10-11 15:47:332852
[email protected]ef5c5f1b2011-12-17 02:16:242853 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332854 ['win_release_OmitFramePointers==1', {
2855 'OmitFramePointers': 'true',
2856 }],
2857 ['win_release_OmitFramePointers==0', {
2858 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242859 # The above is not sufficient (http://crbug.com/106711): it
2860 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2861 # perform FPO regardless, so we must explicitly disable.
2862 # We still want the false setting above to avoid having
2863 # "/Oy /Oy-" and warnings about overriding.
2864 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332865 }],
[email protected]2ae6e022010-05-07 13:19:152866 ],
[email protected]ef5c5f1b2011-12-17 02:16:242867 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472868 },
[email protected]bb05e452009-10-29 21:24:562869 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342870 # LinkIncremental is a tri-state boolean, where 0 means default
2871 # (i.e., inherit from parent solution), 1 means false, and
2872 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562873 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342874 # This corresponds to the /PROFILE flag which ensures the PDB
2875 # file contains FIXUP information (growing the PDB file by about
2876 # 5%) but does not otherwise alter the output binary. This
2877 # information is used by the Syzygy optimization tool when
2878 # decomposing the release image.
2879 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562880 },
2881 },
[email protected]2f80c312009-02-25 21:26:552882 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162883 ['msvs_use_common_release', {
2884 'includes': ['release.gypi'],
2885 }],
[email protected]7bdd7d7c2012-11-01 10:36:162886 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582887 'defines': [
2888 'NVALGRIND',
2889 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2890 ],
[email protected]ee857512010-05-14 08:24:422891 }, {
[email protected]14339762011-04-05 07:36:582892 'defines': [
[email protected]2f047202013-06-14 06:36:392893 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582894 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2895 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2896 ],
[email protected]92822e82009-09-18 14:26:562897 }],
[email protected]7e0d664a2009-12-03 21:07:472898 ['win_use_allocator_shim==0', {
2899 'defines': ['NO_TCMALLOC'],
2900 }],
[email protected]8b225222014-02-18 22:54:442901 # _FORTIFY_SOURCE isn't really supported by Clang now, see
2902 # http://llvm.org/bugs/show_bug.cgi?id=16821.
2903 # TODO(glider): once the bug is fixed, disable source fortification
2904 # under the sanitizer tools only.
2905 ['os_posix==1 and (OS!="linux" or clang!=1)', {
[email protected]9577be42013-11-01 15:16:302906 'target_conditions': [
2907 ['chromium_code==1', {
2908 # Non-chromium code is not guaranteed to compile cleanly
2909 # with _FORTIFY_SOURCE. Also, fortified build may fail
2910 # when optimizations are disabled, so only do that for Release
2911 # build.
2912 'defines': [
2913 '_FORTIFY_SOURCE=2',
2914 ],
2915 }],
[email protected]37305ae2012-12-11 01:54:582916 ],
2917 }],
[email protected]7df38122012-11-05 23:54:432918 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542919 'target_conditions': [
2920 ['_toolset=="target"', {
2921 'cflags': [
2922 '<@(release_extra_cflags)',
2923 ],
2924 }],
[email protected]bb05e452009-10-29 21:24:562925 ],
2926 }],
[email protected]b64ec822013-05-23 12:57:412927 ['OS=="ios"', {
2928 'defines': [
2929 'NS_BLOCK_ASSERTIONS=1',
2930 ],
2931 }],
[email protected]2f80c312009-02-25 21:26:552932 ],
2933 },
[email protected]5153767c2009-12-22 01:52:502934 #
2935 # Concrete configurations
2936 #
2937 'Debug': {
2938 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2939 },
2940 'Release': {
2941 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502942 },
[email protected]f926fa0a2009-08-04 22:50:132943 'conditions': [
2944 [ 'OS=="win"', {
2945 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502946 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502947 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302948 },
2949 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502950 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302951 },
[email protected]f926fa0a2009-08-04 22:50:132952 }],
2953 ],
[email protected]2f80c312009-02-25 21:26:552954 },
2955 },
2956 'conditions': [
[email protected]43539ec2012-11-20 22:35:252957 ['os_posix==1', {
2958 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252959 'ldflags': [
2960 '-Wl,-z,now',
2961 '-Wl,-z,relro',
2962 ],
[email protected]43539ec2012-11-20 22:35:252963 },
2964 }],
[email protected]d2ca75c2013-02-01 05:47:172965 ['os_posix==1 and chromeos==0', {
2966 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2967 # and we want to avoid overriding this, so stack-protector is only
2968 # enabled when not building on Chrome OS.
2969 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2970 # supports it.
2971 'target_defaults': {
2972 'cflags': [
2973 '-fstack-protector',
2974 '--param=ssp-buffer-size=4',
2975 ],
2976 },
2977 }],
[email protected]1e013672012-06-29 22:12:202978 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262979 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272980 # Enable -Werror by default, but put it in a variable so it can
2981 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2982 'variables': {
[email protected]cbbb3472012-01-25 18:32:312983 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202984 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272985 },
[email protected]6863896f2012-01-25 17:51:362986 'defines': [
2987 '_FILE_OFFSET_BITS=64',
2988 ],
[email protected]9d384032009-03-20 23:13:262989 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162990 '<(werror)', # See note above about the werror variable.
2991 '-pthread',
2992 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292993 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162994 '-Wall',
[email protected]0fa17082010-03-26 00:48:052995 # TODO(evan): turn this back on once all the builds work.
2996 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202997 # Don't warn about unused function params. We use those everywhere.
2998 '-Wno-unused-parameter',
2999 # Don't warn about the "struct foo f = {0};" initialization pattern.
3000 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:123001 # Don't export any symbols (for example, to plugins we dlopen()).
3002 # Note: this is *required* to make some plugins work.
3003 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:353004 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:243005 ],
3006 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:223007 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:243008 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:363009 # Make inline functions have hidden visiblity by default.
3010 # Surprisingly, not covered by -fvisibility=hidden.
3011 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:173012 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
[email protected]f58fa2c2013-12-06 08:06:203013 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
[email protected]554abd902011-07-25 04:03:173014 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:263015 ],
[email protected]a6cf87e2009-04-03 04:07:383016 'ldflags': [
[email protected]138241f2010-03-30 23:53:103017 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:263018 ],
[email protected]1e013672012-06-29 22:12:203019 'libraries' : [
3020 '<(libraries_for_target)',
3021 ],
[email protected]3aacaf952009-04-02 15:34:093022 'configurations': {
[email protected]5153767c2009-12-22 01:52:503023 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:313024 'variables': {
3025 'debug_optimize%': '0',
3026 },
[email protected]3aacaf952009-04-02 15:34:093027 'defines': [
3028 '_DEBUG',
3029 ],
3030 'cflags': [
[email protected]95ad2032012-08-24 00:49:253031 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:093032 '-g',
3033 ],
[email protected]da1c8d692011-09-20 20:35:013034 'conditions' : [
[email protected]3f05e912013-04-11 20:38:343035 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:343036 'ldflags': [
[email protected]933d0722013-07-03 04:32:493037 '-Wl,--fatal-warnings',
3038 # Only link with needed input sections. This is to avoid
3039 # getting undefined reference to __cxa_bad_typeid in the CDU
3040 # library.
[email protected]3f05e912013-04-11 20:38:343041 '-Wl,--gc-sections',
[email protected]933d0722013-07-03 04:32:493042 # Warn in case of text relocations.
3043 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:343044 ],
3045 }],
[email protected]fa9d4e262012-08-21 04:39:003046 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:553047 # Some configurations are copied from Release_Base to reduce
3048 # the binary size.
3049 'variables': {
3050 'debug_optimize%': 's',
3051 },
[email protected]da1c8d692011-09-20 20:35:013052 'cflags': [
[email protected]8a37e4502012-08-14 22:42:553053 '-fomit-frame-pointer',
3054 '-fdata-sections',
3055 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:013056 ],
[email protected]8a37e4502012-08-14 22:42:553057 'ldflags': [
3058 '-Wl,-O1',
3059 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:553060 ],
[email protected]da1c8d692011-09-20 20:35:013061 }],
[email protected]d4c0ec5b2013-03-10 03:07:453062 ['OS=="linux" and target_arch=="ia32"', {
3063 'ldflags': [
3064 '-Wl,--no-as-needed',
3065 ],
3066 }],
[email protected]2578ea12014-01-17 06:02:513067 ['debug_unwind_tables==1', {
3068 'cflags': ['-funwind-tables'],
3069 }, {
3070 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3071 }],
[email protected]da1c8d692011-09-20 20:35:013072 ],
[email protected]5315f2842009-04-28 00:43:273073 },
[email protected]5153767c2009-12-22 01:52:503074 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:013075 'variables': {
3076 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:513077 # Binaries become big and gold is unable to perform GC
3078 # and remove unused sections for some of test targets
3079 # on 32 bit platform.
3080 # (This is currently observed only in chromeos valgrind bots)
3081 # The following flag is to disable --gc-sections linker
3082 # option for these bots.
3083 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:123084
3085 # TODO(bradnelson): reexamine how this is done if we change the
3086 # expansion of configurations
3087 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:013088 },
[email protected]3aacaf952009-04-02 15:34:093089 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:183090 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:533091 # Don't emit the GCC version ident directives, they just end up
3092 # in the .comment section taking up binary size.
3093 '-fno-ident',
3094 # Put data and code in their own sections, so that unused symbols
3095 # can be removed at link time with --gc-sections.
3096 '-fdata-sections',
3097 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:093098 ],
[email protected]c902f2c2010-08-06 20:04:183099 'ldflags': [
3100 # Specifically tell the linker to perform optimizations.
3101 # See http://lwn.net/Articles/192624/ .
3102 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:223103 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:183104 ],
[email protected]1dd529642010-05-15 01:02:513105 'conditions' : [
3106 ['no_gc_sections==0', {
3107 'ldflags': [
3108 '-Wl,--gc-sections',
3109 ],
3110 }],
[email protected]da1c8d692011-09-20 20:35:013111 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:583112 'variables': {
3113 'release_optimize%': 's',
3114 },
[email protected]da1c8d692011-09-20 20:35:013115 'cflags': [
3116 '-fomit-frame-pointer',
3117 ],
[email protected]933d0722013-07-03 04:32:493118 'ldflags': [
3119 '-Wl,--fatal-warnings',
3120 # Warn in case of text relocations.
3121 '-Wl,--warn-shared-textrel',
3122 ],
[email protected]da1c8d692011-09-20 20:35:013123 }],
[email protected]ecf7b6482010-10-13 09:15:203124 ['clang==1', {
3125 'cflags!': [
3126 '-fno-ident',
3127 ],
3128 }],
[email protected]7664ab32011-02-01 23:35:253129 ['profiling==1', {
3130 'cflags': [
3131 '-fno-omit-frame-pointer',
3132 '-g',
3133 ],
[email protected]0358c4832013-06-23 14:17:583134 'conditions' : [
3135 ['profiling_full_stack_frames==1', {
3136 'cflags': [
3137 '-fno-inline',
3138 '-fno-optimize-sibling-calls',
3139 ],
3140 }],
3141 ],
[email protected]7664ab32011-02-01 23:35:253142 }],
[email protected]2578ea12014-01-17 06:02:513143 ['release_unwind_tables==1', {
3144 'cflags': ['-funwind-tables'],
3145 }, {
3146 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
[email protected]a637d4382014-01-11 03:12:053147 }],
[email protected]8d726a42012-02-09 03:49:003148 ],
[email protected]3aacaf952009-04-02 15:34:093149 },
3150 },
[email protected]606116d22009-05-06 22:38:233151 'conditions': [
[email protected]04b482602011-09-14 02:36:213152 ['target_arch=="ia32"', {
3153 'target_conditions': [
3154 ['_toolset=="target"', {
3155 'asflags': [
3156 # Needed so that libs with .s files (e.g. libicudata.a)
3157 # are compatible with the general 32-bit-ness.
3158 '-32',
3159 ],
3160 # All floating-point computations on x87 happens in 80-bit
3161 # precision. Because the C and C++ language standards allow
3162 # the compiler to keep the floating-point values in higher
3163 # precision than what's specified in the source and doing so
3164 # is more efficient than constantly rounding up to 64-bit or
3165 # 32-bit precision as specified in the source, the compiler,
3166 # especially in the optimized mode, tries very hard to keep
3167 # values in x87 floating-point stack (in 80-bit precision)
3168 # as long as possible. This has important side effects, that
3169 # the real value used in computation may change depending on
3170 # how the compiler did the optimization - that is, the value
3171 # kept in 80-bit is different than the value rounded down to
3172 # 64-bit or 32-bit. There are possible compiler options to
3173 # make this behavior consistent (e.g. -ffloat-store would keep
3174 # all floating-values in the memory, thus force them to be
3175 # rounded to its original precision) but they have significant
3176 # runtime performance penalty.
3177 #
3178 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3179 # which keep floating-point values in SSE registers in its
3180 # native precision (32-bit for single precision, and 64-bit
3181 # for double precision values). This means the floating-point
3182 # value used during computation does not change depending on
3183 # how the compiler optimized the code, since the value is
3184 # always kept in its specified precision.
3185 'conditions': [
3186 ['branding=="Chromium" and disable_sse2==0', {
3187 'cflags': [
3188 '-march=pentium4',
3189 '-msse2',
3190 '-mfpmath=sse',
3191 ],
3192 }],
3193 # ChromeOS targets Pinetrail, which is sse3, but most of the
3194 # benefit comes from sse2 so this setting allows ChromeOS
3195 # to build on other CPUs. In the future -march=atom would
3196 # help but requires a newer compiler.
3197 ['chromeos==1 and disable_sse2==0', {
3198 'cflags': [
3199 '-msse2',
[email protected]1d07e92b2013-08-16 19:54:513200 '-mfpmath=sse',
[email protected]04b482602011-09-14 02:36:213201 ],
3202 }],
[email protected]0a0063c52013-03-29 06:36:213203 # Use gold linker for Android ia32 target.
3204 ['OS=="android"', {
3205 'cflags': [
3206 '-fuse-ld=gold',
3207 ],
3208 'ldflags': [
3209 '-fuse-ld=gold',
3210 ],
3211 }],
[email protected]04b482602011-09-14 02:36:213212 # Install packages have started cropping up with
3213 # different headers between the 32-bit and 64-bit
3214 # versions, so we have to shadow those differences off
3215 # and make sure a 32-bit-on-64-bit build picks up the
3216 # right files.
[email protected]32594022012-05-10 03:22:283217 # For android build, use NDK headers instead of host headers
3218 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213219 'include_dirs+': [
3220 '/usr/include32',
3221 ],
3222 }],
3223 ],
3224 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
3225 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:063226 'cflags': [
[email protected]04b482602011-09-14 02:36:213227 '-m32',
3228 '-mmmx',
3229 ],
3230 'ldflags': [
3231 '-m32',
[email protected]ffde7932009-05-29 00:39:063232 ],
3233 }],
[email protected]606116d22009-05-06 22:38:233234 ],
3235 }],
[email protected]3dda8a962009-08-10 18:58:073236 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293237 'target_conditions': [
3238 ['_toolset=="target"', {
3239 'cflags_cc': [
3240 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3241 # has changed whenever it encounters a varargs function. This
3242 # silences those warnings, as they are not helpful and
3243 # clutter legitimate warnings.
3244 '-Wno-abi',
3245 ],
3246 'conditions': [
[email protected]7d6763422013-04-26 12:06:543247 ['arm_arch!=""', {
3248 'cflags': [
3249 '-march=<(arm_arch)',
3250 ],
3251 }],
3252 ['arm_tune!=""', {
3253 'cflags': [
3254 '-mtune=<(arm_tune)',
3255 ],
3256 }],
3257 ['arm_fpu!=""', {
3258 'cflags': [
3259 '-mfpu=<(arm_fpu)',
3260 ],
3261 }],
3262 ['arm_float_abi!=""', {
3263 'cflags': [
3264 '-mfloat-abi=<(arm_float_abi)',
3265 ],
3266 }],
3267 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293268 'cflags': [
3269 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293270 ]
3271 }],
[email protected]da1c8d692011-09-20 20:35:013272 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533273 # Most of the following flags are derived from what Android
3274 # uses by default when building for arm, reference for which
3275 # can be found in the following file in the Android NDK:
3276 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3277 'cflags': [
3278 # The tree-sra optimization (scalar replacement for
3279 # aggregates enabling subsequent optimizations) leads to
3280 # invalid code generation when using the Android NDK's
3281 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433282 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533283 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483284 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533285 '-Wno-psabi',
3286 ],
[email protected]ad17e342012-07-17 20:45:483287 # Android now supports .relro sections properly.
3288 # NOTE: While these flags enable the generation of .relro
3289 # sections, the generated libraries can still be loaded on
3290 # older Android platform versions.
3291 'ldflags': [
3292 '-Wl,-z,relro',
3293 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483294 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483295 ],
[email protected]da1c8d692011-09-20 20:35:013296 'conditions': [
[email protected]7d6763422013-04-26 12:06:543297 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223298 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013299 }],
[email protected]4c48ef102012-11-29 22:00:383300 ['profiling==1', {
3301 'cflags': [
3302 '-marm', # Probably reduntant, but recommend by "perf" docs.
3303 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3304 ],
3305 }],
[email protected]220ea5932012-08-09 10:44:073306 ['clang==1', {
3307 'cflags!': [
3308 # Clang does not support the following options.
3309 '-mthumb-interwork',
3310 '-finline-limit=64',
3311 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483312 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073313 '-Wno-psabi',
3314 ],
[email protected]b763d402014-01-13 18:34:223315 'cflags': [
3316 # TODO(hans) Enable integrated-as (crbug.com/124610).
3317 '-no-integrated-as',
[email protected]f4091d32014-01-23 23:16:353318 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
[email protected]b763d402014-01-13 18:34:223319 ],
3320
[email protected]7d899e9a2013-10-12 06:02:423321 'ldflags!': [
3322 # Clang does not support the following options.
3323 '-fuse-ld=gold',
3324 ],
[email protected]1afb1102014-01-31 00:04:223325 'ldflags': [
3326 # As long as -fuse-ld=gold doesn't work, add a dummy directory
3327 # with an 'ld' that redirects to gold, so that clang uses gold.
3328 '-B<(PRODUCT_DIR)/../../build/android/arm-linux-androideabi-gold',
3329 ],
[email protected]220ea5932012-08-09 10:44:073330 }],
[email protected]cdc001e2014-01-23 11:07:533331 ['asan==1', {
3332 'cflags': [
3333 '-marm', # Required for frame pointer based stack traces.
3334 ],
3335 }],
[email protected]da1c8d692011-09-20 20:35:013336 ],
3337 }],
[email protected]3dda8a962009-08-10 18:58:073338 ],
3339 }],
3340 ],
3341 }],
[email protected]23eea4a42013-04-27 04:10:263342 ['target_arch=="mipsel"', {
3343 'target_conditions': [
3344 ['_toolset=="target"', {
3345 'conditions': [
[email protected]3a626e02013-06-27 12:58:343346 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263347 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343348 }],
3349 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263350 'cflags': ['-mips32', '-Wa,-mips32'],
3351 }],
3352 ],
3353 'cflags': [
3354 '-EL',
3355 '-mhard-float',
3356 ],
3357 'ldflags': [
3358 '-EL',
3359 '-Wl,--no-keep-memory'
3360 ],
3361 'cflags_cc': [
3362 '-Wno-uninitialized',
3363 ],
3364 }],
3365 ],
3366 }],
[email protected]2fb843b2010-08-12 02:11:083367 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583368 'cflags': [
3369 '-fPIC',
3370 ],
[email protected]d3f692b32011-12-14 19:04:353371 'ldflags': [
3372 '-fPIC',
3373 ],
[email protected]c76723a2010-01-25 23:10:583374 }],
[email protected]ee28c9f2009-09-04 01:53:013375 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573376 'target_conditions': [
3377 ['_toolset=="target"', {
3378 'cflags': [
3379 '--sysroot=<(sysroot)',
3380 ],
3381 'ldflags': [
3382 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153383 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573384 ],
3385 }]]
[email protected]ee28c9f2009-09-04 01:53:013386 }],
[email protected]58680ce2010-09-18 00:09:153387 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123388 'cflags': [
3389 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073390
[email protected]7ddcb1d2013-04-19 04:52:533391 # Don't die on dtoa code that uses a char as an array index.
3392 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073393
[email protected]64bbd6c2013-11-12 05:05:413394 # TODO(thakis): This used to be implied by -Wno-unused-function,
3395 # which we no longer use. Check if it makes sense to remove
3396 # this as well. http://crbug.com/316352
3397 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:103398
3399 # Warns on switches on enums that cover all enum values but
3400 # also contain a default: branch. Chrome is full of that.
3401 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513402
3403 # Warns when a const char[] is converted to bool.
3404 '-Wstring-conversion',
[email protected]ce889c22013-07-16 22:37:183405
3406 # C++11-related flags:
3407
[email protected]8dec02e2013-04-30 21:40:073408 # This warns on using ints as initializers for floats in
3409 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3410 # which happens in several places in chrome code. Not sure if
3411 # this is worth fixing.
3412 '-Wno-c++11-narrowing',
3413
[email protected]00c83cc2013-07-25 00:55:503414 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:073415 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243416
3417 # Clang considers the `register` keyword as deprecated, but e.g.
3418 # code generated by flex (used in angle) contains that keyword.
3419 # http://crbug.com/255186
3420 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073421 ],
[email protected]ce889c22013-07-16 22:37:183422 'cflags!': [
3423 # Clang doesn't seem to know know this flag.
3424 '-mfpmath=sse',
3425 ],
[email protected]8dec02e2013-04-30 21:40:073426 'cflags_cc': [
3427 # See the comment in the Mac section for what it takes to move
3428 # this to -std=c++11.
3429 '-std=gnu++11',
3430 ],
3431 }],
[email protected]bca3e082013-05-30 21:13:443432 ['clang==1 and OS=="android"', {
[email protected]ce889c22013-07-16 22:37:183433 # Android uses stlport, whose include/new defines
3434 # `void operator delete[](void* ptr) throw();`, which
3435 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3436 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3437 # via -isystem instead.
3438 'cflags_cc': [
3439 '-Wno-implicit-exception-spec-mismatch',
[email protected]8dec02e2013-04-30 21:40:073440 ],
3441 }],
[email protected]5d451ad2011-02-11 16:43:463442 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263443 'cflags': [
[email protected]c872dc52012-05-19 06:36:313444 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263445 ],
[email protected]5d451ad2011-02-11 16:43:463446 }],
[email protected]4a9ac22e2011-12-02 03:41:533447 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263448 'cflags': [
3449 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533450 ],
3451 }],
3452 ['clang==1 and clang_add_plugin!=""', {
3453 'cflags': [
[email protected]d23720682011-08-11 00:16:263454 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3455 ],
[email protected]5e781232011-01-28 02:57:593456 }],
[email protected]49110f02013-04-22 22:51:343457 ['clang==1 and target_arch=="ia32"', {
3458 'cflags': [
3459 # Else building libyuv gives clang's register allocator issues,
3460 # see llvm.org/PR15798 / crbug.com/233709
3461 '-momit-leaf-frame-pointer',
3462 ],
3463 }],
[email protected]2616d45d2012-01-19 03:15:483464 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3465 'cflags': [
3466 # See http://crbug.com/110262
3467 '-fcolor-diagnostics',
3468 ],
3469 }],
[email protected]062522a2013-06-13 15:49:553470 # Common options for AddressSanitizer, LeakSanitizer,
3471 # ThreadSanitizer and MemorySanitizer.
3472 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543473 'target_conditions': [
3474 ['_toolset=="target"', {
3475 'cflags': [
3476 '-fno-omit-frame-pointer',
3477 '-gline-tables-only',
3478 ],
[email protected]b772fce2014-01-22 09:27:523479 'cflags!': [
3480 '-fomit-frame-pointer',
3481 ],
[email protected]49110f02013-04-22 22:51:343482 'ldflags!': [
3483 # Functions interposed by the sanitizers can make ld think
3484 # that some libraries aren't needed when they actually are,
3485 # http://crbug.com/234010. As workaround, disable --as-needed.
3486 '-Wl,--as-needed',
3487 ],
[email protected]2f047202013-06-14 06:36:393488 'defines': [
3489 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3490 ],
[email protected]cf351c22013-04-19 13:00:543491 }],
3492 ],
3493 }],
[email protected]92799b632011-08-15 14:33:063494 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423495 'target_conditions': [
3496 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453497 'cflags': [
[email protected]48688df02012-11-27 21:04:563498 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563499 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453500 ],
3501 'ldflags': [
[email protected]48688df02012-11-27 21:04:563502 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453503 ],
3504 'defines': [
3505 'ADDRESS_SANITIZER',
3506 ],
[email protected]1ffc3b3962012-05-16 14:08:423507 }],
[email protected]921c7b52011-11-25 10:34:353508 ],
[email protected]92799b632011-08-15 14:33:063509 }],
[email protected]544a18ed2014-01-17 21:01:363510 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:033511 'target_conditions': [
3512 ['_toolset=="target"', {
3513 'cflags': [
[email protected]544a18ed2014-01-17 21:01:363514 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:033515 ],
3516 }],
3517 ],
3518 }],
[email protected]062522a2013-06-13 15:49:553519 ['lsan==1', {
3520 'target_conditions': [
3521 ['_toolset=="target"', {
3522 'cflags': [
3523 '-fsanitize=leak',
3524 ],
3525 'ldflags': [
3526 '-fsanitize=leak',
3527 ],
3528 'defines': [
3529 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:523530 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:553531 ],
3532 }],
3533 ],
3534 }],
[email protected]c9a829272012-07-04 07:51:123535 ['tsan==1', {
3536 'target_conditions': [
3537 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453538 'cflags': [
[email protected]927a9d672012-11-09 11:28:203539 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293540 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203541 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453542 ],
3543 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203544 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453545 ],
3546 'defines': [
3547 'THREAD_SANITIZER',
3548 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163549 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453550 ],
3551 'target_conditions': [
3552 ['_type=="executable"', {
3553 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123554 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453555 ],
3556 }],
3557 ],
[email protected]c9a829272012-07-04 07:51:123558 }],
3559 ],
3560 }],
[email protected]a10ddd2d2013-02-26 20:06:593561 ['msan==1', {
3562 'target_conditions': [
3563 ['_toolset=="target"', {
3564 'cflags': [
3565 '-fsanitize=memory',
3566 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593567 '-fPIC',
[email protected]190d4ce62014-01-17 20:24:533568 '-fsanitize-blacklist=<(msan_blacklist)',
[email protected]a10ddd2d2013-02-26 20:06:593569 ],
3570 'ldflags': [
3571 '-fsanitize=memory',
3572 ],
3573 'defines': [
3574 'MEMORY_SANITIZER',
3575 ],
3576 'target_conditions': [
3577 ['_type=="executable"', {
3578 'ldflags': [
3579 '-pie',
3580 ],
3581 }],
3582 ],
3583 }],
3584 ],
3585 }],
[email protected]c8103a42013-11-12 13:41:303586 ['use_instrumented_libraries==1', {
3587 'dependencies': [
3588 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
3589 ],
3590 'conditions': [
3591 ['asan==1', {
3592 'target_conditions': [
3593 ['_toolset=="target"', {
3594 'ldflags': [
3595 # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
3596 '-Wl,-R,\$$ORIGIN/instrumented_libraries/asan/lib/:\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/',
3597 '-Wl,-z,origin',
3598 ],
3599 }],
3600 ],
3601 }],
[email protected]819f2192013-12-03 14:33:413602 ['msan==1', {
3603 'target_conditions': [
3604 ['_toolset=="target"', {
3605 'ldflags': [
3606 '-Wl,-R,\$$ORIGIN/instrumented_libraries/msan/lib/:\$$ORIGIN/instrumented_libraries/msan/usr/lib/x86_64-linux-gnu/',
3607 '-Wl,-z,origin',
3608 ],
3609 }],
3610 ],
3611 }],
[email protected]c8103a42013-11-12 13:41:303612 ],
3613 }],
[email protected]22b3f531e2013-12-20 13:07:283614 ['use_custom_libcxx==1', {
3615 'dependencies': [
3616 '<(DEPTH)/third_party/libc++/libc++.gyp:libc++',
3617 '<(DEPTH)/third_party/libc++abi/libc++abi.gyp:libc++abi',
3618 ],
3619 }],
[email protected]8a48f3f2012-12-04 20:14:043620 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443621 'target_conditions' : [
3622 ['_toolset=="target"', {
3623 'cflags': [
3624 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453625 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:243626 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:453627 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443628 ],
3629 }],
[email protected]82e9b002013-07-16 21:04:243630 ['_toolset=="target" and OS=="android"', {
3631 'cflags': [
3632 # Avoids errors with current NDK:
3633 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant"
3634 '-finstrument-functions-exclude-file-list=arm_neon.h',
3635 ],
3636 }],
[email protected]8a6abd12012-05-16 10:04:443637 ],
3638 }],
[email protected]ce4367d2013-01-15 16:13:103639 ['linux_dump_symbols==1', {
3640 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253641 'conditions': [
[email protected]791262fe2013-02-21 17:20:153642 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253643 'target_conditions': [
3644 ['_toolset=="target"', {
3645 'ldflags': [
[email protected]567370a32013-03-01 00:11:233646 # Workaround for linker OOM.
3647 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253648 ],
3649 }],
3650 ],
3651 }],
3652 ],
[email protected]cbd5fd52009-08-26 00:14:273653 }],
[email protected]3c8fe5482013-05-22 15:17:033654 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083655 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243656 }],
[email protected]8d726a42012-02-09 03:49:003657 ['linux_use_gold_flags==1', {
[email protected]c5a6fe42013-07-21 14:03:333658 'target_conditions': [
3659 ['_toolset=="target"', {
3660 'ldflags': [
3661 # Experimentation found that using four linking threads
3662 # saved ~20% of link time.
3663 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3664 # Only apply this to the target linker, since the host
3665 # linker might not be gold, but isn't used much anyway.
[email protected]21ed97e2014-01-14 23:40:553666 # TODO(raymes): Disable threading because gold is frequently
3667 # crashing on the bots: crbug.com/161942.
3668 # '-Wl,--threads',
3669 # '-Wl,--thread-count=4',
[email protected]c5a6fe42013-07-21 14:03:333670 ],
3671 }],
[email protected]68d01e82012-12-08 03:36:323672 ],
[email protected]8d726a42012-02-09 03:49:003673 'conditions': [
3674 ['release_valgrind_build==0', {
3675 'target_conditions': [
3676 ['_toolset=="target"', {
3677 'ldflags': [
[email protected]ffc46162014-01-16 12:19:493678 # There seems to be a conflict of --icf and -pie
3679 # in gold which can generate crashy binaries. As
3680 # a security measure, -pie takes precendence for
3681 # now.
3682 #'-Wl,--icf=safe',
3683 '-Wl,--icf=none',
[email protected]8d726a42012-02-09 03:49:003684 ],
3685 }],
3686 ],
3687 }],
3688 ],
3689 }],
[email protected]b07806c12012-02-03 22:44:593690 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593691 'ldflags': [
3692 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443693 # We pass the path to gold to the compiler. gyp leaves
3694 # unspecified what the cwd is when running the compiler,
3695 # so the normal gyp path-munging fails us. This hack
3696 # gets the right path.
[email protected]c0dada12013-11-22 20:46:533697 '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold',
[email protected]b07806c12012-02-03 22:44:593698 ],
3699 }],
[email protected]606116d22009-05-06 22:38:233700 ],
[email protected]9d384032009-03-20 23:13:263701 },
3702 }],
[email protected]c51e8d52009-12-11 20:04:063703 # FreeBSD-specific options; note that most FreeBSD options are set above,
3704 # with Linux.
3705 ['OS=="freebsd"', {
3706 'target_defaults': {
3707 'ldflags': [
3708 '-Wl,--no-keep-memory',
3709 ],
3710 },
3711 }],
[email protected]da1c8d692011-09-20 20:35:013712 # Android-specific options; note that most are set above with Linux.
3713 ['OS=="android"', {
3714 'variables': {
[email protected]25036722012-12-11 10:36:173715 # This is a unique identifier for a given build. It's used for
3716 # identifying various build artifacts corresponding to a particular
3717 # build of chrome (e.g. where to find archived symbols).
3718 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013719 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013720 # Use shared stlport library when system one used.
3721 # Figure this out early since it needs symbols from libgcc.a, so it
3722 # has to be before that in the set of libraries.
3723 ['use_system_stlport==1', {
3724 'android_stlport_library': 'stlport',
3725 }, {
[email protected]806b5232012-11-19 21:19:043726 'conditions': [
3727 ['component=="shared_library"', {
3728 'android_stlport_library': 'stlport_shared',
3729 }, {
3730 'android_stlport_library': 'stlport_static',
3731 }],
3732 ],
[email protected]da1c8d692011-09-20 20:35:013733 }],
3734 ],
3735
3736 # Placing this variable here prevents from forking libvpx, used
3737 # by remoting. Remoting is off, so it needn't built,
3738 # so forking it's deps seems like overkill.
3739 # But this variable need defined to properly run gyp.
3740 # A proper solution is to have an OS==android conditional
3741 # in third_party/libvpx/libvpx.gyp to define it.
3742 'libvpx_path': 'lib/linux/arm',
3743 },
3744 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013745 'variables': {
3746 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593747 'conditions': [
3748 # If we're using the components build, append "cr" to all shared
3749 # libraries to avoid naming collisions with android system library
3750 # versions with the same name (e.g. skia, icu).
3751 ['component=="shared_library"', {
3752 'android_product_extension': 'cr.so',
3753 }, {
3754 'android_product_extension': 'so',
3755 } ],
3756 ],
[email protected]8a37e4502012-08-14 22:42:553757 },
[email protected]da1c8d692011-09-20 20:35:013758 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593759 ['_type=="shared_library"', {
3760 'product_extension': '<(android_product_extension)',
3761 }],
3762
[email protected]da1c8d692011-09-20 20:35:013763 # Settings for building device targets using Android's toolchain.
3764 # These are based on the setup.mk file from the Android NDK.
3765 #
3766 # The NDK Android executable link step looks as follows:
3767 # $LDFLAGS
3768 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3769 # $(PRIVATE_OBJECTS) <-- The .o that we built
3770 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3771 # $(TARGET_LIBGCC) <-- libgcc.a
3772 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3773 # $(PRIVATE_LDLIBS) <-- System .so
3774 # $(TARGET_CRTEND_O) <-- crtend.o
3775 #
3776 # For now the above are approximated for executables by adding
3777 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3778 # of 'libraries'.
3779 #
3780 # The NDK Android shared library link step looks as follows:
3781 # $LDFLAGS
3782 # $(PRIVATE_OBJECTS) <-- The .o that we built
3783 # -l,--whole-archive
3784 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3785 # -l,--no-whole-archive
3786 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3787 # $(TARGET_LIBGCC) <-- libgcc.a
3788 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3789 # $(PRIVATE_LDLIBS) <-- System .so
3790 #
[email protected]ad17e342012-07-17 20:45:483791 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013792 #
3793 # For both executables and shared libraries, add the proper
3794 # libgcc.a to the start of libraries which puts it in the
3795 # proper spot after .o and .a files get linked in.
3796 #
3797 # TODO: The proper thing to do longer-tem would be proper gyp
3798 # support for a custom link command line.
3799 ['_toolset=="target"', {
3800 'cflags!': [
3801 '-pthread', # Not supported by Android toolchain.
3802 ],
3803 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013804 '-ffunction-sections',
3805 '-funwind-tables',
3806 '-g',
3807 '-fstack-protector',
3808 '-fno-short-enums',
3809 '-finline-limit=64',
3810 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013811 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013812 ],
3813 'defines': [
3814 'ANDROID',
3815 '__GNU_SOURCE=1', # Necessary for clone()
3816 'USE_STLPORT=1',
3817 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173818 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013819 ],
3820 'ldflags!': [
3821 '-pthread', # Not supported by Android toolchain.
3822 ],
3823 'ldflags': [
3824 '-nostdlib',
3825 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013826 # Don't export symbols from statically linked libraries.
3827 '-Wl,--exclude-libs=ALL',
3828 ],
[email protected]a0e48b02011-11-22 07:53:013829 'libraries': [
3830 '-l<(android_stlport_library)',
3831 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043832 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013833 '-lc',
3834 '-ldl',
[email protected]a0e48b02011-11-22 07:53:013835 '-lm',
[email protected]da1c8d692011-09-20 20:35:013836 ],
3837 'conditions': [
[email protected]806b5232012-11-19 21:19:043838 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473839 'ldflags!': [
3840 '-Wl,--exclude-libs=ALL',
3841 ],
[email protected]806b5232012-11-19 21:19:043842 }],
[email protected]220ea5932012-08-09 10:44:073843 ['clang==1', {
3844 'cflags': [
3845 # Work around incompatibilities between bionic and clang
3846 # headers.
3847 '-D__compiler_offsetof=__builtin_offsetof',
3848 '-Dnan=__builtin_nan',
3849 ],
3850 'conditions': [
3851 ['target_arch=="arm"', {
3852 'cflags': [
3853 '-target arm-linux-androideabi',
3854 '-mllvm -arm-enable-ehabi',
3855 ],
3856 'ldflags': [
3857 '-target arm-linux-androideabi',
3858 ],
3859 }],
3860 ['target_arch=="ia32"', {
3861 'cflags': [
3862 '-target x86-linux-androideabi',
3863 ],
3864 'ldflags': [
3865 '-target x86-linux-androideabi',
3866 ],
3867 }],
3868 ],
3869 }],
[email protected]ed70ed1862012-11-07 12:11:253870 ['asan==1', {
3871 'cflags': [
3872 # Android build relies on -Wl,--gc-sections removing
3873 # unreachable code. ASan instrumentation for globals inhibits
3874 # this and results in a library with unresolvable relocations.
3875 # TODO(eugenis): find a way to reenable this.
3876 '-mllvm -asan-globals=0',
3877 ],
3878 }],
[email protected]d999c3cb2013-03-12 10:22:363879 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463880 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573881 # The NDK has these things, but doesn't define the constants
3882 # to say that it does. Define them here instead.
3883 'HAVE_SYS_UIO_H',
3884 ],
3885 'cflags': [
3886 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463887 ],
[email protected]da1c8d692011-09-20 20:35:013888 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523889 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013890 ],
3891 }],
[email protected]d999c3cb2013-03-12 10:22:363892 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083893 'include_dirs': [
3894 # OpenAL headers from the Android tree.
3895 '<(android_src)/frameworks/wilhelm/include',
3896 ],
3897 'cflags': [
[email protected]04882132012-11-21 12:40:453898 # Android predefines this as 1; undefine it here so Chromium
3899 # can redefine it later to be 2 for chromium code and unset
3900 # for third party code. This works because cflags are added
3901 # before defines.
3902 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553903 # Disable any additional warnings enabled by the Android build system but which
3904 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083905 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553906 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3907 '-Wno-ignored-qualifiers',
3908 '-Wno-type-limits',
[email protected]6c55f1242014-02-12 16:06:563909 '-Wno-unused-but-set-variable',
[email protected]0d7291e2012-10-04 19:16:083910 ],
3911 'cflags_cc': [
[email protected]2f34a202013-03-11 13:59:163912 # Other things unrelated to -Wextra:
3913 '-Wno-non-virtual-dtor',
3914 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083915 ],
3916 }],
[email protected]9577be42013-11-01 15:16:303917 ['android_webview_build==1', {
3918 'target_conditions': [
3919 ['chromium_code==0', {
3920 'cflags': [
3921 # There is a class of warning which:
3922 # 1) Android always enables and also treats as errors
3923 # 2) Chromium ignores in third party code
3924 # So we re-enable those warnings when building Android.
3925 '-Wno-address',
3926 '-Wno-format-security',
3927 '-Wno-return-type',
3928 '-Wno-sequence-point',
3929 ],
3930 'cflags_cc': [
3931 '-Wno-non-virtual-dtor',
3932 ],
3933 }],
[email protected]0d7291e2012-10-04 19:16:083934 ],
3935 }],
[email protected]febd3572012-05-03 09:17:453936 ['target_arch == "arm"', {
3937 'ldflags': [
3938 # Enable identical code folding to reduce size.
3939 '-Wl,--icf=safe',
3940 ],
3941 }],
[email protected]da1c8d692011-09-20 20:35:013942 # NOTE: The stlport header include paths below are specified in
3943 # cflags rather than include_dirs because they need to come
3944 # after include_dirs. Think of them like system headers, but
3945 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3946 # toolchain (circa Gingerbread) will exhibit strange errors.
3947 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513948 ['use_system_stlport==1', {
3949 'cflags': [
3950 # For libstdc++/include, which is used by stlport.
3951 '-I<(android_src)/bionic',
3952 '-I<(android_src)/external/stlport/stlport',
3953 ],
3954 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013955 'cflags': [
[email protected]225ec632013-04-03 18:20:223956 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013957 ],
[email protected]225ec632013-04-03 18:20:223958 'ldflags': [
3959 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013960 ],
3961 }],
3962 ['target_arch=="ia32"', {
3963 # The x86 toolchain currently has problems with stack-protector.
3964 'cflags!': [
3965 '-fstack-protector',
3966 ],
3967 'cflags': [
3968 '-fno-stack-protector',
3969 ],
3970 }],
3971 ],
3972 'target_conditions': [
3973 ['_type=="executable"', {
3974 'ldflags': [
3975 '-Bdynamic',
3976 '-Wl,-dynamic-linker,/system/bin/linker',
3977 '-Wl,--gc-sections',
3978 '-Wl,-z,nocopyreloc',
3979 # crtbegin_dynamic.o should be the last item in ldflags.
3980 '<(android_ndk_lib)/crtbegin_dynamic.o',
3981 ],
3982 'libraries': [
3983 # crtend_android.o needs to be the last item in libraries.
3984 # Do not add any libraries after this!
3985 '<(android_ndk_lib)/crtend_android.o',
3986 ],
[email protected]63a131fd2012-11-06 16:01:213987 'conditions': [
3988 ['asan==1', {
3989 'cflags': [
3990 '-fPIE',
3991 ],
3992 'ldflags': [
3993 '-pie',
3994 ],
3995 }],
3996 ],
[email protected]da1c8d692011-09-20 20:35:013997 }],
[email protected]f5c7758a2012-07-25 16:17:573998 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013999 'ldflags': [
4000 '-Wl,-shared,-Bsymbolic',
4001 ],
[email protected]d093fe8b2013-04-30 18:00:234002 'conditions': [
4003 ['android_webview_build==0', {
4004 'ldflags': [
4005 # crtbegin_so.o should be the last item in ldflags.
4006 '<(android_ndk_lib)/crtbegin_so.o',
4007 ],
4008 'libraries': [
4009 # crtend_so.o needs to be the last item in libraries.
4010 # Do not add any libraries after this!
4011 '<(android_ndk_lib)/crtend_so.o',
4012 ],
4013 }],
[email protected]a08029b42012-04-25 03:18:464014 ],
[email protected]da1c8d692011-09-20 20:35:014015 }],
4016 ],
4017 }],
4018 # Settings for building host targets using the system toolchain.
4019 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:124020 'cflags!': [
4021 # Due to issues in Clang build system, using ASan on 32-bit
4022 # binaries on x86_64 host is problematic.
4023 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:564024 '-fsanitize=address',
4025 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:124026 ],
[email protected]da1c8d692011-09-20 20:35:014027 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:444028 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:014029 '-Wl,-z,noexecstack',
4030 '-Wl,--gc-sections',
4031 '-Wl,-O1',
4032 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:224033 '-Wl,--warn-shared-textrel',
4034 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:014035 ],
4036 }],
[email protected]0ccf578f2013-03-13 11:13:394037 # Settings for building host targets on mac.
4038 ['_toolset=="host" and host_os=="mac"', {
4039 'ldflags!': [
4040 '-Wl,-z,now',
4041 '-Wl,-z,relro',
4042 ],
4043 }],
[email protected]da1c8d692011-09-20 20:35:014044 ],
4045 },
4046 }],
[email protected]93f21e42010-04-01 00:35:154047 ['OS=="solaris"', {
4048 'cflags!': ['-fvisibility=hidden'],
4049 'cflags_cc!': ['-fvisibility-inlines-hidden'],
4050 }],
[email protected]1e013672012-06-29 22:12:204051 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:554052 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:424053 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:554054 'xcode_settings': {
4055 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:244056 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4057 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:314058 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:044059 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4060 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:044061 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4062 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4063 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:254064 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4065 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:044066 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4067 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4068 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4069 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:554070 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:044071 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:554072 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:044073 'WARNING_CFLAGS': [
4074 '-Wall',
4075 '-Wendif-labels',
4076 '-Wextra',
4077 # Don't warn about unused function parameters.
4078 '-Wno-unused-parameter',
4079 # Don't warn about the "struct foo f = {0};" initialization
4080 # pattern.
4081 '-Wno-missing-field-initializers',
4082 ],
[email protected]b3fb8092009-03-12 19:09:244083 'conditions': [
4084 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:594085 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4086 ],
[email protected]2936b8c2012-10-29 10:57:314087 # Note that the prebuilt Clang binaries should not be used for iOS
4088 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:284089 ['clang==1', {
[email protected]9e0756c2013-09-01 01:37:024090 # gnu++11 instead of c++11 is needed because some code uses
4091 # typeof() (a GNU extension).
4092 # TODO(thakis): Eventually switch this to c++11 instead of
4093 # gnu++11 (once typeof can be removed, which is blocked on c++11
4094 # being available everywhere).
4095 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
[email protected]3e893e0c2012-11-16 16:58:444096 # Warn if automatic synthesis is triggered with
4097 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534098 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:304099 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:284100 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:074101 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:524102
4103 # This warns on using ints as initializers for floats in
4104 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
4105 # which happens in several places in chrome code. Not sure if
4106 # this is worth fixing.
4107 '-Wno-c++11-narrowing',
4108
[email protected]66733172010-09-22 00:09:284109 # Don't die on dtoa code that uses a char as an array index.
4110 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4111 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:074112
[email protected]a6aef302013-11-09 04:18:214113 # TODO(thakis): This used to be implied by -Wno-unused-function,
4114 # which we no longer use. Check if it makes sense to remove
4115 # this as well. http://crbug.com/316352
4116 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:104117
4118 # Warns on switches on enums that cover all enum values but
4119 # also contain a default: branch. Chrome is full of that.
4120 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:514121
4122 # Warns when a const char[] is converted to bool.
4123 '-Wstring-conversion',
[email protected]ce2cad72014-02-13 18:17:354124 ],
[email protected]361b47c2013-07-02 15:13:244125
[email protected]ce2cad72014-02-13 18:17:354126 'conditions': [
4127 ['clang_xcode==0', {
4128 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4129 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
4130
4131 'WARNING_CFLAGS': [
4132 # Clang considers the `register` keyword as deprecated, but
4133 # e.g. code generated by flex (used in angle) contains that
4134 # keyword. http://crbug.com/255186
4135 #
4136 # Note: clang as shipped with Xcode is older and does not
4137 # treat the `register` as deprecated and does not define
4138 # this flag, so don't enable it if "clang_xcode" is "1".
4139 '-Wno-deprecated-register',
4140 ],
4141 }],
[email protected]66733172010-09-22 00:09:284142 ],
4143 }],
[email protected]ce2cad72014-02-13 18:17:354144 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:464145 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:314146 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:464147 ],
4148 }],
[email protected]ce2cad72014-02-13 18:17:354149 ['clang==1 and clang_xcode==0 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:594150 'OTHER_CFLAGS': [
4151 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534152 ],
4153 }],
[email protected]ce2cad72014-02-13 18:17:354154 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
[email protected]4a9ac22e2011-12-02 03:41:534155 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:594156 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4157 ],
4158 }],
[email protected]2616d45d2012-01-19 03:15:484159 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4160 'OTHER_CFLAGS': [
4161 # See http://crbug.com/110262
4162 '-fcolor-diagnostics',
4163 ],
4164 }],
[email protected]b3fb8092009-03-12 19:09:244165 ],
[email protected]2f80c312009-02-25 21:26:554166 },
[email protected]34f40892011-09-06 21:53:304167 'conditions': [
4168 ['clang==1', {
4169 'variables': {
4170 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4171 },
4172 }],
[email protected]921c7b52011-11-25 10:34:354173 ['asan==1', {
4174 'xcode_settings': {
4175 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:564176 '-fsanitize=address',
4177 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:354178 ],
[email protected]921c7b52011-11-25 10:34:354179 },
4180 'defines': [
4181 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:394182 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:354183 ],
4184 }],
[email protected]544a18ed2014-01-17 21:01:364185 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034186 'target_conditions': [
4187 ['_toolset=="target"', {
4188 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364189 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034190 ],
4191 }],
4192 ],
4193 }],
[email protected]34f40892011-09-06 21:53:304194 ],
[email protected]2f80c312009-02-25 21:26:554195 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:554196 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:464197 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:084198 'conditions': [
4199 ['asan==1', {
4200 'xcode_settings': {
4201 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:444202 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:084203 ],
4204 },
4205 }],
[email protected]c9cc9442013-12-28 21:27:444206 ['mac_write_linker_maps==1', {
4207 'xcode_settings': {
4208 'OTHER_LDFLAGS': [
4209 '-Wl,-map,>(_target_name).map',
4210 ],
4211 },
4212 }],
[email protected]4281a4e2012-08-24 19:05:084213 ],
[email protected]5d7dc972009-04-16 15:30:464214 }],
4215 ['_mac_bundle', {
4216 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:314217 'target_conditions': [
4218 ['_type=="executable"', {
4219 'conditions': [
4220 ['asan==1', {
4221 'postbuilds': [
4222 {
4223 'variables': {
4224 # Define copy_asan_dylib_path in a variable ending in
4225 # _path so that gyp understands it's a path and
4226 # performs proper relativization during dict merging.
4227 'copy_asan_dylib_path':
4228 'mac/copy_asan_runtime_dylib.sh',
4229 },
4230 'postbuild_name': 'Copy ASan runtime dylib',
4231 'action': [
4232 '<(copy_asan_dylib_path)',
4233 ],
4234 },
4235 ],
4236 }],
4237 ],
4238 }],
4239 ],
[email protected]87fde4a2009-02-28 00:50:084240 }],
[email protected]2936b8c2012-10-29 10:57:314241 ], # target_conditions
4242 }, # target_defaults
4243 }], # OS=="mac" or OS=="ios"
4244 ['OS=="mac"', {
4245 'target_defaults': {
4246 'variables': {
4247 # These should end with %, but there seems to be a bug with % in
4248 # variables that are intended to be set to different values in
4249 # different targets, like these.
4250 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:314251 # Strip debugging symbols from the target.
4252 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:374253 'conditions': [
4254 ['asan==1', {
4255 'conditions': [
4256 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:354257 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:374258 }, {
4259 'mac_real_dsym': '<(mac_want_real_dsym)'
4260 }],
4261 ],
4262 }, {
4263 'conditions': [
4264 ['mac_want_real_dsym=="default"', {
4265 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4266 }, {
4267 'mac_real_dsym': '<(mac_want_real_dsym)'
4268 }],
4269 ],
4270 }],
4271 ],
[email protected]2936b8c2012-10-29 10:57:314272 },
4273 'xcode_settings': {
4274 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4275 # (Equivalent to -fPIC)
4276 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4277 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4278 # Keep pch files below xcodebuild/.
4279 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:394280 'OTHER_CFLAGS': [
4281 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4282 # xcode_setting, but not until all downstream projects' mac bots are
4283 # using xcode >= 4.6, because that's when the default value of the
4284 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4285 # setting is a no-op as far as xcode is concerned, but the compiler
4286 # behaves differently based on whether -fno-strict-aliasing is
4287 # specified or not.
4288 '-fno-strict-aliasing', # See http://crbug.com/32204.
4289 ],
[email protected]2936b8c2012-10-29 10:57:314290 },
4291 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:104292 ['_type=="executable"', {
4293 'postbuilds': [
4294 {
4295 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:364296 # code execution when running on Mac OS X 10.7 ("Lion"), and
4297 # ensures that the position-independent executable (PIE) bit
4298 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:104299 'variables': {
[email protected]8c40f322011-08-24 03:33:364300 # Define change_mach_o_flags in a variable ending in _path
4301 # so that GYP understands it's a path and performs proper
4302 # relativization during dict merging.
4303 'change_mach_o_flags_path':
4304 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:174305 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134306 ],
4307 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174308 ['mac_pie==0 or release_valgrind_build==1', {
4309 # Don't enable PIE if it's unwanted. It's unwanted if
4310 # the target specifies mac_pie=0 or if building for
4311 # Valgrind, because Valgrind doesn't understand slide.
4312 # See the similar mac_pie/release_valgrind_build check
4313 # below.
[email protected]081c0342011-08-24 14:59:134314 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134315 '--no-pie',
4316 ],
4317 }],
4318 ],
[email protected]6303fed2011-08-11 01:12:104319 },
[email protected]8c40f322011-08-24 03:33:364320 'postbuild_name': 'Change Mach-O Flags',
4321 'action': [
4322 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134323 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364324 ],
[email protected]6303fed2011-08-11 01:12:104325 },
4326 ],
[email protected]5a5d97aa2011-09-02 15:34:004327 'conditions': [
4328 ['asan==1', {
4329 'variables': {
4330 'asan_saves_file': 'asan.saves',
4331 },
4332 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564333 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004334 },
4335 }],
4336 ],
[email protected]162407f2011-09-08 15:33:174337 'target_conditions': [
4338 ['mac_pie==1 and release_valgrind_build==0', {
4339 # Turn on position-independence (ASLR) for executables. When
4340 # PIE is on for the Chrome executables, the framework will
4341 # also be subject to ASLR.
4342 # Don't do this when building for Valgrind, because Valgrind
4343 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4344 # understand slide, and get rid of the Valgrind check.
4345 'xcode_settings': {
4346 'OTHER_LDFLAGS': [
4347 '-Wl,-pie', # Position-independent executable (MH_PIE)
4348 ],
4349 },
4350 }],
4351 ],
[email protected]6a0242bc2011-07-01 00:34:464352 }],
[email protected]9a5e72862010-09-02 16:16:584353 ['(_type=="executable" or _type=="shared_library" or \
4354 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204355 'target_conditions': [
4356 ['mac_real_dsym == 1', {
4357 # To get a real .dSYM bundle produced by dsymutil, set the
4358 # debug information format to dwarf-with-dsym. Since
4359 # strip_from_xcode will not be used, set Xcode to do the
4360 # stripping as well.
4361 'configurations': {
[email protected]5153767c2009-12-22 01:52:504362 'Release_Base': {
[email protected]24700642009-06-01 16:01:204363 'xcode_settings': {
4364 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4365 'DEPLOYMENT_POSTPROCESSING': 'YES',
4366 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074367 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254368 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074369 # The Xcode default is to strip debugging symbols
4370 # only (-S). Local symbols should be stripped as
4371 # well, which will be handled by -x. Xcode will
4372 # continue to insert -S when stripping even when
4373 # additional flags are added with STRIPFLAGS.
4374 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404375 }], # _type=="shared_library" or _type=="loadable_module"
4376 ['_type=="executable"', {
4377 'conditions': [
4378 ['asan==1', {
4379 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4380 }]
4381 ],
4382 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074383 ], # target_conditions
4384 }, # xcode_settings
4385 }, # configuration "Release"
4386 }, # configurations
[email protected]24700642009-06-01 16:01:204387 }, { # mac_real_dsym != 1
4388 # To get a fast fake .dSYM bundle, use a post-build step to
4389 # produce the .dSYM and strip the executable. strip_from_xcode
4390 # only operates in the Release configuration.
4391 'postbuilds': [
4392 {
4393 'variables': {
4394 # Define strip_from_xcode in a variable ending in _path
4395 # so that gyp understands it's a path and performs proper
4396 # relativization during dict merging.
4397 'strip_from_xcode_path': 'mac/strip_from_xcode',
4398 },
4399 'postbuild_name': 'Strip If Needed',
4400 'action': ['<(strip_from_xcode_path)'],
4401 },
[email protected]e14a9f92009-08-05 19:26:074402 ], # postbuilds
4403 }], # mac_real_dsym
4404 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584405 }], # (_type=="executable" or _type=="shared_library" or
4406 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074407 ], # target_conditions
4408 }, # target_defaults
4409 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204410 ['OS=="ios"', {
4411 'target_defaults': {
4412 'xcode_settings' : {
4413 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4414
4415 # This next block is mostly common with the 'mac' section above,
4416 # but keying off (or setting) 'clang' isn't valid for iOS as it
[email protected]7503ad1f2013-09-09 15:59:054417 # also means using Chromium's build of clang.
[email protected]1e013672012-06-29 22:12:204418
[email protected]e31ef5b2013-05-21 11:08:494419 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4420 # section above).
4421 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]3e893e0c2012-11-16 16:58:444422 # Warn if automatic synthesis is triggered with
4423 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534424 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204425 'WARNING_CFLAGS': [
4426 '-Wheader-hygiene',
4427 # Don't die on dtoa code that uses a char as an array index.
4428 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4429 '-Wno-char-subscripts',
[email protected]e3a85452013-11-14 01:46:174430 # See comment in the mac clang section above for this flag.
4431 '-Wno-unneeded-internal-declaration',
[email protected]e31ef5b2013-05-21 11:08:494432 # Match OS X clang C++11 warning settings.
4433 '-Wno-c++11-narrowing',
[email protected]1e013672012-06-29 22:12:204434 ],
[email protected]ce2cad72014-02-13 18:17:354435
4436 # Limit the valid architectures depending on "target_subarch".
4437 # This need to include the "arm" architectures but also the "x86"
4438 # ones (they are used when building for the simulator).
4439 'conditions': [
4440 ['target_subarch=="arm32"', {
4441 'VALID_ARCHS': ['armv7', 'i386'],
4442 }],
4443 ['target_subarch=="arm64"', {
4444 'VALID_ARCHS': ['arm64', 'x86_64'],
4445 }],
4446 ['target_subarch=="both"', {
4447 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
4448 }],
4449 ],
[email protected]1e013672012-06-29 22:12:204450 },
4451 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474452 ['_toolset=="host"', {
4453 'xcode_settings': {
4454 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4455 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:354456 'VALID_ARCHS': [
4457 'x86_64',
4458 ],
[email protected]c3c372e2013-10-29 22:31:514459 'ARCHS': [
[email protected]ce2cad72014-02-13 18:17:354460 'x86_64',
[email protected]c3c372e2013-10-29 22:31:514461 ],
[email protected]296bc452013-05-13 21:29:474462 },
4463 }],
4464 ['_toolset=="target"', {
4465 'xcode_settings': {
4466 # This section should be for overriding host settings. But,
4467 # since we can't negate the iphone deployment target above, we
4468 # instead set it here for target only.
4469 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]ce2cad72014-02-13 18:17:354470 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
[email protected]296bc452013-05-13 21:29:474471 },
4472 }],
[email protected]1e013672012-06-29 22:12:204473 ['_type=="executable"', {
4474 'configurations': {
4475 'Release_Base': {
4476 'xcode_settings': {
4477 'DEPLOYMENT_POSTPROCESSING': 'YES',
4478 'STRIP_INSTALLED_PRODUCT': 'YES',
4479 },
4480 },
[email protected]3c6aa862012-11-05 17:11:444481 'Debug_Base': {
4482 'xcode_settings': {
4483 # Remove dSYM to reduce build time.
4484 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4485 },
4486 },
[email protected]1e013672012-06-29 22:12:204487 },
[email protected]c3c372e2013-10-29 22:31:514488 'xcode_settings': {
4489 'conditions': [
4490 ['chromium_ios_signing', {
4491 # iOS SDK wants everything for device signed.
4492 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4493 }, {
4494 'CODE_SIGNING_REQUIRED': 'NO',
4495 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4496 }],
4497 ],
4498 },
[email protected]1e013672012-06-29 22:12:204499 }],
4500 ], # target_conditions
4501 }, # target_defaults
4502 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554503 ['OS=="win"', {
4504 'target_defaults': {
4505 'defines': [
[email protected]8e345da2012-07-01 22:10:304506 '_WIN32_WINNT=0x0602',
4507 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554508 'WIN32',
4509 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554510 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284511 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554512 '_CRT_RAND_S',
4513 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4514 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274515 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554516 ],
[email protected]8974e042010-06-21 18:06:524517 'conditions': [
[email protected]2212d272011-12-20 21:37:374518 ['buildtype=="Official"', {
4519 # In official builds, targets can self-select an optimization
4520 # level by defining a variable named 'optimize', and setting it
4521 # to one of
4522 # - "size", optimizes for minimal code size - the default.
4523 # - "speed", optimizes for speed over code size.
4524 # - "max", whole program optimization and link-time code
4525 # generation. This is very expensive and should be used
4526 # sparingly.
4527 'variables': {
4528 'optimize%': 'size',
4529 },
4530 'target_conditions': [
4531 ['optimize=="size"', {
4532 'msvs_settings': {
4533 'VCCLCompilerTool': {
4534 # 1, optimizeMinSpace, Minimize Size (/O1)
4535 'Optimization': '1',
4536 # 2, favorSize - Favor small code (/Os)
4537 'FavorSizeOrSpeed': '2',
4538 },
4539 },
4540 },
4541 ],
4542 ['optimize=="speed"', {
4543 'msvs_settings': {
4544 'VCCLCompilerTool': {
4545 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4546 'Optimization': '2',
4547 # 1, favorSpeed - Favor fast code (/Ot)
4548 'FavorSizeOrSpeed': '1',
4549 },
4550 },
4551 },
4552 ],
4553 ['optimize=="max"', {
4554 'msvs_settings': {
4555 'VCCLCompilerTool': {
4556 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4557 'Optimization': '2',
4558 # 1, favorSpeed - Favor fast code (/Ot)
4559 'FavorSizeOrSpeed': '1',
4560 # This implies link time code generation.
4561 'WholeProgramOptimization': 'true',
4562 },
4563 },
4564 },
4565 ],
4566 ],
4567 },
4568 ],
[email protected]8974e042010-06-21 18:06:524569 ['component=="static_library"', {
4570 'defines': [
4571 '_HAS_EXCEPTIONS=0',
4572 ],
4573 }],
[email protected]3e2648a2011-03-21 20:58:504574 ['secure_atl', {
4575 'defines': [
4576 '_SECURE_ATL',
4577 ],
4578 }],
[email protected]54184ce72012-10-18 07:11:264579 ['msvs_express', {
4580 'configurations': {
4581 'x86_Base': {
4582 'msvs_settings': {
4583 'VCLinkerTool': {
4584 'AdditionalLibraryDirectories':
4585 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4586 },
4587 'VCLibrarianTool': {
4588 'AdditionalLibraryDirectories':
4589 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4590 },
4591 },
4592 },
4593 'x64_Base': {
4594 'msvs_settings': {
4595 'VCLibrarianTool': {
4596 'AdditionalLibraryDirectories':
4597 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4598 },
4599 'VCLinkerTool': {
4600 'AdditionalLibraryDirectories':
4601 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4602 },
4603 },
4604 },
4605 },
4606 'msvs_settings': {
4607 'VCLinkerTool': {
4608 # Explicitly required when using the ATL with express
4609 'AdditionalDependencies': ['atlthunk.lib'],
4610
4611 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4612 # almost eight hundred LNK4254 and LNK4078 warnings:
4613 # - warning LNK4254: section 'ATL' (50000040) merged into
4614 # '.rdata' (40000040) with different attributes
4615 # - warning LNK4078: multiple 'ATL' sections found with
4616 # different attributes
4617 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4618 },
4619 },
4620 'msvs_system_include_dirs': [
4621 '<(windows_driver_kit_path)/inc/atl71',
4622 '<(windows_driver_kit_path)/inc/mfc42',
4623 ],
[email protected]9577be42013-11-01 15:16:304624 'target_conditions': [
[email protected]1a52d8022014-02-04 17:50:014625 ['chromium_code and MSVS_VERSION=="2010e"', {
[email protected]9577be42013-11-01 15:16:304626 # Workaround for intsafe in 2010 Express + WDK.
4627 # ATL code uses intsafe.h and both intsafe.h and stdint.h
4628 # define INT8_MIN et al.
4629 # We can't use this workaround in third_party code because
4630 # it has various levels of intolerance for including stdint.h.
[email protected]1a52d8022014-02-04 17:50:014631 # This is not necessary in 2013e, and should be removed once
4632 # mainline is switched: http://crbug.com/340358.
[email protected]9577be42013-11-01 15:16:304633 'msvs_system_include_dirs': [
4634 '<(DEPTH)/build',
4635 ],
4636 'msvs_settings': {
4637 'VCCLCompilerTool': {
4638 'ForcedIncludeFiles': [ 'intsafe_workaround.h', ],
4639 },
4640 },
4641 }],
[email protected]3f3f45f2013-10-28 19:30:434642 ],
[email protected]3f3f45f2013-10-28 19:30:434643 }],
[email protected]8974e042010-06-21 18:06:524644 ],
[email protected]5b5ca7cb2009-07-20 23:00:204645 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054646 '<(windows_sdk_path)/Include/shared',
4647 '<(windows_sdk_path)/Include/um',
4648 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554649 '$(VSInstallDir)/VC/atlmfc/include',
4650 ],
[email protected]bab6e232013-11-27 22:52:394651 'msvs_cygwin_shell': 0,
[email protected]7815a362013-04-26 08:12:004652 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114653 # TODO(maruel): These warnings are level 4. They will be slowly
4654 # removed as code is fixed.
4655 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004656 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4657 4706,
[email protected]942c3a60f2011-05-03 02:04:114658 ],
[email protected]2f80c312009-02-25 21:26:554659 'msvs_settings': {
4660 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444661 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554662 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554663 'BufferSecurityCheck': 'true',
4664 'EnableFunctionLevelLinking': 'true',
4665 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114666 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554667 'WarnAsError': 'true',
4668 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584669 'conditions': [
[email protected]8974e042010-06-21 18:06:524670 ['component=="shared_library"', {
4671 'ExceptionHandling': '1', # /EHsc
4672 }, {
4673 'ExceptionHandling': '0',
4674 }],
[email protected]3fef6e62009-07-31 19:58:584675 ],
[email protected]2f80c312009-02-25 21:26:554676 },
4677 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164678 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374679 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054680 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374681 ],
[email protected]2f80c312009-02-25 21:26:554682 },
4683 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554684 'AdditionalDependencies': [
4685 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504686 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554687 'version.lib',
4688 'msimg32.lib',
4689 'ws2_32.lib',
4690 'usp10.lib',
4691 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084692 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484693 'winmm.lib',
4694 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554695 ],
[email protected]a78da50e2010-06-09 21:31:374696 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054697 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374698 ],
[email protected]2f80c312009-02-25 21:26:554699 'GenerateDebugInformation': 'true',
4700 'MapFileName': '$(OutDir)\\$(TargetName).map',
4701 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554702 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484703 # SubSystem values:
4704 # 0 == not set
4705 # 1 == /SUBSYSTEM:CONSOLE
4706 # 2 == /SUBSYSTEM:WINDOWS
4707 # Most of the executables we'll ever create are tests
4708 # and utilities with console output.
4709 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554710 },
4711 'VCMIDLTool': {
4712 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094713 'TypeLibraryName': '$(InputName).tlb',
4714 'OutputDirectory': '$(IntDir)',
4715 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334716 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094717 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4718 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554719 },
4720 'VCResourceCompilerTool': {
4721 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384722 'AdditionalIncludeDirectories': [
4723 '<(DEPTH)',
4724 '<(SHARED_INTERMEDIATE_DIR)',
4725 ],
[email protected]2f80c312009-02-25 21:26:554726 },
[email protected]5d60b0b2013-07-30 20:24:304727 'target_conditions': [
4728 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4729 'VCManifestTool': {
4730 'AdditionalManifestFiles': [
4731 '>(win_exe_compatibility_manifest)',
4732 ],
4733 },
4734 }],
4735 ['_type=="executable" and >(win_use_external_manifest)==0', {
4736 'VCManifestTool': {
4737 'EmbedManifest': 'true',
4738 }
4739 }],
4740 ['_type=="executable" and >(win_use_external_manifest)==1', {
4741 'VCManifestTool': {
4742 'EmbedManifest': 'false',
4743 }
4744 }],
4745 ],
[email protected]8efc26082014-01-24 13:26:354746 'conditions': [
4747 ['clang==1', {
4748 # Building with Clang on Windows is a work in progress and very
4749 # experimental. See crbug.com/82385.
4750 'VCCLCompilerTool': {
4751 'WarnAsError': 'false',
4752 'RuntimeTypeInfo': 'false',
4753 'AdditionalOptions': [
4754 '/fallback',
4755
4756 # Many files use intrinsics without including this header.
4757 # TODO(hans): Fix those files, or move this to sub-GYPs.
4758 '/FIIntrin.h',
4759
4760 # TODO(hans): Make this list shorter eventually.
4761 '-Qunused-arguments',
4762 '-Wno-c++11-compat-deprecated-writable-strings',
4763 '-Wno-char-subscripts',
4764 '-Wno-deprecated-declarations',
4765 '-Wno-deprecated-register',
4766 '-Wno-empty-body',
4767 '-Wno-enum-conversion',
[email protected]609d1c02014-02-11 02:05:134768 '-Wno-extra-tokens',
4769 '-Wno-ignored-attributes',
[email protected]8efc26082014-01-24 13:26:354770 '-Wno-incompatible-pointer-types',
[email protected]609d1c02014-02-11 02:05:134771 '-Wno-int-to-void-pointer-cast',
4772 '-Wno-invalid-noreturn',
[email protected]8efc26082014-01-24 13:26:354773 '-Wno-logical-op-parentheses',
4774 '-Wno-microsoft',
4775 '-Wno-missing-braces',
[email protected]609d1c02014-02-11 02:05:134776 '-Wno-missing-declarations',
[email protected]8efc26082014-01-24 13:26:354777 '-Wno-msvc-include',
4778 '-Wno-null-dereference',
4779 '-Wno-overloaded-virtual',
4780 '-Wno-parentheses',
4781 '-Wno-pointer-sign',
4782 '-Wno-reorder',
4783 '-Wno-return-type-c-linkage',
4784 '-Wno-self-assign',
[email protected]609d1c02014-02-11 02:05:134785 '-Wno-sometimes-uninitialized',
[email protected]8efc26082014-01-24 13:26:354786 '-Wno-switch',
4787 '-Wno-tautological-compare',
4788 '-Wno-unknown-pragmas',
4789 '-Wno-unsequenced',
4790 '-Wno-unused-function',
4791 '-Wno-unused-private-field',
4792 '-Wno-unused-value',
4793 '-Wno-unused-variable',
4794 '-ferror-limit=1',
4795 ],
4796 },
[email protected]377cbf12014-02-11 21:22:004797 'conditions': [
4798 ['MSVS_VERSION=="2013" or MSVS_VERSION=="2013e"', {
4799 'VCCLCompilerTool': {
4800 'AdditionalOptions': [
4801 '-fmsc-version=1800',
4802 ],
4803 },
4804 }],
4805 ['MSVS_VERSION=="2010" or MSVS_VERSION=="2010e"', {
4806 'VCCLCompilerTool': {
4807 'AdditionalOptions': [
4808 '-fmsc-version=1600',
4809 ],
4810 },
4811 }],
4812 ],
[email protected]8efc26082014-01-24 13:26:354813 }],
4814 ],
[email protected]2f80c312009-02-25 21:26:554815 },
4816 },
4817 }],
[email protected]79e2336c2011-05-12 18:18:344818 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314819 'target_defaults': {
4820 'defines': [
4821 'DISABLE_NACL',
4822 ],
4823 },
4824 }],
[email protected]cfbf9bc2009-12-07 22:07:564825 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194826 'target_defaults': {
4827 'msvs_settings': {
4828 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194829 'DelayLoadDLLs': [
4830 'dbghelp.dll',
4831 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014832 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194833 'uxtheme.dll',
4834 ],
4835 },
4836 },
[email protected]ef4fa4072009-12-04 22:46:504837 'configurations': {
[email protected]5153767c2009-12-22 01:52:504838 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504839 'msvs_settings': {
4840 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164841 'AdditionalOptions': [
4842 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334843 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164844 '/ignore:4199',
4845 '/ignore:4221',
4846 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434847 ],
4848 'conditions': [
[email protected]1612e552014-02-15 04:49:184849 ['syzyasan==0', {
[email protected]c3fcbd122013-06-20 10:47:434850 'AdditionalOptions': ['/largeaddressaware'],
4851 }],
[email protected]1f9471a2010-01-04 06:40:164852 ],
[email protected]ef4fa4072009-12-04 22:46:504853 },
4854 },
4855 },
[email protected]5153767c2009-12-22 01:52:504856 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504857 'msvs_settings': {
4858 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164859 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504860 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334861 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164862 '/ignore:4199',
4863 '/ignore:4221',
4864 '/nxcompat',
4865 ],
[email protected]ef4fa4072009-12-04 22:46:504866 },
4867 },
4868 },
4869 },
[email protected]48c7af72009-07-03 22:00:194870 },
4871 }],
[email protected]9821d0d2010-04-16 22:40:374872 ['enable_new_npdevice_api==1', {
4873 'target_defaults': {
4874 'defines': [
4875 'ENABLE_NEW_NPDEVICE_API',
4876 ],
4877 },
4878 }],
[email protected]5f683172013-04-27 01:53:194879 # Don't warn about the "typedef 'foo' locally defined but not used"
4880 # for gcc 4.8.
4881 # TODO: remove this flag once all builds work. See crbug.com/227506
4882 ['gcc_version>=48', {
4883 'target_defaults': {
4884 'cflags': [
4885 '-Wno-unused-local-typedefs',
4886 ],
4887 },
4888 }],
[email protected]ce2cad72014-02-13 18:17:354889 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
4890 'and OS!="win"', {
[email protected]e71a3622013-12-04 07:32:414891 'make_global_settings': [
4892 ['CC', '<(make_clang_dir)/bin/clang'],
4893 ['CXX', '<(make_clang_dir)/bin/clang++'],
4894 ['CC.host', '$(CC)'],
4895 ['CXX.host', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:304896 ],
4897 }],
[email protected]6e354d42014-01-29 01:59:214898 ['clang==1 and OS=="win"', {
4899 'make_global_settings': [
4900 # On Windows, gyp's ninja generator only looks at CC.
4901 ['CC', '<(make_clang_dir)/bin/clang-cl'],
4902 ],
4903 }],
[email protected]615fa6642012-08-14 19:17:074904 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274905 # Hardcode the compiler names in the Makefile so that
4906 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114907 'make_global_settings': [
[email protected]e71a3622013-12-04 07:32:414908 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
4909 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
4910 ['CC.host', '<!(which gcc)'],
4911 ['CXX.host', '<!(which g++)'],
[email protected]d10e2cc2012-03-20 10:45:274912 ],
4913 }],
[email protected]23eea4a42013-04-27 04:10:264914 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464915 'make_global_settings': [
4916 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4917 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
[email protected]eb5f1672013-01-31 07:56:464918 ['CC.host', '<!(which gcc)'],
4919 ['CXX.host', '<!(which g++)'],
[email protected]eb5f1672013-01-31 07:56:464920 ],
4921 }],
[email protected]e71a3622013-12-04 07:32:414922
4923 # TODO(yyanagisawa): supports GENERATOR==make
4924 # make generator doesn't support CC_wrapper without CC
4925 # in make_global_settings yet.
[email protected]ce2cad72014-02-13 18:17:354926 ['use_goma==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) and '
4927 '("<(GENERATOR)"=="ninja" or clang==1)', {
[email protected]e71a3622013-12-04 07:32:414928 'make_global_settings': [
4929 ['CC_wrapper', '<(gomadir)/gomacc'],
4930 ['CXX_wrapper', '<(gomadir)/gomacc'],
4931 ['CC.host_wrapper', '<(gomadir)/gomacc'],
4932 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
4933 ],
4934 }],
[email protected]2f80c312009-02-25 21:26:554935 ],
4936 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504937 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4938 # This block adds *project-wide* configuration settings to each project
4939 # file. It's almost always wrong to put things here. Specify your
4940 # custom xcode_settings in target_defaults to add them to targets instead.
4941
[email protected]1e013672012-06-29 22:12:204942 'conditions': [
[email protected]fca3d812012-07-27 00:55:364943 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4944 # setting sets the SDK on a project-wide basis. In order to get the
4945 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4946 # here at the project level.
[email protected]2c261532012-10-06 00:46:294947 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364948 'conditions': [
[email protected]2c261532012-10-06 00:46:294949 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364950 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294951 }, {
4952 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364953 }],
4954 ],
[email protected]2c261532012-10-06 00:46:294955 }],
4956 ['OS=="ios"', {
4957 'conditions': [
4958 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404959 'conditions': [
4960 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]c3c372e2013-10-29 22:31:514961 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404962 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:384963 }, {
4964 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:404965 }],
4966 ],
[email protected]2c261532012-10-06 00:46:294967 }, {
4968 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4969 }],
4970 ],
[email protected]1e013672012-06-29 22:12:204971 }],
4972 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204973 # Target both iPhone and iPad.
4974 'TARGETED_DEVICE_FAMILY': '1,2',
[email protected]72c0d3652013-11-05 19:11:424975 }, { # OS!="ios"
4976 'conditions': [
4977 ['target_arch=="x64"', {
4978 'ARCHS': [
4979 'x86_64'
4980 ],
4981 }],
4982 ['target_arch=="ia32"', {
4983 'ARCHS': [
4984 'i386'
4985 ],
4986 }],
4987 ],
[email protected]d64554012013-10-31 18:40:004988 }],
[email protected]1e013672012-06-29 22:12:204989 ],
[email protected]0c8ab452009-11-06 21:57:504990
[email protected]2f80c312009-02-25 21:26:554991 # The Xcode generator will look for an xcode_settings section at the root
4992 # of each dict and use it to apply settings on a file-wide basis. Most
4993 # settings should not be here, they should be in target-specific
4994 # xcode_settings sections, or better yet, should use non-Xcode-specific
4995 # settings in target dicts. SYMROOT is a special case, because many other
4996 # Xcode variables depend on it, including variables such as
4997 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4998 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4999 # files to appear (when present) in the UI as actual files and not red
5000 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
5001 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:165002 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:555003 },
[email protected]ee28c9f2009-09-04 01:53:015004}