blob: d005e6e897f3888b292de0925941a3f5f4d425be [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]6155e702012-05-02 17:56:0659 # Enable touch optimized art assets and metrics.
60 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1861
[email protected]f1f362b42012-05-15 17:46:5862 # Override buildtype to select the desired build flavor.
63 # Dev - everyday build for development/testing
64 # Official - release build (generally implies additional processing)
65 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
66 # conversion is done), some of the things which are now controlled by
67 # 'branding', such as symbol generation, will need to be refactored
68 # based on 'buildtype' (i.e. we don't care about saving symbols for
69 # non-Official # builds).
70 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1171
[email protected]e2aaaac2013-05-08 07:20:0972 # Override branding to select the desired branding flavor.
73 'branding%': 'Chromium',
74
[email protected]8796d922012-08-07 01:23:1175 'conditions': [
[email protected]2d0505202013-09-16 00:22:5276 # ChromeOS and Windows use Aura and Ash.
77 ['chromeos==1 or OS=="win"', {
[email protected]8796d922012-08-07 01:23:1178 'use_ash%': 1,
[email protected]978a2ae2013-09-13 04:28:0179 'use_aura%': 1,
[email protected]8796d922012-08-07 01:23:1180 }],
[email protected]020648aa2013-06-08 17:16:4781
[email protected]02968b82013-11-14 02:42:4382 # Ozone uses Aura.
83 ['use_ozone==1', {
84 'use_aura%': 1,
85 }],
86
[email protected]f2f33ffc2014-01-18 03:40:1787 # ToT Linux should be aura.
88 #
89 # TODO(erg): Merge this into the previous block once compiling with
90 # aura safely implies including ash capabilities.
91 ['OS=="linux"', {
92 'use_aura%': 1,
93 }],
94
[email protected]7ed44342013-09-30 08:36:1395 # Whether we're a traditional desktop unix.
96 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
97 'desktop_linux%': 1,
98 }, {
99 'desktop_linux%': 0,
100 }],
101
[email protected]94cdbf42012-12-11 19:49:22102 # Compute the architecture that we're building on.
103 ['OS=="win" or OS=="mac" or OS=="ios"', {
104 'host_arch%': 'ia32',
105 }, {
106 # This handles the Unix platforms for which there is some support.
107 # Anything else gets passed through, which probably won't work
108 # very well; such hosts should pass an explicit target_arch to
109 # gyp.
110 'host_arch%':
111 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
112 }],
[email protected]02968b82013-11-14 02:42:43113
114 # Embedded implies ozone.
115 ['embedded==1', {
116 'use_ozone%': 1,
117 }],
[email protected]e71a3622013-12-04 07:32:41118
[email protected]5be60002014-01-13 21:27:42119 ['embedded==1', {
120 'use_system_fontconfig%': 0,
121 }, {
122 'use_system_fontconfig%': 1,
123 }],
[email protected]8796d922012-08-07 01:23:11124 ],
[email protected]bb6aba32011-01-07 19:04:43125 },
126 # Copy conditionally-set variables out one scope.
127 'chromeos%': '<(chromeos)',
[email protected]7ed44342013-09-30 08:36:13128 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58129 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16130 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31131 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15132 'use_ozone%': '<(use_ozone)',
[email protected]02968b82013-11-14 02:42:43133 'embedded%': '<(embedded)',
[email protected]e0b85a52011-10-06 03:30:42134 'use_openssl%': '<(use_openssl)',
[email protected]5be60002014-01-13 21:27:42135 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]7ddea9802012-02-22 23:08:05136 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24137 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06138 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58139 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09140 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22141 'host_arch%': '<(host_arch)',
142
143 # Default architecture we're building for is the architecture we're
144 # building on.
145 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58146
[email protected]d999c3cb2013-03-12 10:22:36147 # This is set when building the Android WebView inside the Android
148 # build system, using the 'android' gyp backend. The WebView code is
149 # still built when this is unset, but builds using the normal chromium
150 # build system.
151 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53152
[email protected]7d6763422013-04-26 12:06:54153 # Set ARM architecture version.
154 'arm_version%': 7,
155
[email protected]89dcd662013-12-12 23:06:50156 # Use aurax11 for clipboard implementation. This is true on linux_aura.
157 'use_clipboard_aurax11%': 0,
158
[email protected]e71a3622013-12-04 07:32:41159 # goma settings.
160 # 1 to use goma.
161 # If no gomadir is set, it uses the default gomadir.
162 'use_goma%': 0,
163 'gomadir%': '',
164
[email protected]e72e55b2011-01-06 22:19:30165 'conditions': [
[email protected]2c858a82013-10-05 01:01:32166 # Ash needs Aura.
167 ['use_aura==0', {
168 'use_ash%': 0,
169 }],
170
[email protected]ab2017e2012-02-07 01:54:50171 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35172 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43173 'toolkit_views%': 1,
174 }, {
175 'toolkit_views%': 0,
176 }],
[email protected]1efbaaa2012-04-24 02:43:24177
[email protected]02968b82013-11-14 02:42:43178 # Embedded builds use aura without ash or views.
179 ['embedded==1', {
180 'use_aura%': 1,
181 'use_ash%': 0,
182 'toolkit_views%': 0,
183 }],
184
[email protected]8796d922012-08-07 01:23:11185 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]7ed44342013-09-30 08:36:13186 ['desktop_linux==1 and use_aura==0 and use_ozone==0', {
[email protected]8796d922012-08-07 01:23:11187 'toolkit_uses_gtk%': 1,
188 }, {
189 'toolkit_uses_gtk%': 0,
190 }],
191
[email protected]3aa8a682012-08-11 00:04:29192 # Enable HiDPI on Mac OS and Chrome OS.
193 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24194 'enable_hidpi%': 1,
195 }],
[email protected]219c7312012-05-10 20:32:40196
[email protected]c71fe6402012-08-15 15:22:55197 # Enable touch UI on Metro.
198 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06199 'enable_touch_ui%': 1,
200 }],
[email protected]dc4e8b82012-11-15 03:58:16201
[email protected]7ed44342013-09-30 08:36:13202 # Enable App Launcher on ChromeOS, Windows and OSX.
203 # On Linux, enable App Launcher for the Aura build.
204 ['use_ash==1 or OS=="win" or OS=="mac" or (desktop_linux==1 and use_aura==1)', {
[email protected]dc4e8b82012-11-15 03:58:16205 'enable_app_list%': 1,
206 }, {
207 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09208 }],
209
[email protected]cb800562012-11-20 22:36:07210 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26211 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07212 }, {
213 'use_default_render_theme%': 0,
214 }],
[email protected]02968b82013-11-14 02:42:43215
216 ['use_ozone==1', {
217 'use_ozone_evdev%': 1,
218 }, {
219 'use_ozone_evdev%': 0,
[email protected]e71a3622013-12-04 07:32:41220 }],
221
222 # Set default gomadir.
223 ['OS=="win"', {
224 'gomadir': 'c:\\goma\\goma-win',
[email protected]91b91292014-01-18 23:54:41225 }, {
[email protected]e71a3622013-12-04 07:32:41226 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
227 }],
[email protected]e72e55b2011-01-06 22:19:30228 ],
229 },
230
231 # Copy conditionally-set variables out one scope.
232 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30233 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22234 'target_arch%': '<(target_arch)',
[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]6155e702012-05-02 17:56:06249 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36250 'android_webview_build%': '<(android_webview_build)',
[email protected]e71a3622013-12-04 07:32:41251 'use_goma%': '<(use_goma)',
252 'gomadir%': '<(gomadir)',
[email protected]dc4e8b82012-11-15 03:58:16253 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07254 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22255 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09256 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54257 'arm_version%': '<(arm_version)',
[email protected]e14a9f92009-08-05 19:26:07258
[email protected]c86fd472013-04-02 19:42:30259 # Set to 1 to enable fast builds. Set to 2 for even faster builds
260 # (it disables debug info for fastest compilation - only for use
261 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30262 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49263
[email protected]20960e072011-09-20 20:59:01264 # Set to 1 to enable dcheck in release without having to use the flag.
265 'dcheck_always_on%': 0,
266
[email protected]65b0819e2013-06-21 15:24:00267 # Set to 1 to make a build that logs like an official build, but is not
268 # necessarily an official build, ie DCHECK and DLOG are disabled and
269 # removed completely in release builds, to minimize binary footprint.
270 # Note: this setting is ignored if buildtype=="Official".
271 'logging_like_official_build%': 0,
272
[email protected]a1e87422013-07-09 21:47:01273 # Set to 1 to make a build that disables unshipped tracing events.
274 # Note: this setting is ignored if buildtype=="Official".
275 'tracing_like_official_build%': 0,
276
[email protected]464750f2011-10-24 23:16:18277 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51278 'file_manager_extension%': 0,
279
[email protected]77a848262013-02-22 11:17:25280 # Disable image loader component extension by default.
281 'image_loader_extension%': 0,
282
[email protected]e72e55b2011-01-06 22:19:30283 # Python version.
[email protected]a43c5a02011-05-27 06:54:51284 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17285
[email protected]7d6763422013-04-26 12:06:54286 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30287 'arm_neon%': 1,
288
[email protected]7d6763422013-04-26 12:06:54289 # Detect NEON support at run-time.
290 'arm_neon_optional%': 0,
291
[email protected]e72e55b2011-01-06 22:19:30292 # The system root for cross-compiles. Default: none.
293 'sysroot%': '',
294
[email protected]945361a2011-09-30 04:38:43295 # The system libdir used for this ABI.
296 'system_libdir%': 'lib',
297
[email protected]e72e55b2011-01-06 22:19:30298 # On Linux, we build with sse2 for Chromium builds.
299 'disable_sse2%': 0,
300
301 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03302 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30303
[email protected]d9113542012-07-18 17:11:28304 # Use system libjpeg. Note that the system's libjepg will be used even if
305 # use_libjpeg_turbo is set.
306 'use_system_libjpeg%': 0,
307
[email protected]aa5e01fc2013-03-06 14:06:17308 # By default, component is set to static_library and it can be overriden
309 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53310 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30311
[email protected]bb6aba32011-01-07 19:04:43312 # Set to select the Title Case versions of strings in GRD files.
313 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21314
[email protected]98da0042011-02-02 00:10:27315 # Use translations provided by volunteers at launchpad.net. This
316 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19317 'use_third_party_translations%': 0,
318
[email protected]9a425422011-01-11 00:53:18319 # Remoting compilation is enabled by default. Set to 0 to disable.
320 'remoting%': 1,
321
[email protected]1ec68c42011-06-01 13:56:25322 # Configuration policy is enabled by default. Set to 0 to disable.
323 'configuration_policy%': 1,
324
[email protected]6c521fed2012-11-29 17:00:03325 # Variable safe_browsing is used to control the build time configuration
326 # for safe browsing feature. Safe browsing can be compiled in 3 different
327 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
328 # reporting features without enabling phishing and malware detection. This
329 # is useful to integrate a third party phishing/malware detection to
330 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56331 'safe_browsing%': 1,
332
[email protected]9eb100e2011-10-14 05:08:22333 # Speech input is compiled in by default. Set to 0 to disable.
334 'input_speech%': 1,
335
[email protected]7cce3232011-10-28 10:41:57336 # Notifications are compiled in by default. Set to 0 to disable.
337 'notifications%' : 1,
338
[email protected]970fd4e2012-12-19 11:09:37339 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
340 # regular builds and 1 for ASan builds.
341 'mac_want_real_dsym%': 'default',
342
[email protected]5d451ad2011-02-11 16:43:46343 # If this is set, the clang plugins used on the buildbot will be used.
344 # Run tools/clang/scripts/update.sh to make sure they are compiled.
345 # This causes 'clang_chrome_plugins_flags' to be set.
346 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08347 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46348
[email protected]2e82fa52012-11-27 23:41:44349 # Enable building with ASAN (Clang's -fsanitize=address option).
350 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06351 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
352 'asan%': 0,
[email protected]544a18ed2014-01-17 21:01:36353 # Enable coverage gathering instrumentation in ASan. This flag also
354 # controls coverage granularity (experimental).
[email protected]20a127f2014-01-16 03:25:03355 'asan_coverage%': 0,
[email protected]92799b632011-08-15 14:33:06356
[email protected]062522a2013-06-13 15:49:55357 # Enable building with LSan (Clang's -fsanitize=leak option).
358 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
359 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
360 'lsan%': 0,
361
[email protected]927a9d672012-11-09 11:28:20362 # Enable building with TSAN (Clang's -fsanitize=thread option).
363 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12364 # See http://clang.llvm.org/docs/ThreadSanitizer.html
365 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16366 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12367
[email protected]a10ddd2d2013-02-26 20:06:59368 # Enable building with MSAN (Clang's -fsanitize=memory option).
369 # MemorySanitizer only works with clang, but msan=1 implies clang=1
370 # See http://clang.llvm.org/docs/MemorySanitizer.html
371 'msan%': 0,
[email protected]190d4ce62014-01-17 20:24:53372 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
[email protected]a10ddd2d2013-02-26 20:06:59373
[email protected]c8103a42013-11-12 13:41:30374 # Use the dynamic libraries instrumented by one of the sanitizers
375 # instead of the standard system libraries.
376 'use_instrumented_libraries%': 0,
377
[email protected]22b3f531e2013-12-20 13:07:28378 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
379 # stdlibc++ as standard library. This is intended to use for instrumented
380 # builds.
381 'use_custom_libcxx%': 0,
382
[email protected]7ce58b22012-09-26 05:17:25383 # Use a modified version of Clang to intercept allocated types and sizes
384 # for allocated objects. clang_type_profiler=1 implies clang=1.
385 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
386 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
387 'clang_type_profiler%': 0,
388
[email protected]8a6abd12012-05-16 10:04:44389 # Set to true to instrument the code with function call logger.
390 # See src/third_party/cygprofile/cyg-profile.cc for details.
391 'order_profiling%': 0,
392
[email protected]00b0a7f2012-01-25 15:30:46393 # Use the provided profiled order file to link Chrome image with it.
394 # This makes Chrome faster by better using CPU cache when executing code.
395 # This is known as PGO (profile guided optimization).
396 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
397 'order_text_section%' : "",
398
[email protected]1ad5a7b2011-06-24 03:15:13399 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
400 # libraries on linux x86-64 and arm, plus ASLR.
401 'linux_fpic%': 1,
402
[email protected]bd7b6fe2012-03-05 21:02:40403 # Whether one-click signin is enabled or not.
404 'enable_one_click_signin%': 0,
405
[email protected]6a3cd37e2012-04-17 17:13:34406 # Enable Chrome browser extensions
407 'enable_extensions%': 1,
408
[email protected]658677f2012-06-09 06:04:02409 # Enable browser automation.
410 'enable_automation%': 1,
411
[email protected]6ee43a72012-12-07 22:44:40412 # Enable Google Now.
413 'enable_google_now%': 1,
414
[email protected]1e54c1c2013-08-12 17:16:05415 # Enable printing support and UI. This variable is used to configure
416 # which parts of printing will be built. 0 disables printing completely,
417 # 1 enables it fully, and 2 enables only the codepath to generate a
418 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
419 # print, UI, etc.
[email protected]658677f2012-06-09 06:04:02420 'enable_printing%': 1,
421
[email protected]3b5e88d2013-09-06 11:03:06422 # Set the version of CLD.
423 # 0: Don't specify the version. This option is for the Finch testing.
424 # 1: Use only CLD1.
425 # 2: Use only CLD2.
[email protected]d8ef2362013-10-22 02:10:00426 'cld_version%': 2,
[email protected]3b5e88d2013-09-06 11:03:06427
[email protected]c6ce08072013-07-31 07:48:53428 # Enable spell checker.
429 'enable_spellcheck%': 1,
430
[email protected]dda90ae2011-07-19 22:07:48431 # Webrtc compilation is enabled by default. Set to 0 to disable.
432 'enable_webrtc%': 1,
433
[email protected]cdb756ef2012-04-05 18:34:53434 # Enables use of the session service, which is enabled by default.
435 # Support for disabling depends on the platform.
436 'enable_session_service%': 1,
437
[email protected]6b40bb582012-03-15 20:50:38438 # Enables theme support, which is enabled by default. Support for
439 # disabling depends on the platform.
440 'enable_themes%': 1,
441
[email protected]57e67ac2013-02-22 03:37:22442 # Enables autofill dialog and associated features; disabled by default.
443 'enable_autofill_dialog%' : 0,
444
[email protected]0acdd772012-04-05 22:53:00445 # Enables support for background apps.
446 'enable_background%': 1,
447
[email protected]44879ed2012-04-06 01:11:02448 # Enable the task manager by default.
449 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45450
[email protected]9bfe0ab2012-08-30 13:18:11451 # Enable FTP support by default.
452 'disable_ftp_support%': 0,
453
[email protected]ef4cb642013-09-14 22:48:02454 # XInput2 multitouch support is enabled by default (use_xi2_mt=2).
455 # Setting to zero value disables XI2 MT. When XI2 MT is enabled,
[email protected]22d6dd72012-05-15 07:29:55456 # the input value also defines the required XI2 minor minimum version.
457 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
[email protected]ef4cb642013-09-14 22:48:02458 'use_xi2_mt%': 2,
[email protected]22d6dd72012-05-15 07:29:55459
[email protected]9061bee82012-01-16 11:45:17460 # Use of precompiled headers on Windows.
461 #
[email protected]9061bee82012-01-16 11:45:17462 # This variable may be explicitly set to 1 (enabled) or 0
463 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
464 # This setting will override the default.
465 #
[email protected]c3340fb32012-12-20 20:45:39466 # See
[email protected]9061bee82012-01-16 11:45:17467 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
468 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16469 'chromium_win_pch%': 0,
470
[email protected]3bb37e62012-04-19 03:40:08471 # Set this to true when building with Clang.
472 # See http://code.google.com/p/chromium/wiki/Clang for details.
473 'clang%': 0,
474
[email protected]18e0f39b2012-01-17 16:47:34475 # Enable plug-in installation by default.
476 'enable_plugin_installation%': 1,
477
[email protected]6d17f6392012-12-05 05:24:54478 # Enable PPAPI and NPAPI by default.
479 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
480 # as PPAPI; see crbug.com/162667.
481 'enable_plugins%': 1,
482
[email protected]62424a52012-03-18 03:09:50483 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42484 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35485 # Chrome UI.
486 # TODO(asvitkine): Enable this on all platforms and delete this flag.
487 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50488 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35489
[email protected]a9318c72012-03-01 01:29:47490 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
491 # with one of those tools.
492 'build_for_tool%': '',
493
[email protected]37138132013-01-17 23:08:52494 # If no directory is specified then a temporary directory will be used.
495 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47496 # True if isolate should fail if the isolate files refer to files
497 # that are missing.
498 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56499
[email protected]740ebed2012-06-27 19:14:06500 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12501 'wix_path%': '<(DEPTH)/third_party/wix',
502
[email protected]0850e842013-01-19 03:44:31503 # Managed users are enabled by default.
504 'enable_managed_users%': 1,
505
[email protected]1591c44d2013-07-15 13:28:43506 # Platform natively supports discardable memory.
507 'native_discardable_memory%': 0,
508
509 # Platform sends memory pressure signals natively.
510 'native_memory_pressure_signals%': 0,
511
[email protected]3f0ed2172013-11-04 20:27:29512 'data_reduction_fallback_host%' : '',
[email protected]324856d2014-01-14 11:17:30513 'data_reduction_dev_host%' : '',
[email protected]199def22013-02-21 17:52:29514 'spdy_proxy_auth_origin%' : '',
515 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25516 'spdy_proxy_auth_value%' : '',
[email protected]d8dd60e2013-10-08 00:49:43517 'data_reduction_proxy_probe_url%' : '',
[email protected]5e131c9f2013-07-10 19:21:05518 'enable_mdns%' : 0,
[email protected]b9171622013-10-01 22:05:23519 'enable_enhanced_bookmarks%': 0,
[email protected]199def22013-02-21 17:52:29520
[email protected]bb6aba32011-01-07 19:04:43521 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34522 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37523 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34524 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37525 }, {
526 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34527 }],
528
[email protected]df9167b2011-11-14 19:15:25529 # A flag for BSD platforms
530 ['OS=="freebsd" or OS=="openbsd"', {
531 'os_bsd%': 1,
532 }, {
533 'os_bsd%': 0,
534 }],
535
[email protected]c329adf82011-10-05 14:34:57536 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42537 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57538 'use_nss%': 1,
539 }, {
540 'use_nss%': 0,
541 }],
[email protected]e0b85a52011-10-06 03:30:42542
[email protected]49513e02013-11-20 08:36:40543 # libudev usage. This currently only affects the content layer.
[email protected]048ab5f2013-11-22 01:42:47544 ['OS=="linux" and embedded==0', {
[email protected]49513e02013-11-20 08:36:40545 'use_udev%': 1,
546 }, {
547 'use_udev%': 0,
548 }],
549
[email protected]c335f4802013-04-06 04:51:21550 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54551 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34552 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37553 }, {
[email protected]c49ab0c2011-05-18 17:25:37554 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34555 }],
[email protected]9a8175892012-03-20 02:11:58556
[email protected]02968b82013-11-14 02:42:43557 # Flags to use glib.
[email protected]b132edd2013-11-22 23:21:55558 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
[email protected]c335f4802013-04-06 04:51:21559 'use_glib%': 0,
560 }, {
561 'use_glib%': 1,
[email protected]02968b82013-11-14 02:42:43562 }],
563
[email protected]928362a2013-11-19 20:17:16564 # Flags to use pango and cairo.
[email protected]02968b82013-11-14 02:42:43565 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
566 'use_pango%': 0,
[email protected]928362a2013-11-19 20:17:16567 'use_cairo%': 0,
[email protected]02968b82013-11-14 02:42:43568 }, {
[email protected]26bade892013-05-23 21:44:15569 'use_pango%': 1,
[email protected]928362a2013-11-19 20:17:16570 'use_cairo%': 1,
[email protected]c335f4802013-04-06 04:51:21571 }],
572
[email protected]61955d92013-11-13 20:44:52573 # DBus usage.
[email protected]02968b82013-11-14 02:42:43574 ['OS=="linux" and embedded==0', {
[email protected]61955d92013-11-13 20:44:52575 'use_dbus%': 1,
576 }, {
577 'use_dbus%': 0,
578 }],
579
[email protected]efadeacf2011-10-27 19:01:00580 # We always use skia text rendering in Aura on Windows, since GDI
581 # doesn't agree with our BackingStore.
582 # TODO(beng): remove once skia text rendering is on by default.
583 ['use_aura==1 and OS=="win"', {
584 'enable_skia_text%': 1,
585 }],
[email protected]9edeb712011-09-20 21:20:33586
[email protected]63692212010-09-16 00:22:21587 # A flag to enable or disable our compile-time dependency
588 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
589 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49590 # for Linux distributions and for Aura.
[email protected]556975ce2013-11-15 22:00:22591 ['OS!="linux" or chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21592 'use_gnome_keyring%': 0,
593 }, {
594 'use_gnome_keyring%': 1,
595 }],
[email protected]0afe5212010-10-01 18:56:11596
[email protected]8796d922012-08-07 01:23:11597 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20598 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43599 'use_titlecase_in_grd_files%': 1,
600 }],
601
[email protected]77a848262013-02-22 11:17:25602 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06603 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50604 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25605 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50606 }, {
[email protected]3d38d8e2011-04-16 20:48:51607 'file_manager_extension%': 0,
[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,
628 }],
[email protected]b25f0032013-08-19 22:26:25629
[email protected]0d841b7d2013-08-20 20:22:22630 # Android OS includes support for proprietary codecs regardless of
631 # building Chromium or Google Chrome. We also ship Google Chrome with
632 # proprietary codecs.
633 ['OS=="android" or branding=="Chrome"', {
634 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41635 }, {
636 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22637 }],
638
[email protected]85f29582013-12-16 18:02:04639 ['OS=="mac" or OS=="ios"', {
[email protected]cef6c76f2013-10-30 16:33:30640 'native_discardable_memory%': 1,
641 'native_memory_pressure_signals%': 1,
642 }],
643
[email protected]8f5999e2013-08-10 18:27:05644 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
645 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22646 'enable_autofill_dialog%': 1
647 }],
648
[email protected]d999c3cb2013-03-12 10:22:36649 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43650 'enable_webrtc%': 1,
651 }],
652
653 # Disable WebRTC for building WebView as part of Android system.
654 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
655 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36656 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43657 'enable_webrtc%': 0,
658 }],
659
[email protected]0d16f292012-07-02 22:10:48660 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24661 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11662 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24663 'enable_automation%': 0,
664 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40665 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06666 'cld_version%': 1,
[email protected]c4ac4d12012-09-12 12:02:24667 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44668 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24669 'enable_themes%': 0,
670 'enable_webrtc%': 0,
671 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48672 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44673 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31674 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48675 }],
676
[email protected]839d5172011-10-13 17:18:11677 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27678 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01679 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33680 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11681 }, {
[email protected]1ee7c56c2011-10-19 14:51:33682 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11683 }],
[email protected]9061bee82012-01-16 11:45:17684
[email protected]c3340fb32012-12-20 20:45:39685 # Turn precompiled headers on by default.
686 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17687 'chromium_win_pch%': 1
688 }],
[email protected]18e0f39b2012-01-17 16:47:34689
[email protected]deb8b3cd2013-05-07 19:52:10690 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34691 'enable_plugin_installation%': 0,
692 }, {
693 'enable_plugin_installation%': 1,
694 }],
[email protected]b07806c12012-02-03 22:44:59695
[email protected]693f63c2014-01-17 06:52:19696 ['OS=="android" or OS=="ios" or embedded==1', {
[email protected]6d17f6392012-12-05 05:24:54697 'enable_plugins%': 0,
698 }, {
699 'enable_plugins%': 1,
700 }],
701
[email protected]8d726a42012-02-09 03:49:00702 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56703 # third_party/gold. Gold is not used for 32-bit linux builds
704 # as it runs out of address space.
705 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51706 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17707 }, {
[email protected]bd68ea52013-03-26 09:49:37708 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34709 }],
710
711 # linux_use_gold_flags: whether to use build flags that rely on gold.
712 # On by default for x64 Linux. Temporarily off for ChromeOS as
713 # it failed on a buildbot.
714 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
715 'linux_use_gold_flags%': 1,
716 }, {
[email protected]8d726a42012-02-09 03:49:00717 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59718 }],
[email protected]2e22e2f2012-03-15 21:53:10719
[email protected]a95d5302012-11-03 00:02:19720 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32721 'enable_captive_portal_detection%': 0,
722 }, {
723 'enable_captive_portal_detection%': 1,
724 }],
725
[email protected]3bd47e022012-03-22 04:19:12726 # Enable Skia UI text drawing incrementally on different platforms.
727 # http://crbug.com/105550
728 #
729 # On Aura, this allows per-tile painting to be used in the browser
730 # compositor.
[email protected]04b67b62013-09-14 01:32:17731 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12732 'use_canvas_skia%': 1,
733 }],
[email protected]adb44342012-07-23 13:36:12734
[email protected]0753ea42012-08-30 20:15:44735 ['chromeos==1', {
736 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
737 'use_libjpeg_turbo%': 0,
738 }],
739
[email protected]adb44342012-07-23 13:36:12740 ['OS=="android"', {
741 # When building as part of the Android system, use system libraries
742 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36743 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12744 }],
[email protected]8a46f5f2012-12-05 00:47:12745
[email protected]5be161f2013-06-18 11:09:33746 # Do not enable the Settings App on ChromeOS.
747 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12748 'enable_settings_app%': 1,
749 }, {
750 'enable_settings_app%': 0,
751 }],
[email protected]94cdbf42012-12-11 19:49:22752
753 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
754 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22755 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43756 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22757 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43758 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22759 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46760
[email protected]42972b62013-08-28 05:46:42761 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09762 'conditions': [
763 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43764 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09765 }],
766 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43767 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09768 }],
769 ],
[email protected]42972b62013-08-28 05:46:42770 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09771
[email protected]59e85f472013-06-28 18:20:44772 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07773 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28774 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46775 }],
[email protected]5b38a522013-03-20 17:00:47776
777 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01778 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47779 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]10d8ac32013-10-31 13:34:31780 # target always calls tools/swarming_client/isolate.py. See the script's
[email protected]5b38a522013-03-20 17:00:47781 # --help for more information and the valid --mode values. Meant to be
782 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01783 # TODO(maruel): Remove the conditions as more configurations are
784 # supported.
785 # NOTE: The check for disable_nacl==0 and component=="static_library"
786 # can't be used here because these variables are not defined yet, but it
787 # is still not supported.
[email protected]e51e35652013-12-19 02:39:08788 ['OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47789 'test_isolation_mode%': 'check',
790 }, {
791 'test_isolation_mode%': 'noop',
792 }],
[email protected]02211392013-12-09 18:13:14793 # Whether Android ARM or x86 build uses OpenMAX DL FFT.
794 ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', {
795 # Currently only supported on Android ARMv7+, or ia32
796 # without webview. When enabled, this will also enable
797 # WebAudio support on Android ARM and ia32. Default is
798 # enabled. Whether WebAudio is actually available depends
799 # on runtime settings and flags.
[email protected]330f3a32013-04-23 05:47:58800 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53801 }, {
802 'use_openmax_dl_fft%': 0,
803 }],
[email protected]5e131c9f2013-07-10 19:21:05804 ['OS=="win" or OS=="linux"', {
805 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06806 }],
807
808 # Turns on compiler optimizations in V8 in Debug build, except
809 # on android_clang, where we're hitting a weird linker error.
810 # TODO(dpranke): http://crbug.com/266155 .
811 ['OS=="android"', {
[email protected]6268e01b42013-10-19 22:44:19812 'v8_optimized_debug%': 1,
[email protected]2abbc1a2013-08-07 22:09:06813 }, {
[email protected]6268e01b42013-10-19 22:44:19814 'v8_optimized_debug%': 2,
[email protected]2abbc1a2013-08-07 22:09:06815 }],
[email protected]02968b82013-11-14 02:42:43816
817 # Disable various features by default on embedded.
818 ['embedded==1', {
819 'remoting%': 0,
820 'enable_printing%': 0,
821 }],
[email protected]b3f23ba2010-04-26 22:58:17822 ],
[email protected]2b113652012-09-17 17:01:39823
[email protected]a3a720f2013-04-25 19:35:42824 # Set this to 1 to enable use of concatenated impulse responses
825 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26826 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42827
[email protected]f2817cf2013-05-16 11:39:54828 # You can set the variable 'use_official_google_api_keys' to 1
829 # to use the Google-internal file containing official API keys
830 # for Google Chrome even in a developer build. Setting this
831 # variable explicitly to 1 will cause your build to fail if the
832 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39833 #
[email protected]f2817cf2013-05-16 11:39:54834 # The variable is documented here, but not handled in this file;
835 # see //google_apis/determine_use_official_keys.gypi for the
836 # implementation.
[email protected]2b113652012-09-17 17:01:39837 #
[email protected]f2817cf2013-05-16 11:39:54838 # Set the variable to 0 to not use the internal file, even when
839 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39840 #
[email protected]f2817cf2013-05-16 11:39:54841 # Leave it unset in your include.gypi to have the variable
842 # implicitly set to 1 if you have
843 # src/google_apis/internal/google_chrome_api_keys.h in your
844 # checkout, and implicitly set to 0 if not.
845 #
846 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39847 # was explicitly set to 1, i.e. they always use official keys,
848 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54849 #
850 # NOTE: You MUST NOT explicitly set the variable to 2 in your
851 # include.gypi or by other means. Due to subtleties of GYP, this
852 # is not the same as leaving the variable unset, even though its
853 # default value in
854 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39855
856 # Set these to bake the specified API keys and OAuth client
857 # IDs/secrets into your build.
858 #
859 # If you create a build without values baked in, you can instead
860 # set environment variables to provide the keys at runtime (see
861 # src/google_apis/google_api_keys.h for details). Features that
862 # require server-side APIs may fail to work if no keys are
863 # provided.
864 #
865 # Note that if you are building an official build or if
866 # use_official_google_api_keys has been set to 1 (explicitly or
867 # implicitly), these values will be ignored and the official
868 # keys will be used instead.
869 'google_api_key%': '',
870 'google_default_client_id%': '',
871 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07872 },
873
[email protected]e72e55b2011-01-06 22:19:30874 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07875 'branding%': '<(branding)',
876 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27877 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59878 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44879 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33880 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58881 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16882 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31883 'use_cras%': '<(use_cras)',
[email protected]e0b85a52011-10-06 03:30:42884 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57885 'use_nss%': '<(use_nss)',
[email protected]49513e02013-11-20 08:36:40886 'use_udev%': '<(use_udev)',
[email protected]df9167b2011-11-14 19:15:25887 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34888 'os_posix%': '<(os_posix)',
[email protected]61955d92013-11-13 20:44:52889 'use_dbus%': '<(use_dbus)',
[email protected]258dca42011-09-21 00:17:19890 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15891 'use_pango%': '<(use_pango)',
[email protected]928362a2013-11-19 20:17:16892 'use_cairo%': '<(use_cairo)',
[email protected]ff78e4e2013-05-03 19:19:15893 'use_ozone%': '<(use_ozone)',
[email protected]c0c72dd52013-10-21 23:09:48894 'use_ozone_evdev%': '<(use_ozone_evdev)',
[email protected]89dcd662013-12-12 23:06:50895 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
[email protected]5be60002014-01-13 21:27:42896 'use_system_fontconfig%': '<(use_system_fontconfig)',
[email protected]79e2336c2011-05-12 18:18:34897 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]d628ab412013-09-07 03:26:37898 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:34899 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21900 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11901 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44902 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05903 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24904 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06905 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35906 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20907 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25908 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54909 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01910 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]65b0819e2013-06-21 15:24:00911 'logging_like_official_build%': '<(logging_like_official_build)',
[email protected]a1e87422013-07-09 21:47:01912 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]a76fe1a2010-03-01 23:39:36913 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54914 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43915 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54916 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23917 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43918 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52919 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43920 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17921 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18922 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40923 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48924 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16925 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25926 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56927 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22928 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57929 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46930 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37931 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06932 'asan%': '<(asan)',
[email protected]20a127f2014-01-16 03:25:03933 'asan_coverage%': '<(asan_coverage)',
[email protected]062522a2013-06-13 15:49:55934 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59935 'msan%': '<(msan)',
[email protected]190d4ce62014-01-17 20:24:53936 'msan_blacklist%': '<(msan_blacklist)',
[email protected]c9a829272012-07-04 07:51:12937 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16938 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]c8103a42013-11-12 13:41:30939 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
[email protected]22b3f531e2013-12-20 13:07:28940 'use_custom_libcxx%': '<(use_custom_libcxx)',
[email protected]7ce58b22012-09-26 05:17:25941 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44942 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46943 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34944 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34945 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54946 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53947 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38948 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22949 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]0acdd772012-04-05 22:53:00950 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59951 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00952 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50953 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33954 'test_isolation_mode%': '<(test_isolation_mode)',
955 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47956 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10957 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02958 'enable_printing%': '<(enable_printing)',
[email protected]c6ce08072013-07-31 07:48:53959 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:40960 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:06961 'cld_version%': '<(cld_version)',
[email protected]e6026962012-06-14 21:28:32962 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11963 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02964 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06965 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12966 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44967 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12968 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36969 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46970 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:07971 'create_standalone_apk%': 1,
[email protected]dc4e8b82012-11-15 03:58:16972 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07973 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16974 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39975 'google_api_key%': '<(google_api_key)',
976 'google_default_client_id%': '<(google_default_client_id)',
977 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31978 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:43979 'native_discardable_memory%': '<(native_discardable_memory)',
980 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]3f0ed2172013-11-04 20:27:29981 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)',
[email protected]324856d2014-01-14 11:17:30982 'data_reduction_dev_host%': '<(data_reduction_dev_host)',
[email protected]199def22013-02-21 17:52:29983 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
984 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25985 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]d8dd60e2013-10-08 00:49:43986 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)',
[email protected]5e131c9f2013-07-10 19:21:05987 'enable_mdns%' : '<(enable_mdns)',
[email protected]b9171622013-10-01 22:05:23988 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)',
[email protected]6268e01b42013-10-19 22:44:19989 'v8_optimized_debug%': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:41990 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]e71a3622013-12-04 07:32:41991 'use_goma%': '<(use_goma)',
992 'gomadir%': '<(gomadir)',
[email protected]01971642012-03-07 14:39:56993
[email protected]c486e4e2013-01-08 16:49:07994 # Use system nspr instead of the bundled one.
995 'use_system_nspr%': 0,
996
[email protected]2f325672012-10-31 23:29:37997 # Use system protobuf instead of bundled one.
998 'use_system_protobuf%': 0,
999
[email protected]371e1092011-10-12 20:37:361000 # Use system yasm instead of bundled one.
1001 'use_system_yasm%': 0,
1002
[email protected]ea02e962013-04-26 11:18:161003 # Use system ICU instead of bundled one.
1004 'use_system_icu%' : 0,
1005
[email protected]cd00bd862012-02-29 00:40:361006 # Default to enabled PIE; this is important for ASLR but we may need to be
1007 # able to turn it off for various reasons.
1008 'linux_disable_pie%': 0,
1009
[email protected]caa95c82009-11-23 22:39:321010 # The release channel that this build targets. This is used to restrict
1011 # channel-specific build options, like which installer packages to create.
1012 # The default is 'all', which does no channel-specific filtering.
1013 'channel%': 'all',
1014
[email protected]b3fb8092009-03-12 19:09:241015 # Override chromium_mac_pch and set it to 0 to suppress the use of
1016 # precompiled headers on the Mac. Prefix header injection may still be
1017 # used, but prefix headers will not be precompiled. This is useful when
1018 # using distcc to distribute a build to compile slaves that don't
1019 # share the same compiler executable as the system driving the compilation,
1020 # because precompiled headers rely on pointers into a specific compiler
1021 # executable's image. Setting this to 0 is needed to use an experimental
1022 # Linux-Mac cross compiler distcc farm.
1023 'chromium_mac_pch%': 1,
1024
[email protected]27b687ec42012-03-26 22:22:151025 # The default value for mac_strip in target_defaults. This cannot be
1026 # set there, per the comment about variable% in a target_defaults.
[email protected]70d0f782013-11-14 06:22:291027 'mac_strip_release%': 0,
[email protected]27b687ec42012-03-26 22:22:151028
[email protected]c0a12772013-08-22 00:08:311029 # Set to 1 to enable java code coverage. Instruments classes during build
1030 # to produce .ec files during runtime.
1031 'emma_coverage%': 0,
1032
[email protected]9662d922013-10-04 22:02:441033 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1034 # separated with whitespace and/or comma. Only has effect if
1035 # 'emma_coverage=1'.
1036 'emma_filter%': '',
1037
[email protected]22860352013-12-11 03:02:101038 # Set to 1 to enable running Android lint on java/class files.
[email protected]2219b752014-01-10 22:42:571039 'android_lint%': 0,
[email protected]22860352013-12-11 03:02:101040
[email protected]9619e65d2012-05-23 19:06:521041 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
1042 # This is useful for parallel compilation tools which can't support /Zi.
1043 # Only used on Windows.
1044 'win_z7%' : 0,
1045
[email protected]7477ea6f2009-12-22 23:28:151046 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:471047 # environment variable, the libcmt shim it uses sometimes gets in
1048 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1049 # 'win_use_allocator_shim': 0,
1050 # 'win_release_RuntimeLibrary': 2
1051 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:521052 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:111053
[email protected]e5b2eaa2009-04-14 01:39:121054 # TODO(bradnelson): eliminate this when possible.
1055 # To allow local gyp files to prevent release.vsprops from being included.
1056 # Yes(1) means include release.vsprops.
1057 # Once all vsprops settings are migrated into gyp, this can go away.
1058 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:231059
[email protected]cbd5fd52009-08-26 00:14:271060 # TODO(bradnelson): eliminate this when possible.
1061 # To allow local gyp files to override additional linker options for msvs.
1062 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:191063 'msvs_use_common_linker_extras%': 1,
1064
[email protected]1ffb6502009-06-02 07:46:241065 # TODO(sgk): eliminate this if possible.
1066 # It would be nicer to support this via a setting in 'target_defaults'
1067 # in chrome/app/locales/locales.gypi overriding the setting in the
1068 # 'Debug' configuration in the 'target_defaults' dict below,
1069 # but that doesn't work as we'd like.
1070 'msvs_debug_link_incremental%': '2',
1071
[email protected]1f790ef2011-01-11 20:45:361072 # Needed for some of the largest modules.
1073 'msvs_debug_link_nonincremental%': '1',
1074
[email protected]6f390be2012-08-16 18:57:101075 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:061076 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:261077 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:061078
[email protected]1ff64292013-07-18 20:37:151079 # Experimental setting to break chrome.dll into multiple pieces based on
1080 # process type.
1081 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:021082
[email protected]c54b41cb2012-08-24 20:58:241083 # The default settings for third party code for treating
1084 # warnings-as-errors. Ideally, this would not be required, however there
1085 # is some third party code that takes a long time to fix/roll. So, this
1086 # flag allows us to have warnings as errors in general to prevent
1087 # regressions in most modules, while working on the bits that are
1088 # remaining.
1089 'win_third_party_warn_as_error%': 'true',
1090
[email protected]3bb37e62012-04-19 03:40:081091 # Clang stuff.
1092 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:241093 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:151094
[email protected]5e781232011-01-28 02:57:591095 # These two variables can be set in GYP_DEFINES while running
1096 # |gclient runhooks| to let clang run a plugin in every compilation.
1097 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1098 # Example:
[email protected]93120fe2011-02-03 20:46:421099 # 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:591100
1101 'clang_load%': '',
1102 'clang_add_plugin%': '',
1103
[email protected]c9cc9442013-12-28 21:27:441104 # Tell ld64 to write map files describing binary layout. Useful
1105 # for looking at what contributes to binary size, e.g. with
1106 # https://github.com/nico/bloat
1107 'mac_write_linker_maps%': 0,
1108
[email protected]da1c8d692011-09-20 20:35:011109 # The default type of gtest.
1110 'gtest_target_type%': 'executable',
1111
[email protected]7664ab32011-02-01 23:35:251112 # Enable sampling based profiler.
1113 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1114 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581115 # Profile without optimizing out stack frames when profiling==1.
1116 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251117
[email protected]36532f332010-08-25 00:22:011118 # And if we want to dump symbols for Breakpad-enabled builds.
[email protected]8ebfecb2013-11-14 05:30:311119 'linux_dump_symbols%': 0,
[email protected]36532f332010-08-25 00:22:011120 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031121 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:491122 # Strip the test binaries needed for Linux reliability tests.
1123 'linux_strip_reliability_tests%': 0,
[email protected]2578ea12014-01-17 06:02:511124 # If we want stack unwind support for backtrace().
1125 'debug_unwind_tables%': 1,
1126 'release_unwind_tables%': 1,
[email protected]05cb6962009-10-01 23:29:031127
[email protected]46ce5b562010-06-16 18:39:531128 # Enable TCMalloc.
1129 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:031130 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:241131
[email protected]556c5d72010-06-10 05:45:011132 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1133 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351134 # Set to 1 to link against gsettings APIs instead of using dlopen().
1135 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011136
[email protected]23eea4a42013-04-27 04:10:261137 # Default arch variant for MIPS.
1138 'mips_arch_variant%': 'mips32r2',
1139
[email protected]a63e8d22013-03-23 16:17:081140 # Enable use of OpenMAX DL FFT routines.
1141 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341142
[email protected]9821d0d2010-04-16 22:40:371143 # Enable new NPDevice API.
1144 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501145
1146 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141147 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501148
[email protected]e72e55b2011-01-06 22:19:301149 # .gyp files or targets should set chromium_code to 1 if they build
1150 # Chromium-specific code, as opposed to external code. This variable is
1151 # used to control such things as the set of warnings to enable, and
1152 # whether warnings are treated as errors.
1153 'chromium_code%': 0,
1154
[email protected]8d726a42012-02-09 03:49:001155 'release_valgrind_build%': 0,
1156
[email protected]b1eb341c2011-11-09 18:46:071157 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1158 'enable_wexit_time_destructors%': 0,
1159
[email protected]e72e55b2011-01-06 22:19:301160 # Set to 1 to compile with the built in pdf viewer.
1161 'internal_pdf%': 0,
1162
[email protected]9e1149d72012-07-24 01:27:171163 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1164 'internal_gles2_conform_tests%': 0,
1165
[email protected]5c18edd2013-11-19 22:04:111166 # Set to 1 to compile the filter fuzzer.
1167 'internal_filter_fuzzer%': 0,
1168
[email protected]e72e55b2011-01-06 22:19:301169 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1170 # so Cocoa is happy (http://crbug.com/20441).
1171 'locales': [
1172 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1173 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1174 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411175 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301176 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1177 'vi', 'zh-CN', 'zh-TW',
1178 ],
1179
[email protected]cc0322d2011-07-24 09:29:191180 # Pseudo locales are special locales which are used for testing and
1181 # debugging. They don't get copied to the final app. For more info,
1182 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1183 'pseudo_locales': [
1184 'fake-bidi',
1185 ],
1186
[email protected]bb6aba32011-01-07 19:04:431187 'grit_defines': [],
1188
[email protected]bd3bd442011-03-28 07:58:511189 # If debug_devtools is set to 1, JavaScript files for DevTools are
1190 # stored as is and loaded from disk. Otherwise, a concatenated file
1191 # is stored in resources.pak. It is still possible to load JS files
1192 # from disk by passing --debug-devtools cmdline switch.
1193 'debug_devtools%': 0,
1194
[email protected]464750f2011-10-24 23:16:181195 # The Java Bridge is not compiled in by default.
1196 'java_bridge%': 0,
1197
[email protected]1e013672012-06-29 22:12:201198 # Code signing for iOS binaries. The bots need to be able to disable this.
1199 'chromium_ios_signing%': 1,
1200
[email protected]33e1c372011-12-14 16:32:071201 # This flag is only used when disable_nacl==0 and disables all those
1202 # subcomponents which would require the installation of a native_client
1203 # untrusted toolchain.
1204 'disable_nacl_untrusted%': 0,
1205
[email protected]407dfa632011-12-23 11:59:351206 # Disable Dart by default.
1207 'enable_dart%': 0,
1208
[email protected]ff10b132012-02-29 22:53:301209 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1210 'msbuild_toolset%': '',
1211
[email protected]836285f22012-04-03 16:19:261212 # Native Client is enabled by default.
1213 'disable_nacl%': 0,
1214
[email protected]1e40ba002013-03-07 22:07:331215 # Portable Native Client is enabled by default.
1216 'disable_pnacl%': 0,
1217
[email protected]fa9d4e262012-08-21 04:39:001218 # Whether to build full debug version for Debug configuration on Android.
1219 # Compared to full debug version, the default Debug configuration on Android
1220 # has no full v8 debug, has size optimization and linker gc section, so that
1221 # we can build a debug version with acceptable size and performance.
1222 'android_full_debug%': 0,
1223
[email protected]65885272012-10-05 23:55:501224 # Sets the default version name and code for Android app, by default we
1225 # do a developer build.
1226 'android_app_version_name%': 'Developer Build',
1227 'android_app_version_code%': 0,
1228
[email protected]014d1ff12013-07-02 01:52:331229 # Contains data about the attached devices for gyp_managed_install.
1230 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1231
[email protected]51528312013-09-24 07:36:191232 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")',
1233 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")',
[email protected]49ae3e52012-04-12 09:50:121234
[email protected]1f8d9402012-07-06 22:47:561235 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1236 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051237
[email protected]fd6d8822012-12-08 06:56:111238 # Whether we are using the rlz library or not. Platforms like Android send
1239 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221240 'enable_rlz%': 0,
1241
[email protected]3b4038e2013-07-28 08:59:541242 # Turns on the i18n support in V8.
1243 'v8_enable_i18n_support': 1,
1244
[email protected]6a694912014-01-17 14:17:401245 # Compile d8 for the host toolset.
1246 'v8_toolset_for_d8': 'host',
1247
[email protected]d98df122013-08-12 13:56:431248 # Use the chromium skia by default.
1249 'use_system_skia%': '0',
1250
[email protected]2c14260f2013-09-11 11:48:221251 # Use brlapi from brltty for braille display support.
1252 'use_brlapi%': 0,
1253
[email protected]c66b5aa2013-09-12 13:29:411254 # Relative path to icu.gyp from this file.
1255 'icu_gyp_path': '../third_party/icu/icu.gyp',
1256
[email protected]8c64e282013-11-28 16:05:141257 # IPC fuzzer is disabled by default.
1258 'enable_ipc_fuzzer%': 0,
1259
[email protected]f35bcea82013-12-04 04:37:061260 # Whether or not to use "icu*.dat" file for ICU data.
1261 # Do not use it by default.
1262 'icu_use_data_file_flag%': 0,
1263
[email protected]1eec679e2013-12-13 22:10:271264 # Force disable libstdc++ debug mode.
1265 'disable_glibcxx_debug%': 0,
1266
[email protected]912c55c2009-07-31 23:33:551267 'conditions': [
[email protected]5f683172013-04-27 01:53:191268 # The version of GCC in use, set later in platforms that use GCC and have
1269 # not explicitly chosen to build with clang. Currently, this means all
1270 # platforms except Windows, Mac and iOS.
1271 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1272 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551273 ['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:491274 'conditions': [
1275 ['OS=="android"', {
1276 # We directly set the gcc_version since we know what we use.
1277 'gcc_version%': 46,
1278 }, {
1279 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1280 }],
1281 ],
[email protected]5f683172013-04-27 01:53:191282 }, {
1283 'gcc_version%': 0,
1284 }],
[email protected]1f8d9402012-07-06 22:47:561285 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1286 'windows_sdk_path%': '<(windows_sdk_default_path)',
1287 }, {
1288 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1289 }],
1290 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1291 'directx_sdk_path%': '<(directx_sdk_default_path)',
1292 }, {
1293 'directx_sdk_path%': '$(DXSDK_DIR)',
1294 }],
[email protected]54184ce72012-10-18 07:11:261295 ['OS=="win"', {
1296 'windows_driver_kit_path%': '$(WDK_DIR)',
1297 }],
[email protected]1e013672012-06-29 22:12:201298 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]cbd5fd52009-08-26 00:14:271299 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461300 ['target_arch=="mipsel"', {
1301 'werror%': '',
1302 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461303 'nacl_untrusted_build%': 0,
1304 'linux_use_tcmalloc%': 0,
[email protected]59e85f472013-06-28 18:20:441305 }],
1306 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461307 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281308 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461309 }],
[email protected]4c9cc6c2009-10-01 18:54:571310 # All Chrome builds have breakpad symbols, but only process the
1311 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081312 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571313 'linux_dump_symbols%': 1,
[email protected]2578ea12014-01-17 06:02:511314
1315 # Omit unwind support in official release builds to save space. We
1316 # can use breakpad for these builds.
1317 'release_unwind_tables%': 0,
[email protected]4c9cc6c2009-10-01 18:54:571318 }],
[email protected]cbd5fd52009-08-26 00:14:271319 ],
[email protected]1e013672012-06-29 22:12:201320 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481321 ['OS=="ios"', {
1322 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191323 'enable_background%': 0,
[email protected]a35aa362012-10-30 13:55:071324 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351325 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131326 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471327 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411328 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391329 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
1330 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb',
1331 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk',
1332 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411333 ],
[email protected]57871bc2012-08-20 16:28:121334
1335 # The Mac SDK is set for iOS builds and passed through to Mac
1336 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1337 # overridden from the command line the same way it is for a Mac build.
1338 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291339
[email protected]523f128d2013-08-06 17:36:111340 # iOS SDK and deployment target support. The |ios_sdk| value is left
1341 # blank so that when it is set in the project files it will be the
1342 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1343 # causes Xcode to spit out a warning for every single project file for
1344 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291345 'ios_sdk%': '',
1346 'ios_sdk_path%': '',
[email protected]523f128d2013-08-06 17:36:111347 'ios_deployment_target%': '6.0',
[email protected]fcd634182012-10-09 10:50:321348
1349 'conditions': [
1350 # ios_product_name is set to the name of the .app bundle as it should
1351 # appear on disk.
1352 ['branding=="Chrome"', {
1353 'ios_product_name%': 'Chrome',
1354 }, { # else: branding!="Chrome"
1355 'ios_product_name%': 'Chromium',
1356 }],
1357 ['branding=="Chrome" and buildtype=="Official"', {
1358 'ios_breakpad%': 1,
1359 }, { # else: branding!="Chrome" or buildtype!="Official"
1360 'ios_breakpad%': 0,
1361 }],
1362 ],
1363 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011364 ['OS=="android"', {
1365 # Location of Android NDK.
1366 'variables': {
1367 'variables': {
[email protected]5061d152013-01-16 17:45:571368 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1369 # they're passed to ant which uses a different relative path from
1370 # gyp.
1371 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1372 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1373 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041374 # Android API-level of the SDK used for compilation.
[email protected]6bfda61f2013-08-09 06:48:181375 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})',
1376 # Android SDK build tools (e.g. dx, aapt, aidl)
1377 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})',
[email protected]da1c8d692011-09-20 20:35:011378 },
[email protected]5061d152013-01-16 17:45:571379 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011380 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571381 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041382 'android_sdk_version%': '<(android_sdk_version)',
[email protected]6bfda61f2013-08-09 06:48:181383 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]225ec632013-04-03 18:20:221384 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]5061d152013-01-16 17:45:571385
[email protected]e20a8ad2013-03-18 15:05:041386 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571387
[email protected]5cfec2b2013-03-05 20:54:331388 # Android API level 14 is ICS (Android 4.0) which is the minimum
1389 # platform requirement for Chrome on Android, we use it for native
1390 # code compilation.
[email protected]5061d152013-01-16 17:45:571391 'conditions': [
1392 ['target_arch == "ia32"', {
1393 'android_app_abi%': 'x86',
1394 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331395 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571396 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1397 }],
1398 ['target_arch=="arm"', {
1399 'conditions': [
[email protected]7d6763422013-04-26 12:06:541400 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571401 'android_app_abi%': 'armeabi',
1402 }, {
1403 'android_app_abi%': 'armeabi-v7a',
1404 }],
1405 ],
1406 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331407 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571408 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1409 }],
[email protected]23eea4a42013-04-27 04:10:261410 ['target_arch == "mipsel"', {
1411 'android_app_abi%': 'mips',
1412 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1413 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471414 '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:261415 }],
[email protected]5061d152013-01-16 17:45:571416 ],
[email protected]da1c8d692011-09-20 20:35:011417 },
[email protected]5061d152013-01-16 17:45:571418 # Copy conditionally-set variables out one scope.
1419 'android_app_abi%': '<(android_app_abi)',
1420 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011421 'android_ndk_root%': '<(android_ndk_root)',
1422 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571423 'android_sdk_root%': '<(android_sdk_root)',
1424 'android_sdk_version%': '<(android_sdk_version)',
1425 'android_toolchain%': '<(android_toolchain)',
1426
[email protected]da1c8d692011-09-20 20:35:011427 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1428 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]6bfda61f2013-08-09 06:48:181429 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041430 'android_sdk%': '<(android_sdk)',
1431 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011432
[email protected]225ec632013-04-03 18:20:221433 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221434 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221435 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]225ec632013-04-03 18:20:221436
[email protected]c0f76312012-08-16 13:52:041437 # Location of the "strip" binary, used by both gyp and scripts.
1438 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1439
[email protected]225ec632013-04-03 18:20:221440 # Location of the "readelf" binary.
1441 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1442
[email protected]d8621ce2013-02-22 00:37:331443 # Determines whether we should optimize JNI generation at the cost of
1444 # breaking assumptions in the build system that when inputs have changed
1445 # the outputs should always change as well. This is meant purely for
1446 # developer builds, to avoid spurious re-linking of native files.
1447 'optimize_jni_generation%': 0,
1448
[email protected]da1c8d692011-09-20 20:35:011449 # Always uses openssl.
1450 'use_openssl%': 1,
1451
1452 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021453 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071454 'safe_browsing%': 2,
[email protected]9eb100e2011-10-14 05:08:221455 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021456 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181457 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581458 'build_ffmpegsumo%': 0,
1459 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021460
[email protected]ad17e342012-07-17 20:45:481461 # Disable Native Client.
1462 'disable_nacl%': 1,
1463
[email protected]58242012012-04-12 16:14:311464 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001465 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111466
[email protected]cdb756ef2012-04-05 18:34:531467 # Sessions are store separately in the Java side.
1468 'enable_session_service%': 0,
1469
[email protected]5fd2e842012-03-01 00:29:111470 # Set to 1 once we have a notification system for Android.
1471 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571472 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011473
[email protected]ad17e342012-07-17 20:45:481474 'p2p_apis%' : 0,
1475
[email protected]48de0fc2012-08-02 11:03:581476 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011477
1478 # Uses system APIs for decoding audio and video.
1479 'use_libffmpeg%': '0',
1480
[email protected]adb44342012-07-23 13:36:121481 # When building as part of the Android system, use system libraries
1482 # where possible to reduce ROM size.
1483 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361484 'use_system_sqlite%': 0, # '<(android_webview_build)',
1485 'use_system_expat%': '<(android_webview_build)',
1486 'use_system_icu%': '<(android_webview_build)',
1487 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121488
[email protected]da1c8d692011-09-20 20:35:011489 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361490 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011491 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121492 ['android_webview_build==1', {
1493 # When building the WebView in the Android tree, jarjar will remap all
1494 # the class names, so the JNI generator needs to know this.
1495 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1496 }],
[email protected]e14a9f92009-08-05 19:26:071497 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471498 # Enable clang on mac by default!
1499 'clang%': 1,
[email protected]70d0f782013-11-14 06:22:291500 'conditions': [
1501 # All Chrome builds have breakpad symbols, but only process the
1502 # symbols from official builds.
1503 ['(branding=="Chrome" and buildtype=="Official")', {
1504 'mac_strip_release%': 1,
1505 }],
[email protected]22860352013-12-11 03:02:101506 ],
[email protected]296bc452013-05-13 21:29:471507 }], # OS=="mac"
1508 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291509 'variables': {
1510 # Mac OS X SDK and deployment target support. The SDK identifies
1511 # the version of the system headers that will be used, and
1512 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1513 # macro. "Maximum allowed" refers to the operating system version
1514 # whose APIs are available in the headers. The deployment target
1515 # identifies the minimum system version that the built products are
1516 # expected to function on. It corresponds to the
1517 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1518 # macros are available, #include <AvailabilityMacros.h>. Additional
1519 # documentation on these macros is available at
1520 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1521 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1522 # deployment target to 10.6. Other projects, such as O3D, may
1523 # override these defaults.
1524
1525 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1526 # about that is at least the specified version. In official builds,
1527 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1528 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1529 # path to the SDK; when set to a non-empty string, SDK detection
1530 # based on mac_sdk_min will be bypassed entirely.
1531 'mac_sdk_min%': '10.6',
1532 'mac_sdk_path%': '',
1533
1534 'mac_deployment_target%': '10.6',
1535 },
1536
1537 'mac_sdk_min': '<(mac_sdk_min)',
1538 'mac_sdk_path': '<(mac_sdk_path)',
1539 'mac_deployment_target': '<(mac_deployment_target)',
1540
[email protected]794fb4782011-12-14 19:10:561541 # Compile in Breakpad support by default so that it can be
1542 # tested, even if it is not enabled by default at runtime.
1543 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071544 'conditions': [
1545 # mac_product_name is set to the name of the .app bundle as it should
1546 # appear on disk. This duplicates data from
1547 # chrome/app/theme/chromium/BRANDING and
1548 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1549 # these names into the build system.
1550 ['branding=="Chrome"', {
1551 'mac_product_name%': 'Google Chrome',
1552 }, { # else: branding!="Chrome"
1553 'mac_product_name%': 'Chromium',
1554 }],
1555
[email protected]e14a9f92009-08-05 19:26:071556 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291557 '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:561558 # Enable uploading crash dumps.
1559 'mac_breakpad_uploads%': 1,
1560 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071561 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561562 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071563 'mac_keystone%': 1,
1564 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291565 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561566 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071567 'mac_breakpad%': 0,
1568 'mac_keystone%': 0,
1569 }],
1570 ],
[email protected]296bc452013-05-13 21:29:471571 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551572 ['OS=="win"', {
1573 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431574 # This is the architecture convention used in WinSDK paths.
1575 ['target_arch=="ia32"', {
1576 'winsdk_arch%': 'x86',
1577 },{
1578 'winsdk_arch%': '<(target_arch)',
1579 }],
[email protected]8974e042010-06-21 18:06:521580 ['component=="shared_library"', {
1581 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221582 },{
1583 # Turn on multiple dll by default on Windows when in static_library.
1584 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521585 }],
[email protected]fa0f16e2012-08-20 22:30:041586 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101587 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041588 # Not enabled for component=static_library because some targets
1589 # are too large and the toolchain fails due to the size of the
1590 # .obj files.
[email protected]6f390be2012-08-16 18:57:101591 'incremental_chrome_dll%': 1,
1592 }],
[email protected]a96cf1422013-11-08 08:55:411593 # Don't do incremental linking for large modules on 32-bit or when
1594 # component=static_library as the toolchain fails due to the size of
1595 # the .ilk files.
1596 ['MSVS_OS_BITS==32 or component=="static_library"', {
[email protected]10bb8c92009-08-07 21:16:031597 'msvs_large_module_debug_link_mode%': '1', # No
1598 },{
1599 'msvs_large_module_debug_link_mode%': '2', # Yes
1600 }],
[email protected]78764182013-01-23 20:32:511601 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501602 'msvs_express%': 1,
1603 'secure_atl%': 0,
1604 },{
1605 'msvs_express%': 0,
1606 'secure_atl%': 1,
1607 }],
[email protected]912c55c2009-07-31 23:33:551608 ],
[email protected]ef4fa4072009-12-04 22:46:501609 'nacl_win64_defines': [
1610 # This flag is used to minimize dependencies when building
1611 # Native Client loader for 64-bit Windows.
1612 'NACL_WIN64',
1613 ],
[email protected]912c55c2009-07-31 23:33:551614 }],
[email protected]bb6aba32011-01-07 19:04:431615
[email protected]a35aa362012-10-30 13:55:071616 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441617 'use_cups%': 1,
1618 }, {
1619 'use_cups%': 0,
1620 }],
[email protected]bb6aba32011-01-07 19:04:431621
[email protected]693f63c2014-01-17 06:52:191622 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
[email protected]280755c2013-05-23 10:44:351623 'enable_pepper_cdms%': 1,
1624 }, {
1625 'enable_pepper_cdms%': 0,
1626 }],
1627
[email protected]eb5f1672013-01-31 07:56:461628 # Native Client glibc toolchain is enabled
1629 # by default except on arm and mips.
1630 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321631 'disable_glibc%': 1,
1632 }, {
1633 'disable_glibc%': 0,
1634 }],
1635
[email protected]712c3da2012-09-24 21:31:241636 # Disable SSE2 when building for ARM or MIPS.
1637 ['target_arch=="arm" or target_arch=="mipsel"', {
1638 'disable_sse2%': 1,
1639 }, {
1640 'disable_sse2%': '<(disable_sse2)',
1641 }],
1642
[email protected]19fe8f0b2010-12-07 07:27:271643 # Set the relative path from this file to the GYP file of the JPEG
1644 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281645 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1646 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271647 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281648 }, {
1649 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1650 }],
[email protected]bb6aba32011-01-07 19:04:431651
[email protected]abcc9ac2011-05-16 20:04:351652 # Options controlling the use of GConf (the classic GNOME configuration
1653 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]02968b82013-11-14 02:42:431654 ['chromeos==1 or embedded==1', {
[email protected]1c6fe29302011-01-20 22:14:311655 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351656 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311657 }, {
1658 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351659 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311660 }],
1661
[email protected]4de39f82011-03-28 12:01:291662 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291663 ['branding=="Chrome"', {
1664 # TODO(mmoss) The .grd files look for _google_chrome, but for
1665 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291666 'grit_defines': ['-D', '_google_chrome',
1667 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291668 }, {
[email protected]4de39f82011-03-28 12:01:291669 'grit_defines': ['-D', '_chromium',
1670 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291671 }],
[email protected]bb6aba32011-01-07 19:04:431672 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131673 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431674 }],
[email protected]d628ab412013-09-07 03:26:371675 ['desktop_linux==1', {
1676 'grit_defines': ['-D', 'desktop_linux'],
1677 }],
[email protected]bb6aba32011-01-07 19:04:431678 ['toolkit_views==1', {
1679 'grit_defines': ['-D', 'toolkit_views'],
1680 }],
[email protected]8dd791d2011-09-16 16:37:301681 ['use_aura==1', {
1682 'grit_defines': ['-D', 'use_aura'],
1683 }],
[email protected]ed329be2012-01-03 22:02:161684 ['use_ash==1', {
1685 'grit_defines': ['-D', 'use_ash'],
1686 }],
[email protected]c329adf82011-10-05 14:34:571687 ['use_nss==1', {
1688 'grit_defines': ['-D', 'use_nss'],
1689 }],
[email protected]ff78e4e2013-05-03 19:19:151690 ['use_ozone==1', {
1691 'grit_defines': ['-D', 'use_ozone'],
1692 }],
[email protected]e47c32032011-03-01 19:26:201693 ['file_manager_extension==1', {
1694 'grit_defines': ['-D', 'file_manager_extension'],
1695 }],
[email protected]77a848262013-02-22 11:17:251696 ['image_loader_extension==1', {
1697 'grit_defines': ['-D', 'image_loader_extension'],
1698 }],
[email protected]9a425422011-01-11 00:53:181699 ['remoting==1', {
1700 'grit_defines': ['-D', 'remoting'],
1701 }],
[email protected]bb6aba32011-01-07 19:04:431702 ['use_titlecase_in_grd_files==1', {
1703 'grit_defines': ['-D', 'use_titlecase'],
1704 }],
[email protected]02211392013-12-09 18:13:141705 ['OS=="android" and target_arch=="ia32"', {
1706 # WebAudio on Android/x86 is disabled by default, unlike
1707 # everywhere else, so use appropriate message.
1708 'grit_defines': ['-D', 'use_webaudio_enable_message'],
1709 }],
[email protected]00dc155832011-02-01 18:51:191710 ['use_third_party_translations==1', {
1711 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121712 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161713 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1714 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121715 ],
[email protected]00dc155832011-02-01 18:51:191716 }],
[email protected]da1c8d692011-09-20 20:35:011717 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171718 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571719 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]da1c8d692011-09-20 20:35:011720 }],
[email protected]cc1f0572013-07-31 05:41:031721 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:231722 'grit_defines': ['-D', 'scale_factors=2x'],
1723 }],
[email protected]ad563d02012-10-03 10:37:031724 ['OS == "ios"', {
1725 'grit_defines': [
[email protected]033346902013-08-20 01:01:121726 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:031727 # iOS uses a whitelist to filter resources.
1728 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1729 ],
[email protected]b4530c82013-05-09 09:20:011730
1731 # Enable clang and host builds when generating with ninja-ios.
1732 'conditions': [
1733 ['"<(GENERATOR)"=="ninja"', {
1734 'clang%': 1,
1735 'host_os%': "mac",
1736 }]
1737 ],
[email protected]ad563d02012-10-03 10:37:031738 }],
[email protected]6a3cd37e2012-04-17 17:13:341739 ['enable_extensions==1', {
1740 'grit_defines': ['-D', 'enable_extensions'],
1741 }],
[email protected]6ab4ef92013-12-09 08:43:171742 ['enable_plugins!=0', {
1743
1744 'grit_defines': ['-D', 'enable_plugins'],
1745 }],
[email protected]1e54c1c2013-08-12 17:16:051746 ['enable_printing!=0', {
[email protected]658677f2012-06-09 06:04:021747 'grit_defines': ['-D', 'enable_printing'],
1748 }],
[email protected]c2aad542012-07-31 20:40:331749 ['enable_themes==1', {
1750 'grit_defines': ['-D', 'enable_themes'],
1751 }],
[email protected]ef1dd5062012-12-17 06:41:331752 ['enable_app_list==1', {
1753 'grit_defines': ['-D', 'enable_app_list'],
1754 }],
[email protected]dc4e8b82012-11-15 03:58:161755 ['enable_settings_app==1', {
1756 'grit_defines': ['-D', 'enable_settings_app'],
1757 }],
[email protected]5411d8202013-01-30 01:32:151758 ['enable_google_now==1', {
1759 'grit_defines': ['-D', 'enable_google_now'],
1760 }],
[email protected]a3a720f2013-04-25 19:35:421761 ['use_concatenated_impulse_responses==1', {
1762 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1763 }],
[email protected]f66ddbd2013-06-27 14:17:041764 ['enable_webrtc==1', {
1765 'grit_defines': ['-D', 'enable_webrtc'],
1766 }],
[email protected]2163eb92013-08-27 00:06:241767 ['enable_mdns==1', {
1768 'grit_defines': ['-D', 'enable_mdns'],
1769 }],
[email protected]b9171622013-10-01 22:05:231770 ['enable_enhanced_bookmarks==1', {
1771 'grit_defines': ['-D', 'enable_enhanced_bookmarks'],
1772 }],
[email protected]3bb37e62012-04-19 03:40:081773 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071774 'clang_chrome_plugins_flags': [
1775 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311776 ],
[email protected]5d451ad2011-02-11 16:43:461777 }],
[email protected]cfa2e1102011-04-27 22:30:231778
[email protected]696de4e62012-11-21 21:18:541779 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061780 'clang%': 1,
1781 }],
[email protected]f5d8c222012-08-29 17:47:021782 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091783 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571784 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091785 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021786 }],
[email protected]062522a2013-06-13 15:49:551787 ['lsan==1', {
1788 'clang%': 1,
1789 }],
[email protected]c9a829272012-07-04 07:51:121790 ['tsan==1', {
1791 'clang%': 1,
1792 }],
[email protected]a10ddd2d2013-02-26 20:06:591793 ['msan==1', {
1794 'clang%': 1,
1795 }],
[email protected]c9a829272012-07-04 07:51:121796
[email protected]7ce58b22012-09-26 05:17:251797 ['OS=="linux" and clang_type_profiler==1', {
1798 'clang%': 1,
1799 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321800 'conditions': [
1801 ['host_arch=="x64"', {
1802 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1803 }],
1804 ['host_arch=="ia32"', {
1805 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1806 # Clang in this directory at your own risk if needed for some
1807 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1808 # usage). Any failure by this compiler should not close the tree.
1809 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1810 }],
1811 ],
[email protected]7ce58b22012-09-26 05:17:251812 }],
1813
[email protected]a9318c72012-03-01 01:29:471814 # On valgrind bots, override the optimizer settings so we don't inline too
1815 # much and make the stacks harder to figure out.
1816 #
1817 # TODO(rnk): Kill off variables that no one else uses and just implement
1818 # them under a build_for_tool== condition.
1819 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1820 # gcc flags
1821 'mac_debug_optimization': '1',
1822 'mac_release_optimization': '1',
1823 'release_optimize': '1',
1824 'no_gc_sections': 1,
1825 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1826 '-fno-builtin -fno-optimize-sibling-calls',
1827 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1828 '-fno-builtin -fno-optimize-sibling-calls',
1829
1830 # MSVS flags for TSan on Pin and Windows.
1831 'win_debug_RuntimeChecks': '0',
1832 'win_debug_disable_iterator_debugging': '1',
1833 'win_debug_Optimization': '1',
1834 'win_debug_InlineFunctionExpansion': '0',
1835 'win_release_InlineFunctionExpansion': '0',
1836 'win_release_OmitFramePointers': '0',
1837
1838 'linux_use_tcmalloc': 1,
1839 'release_valgrind_build': 1,
1840 'werror': '',
1841 'component': 'static_library',
1842 'use_system_zlib': 0,
1843 }],
1844
1845 # Build tweaks for DrMemory.
1846 # TODO(rnk): Combine with tsan config to share the builder.
1847 # http://crbug.com/108155
1848 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471849 # These runtime checks force initialization of stack vars which blocks
1850 # DrMemory's uninit detection.
1851 'win_debug_RuntimeChecks': '0',
[email protected]49605d42013-10-18 13:58:171852 # Iterator debugging is slow.
[email protected]a9318c72012-03-01 01:29:471853 'win_debug_disable_iterator_debugging': '1',
1854 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161855 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1856 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1857 # compiler bug, so we use /Ob1 instead.
1858 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471859 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501860 # Ditto for debug, to support bumping win_debug_Optimization.
1861 'win_debug_InlineFunctionExpansion': 0,
1862 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471863 # Keep the code under #ifndef NVALGRIND.
1864 'release_valgrind_build': 1,
1865 }],
[email protected]b6a5ac92012-10-29 18:17:221866
[email protected]fcc89bf2013-10-30 17:37:211867 # Enable RLZ on Win, Mac, iOS and ChromeOS.
1868 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221869 'enable_rlz%': 1,
1870 }],
[email protected]7d6763422013-04-26 12:06:541871
1872 # Set default compiler flags depending on ARM version.
[email protected]7d6763422013-04-26 12:06:541873 ['arm_version==6 and android_webview_build==0', {
1874 'arm_arch%': 'armv6',
1875 'arm_tune%': '',
[email protected]70f970d2013-12-16 14:11:381876 'arm_fpu%': 'vfp',
1877 'arm_float_abi%': 'softfp',
[email protected]7d6763422013-04-26 12:06:541878 'arm_thumb%': 0,
1879 }],
1880 ['arm_version==7 and android_webview_build==0', {
1881 'arm_arch%': 'armv7-a',
1882 'arm_tune%': 'cortex-a8',
1883 'conditions': [
1884 ['arm_neon==1', {
1885 'arm_fpu%': 'neon',
1886 }, {
1887 'arm_fpu%': 'vfpv3-d16',
1888 }],
1889 ],
[email protected]3f85dac32013-10-29 02:38:461890 # Change the default to hard once the armhf transition is complete.
[email protected]7d6763422013-04-26 12:06:541891 'arm_float_abi%': 'softfp',
1892 'arm_thumb%': 1,
1893 }],
1894
1895 ['android_webview_build==1', {
1896 # The WebView build gets its cpu-specific flags from the Android build system.
1897 'arm_arch%': '',
1898 'arm_tune%': '',
1899 'arm_fpu%': '',
1900 'arm_float_abi%': '',
1901 'arm_thumb%': 0,
1902 }],
[email protected]5ac4b902013-10-22 17:21:291903
1904 # Enable brlapi by default for chromeos.
1905 [ 'chromeos==1', {
1906 'use_brlapi%': 1,
1907 }],
[email protected]f93c2c92013-10-31 18:22:441908
1909 ['use_ozone==1', {
[email protected]4814ed22013-11-01 05:37:261910 # This is the default platform
[email protected]f93c2c92013-10-31 18:22:441911 'ozone_platform%': "test",
[email protected]4814ed22013-11-01 05:37:261912
1913 # Enable built-in ozone platforms if ozone is enabled.
1914 'ozone_platform_dri%': 1,
1915 'ozone_platform_test%': 1,
[email protected]c64a9d22013-11-07 20:10:441916 }, { # use_ozone==0
1917 'ozone_platform_dri%': 0,
1918 'ozone_platform_test%': 0,
[email protected]f93c2c92013-10-31 18:22:441919 }],
[email protected]da7aed42013-12-17 22:28:311920
1921 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
1922 'use_clipboard_aurax11%': 1,
1923 }],
1924
[email protected]e71a3622013-12-04 07:32:411925 ['OS=="win" and use_goma==1', {
1926 # goma doesn't support pch yet.
1927 'chromium_win_pch': 0,
1928 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
1929 'conditions': [
1930 ['fastbuild==0', {
1931 'win_z7': 1,
1932 }],
1933 ],
1934 }],
[email protected]9f7615ee2013-12-19 21:38:381935 # The seccomp-bpf sandbox is only supported on three architectures
1936 # currently.
1937 # Do not disable seccomp_bpf anywhere without talking to
1938 # [email protected]!
1939 ['((OS=="linux" or OS=="android") and '
1940 '(target_arch=="ia32" or target_arch=="x64" or '
1941 'target_arch=="arm"))', {
1942 'use_seccomp_bpf%': 1,
1943 }, {
1944 'use_seccomp_bpf%': 0,
1945 }],
[email protected]912c55c2009-07-31 23:33:551946 ],
[email protected]a9318c72012-03-01 01:29:471947
[email protected]6a502252013-12-13 11:49:091948 # The path to the ANGLE library.
1949 'angle_path': '<(DEPTH)/third_party/angle',
[email protected]c91dc722013-06-12 22:53:011950
[email protected]35958422011-09-28 02:03:591951 # List of default apps to install in new profiles. The first list contains
1952 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061953 # contains the destination location for each of the files. When a crx
1954 # is added or removed from the list, the chrome/browser/resources/
1955 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591956 'default_apps_list': [
1957 'browser/resources/default_apps/external_extensions.json',
1958 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061959 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591960 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001961 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231962 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591963 ],
1964 'default_apps_list_linux_dest': [
1965 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1966 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061967 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591968 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001969 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231970 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591971 ],
[email protected]2f80c312009-02-25 21:26:551972 },
1973 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261974 'variables': {
[email protected]a6e22132010-02-10 20:43:181975 # The condition that operates on chromium_code is in a target_conditions
1976 # section, and will not have access to the default fallback value of
1977 # chromium_code at the top of this file, or to the chromium_code
1978 # variable placed at the root variables scope of .gyp files, because
1979 # those variables are not set at target scope. As a workaround,
1980 # if chromium_code is not set at target scope, define it in target scope
1981 # to contain whatever value it has during early variable expansion.
1982 # That's enough to make it available during target conditional
1983 # processing.
1984 'chromium_code%': '<(chromium_code)',
1985
[email protected]7e0d664a2009-12-03 21:07:471986 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1987 'win_release_Optimization%': '2', # 2 = /Os
1988 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331989
1990 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241991 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111992 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241993 # Tri-state: blank is default, 1 on, 0 off
1994 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331995
[email protected]6b0507b2010-05-07 07:41:211996 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1997 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331998
[email protected]6b0507b2010-05-07 07:41:211999 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:152000 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2001 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:332002
[email protected]fac10d12010-11-08 16:00:312003 # VS inserts quite a lot of extra checks to algorithms like
2004 # std::partial_sort in Debug build which make them O(N^2)
2005 # instead of O(N*logN). This is particularly slow under memory
2006 # tools like ThreadSanitizer so we want it to be disablable.
2007 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
2008 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:472009
[email protected]5d60b0b2013-07-30 20:24:302010 # An application manifest fragment to declare compatibility settings for
2011 # 'executable' targets. Ignored in other target type.
2012 'win_exe_compatibility_manifest%':
2013 '<(DEPTH)\\build\\win\\compatibility.manifest',
2014
2015 # Set to 1 to generate external manifest instead of embedding it for
2016 # 'executable' target. Does nothing for other target type. This flag is
2017 # used to make mini_installer compatible with the component build.
2018 # See http://crbug.com/127233
2019 'win_use_external_manifest%': 0,
2020
[email protected]ffd984b12009-09-11 19:37:002021 'release_extra_cflags%': '',
2022 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:002023
2024 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:522025
[email protected]ef5c5f1b2011-12-17 02:16:242026 # the non-qualified versions are widely assumed to be *nix-only
2027 'win_release_extra_cflags%': '',
2028 'win_debug_extra_cflags%': '',
2029
[email protected]b1eb341c2011-11-09 18:46:072030 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2031 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2032
[email protected]ef3326702011-10-06 18:06:442033 # Only used by Windows build for now. Can be used to build into a
2034 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2035 # output files in src/build/VS2010_{Debug,Release}.
2036 'build_dir_prefix%': '',
2037
[email protected]9ac2db692012-06-08 01:01:572038 # Targets are by default not nacl untrusted code.
2039 'nacl_untrusted_build%': 0,
2040
[email protected]9c55d9d2012-11-15 23:28:442041 'pnacl_compile_flags': [
[email protected]7dcd93c2013-11-02 02:05:532042 # pnacl uses the clang compiler so we need to suppress all the
[email protected]9c55d9d2012-11-15 23:28:442043 # same warnings as we do for clang.
2044 # TODO(sbc): Remove these if/when they are removed from the clang
2045 # build.
2046 '-Wno-unused-function',
2047 '-Wno-char-subscripts',
2048 '-Wno-c++11-extensions',
2049 '-Wno-unnamed-type-template-args',
2050 ],
2051
[email protected]8974e042010-06-21 18:06:522052 'conditions': [
2053 ['OS=="win" and component=="shared_library"', {
2054 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:162055 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2056 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:522057 }, {
2058 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2059 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2060 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2061 }],
[email protected]1e013672012-06-29 22:12:202062 ['OS=="ios"', {
2063 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2064 'mac_release_optimization%': 's', # Use -Os unless overridden
2065 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2066 }, {
2067 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2068 'mac_release_optimization%': '3', # Use -O3 unless overridden
2069 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2070 }],
[email protected]8974e042010-06-21 18:06:522071 ],
[email protected]1c966092009-08-20 21:19:262072 },
[email protected]c91dc722013-06-12 22:53:012073 'defines': [
[email protected]6d84e0b2013-12-05 12:16:132074 # Don't use deprecated V8 APIs anywhere.
2075 'V8_DEPRECATION_WARNINGS',
[email protected]c91dc722013-06-12 22:53:012076 ],
[email protected]32aa8cc2009-03-04 21:36:392077 'conditions': [
[email protected]d808e212013-03-12 14:06:162078 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:312079 'dependencies': [
2080 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2081 ],
2082 }],
[email protected]7ce58b22012-09-26 05:17:252083 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
2084 'cflags_cc!': ['-fno-rtti'],
2085 'cflags_cc+': [
2086 '-frtti',
2087 '-gline-tables-only',
2088 '-fintercept-allocation-functions',
2089 ],
2090 'defines': ['TYPE_PROFILING'],
2091 'dependencies': [
2092 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2093 ],
2094 }],
[email protected]b0c45722013-01-23 04:47:322095 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
2096 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
2097 # See http://crbug.com/162818.
2098 'cflags+': ['-Wno-sentinel'],
2099 }],
[email protected]ff10b132012-02-29 22:53:302100 ['OS=="win" and "<(msbuild_toolset)"!=""', {
2101 'msbuild_toolset': '<(msbuild_toolset)',
2102 }],
[email protected]32aa8cc2009-03-04 21:36:392103 ['branding=="Chrome"', {
2104 'defines': ['GOOGLE_CHROME_BUILD'],
2105 }, { # else: branding!="Chrome"
2106 'defines': ['CHROMIUM_BUILD'],
2107 }],
[email protected]286d9a12012-05-30 16:20:382108 ['OS=="mac" and component=="shared_library"', {
2109 'xcode_settings': {
2110 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2111 'LD_RUNPATH_SEARCH_PATHS': [
2112 # For unbundled binaries.
2113 '@loader_path/.',
2114 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2115 '@loader_path/../../..',
2116 ],
2117 },
2118 }],
[email protected]b6a5ac92012-10-29 18:17:222119 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:172120 'defines': ['ENABLE_RLZ'],
2121 }],
[email protected]63e39a282011-07-13 20:41:282122 ['component=="shared_library"', {
2123 'defines': ['COMPONENT_BUILD'],
2124 }],
[email protected]06c756182010-04-27 18:31:312125 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:172126 'defines': ['TOOLKIT_VIEWS=1'],
2127 }],
[email protected]1ee7c56c2011-10-19 14:51:332128 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:112129 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2130 }],
[email protected]41423092011-08-25 15:39:582131 ['use_aura==1', {
2132 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:352133 }],
[email protected]ed329be2012-01-03 22:02:162134 ['use_ash==1', {
2135 'defines': ['USE_ASH=1'],
2136 }],
[email protected]928362a2013-11-19 20:17:162137 ['use_cairo==1', {
2138 'defines': ['USE_CAIRO=1'],
2139 }],
[email protected]2a76009b2013-08-07 21:02:312140 ['use_cras==1', {
2141 'defines': ['USE_CRAS=1'],
2142 }],
[email protected]6ec70cc72013-11-20 05:33:462143 ['use_glib==1', {
2144 'defines': ['USE_GLIB=1'],
2145 }],
[email protected]ff78e4e2013-05-03 19:19:152146 ['use_ozone==1', {
2147 'defines': ['USE_OZONE=1'],
2148 }],
[email protected]cb800562012-11-20 22:36:072149 ['use_default_render_theme==1', {
2150 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2151 }],
[email protected]e190d272012-08-30 17:36:442152 ['use_libjpeg_turbo==1', {
2153 'defines': ['USE_LIBJPEG_TURBO=1'],
2154 }],
[email protected]c329adf82011-10-05 14:34:572155 ['use_nss==1', {
2156 'defines': ['USE_NSS=1'],
2157 }],
[email protected]2fa2f2d82013-04-29 18:13:122158 ['use_x11==1', {
2159 'defines': ['USE_X11=1'],
2160 }],
[email protected]89dcd662013-12-12 23:06:502161 ['use_clipboard_aurax11==1', {
2162 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2163 }],
[email protected]bd7b6fe2012-03-05 21:02:402164 ['enable_one_click_signin==1', {
2165 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2166 }],
[email protected]a47aa892011-11-22 03:12:312167 ['toolkit_uses_gtk==1 and toolkit_views==0', {
2168 # TODO(erg): We are progressively sealing up use of deprecated features
2169 # in gtk in preparation for an eventual porting to gtk3.
2170 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
2171 }],
[email protected]fdc5bed2010-01-09 01:16:572172 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:292173 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:502174 }],
[email protected]23485ba2013-09-15 00:50:002175 ['use_xi2_mt!=0 and use_x11==1', {
[email protected]f56797b2011-09-25 00:04:352176 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
2177 }],
[email protected]e47c32032011-03-01 19:26:202178 ['file_manager_extension==1', {
2179 'defines': ['FILE_MANAGER_EXTENSION=1'],
2180 }],
[email protected]77a848262013-02-22 11:17:252181 ['image_loader_extension==1', {
2182 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2183 }],
[email protected]7664ab32011-02-01 23:35:252184 ['profiling==1', {
2185 'defines': ['ENABLE_PROFILING=1'],
2186 }],
[email protected]542bf24a2010-06-11 23:08:172187 ['remoting==1', {
2188 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002189 }],
[email protected]5b87e782012-02-09 18:19:322190 ['enable_webrtc==1', {
2191 'defines': ['ENABLE_WEBRTC=1'],
2192 }],
[email protected]d01120e62010-05-10 17:04:482193 ['proprietary_codecs==1', {
2194 'defines': ['USE_PROPRIETARY_CODECS'],
2195 }],
[email protected]7ddea9802012-02-22 23:08:052196 ['enable_viewport==1', {
2197 'defines': ['ENABLE_VIEWPORT'],
2198 }],
[email protected]280755c2013-05-23 10:44:352199 ['enable_pepper_cdms==1', {
2200 'defines': ['ENABLE_PEPPER_CDMS'],
2201 }],
[email protected]f31e2e52011-07-14 16:01:192202 ['configuration_policy==1', {
2203 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2204 }],
[email protected]9eb100e2011-10-14 05:08:222205 ['input_speech==1', {
2206 'defines': ['ENABLE_INPUT_SPEECH'],
2207 }],
[email protected]7cce3232011-10-28 10:41:572208 ['notifications==1', {
2209 'defines': ['ENABLE_NOTIFICATIONS'],
2210 }],
[email protected]1efbaaa2012-04-24 02:43:242211 ['enable_hidpi==1', {
2212 'defines': ['ENABLE_HIDPI=1'],
2213 }],
[email protected]cef6c76f2013-10-30 16:33:302214 ['native_discardable_memory==1', {
2215 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2216 }],
2217 ['native_memory_pressure_signals==1', {
2218 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2219 }],
[email protected]49513e02013-11-20 08:36:402220 ['use_udev==1', {
2221 'defines': ['USE_UDEV'],
2222 }],
[email protected]f35bcea82013-12-04 04:37:062223 ['icu_use_data_file_flag==1', {
2224 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
2225 }, { # else icu_use_data_file_flag !=1
2226 'conditions': [
2227 ['OS=="win"', {
2228 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
2229 }, {
2230 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
2231 }],
2232 ],
2233 }],
[email protected]9c1949e2009-10-02 19:59:542234 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312235 'xcode_settings': {
2236 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2237 },
[email protected]9c1949e2009-10-02 19:59:542238 'conditions': [
[email protected]7df38122012-11-05 23:54:432239 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:302240 # Clang creates chubby debug information, which makes linking very
2241 # slow. For now, don't create debug information with clang. See
2242 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432243 'conditions': [
2244 ['OS=="linux"', {
2245 'variables': {
2246 'debug_extra_cflags': '-g0',
2247 },
2248 }],
2249 # Android builds symbols on release by default, disable them.
2250 ['OS=="android"', {
2251 'variables': {
2252 'debug_extra_cflags': '-g0',
2253 'release_extra_cflags': '-g0',
2254 },
2255 }],
2256 ],
2257 }, { # else clang!=1
2258 'conditions': [
[email protected]c86fd472013-04-02 19:42:302259 ['OS=="win" and fastbuild==2', {
2260 # Completely disable debug information.
2261 'msvs_settings': {
2262 'VCLinkerTool': {
2263 'GenerateDebugInformation': 'false',
2264 },
2265 'VCCLCompilerTool': {
2266 'DebugInformationFormat': '0',
2267 },
2268 },
2269 }],
2270 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432271 'msvs_settings': {
2272 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312273 # This tells the linker to generate .pdbs, so that
2274 # we can get meaningful stack traces.
2275 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432276 },
2277 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312278 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432279 'DebugInformationFormat': '0',
2280 },
2281 },
2282 }],
[email protected]c86fd472013-04-02 19:42:302283 ['OS=="linux" and fastbuild==2', {
2284 'variables': {
2285 'debug_extra_cflags': '-g0',
2286 },
2287 }],
2288 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432289 'variables': {
2290 'debug_extra_cflags': '-g1',
2291 },
2292 }],
[email protected]c86fd472013-04-02 19:42:302293 ['OS=="android" and fastbuild==2', {
2294 'variables': {
2295 'debug_extra_cflags': '-g0',
2296 'release_extra_cflags': '-g0',
2297 },
2298 }],
2299 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432300 'variables': {
2301 'debug_extra_cflags': '-g1',
2302 'release_extra_cflags': '-g1',
2303 },
2304 }],
2305 ],
2306 }], # clang!=1
2307 ],
[email protected]9c1949e2009-10-02 19:59:542308 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012309 ['dcheck_always_on!=0', {
2310 'defines': ['DCHECK_ALWAYS_ON=1'],
2311 }], # dcheck_always_on!=0
[email protected]65b0819e2013-06-21 15:24:002312 ['logging_like_official_build!=0', {
2313 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2314 }], # logging_like_official_build!=0
[email protected]a1e87422013-07-09 21:47:012315 ['tracing_like_official_build!=0', {
2316 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2317 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472318 ['win_use_allocator_shim==0', {
2319 'conditions': [
2320 ['OS=="win"', {
2321 'defines': ['NO_TCMALLOC'],
2322 }],
2323 ],
2324 }],
[email protected]b1c2a5542010-10-08 12:44:402325 ['use_openssl==1', {
2326 'defines': [
2327 'USE_OPENSSL=1',
2328 ],
2329 }],
[email protected]ed154592010-04-29 00:18:502330 ['enable_eglimage==1', {
2331 'defines': [
2332 'ENABLE_EGLIMAGE=1',
2333 ],
2334 }],
[email protected]696de4e62012-11-21 21:18:542335 ['asan==1 and OS=="win"', {
2336 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2337 # produce appropriate pdbs.
2338 'msvs_settings': {
2339 'VCLinkerTool': {
2340 'Profile': 'true',
2341 },
2342 },
[email protected]2f047202013-06-14 06:36:392343 'defines': [
[email protected]bba0fea32013-06-14 12:29:352344 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:392345 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2346 ],
[email protected]696de4e62012-11-21 21:18:542347 }], # asan==1 and OS=="win"
[email protected]4e4d6042010-08-26 18:34:382348 ['OS=="win"', {
2349 'defines': [
2350 '__STD_C',
2351 '_CRT_SECURE_NO_DEPRECATE',
2352 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102353 # This define is required to pull in the new Win8 interfaces from
2354 # system headers like ShObjIdl.h.
2355 'NTDDI_VERSION=0x06020000',
[email protected]37416742013-11-12 07:13:332356 # This is required for ATL to use XP-safe versions of its functions.
2357 '_USING_V110_SDK71_',
[email protected]4e4d6042010-08-26 18:34:382358 ],
2359 'include_dirs': [
2360 '<(DEPTH)/third_party/wtl/include',
2361 ],
[email protected]9619e65d2012-05-23 19:06:522362 'conditions': [
2363 ['win_z7!=0', {
2364 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092365 # Generates debug info when win_z7=1
2366 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2367 'VCLinkerTool': {
2368 'GenerateDebugInformation': 'true',
2369 },
[email protected]9619e65d2012-05-23 19:06:522370 'VCCLCompilerTool': {
2371 'DebugInformationFormat': '1',
2372 }
2373 }
2374 }],
[email protected]45a77072012-11-17 00:28:422375 ['"<(GENERATOR)"=="msvs"', {
2376 'msvs_settings': {
2377 'VCLinkerTool': {
2378 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2379 # have foo.pdb. The ninja generator already defaults to this and
2380 # can't handle the $(TargetPath) macro.
2381 'ProgramDatabaseFile': '$(TargetPath).pdb',
2382 }
2383 },
2384 }],
[email protected]9619e65d2012-05-23 19:06:522385 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382386 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022387 ['enable_task_manager==1', {
2388 'defines': [
2389 'ENABLE_TASK_MANAGER=1',
2390 ],
2391 }],
[email protected]6a3cd37e2012-04-17 17:13:342392 ['enable_extensions==1', {
2393 'defines': [
2394 'ENABLE_EXTENSIONS=1',
2395 ],
2396 }],
[email protected]13eb97d2012-01-05 01:07:122397 ['OS=="win" and branding=="Chrome"', {
2398 'defines': ['ENABLE_SWIFTSHADER'],
2399 }],
[email protected]407dfa632011-12-23 11:59:352400 ['enable_dart==1', {
2401 'defines': ['WEBKIT_USING_DART=1'],
2402 }],
[email protected]18e0f39b2012-01-17 16:47:342403 ['enable_plugin_installation==1', {
2404 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2405 }],
[email protected]6d17f6392012-12-05 05:24:542406 ['enable_plugins==1', {
2407 'defines': ['ENABLE_PLUGINS=1'],
2408 }],
[email protected]cdb756ef2012-04-05 18:34:532409 ['enable_session_service==1', {
2410 'defines': ['ENABLE_SESSION_SERVICE=1'],
2411 }],
[email protected]6b40bb582012-03-15 20:50:382412 ['enable_themes==1', {
2413 'defines': ['ENABLE_THEMES=1'],
2414 }],
[email protected]57e67ac2013-02-22 03:37:222415 ['enable_autofill_dialog==1', {
2416 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2417 }],
[email protected]0acdd772012-04-05 22:53:002418 ['enable_background==1', {
2419 'defines': ['ENABLE_BACKGROUND=1'],
2420 }],
[email protected]2e22e2f2012-03-15 21:53:102421 ['enable_automation==1', {
2422 'defines': ['ENABLE_AUTOMATION=1'],
2423 }],
[email protected]6ee43a72012-12-07 22:44:402424 ['enable_google_now==1', {
2425 'defines': ['ENABLE_GOOGLE_NOW=1'],
2426 }],
[email protected]3b5e88d2013-09-06 11:03:062427 ['cld_version!=0', {
2428 'defines': ['CLD_VERSION=<(cld_version)'],
2429 }],
[email protected]658677f2012-06-09 06:04:022430 ['enable_printing==1', {
[email protected]1e54c1c2013-08-12 17:16:052431 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2432 }],
2433 ['enable_printing==2', {
[email protected]658677f2012-06-09 06:04:022434 'defines': ['ENABLE_PRINTING=1'],
2435 }],
[email protected]c6ce08072013-07-31 07:48:532436 ['enable_spellcheck==1', {
2437 'defines': ['ENABLE_SPELLCHECK=1'],
2438 }],
[email protected]e6026962012-06-14 21:28:322439 ['enable_captive_portal_detection==1', {
2440 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2441 }],
[email protected]dc4e8b82012-11-15 03:58:162442 ['enable_app_list==1', {
2443 'defines': ['ENABLE_APP_LIST=1'],
2444 }],
2445 ['enable_settings_app==1', {
2446 'defines': ['ENABLE_SETTINGS_APP=1'],
2447 }],
[email protected]9bfe0ab2012-08-30 13:18:112448 ['disable_ftp_support==1', {
2449 'defines': ['DISABLE_FTP_SUPPORT=1'],
2450 }],
[email protected]0850e842013-01-19 03:44:312451 ['enable_managed_users==1', {
2452 'defines': ['ENABLE_MANAGED_USERS=1'],
2453 }],
[email protected]3f0ed2172013-11-04 20:27:292454 ['data_reduction_fallback_host != ""', {
2455 'defines': [
2456 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'],
2457 }],
[email protected]324856d2014-01-14 11:17:302458 ['data_reduction_dev_host != ""', {
2459 'defines': [
2460 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'],
2461 }],
[email protected]199def22013-02-21 17:52:292462 ['spdy_proxy_auth_origin != ""', {
2463 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2464 }],
2465 ['spdy_proxy_auth_property != ""', {
2466 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2467 }],
[email protected]f37e9412013-05-27 23:18:252468 ['spdy_proxy_auth_value != ""', {
2469 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2470 }],
[email protected]d8dd60e2013-10-08 00:49:432471 ['data_reduction_proxy_probe_url != ""', {
2472 'defines': [
2473 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'],
2474 }],
[email protected]5cbeb502013-04-23 19:25:272475 ['enable_mdns==1', {
2476 'defines': ['ENABLE_MDNS=1'],
[email protected]b9171622013-10-01 22:05:232477 }],
2478 ['enable_enhanced_bookmarks==1', {
2479 'defines': ['ENABLE_ENHANCED_BOOKMARKS=1'],
[email protected]8c64e282013-11-28 16:05:142480 }],
2481 ['enable_ipc_fuzzer==1', {
2482 'defines': ['ENABLE_IPC_FUZZER=1'],
2483 }],
[email protected]a6e22132010-02-10 20:43:182484 ], # conditions for 'target_defaults'
2485 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072486 ['enable_wexit_time_destructors==1', {
2487 'conditions': [
2488 [ 'clang==1', {
2489 'cflags': [
2490 '-Wexit-time-destructors',
2491 ],
2492 'xcode_settings': {
2493 'WARNING_CFLAGS': [
2494 '-Wexit-time-destructors',
2495 ],
2496 },
2497 }],
2498 ],
2499 }],
[email protected]c14d8e772010-02-09 22:06:152500 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282501 'conditions': [
[email protected]1e013672012-06-29 22:12:202502 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332503 # We don't want to get warnings from third-party code,
2504 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282505 'cflags!': [
2506 '-Wall',
2507 '-Wextra',
[email protected]d8543312010-02-10 17:43:282508 ],
[email protected]167ec822011-10-24 22:05:272509 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002510 # Don't warn about hash_map in third-party code.
2511 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272512 ],
2513 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332514 # Don't warn about printf format problems.
2515 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222516 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002517 ],
[email protected]d16bd642011-07-25 23:59:182518 'cflags_cc!': [
[email protected]f58fa2c2013-12-06 08:06:202519 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
[email protected]d16bd642011-07-25 23:59:182520 '-Wsign-compare',
2521 ]
[email protected]d8543312010-02-10 17:43:282522 }],
[email protected]82dd5eb32012-08-18 04:24:322523 # TODO: Fix all warnings on chromeos too.
2524 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2525 'cflags!': [
2526 '-Werror',
2527 ],
2528 }],
[email protected]bc073c062012-01-13 06:28:032529 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112530 'cflags': [
2531 # Don't warn about ignoring the return value from e.g. close().
2532 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032533 # BSD systems do not support this option, since they are usually
2534 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112535 '-Wno-unused-result',
2536 ],
2537 }],
[email protected]d8543312010-02-10 17:43:282538 [ 'OS=="win"', {
2539 'defines': [
2540 '_CRT_SECURE_NO_DEPRECATE',
2541 '_CRT_NONSTDC_NO_WARNINGS',
2542 '_CRT_NONSTDC_NO_DEPRECATE',
2543 '_SCL_SECURE_NO_DEPRECATE',
2544 ],
2545 'msvs_disabled_warnings': [4800],
2546 'msvs_settings': {
2547 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112548 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242549 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282550 'Detect64BitPortabilityProblems': 'false',
2551 },
2552 },
[email protected]c54b41cb2012-08-24 20:58:242553 'conditions': [
2554 ['buildtype=="Official"', {
2555 'msvs_settings': {
2556 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2557 }
2558 }],
2559 ],
[email protected]d8543312010-02-10 17:43:282560 }],
[email protected]0915c3b2012-11-22 17:24:072561 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422562 [ 'OS=="win" and component=="shared_library"', {
2563 'msvs_disabled_warnings': [
2564 4251, # class 'std::xx' needs to have dll-interface.
2565 ],
2566 }],
[email protected]1e013672012-06-29 22:12:202567 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282568 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062569 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282570 },
[email protected]3a352c362012-05-08 19:45:492571 'conditions': [
2572 ['buildtype=="Official"', {
2573 'xcode_settings': {
2574 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2575 },
2576 }],
2577 ],
[email protected]d8543312010-02-10 17:43:282578 }],
[email protected]1e013672012-06-29 22:12:202579 [ 'OS=="ios"', {
2580 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222581 # TODO(ios): Fix remaining warnings in third-party code, then
2582 # remove this; the Mac cleanup didn't get everything that's
2583 # flagged in an iOS build.
2584 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202585 'RUN_CLANG_STATIC_ANALYZER': 'NO',
[email protected]5a2637d02013-11-12 17:01:172586 # Several internal ios directories generate numerous warnings for
2587 # -Wobjc-missing-property-synthesis.
2588 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
[email protected]1e013672012-06-29 22:12:202589 },
2590 }],
[email protected]c14d8e772010-02-09 22:06:152591 ],
2592 }, {
[email protected]a5c598152012-01-27 04:55:132593 'includes': [
2594 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2595 'filename_rules.gypi',
2596 ],
[email protected]41af4f82012-11-08 00:09:312597 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152598 # C99 macros on Mac and Linux.
2599 'defines': [
[email protected]41af4f82012-11-08 00:09:312600 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152601 '__STDC_FORMAT_MACROS',
2602 ],
2603 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152604 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072605 # turn on warnings for signed/unsigned mismatch on chromium code.
2606 'msvs_settings': {
2607 'VCCLCompilerTool': {
2608 'AdditionalOptions': ['/we4389'],
2609 },
2610 },
[email protected]c14d8e772010-02-09 22:06:152611 }],
[email protected]63e39a282011-07-13 20:41:282612 ['OS=="win" and component=="shared_library"', {
2613 'msvs_disabled_warnings': [
2614 4251, # class 'std::xx' needs to have dll-interface.
2615 ],
2616 }],
[email protected]c14d8e772010-02-09 22:06:152617 ],
2618 }],
[email protected]a6e22132010-02-10 20:43:182619 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552620 'default_configuration': 'Debug',
2621 'configurations': {
[email protected]5153767c2009-12-22 01:52:502622 # VCLinkerTool LinkIncremental values below:
2623 # 0 == default
2624 # 1 == /INCREMENTAL:NO
2625 # 2 == /INCREMENTAL
2626 # Debug links incremental, Release does not.
2627 #
[email protected]7b99801e2010-11-03 17:26:232628 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502629 #
2630 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562631 'abstract': 1,
2632 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512633 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562634 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2635 'CharacterSet': '1',
2636 },
[email protected]f59e1302013-02-15 13:48:402637 # Add the default import libs.
2638 'msvs_settings':{
2639 'VCLinkerTool': {
2640 'AdditionalDependencies': [
2641 'kernel32.lib',
2642 'gdi32.lib',
2643 'winspool.lib',
2644 'comdlg32.lib',
2645 'advapi32.lib',
2646 'shell32.lib',
2647 'ole32.lib',
2648 'oleaut32.lib',
2649 'user32.lib',
2650 'uuid.lib',
2651 'odbc32.lib',
2652 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392653 'delayimp.lib',
[email protected]48293fb2013-12-04 04:02:032654 'credui.lib',
2655 'netapi32.lib',
[email protected]f59e1302013-02-15 13:48:402656 ],
2657 },
2658 },
[email protected]5153767c2009-12-22 01:52:502659 },
2660 'x86_Base': {
2661 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502662 'msvs_settings': {
2663 'VCLinkerTool': {
2664 'TargetMachine': '1',
2665 },
[email protected]2d584a92013-11-12 22:44:392666 'VCLibrarianTool': {
2667 'TargetMachine': '1',
2668 },
[email protected]ef4fa4072009-12-04 22:46:502669 },
[email protected]2fa40782009-11-01 21:17:342670 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562671 },
[email protected]5153767c2009-12-22 01:52:502672 'x64_Base': {
2673 'abstract': 1,
2674 'msvs_configuration_platform': 'x64',
2675 'msvs_settings': {
2676 'VCLinkerTool': {
2677 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502678 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052679 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502680 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052681 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362682 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2683 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502684 },
[email protected]d26b4418ab2010-03-24 22:06:352685 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502686 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052687 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502688 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052689 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]2d584a92013-11-12 22:44:392690 'TargetMachine': '17', # x64
[email protected]5153767c2009-12-22 01:52:502691 },
2692 },
[email protected]5153767c2009-12-22 01:52:502693 },
2694 'Debug_Base': {
2695 'abstract': 1,
[email protected]14339762011-04-05 07:36:582696 'defines': [
2697 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2698 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2699 ],
[email protected]1c966092009-08-20 21:19:262700 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:292701 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492702 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492703 '<@(debug_extra_cflags)',
2704 ],
[email protected]1c966092009-08-20 21:19:262705 },
[email protected]bb05e452009-10-29 21:24:562706 'msvs_settings': {
2707 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472708 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562709 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212710 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472711 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152712 'conditions': [
2713 # According to MSVS, InlineFunctionExpansion=0 means
2714 # "default inlining", not "/Ob0".
2715 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2716 ['win_debug_InlineFunctionExpansion==0', {
2717 'AdditionalOptions': ['/Ob0'],
2718 }],
2719 ['win_debug_InlineFunctionExpansion!=""', {
2720 'InlineFunctionExpansion':
2721 '<(win_debug_InlineFunctionExpansion)',
2722 }],
[email protected]fac10d12010-11-08 16:00:312723 ['win_debug_disable_iterator_debugging==1', {
2724 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2725 }],
[email protected]ef5c5f1b2011-12-17 02:16:242726
2727 # if win_debug_OmitFramePointers is blank, leave as default
2728 ['win_debug_OmitFramePointers==1', {
2729 'OmitFramePointers': 'true',
2730 }],
2731 ['win_debug_OmitFramePointers==0', {
2732 'OmitFramePointers': 'false',
2733 # The above is not sufficient (http://crbug.com/106711): it
2734 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2735 # perform FPO regardless, so we must explicitly disable.
2736 # We still want the false setting above to avoid having
2737 # "/Oy /Oy-" and warnings about overriding.
2738 'AdditionalOptions': ['/Oy-'],
2739 }],
[email protected]2ae6e022010-05-07 13:19:152740 ],
[email protected]ef5c5f1b2011-12-17 02:16:242741 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562742 },
2743 'VCLinkerTool': {
2744 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332745 # ASLR makes debugging with windbg difficult because Chrome.exe and
2746 # Chrome.dll share the same base name. As result, windbg will
2747 # name the Chrome.dll module like chrome_<base address>, where
2748 # <base address> typically changes with each launch. This in turn
2749 # means that breakpoints in Chrome.dll don't stick from one launch
2750 # to the next. For this reason, we turn ASLR off in debug builds.
2751 # Note that this is a three-way bool, where 0 means to pick up
2752 # the default setting, 1 is off and 2 is on.
2753 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562754 },
2755 'VCResourceCompilerTool': {
2756 'PreprocessorDefinitions': ['_DEBUG'],
2757 },
2758 },
[email protected]2f80c312009-02-25 21:26:552759 'conditions': [
[email protected]78204c92012-09-14 04:42:552760 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542761 'target_conditions': [
2762 ['_toolset=="target"', {
2763 'cflags': [
2764 '<@(debug_extra_cflags)',
2765 ],
2766 }],
[email protected]bb05e452009-10-29 21:24:562767 ],
[email protected]2f80c312009-02-25 21:26:552768 }],
[email protected]1eec679e2013-12-13 22:10:272769 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
[email protected]a8d94b42013-12-10 18:52:222770 # Enable libstdc++ debugging facilities to help catch problems
2771 # early, see http://crbug.com/65151 .
2772 # TODO(phajdan.jr): Should we enable this for all of POSIX?
2773 'defines': ['_GLIBCXX_DEBUG=1',],
2774 }],
[email protected]1e013672012-06-29 22:12:202775 # Disabled on iOS because it was causing a crash on startup.
2776 # TODO(michelea): investigate, create a reduced test and possibly
2777 # submit a radar.
2778 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352779 'xcode_settings': {
2780 'OTHER_CFLAGS': [
2781 '-fstack-protector-all', # Implies -fstack-protector
2782 ],
2783 },
2784 }],
[email protected]2f80c312009-02-25 21:26:552785 ],
2786 },
[email protected]5153767c2009-12-22 01:52:502787 'Release_Base': {
2788 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552789 'defines': [
2790 'NDEBUG',
2791 ],
[email protected]1c966092009-08-20 21:19:262792 'xcode_settings': {
2793 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2794 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002795 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262796 },
[email protected]bb05e452009-10-29 21:24:562797 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472798 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472799 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152800 'conditions': [
[email protected]2212d272011-12-20 21:37:372801 # In official builds, each target will self-select
2802 # an optimization level.
2803 ['buildtype!="Official"', {
2804 'Optimization': '<(win_release_Optimization)',
2805 },
2806 ],
[email protected]2ae6e022010-05-07 13:19:152807 # According to MSVS, InlineFunctionExpansion=0 means
2808 # "default inlining", not "/Ob0".
2809 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2810 ['win_release_InlineFunctionExpansion==0', {
2811 'AdditionalOptions': ['/Ob0'],
2812 }],
2813 ['win_release_InlineFunctionExpansion!=""', {
2814 'InlineFunctionExpansion':
2815 '<(win_release_InlineFunctionExpansion)',
2816 }],
[email protected]626d2d22011-10-11 15:47:332817
[email protected]ef5c5f1b2011-12-17 02:16:242818 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332819 ['win_release_OmitFramePointers==1', {
2820 'OmitFramePointers': 'true',
2821 }],
2822 ['win_release_OmitFramePointers==0', {
2823 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242824 # The above is not sufficient (http://crbug.com/106711): it
2825 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2826 # perform FPO regardless, so we must explicitly disable.
2827 # We still want the false setting above to avoid having
2828 # "/Oy /Oy-" and warnings about overriding.
2829 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332830 }],
[email protected]2ae6e022010-05-07 13:19:152831 ],
[email protected]ef5c5f1b2011-12-17 02:16:242832 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472833 },
[email protected]bb05e452009-10-29 21:24:562834 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342835 # LinkIncremental is a tri-state boolean, where 0 means default
2836 # (i.e., inherit from parent solution), 1 means false, and
2837 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562838 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342839 # This corresponds to the /PROFILE flag which ensures the PDB
2840 # file contains FIXUP information (growing the PDB file by about
2841 # 5%) but does not otherwise alter the output binary. This
2842 # information is used by the Syzygy optimization tool when
2843 # decomposing the release image.
2844 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562845 },
2846 },
[email protected]2f80c312009-02-25 21:26:552847 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162848 ['msvs_use_common_release', {
2849 'includes': ['release.gypi'],
2850 }],
[email protected]7bdd7d7c2012-11-01 10:36:162851 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582852 'defines': [
2853 'NVALGRIND',
2854 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2855 ],
[email protected]ee857512010-05-14 08:24:422856 }, {
[email protected]14339762011-04-05 07:36:582857 'defines': [
[email protected]2f047202013-06-14 06:36:392858 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582859 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2860 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2861 ],
[email protected]92822e82009-09-18 14:26:562862 }],
[email protected]7e0d664a2009-12-03 21:07:472863 ['win_use_allocator_shim==0', {
2864 'defines': ['NO_TCMALLOC'],
2865 }],
[email protected]9577be42013-11-01 15:16:302866 ['os_posix==1', {
2867 'target_conditions': [
2868 ['chromium_code==1', {
2869 # Non-chromium code is not guaranteed to compile cleanly
2870 # with _FORTIFY_SOURCE. Also, fortified build may fail
2871 # when optimizations are disabled, so only do that for Release
2872 # build.
2873 'defines': [
2874 '_FORTIFY_SOURCE=2',
2875 ],
2876 }],
[email protected]37305ae2012-12-11 01:54:582877 ],
2878 }],
[email protected]7df38122012-11-05 23:54:432879 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542880 'target_conditions': [
2881 ['_toolset=="target"', {
2882 'cflags': [
2883 '<@(release_extra_cflags)',
2884 ],
2885 }],
[email protected]bb05e452009-10-29 21:24:562886 ],
2887 }],
[email protected]b64ec822013-05-23 12:57:412888 ['OS=="ios"', {
2889 'defines': [
2890 'NS_BLOCK_ASSERTIONS=1',
2891 ],
2892 }],
[email protected]2f80c312009-02-25 21:26:552893 ],
2894 },
[email protected]5153767c2009-12-22 01:52:502895 #
2896 # Concrete configurations
2897 #
2898 'Debug': {
2899 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2900 },
2901 'Release': {
2902 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502903 },
[email protected]f926fa0a2009-08-04 22:50:132904 'conditions': [
2905 [ 'OS=="win"', {
2906 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502907 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502908 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302909 },
2910 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502911 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302912 },
[email protected]f926fa0a2009-08-04 22:50:132913 }],
2914 ],
[email protected]2f80c312009-02-25 21:26:552915 },
2916 },
2917 'conditions': [
[email protected]43539ec2012-11-20 22:35:252918 ['os_posix==1', {
2919 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252920 'ldflags': [
2921 '-Wl,-z,now',
2922 '-Wl,-z,relro',
2923 ],
[email protected]43539ec2012-11-20 22:35:252924 },
2925 }],
[email protected]d2ca75c2013-02-01 05:47:172926 ['os_posix==1 and chromeos==0', {
2927 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2928 # and we want to avoid overriding this, so stack-protector is only
2929 # enabled when not building on Chrome OS.
2930 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2931 # supports it.
2932 'target_defaults': {
2933 'cflags': [
2934 '-fstack-protector',
2935 '--param=ssp-buffer-size=4',
2936 ],
2937 },
2938 }],
[email protected]1e013672012-06-29 22:12:202939 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262940 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272941 # Enable -Werror by default, but put it in a variable so it can
2942 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2943 'variables': {
[email protected]cbbb3472012-01-25 18:32:312944 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202945 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272946 },
[email protected]6863896f2012-01-25 17:51:362947 'defines': [
2948 '_FILE_OFFSET_BITS=64',
2949 ],
[email protected]9d384032009-03-20 23:13:262950 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162951 '<(werror)', # See note above about the werror variable.
2952 '-pthread',
2953 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292954 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162955 '-Wall',
[email protected]0fa17082010-03-26 00:48:052956 # TODO(evan): turn this back on once all the builds work.
2957 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202958 # Don't warn about unused function params. We use those everywhere.
2959 '-Wno-unused-parameter',
2960 # Don't warn about the "struct foo f = {0};" initialization pattern.
2961 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122962 # Don't export any symbols (for example, to plugins we dlopen()).
2963 # Note: this is *required* to make some plugins work.
2964 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352965 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242966 ],
2967 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222968 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242969 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362970 # Make inline functions have hidden visiblity by default.
2971 # Surprisingly, not covered by -fvisibility=hidden.
2972 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172973 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
[email protected]f58fa2c2013-12-06 08:06:202974 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
[email protected]554abd902011-07-25 04:03:172975 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262976 ],
[email protected]a6cf87e2009-04-03 04:07:382977 'ldflags': [
[email protected]138241f2010-03-30 23:53:102978 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262979 ],
[email protected]1e013672012-06-29 22:12:202980 'libraries' : [
2981 '<(libraries_for_target)',
2982 ],
[email protected]3aacaf952009-04-02 15:34:092983 'configurations': {
[email protected]5153767c2009-12-22 01:52:502984 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312985 'variables': {
2986 'debug_optimize%': '0',
2987 },
[email protected]3aacaf952009-04-02 15:34:092988 'defines': [
2989 '_DEBUG',
2990 ],
2991 'cflags': [
[email protected]95ad2032012-08-24 00:49:252992 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092993 '-g',
2994 ],
[email protected]da1c8d692011-09-20 20:35:012995 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342996 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:342997 'ldflags': [
[email protected]933d0722013-07-03 04:32:492998 '-Wl,--fatal-warnings',
2999 # Only link with needed input sections. This is to avoid
3000 # getting undefined reference to __cxa_bad_typeid in the CDU
3001 # library.
[email protected]3f05e912013-04-11 20:38:343002 '-Wl,--gc-sections',
[email protected]933d0722013-07-03 04:32:493003 # Warn in case of text relocations.
3004 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:343005 ],
3006 }],
[email protected]fa9d4e262012-08-21 04:39:003007 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:553008 # Some configurations are copied from Release_Base to reduce
3009 # the binary size.
3010 'variables': {
3011 'debug_optimize%': 's',
3012 },
[email protected]da1c8d692011-09-20 20:35:013013 'cflags': [
[email protected]8a37e4502012-08-14 22:42:553014 '-fomit-frame-pointer',
3015 '-fdata-sections',
3016 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:013017 ],
[email protected]8a37e4502012-08-14 22:42:553018 'ldflags': [
3019 '-Wl,-O1',
3020 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:553021 ],
[email protected]da1c8d692011-09-20 20:35:013022 }],
[email protected]d4c0ec5b2013-03-10 03:07:453023 ['OS=="linux" and target_arch=="ia32"', {
3024 'ldflags': [
3025 '-Wl,--no-as-needed',
3026 ],
3027 }],
[email protected]2578ea12014-01-17 06:02:513028 ['debug_unwind_tables==1', {
3029 'cflags': ['-funwind-tables'],
3030 }, {
3031 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3032 }],
[email protected]da1c8d692011-09-20 20:35:013033 ],
[email protected]5315f2842009-04-28 00:43:273034 },
[email protected]5153767c2009-12-22 01:52:503035 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:013036 'variables': {
3037 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:513038 # Binaries become big and gold is unable to perform GC
3039 # and remove unused sections for some of test targets
3040 # on 32 bit platform.
3041 # (This is currently observed only in chromeos valgrind bots)
3042 # The following flag is to disable --gc-sections linker
3043 # option for these bots.
3044 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:123045
3046 # TODO(bradnelson): reexamine how this is done if we change the
3047 # expansion of configurations
3048 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:013049 },
[email protected]3aacaf952009-04-02 15:34:093050 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:183051 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:533052 # Don't emit the GCC version ident directives, they just end up
3053 # in the .comment section taking up binary size.
3054 '-fno-ident',
3055 # Put data and code in their own sections, so that unused symbols
3056 # can be removed at link time with --gc-sections.
3057 '-fdata-sections',
3058 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:093059 ],
[email protected]c902f2c2010-08-06 20:04:183060 'ldflags': [
3061 # Specifically tell the linker to perform optimizations.
3062 # See http://lwn.net/Articles/192624/ .
3063 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:223064 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:183065 ],
[email protected]1dd529642010-05-15 01:02:513066 'conditions' : [
3067 ['no_gc_sections==0', {
3068 'ldflags': [
3069 '-Wl,--gc-sections',
3070 ],
3071 }],
[email protected]da1c8d692011-09-20 20:35:013072 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:583073 'variables': {
3074 'release_optimize%': 's',
3075 },
[email protected]da1c8d692011-09-20 20:35:013076 'cflags': [
3077 '-fomit-frame-pointer',
3078 ],
[email protected]933d0722013-07-03 04:32:493079 'ldflags': [
3080 '-Wl,--fatal-warnings',
3081 # Warn in case of text relocations.
3082 '-Wl,--warn-shared-textrel',
3083 ],
[email protected]da1c8d692011-09-20 20:35:013084 }],
[email protected]ecf7b6482010-10-13 09:15:203085 ['clang==1', {
3086 'cflags!': [
3087 '-fno-ident',
3088 ],
3089 }],
[email protected]7664ab32011-02-01 23:35:253090 ['profiling==1', {
3091 'cflags': [
3092 '-fno-omit-frame-pointer',
3093 '-g',
3094 ],
[email protected]0358c4832013-06-23 14:17:583095 'conditions' : [
3096 ['profiling_full_stack_frames==1', {
3097 'cflags': [
3098 '-fno-inline',
3099 '-fno-optimize-sibling-calls',
3100 ],
3101 }],
3102 ],
[email protected]7664ab32011-02-01 23:35:253103 }],
[email protected]2578ea12014-01-17 06:02:513104 ['release_unwind_tables==1', {
3105 'cflags': ['-funwind-tables'],
3106 }, {
3107 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
[email protected]a637d4382014-01-11 03:12:053108 }],
[email protected]8d726a42012-02-09 03:49:003109 ],
[email protected]3aacaf952009-04-02 15:34:093110 },
3111 },
[email protected]606116d22009-05-06 22:38:233112 'conditions': [
[email protected]04b482602011-09-14 02:36:213113 ['target_arch=="ia32"', {
3114 'target_conditions': [
3115 ['_toolset=="target"', {
3116 'asflags': [
3117 # Needed so that libs with .s files (e.g. libicudata.a)
3118 # are compatible with the general 32-bit-ness.
3119 '-32',
3120 ],
3121 # All floating-point computations on x87 happens in 80-bit
3122 # precision. Because the C and C++ language standards allow
3123 # the compiler to keep the floating-point values in higher
3124 # precision than what's specified in the source and doing so
3125 # is more efficient than constantly rounding up to 64-bit or
3126 # 32-bit precision as specified in the source, the compiler,
3127 # especially in the optimized mode, tries very hard to keep
3128 # values in x87 floating-point stack (in 80-bit precision)
3129 # as long as possible. This has important side effects, that
3130 # the real value used in computation may change depending on
3131 # how the compiler did the optimization - that is, the value
3132 # kept in 80-bit is different than the value rounded down to
3133 # 64-bit or 32-bit. There are possible compiler options to
3134 # make this behavior consistent (e.g. -ffloat-store would keep
3135 # all floating-values in the memory, thus force them to be
3136 # rounded to its original precision) but they have significant
3137 # runtime performance penalty.
3138 #
3139 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3140 # which keep floating-point values in SSE registers in its
3141 # native precision (32-bit for single precision, and 64-bit
3142 # for double precision values). This means the floating-point
3143 # value used during computation does not change depending on
3144 # how the compiler optimized the code, since the value is
3145 # always kept in its specified precision.
3146 'conditions': [
3147 ['branding=="Chromium" and disable_sse2==0', {
3148 'cflags': [
3149 '-march=pentium4',
3150 '-msse2',
3151 '-mfpmath=sse',
3152 ],
3153 }],
3154 # ChromeOS targets Pinetrail, which is sse3, but most of the
3155 # benefit comes from sse2 so this setting allows ChromeOS
3156 # to build on other CPUs. In the future -march=atom would
3157 # help but requires a newer compiler.
3158 ['chromeos==1 and disable_sse2==0', {
3159 'cflags': [
3160 '-msse2',
[email protected]1d07e92b2013-08-16 19:54:513161 '-mfpmath=sse',
[email protected]04b482602011-09-14 02:36:213162 ],
3163 }],
[email protected]0a0063c52013-03-29 06:36:213164 # Use gold linker for Android ia32 target.
3165 ['OS=="android"', {
3166 'cflags': [
3167 '-fuse-ld=gold',
3168 ],
3169 'ldflags': [
3170 '-fuse-ld=gold',
3171 ],
3172 }],
[email protected]04b482602011-09-14 02:36:213173 # Install packages have started cropping up with
3174 # different headers between the 32-bit and 64-bit
3175 # versions, so we have to shadow those differences off
3176 # and make sure a 32-bit-on-64-bit build picks up the
3177 # right files.
[email protected]32594022012-05-10 03:22:283178 # For android build, use NDK headers instead of host headers
3179 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213180 'include_dirs+': [
3181 '/usr/include32',
3182 ],
3183 }],
3184 ],
3185 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
3186 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:063187 'cflags': [
[email protected]04b482602011-09-14 02:36:213188 '-m32',
3189 '-mmmx',
3190 ],
3191 'ldflags': [
3192 '-m32',
[email protected]ffde7932009-05-29 00:39:063193 ],
3194 }],
[email protected]606116d22009-05-06 22:38:233195 ],
3196 }],
[email protected]3dda8a962009-08-10 18:58:073197 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293198 'target_conditions': [
3199 ['_toolset=="target"', {
3200 'cflags_cc': [
3201 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3202 # has changed whenever it encounters a varargs function. This
3203 # silences those warnings, as they are not helpful and
3204 # clutter legitimate warnings.
3205 '-Wno-abi',
3206 ],
3207 'conditions': [
[email protected]7d6763422013-04-26 12:06:543208 ['arm_arch!=""', {
3209 'cflags': [
3210 '-march=<(arm_arch)',
3211 ],
3212 }],
3213 ['arm_tune!=""', {
3214 'cflags': [
3215 '-mtune=<(arm_tune)',
3216 ],
3217 }],
3218 ['arm_fpu!=""', {
3219 'cflags': [
3220 '-mfpu=<(arm_fpu)',
3221 ],
3222 }],
3223 ['arm_float_abi!=""', {
3224 'cflags': [
3225 '-mfloat-abi=<(arm_float_abi)',
3226 ],
3227 }],
3228 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293229 'cflags': [
3230 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293231 ]
3232 }],
[email protected]da1c8d692011-09-20 20:35:013233 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533234 # Most of the following flags are derived from what Android
3235 # uses by default when building for arm, reference for which
3236 # can be found in the following file in the Android NDK:
3237 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3238 'cflags': [
3239 # The tree-sra optimization (scalar replacement for
3240 # aggregates enabling subsequent optimizations) leads to
3241 # invalid code generation when using the Android NDK's
3242 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433243 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533244 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483245 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533246 '-Wno-psabi',
3247 ],
[email protected]ad17e342012-07-17 20:45:483248 # Android now supports .relro sections properly.
3249 # NOTE: While these flags enable the generation of .relro
3250 # sections, the generated libraries can still be loaded on
3251 # older Android platform versions.
3252 'ldflags': [
3253 '-Wl,-z,relro',
3254 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483255 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483256 ],
[email protected]da1c8d692011-09-20 20:35:013257 'conditions': [
[email protected]7d6763422013-04-26 12:06:543258 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223259 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013260 }],
[email protected]4c48ef102012-11-29 22:00:383261 ['profiling==1', {
3262 'cflags': [
3263 '-marm', # Probably reduntant, but recommend by "perf" docs.
3264 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3265 ],
3266 }],
[email protected]220ea5932012-08-09 10:44:073267 ['clang==1', {
3268 'cflags!': [
3269 # Clang does not support the following options.
3270 '-mthumb-interwork',
3271 '-finline-limit=64',
3272 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483273 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073274 '-Wno-psabi',
3275 ],
[email protected]b763d402014-01-13 18:34:223276 'cflags': [
3277 # TODO(hans) Enable integrated-as (crbug.com/124610).
3278 '-no-integrated-as',
3279 ],
3280
[email protected]7d899e9a2013-10-12 06:02:423281 'ldflags!': [
3282 # Clang does not support the following options.
3283 '-fuse-ld=gold',
3284 ],
[email protected]220ea5932012-08-09 10:44:073285 }],
[email protected]da1c8d692011-09-20 20:35:013286 ],
3287 }],
[email protected]3dda8a962009-08-10 18:58:073288 ],
3289 }],
3290 ],
3291 }],
[email protected]23eea4a42013-04-27 04:10:263292 ['target_arch=="mipsel"', {
3293 'target_conditions': [
3294 ['_toolset=="target"', {
3295 'conditions': [
[email protected]3a626e02013-06-27 12:58:343296 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263297 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343298 }],
3299 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263300 'cflags': ['-mips32', '-Wa,-mips32'],
3301 }],
3302 ],
3303 'cflags': [
3304 '-EL',
3305 '-mhard-float',
3306 ],
3307 'ldflags': [
3308 '-EL',
3309 '-Wl,--no-keep-memory'
3310 ],
3311 'cflags_cc': [
3312 '-Wno-uninitialized',
3313 ],
3314 }],
3315 ],
3316 }],
[email protected]2fb843b2010-08-12 02:11:083317 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583318 'cflags': [
3319 '-fPIC',
3320 ],
[email protected]d3f692b32011-12-14 19:04:353321 'ldflags': [
3322 '-fPIC',
3323 ],
[email protected]c76723a2010-01-25 23:10:583324 }],
[email protected]ee28c9f2009-09-04 01:53:013325 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573326 'target_conditions': [
3327 ['_toolset=="target"', {
3328 'cflags': [
3329 '--sysroot=<(sysroot)',
3330 ],
3331 'ldflags': [
3332 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153333 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573334 ],
3335 }]]
[email protected]ee28c9f2009-09-04 01:53:013336 }],
[email protected]58680ce2010-09-18 00:09:153337 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123338 'cflags': [
3339 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073340
[email protected]7ddcb1d2013-04-19 04:52:533341 # Don't die on dtoa code that uses a char as an array index.
3342 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073343
[email protected]64bbd6c2013-11-12 05:05:413344 # TODO(thakis): This used to be implied by -Wno-unused-function,
3345 # which we no longer use. Check if it makes sense to remove
3346 # this as well. http://crbug.com/316352
3347 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:103348
3349 # Warns on switches on enums that cover all enum values but
3350 # also contain a default: branch. Chrome is full of that.
3351 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513352
3353 # Warns when a const char[] is converted to bool.
3354 '-Wstring-conversion',
[email protected]ce889c22013-07-16 22:37:183355
3356 # C++11-related flags:
3357
[email protected]8dec02e2013-04-30 21:40:073358 # This warns on using ints as initializers for floats in
3359 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3360 # which happens in several places in chrome code. Not sure if
3361 # this is worth fixing.
3362 '-Wno-c++11-narrowing',
3363
[email protected]00c83cc2013-07-25 00:55:503364 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:073365 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243366
3367 # Clang considers the `register` keyword as deprecated, but e.g.
3368 # code generated by flex (used in angle) contains that keyword.
3369 # http://crbug.com/255186
3370 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073371 ],
[email protected]ce889c22013-07-16 22:37:183372 'cflags!': [
3373 # Clang doesn't seem to know know this flag.
3374 '-mfpmath=sse',
3375 ],
[email protected]8dec02e2013-04-30 21:40:073376 'cflags_cc': [
3377 # See the comment in the Mac section for what it takes to move
3378 # this to -std=c++11.
3379 '-std=gnu++11',
3380 ],
3381 }],
[email protected]bca3e082013-05-30 21:13:443382 ['clang==1 and OS=="android"', {
[email protected]ce889c22013-07-16 22:37:183383 # Android uses stlport, whose include/new defines
3384 # `void operator delete[](void* ptr) throw();`, which
3385 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3386 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3387 # via -isystem instead.
3388 'cflags_cc': [
3389 '-Wno-implicit-exception-spec-mismatch',
[email protected]8dec02e2013-04-30 21:40:073390 ],
3391 }],
[email protected]5d451ad2011-02-11 16:43:463392 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263393 'cflags': [
[email protected]c872dc52012-05-19 06:36:313394 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263395 ],
[email protected]5d451ad2011-02-11 16:43:463396 }],
[email protected]4a9ac22e2011-12-02 03:41:533397 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263398 'cflags': [
3399 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533400 ],
3401 }],
3402 ['clang==1 and clang_add_plugin!=""', {
3403 'cflags': [
[email protected]d23720682011-08-11 00:16:263404 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3405 ],
[email protected]5e781232011-01-28 02:57:593406 }],
[email protected]49110f02013-04-22 22:51:343407 ['clang==1 and target_arch=="ia32"', {
3408 'cflags': [
3409 # Else building libyuv gives clang's register allocator issues,
3410 # see llvm.org/PR15798 / crbug.com/233709
3411 '-momit-leaf-frame-pointer',
3412 ],
3413 }],
[email protected]2616d45d2012-01-19 03:15:483414 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3415 'cflags': [
3416 # See http://crbug.com/110262
3417 '-fcolor-diagnostics',
3418 ],
3419 }],
[email protected]062522a2013-06-13 15:49:553420 # Common options for AddressSanitizer, LeakSanitizer,
3421 # ThreadSanitizer and MemorySanitizer.
3422 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543423 'target_conditions': [
3424 ['_toolset=="target"', {
3425 'cflags': [
3426 '-fno-omit-frame-pointer',
3427 '-gline-tables-only',
3428 ],
[email protected]49110f02013-04-22 22:51:343429 'ldflags!': [
3430 # Functions interposed by the sanitizers can make ld think
3431 # that some libraries aren't needed when they actually are,
3432 # http://crbug.com/234010. As workaround, disable --as-needed.
3433 '-Wl,--as-needed',
3434 ],
[email protected]2f047202013-06-14 06:36:393435 'defines': [
3436 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3437 ],
[email protected]cf351c22013-04-19 13:00:543438 }],
3439 ],
3440 }],
[email protected]92799b632011-08-15 14:33:063441 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423442 'target_conditions': [
3443 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453444 'cflags': [
[email protected]48688df02012-11-27 21:04:563445 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563446 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453447 ],
3448 'ldflags': [
[email protected]48688df02012-11-27 21:04:563449 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453450 ],
3451 'defines': [
3452 'ADDRESS_SANITIZER',
3453 ],
[email protected]1ffc3b3962012-05-16 14:08:423454 }],
[email protected]921c7b52011-11-25 10:34:353455 ],
[email protected]92799b632011-08-15 14:33:063456 }],
[email protected]544a18ed2014-01-17 21:01:363457 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:033458 'target_conditions': [
3459 ['_toolset=="target"', {
3460 'cflags': [
[email protected]544a18ed2014-01-17 21:01:363461 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:033462 ],
3463 }],
3464 ],
3465 }],
[email protected]062522a2013-06-13 15:49:553466 ['lsan==1', {
3467 'target_conditions': [
3468 ['_toolset=="target"', {
3469 'cflags': [
3470 '-fsanitize=leak',
3471 ],
3472 'ldflags': [
3473 '-fsanitize=leak',
3474 ],
3475 'defines': [
3476 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:523477 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:553478 ],
3479 }],
3480 ],
3481 }],
[email protected]c9a829272012-07-04 07:51:123482 ['tsan==1', {
3483 'target_conditions': [
3484 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453485 'cflags': [
[email protected]927a9d672012-11-09 11:28:203486 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293487 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203488 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453489 ],
3490 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203491 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453492 ],
3493 'defines': [
3494 'THREAD_SANITIZER',
3495 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163496 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453497 ],
3498 'target_conditions': [
3499 ['_type=="executable"', {
3500 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123501 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453502 ],
3503 }],
3504 ],
[email protected]c9a829272012-07-04 07:51:123505 }],
3506 ],
3507 }],
[email protected]a10ddd2d2013-02-26 20:06:593508 ['msan==1', {
3509 'target_conditions': [
3510 ['_toolset=="target"', {
3511 'cflags': [
3512 '-fsanitize=memory',
3513 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593514 '-fPIC',
[email protected]190d4ce62014-01-17 20:24:533515 '-fsanitize-blacklist=<(msan_blacklist)',
[email protected]a10ddd2d2013-02-26 20:06:593516 ],
3517 'ldflags': [
3518 '-fsanitize=memory',
3519 ],
3520 'defines': [
3521 'MEMORY_SANITIZER',
3522 ],
3523 'target_conditions': [
3524 ['_type=="executable"', {
3525 'ldflags': [
3526 '-pie',
3527 ],
3528 }],
3529 ],
3530 }],
3531 ],
3532 }],
[email protected]c8103a42013-11-12 13:41:303533 ['use_instrumented_libraries==1', {
3534 'dependencies': [
3535 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
3536 ],
3537 'conditions': [
3538 ['asan==1', {
3539 'target_conditions': [
3540 ['_toolset=="target"', {
3541 'ldflags': [
3542 # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
3543 '-Wl,-R,\$$ORIGIN/instrumented_libraries/asan/lib/:\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/',
3544 '-Wl,-z,origin',
3545 ],
3546 }],
3547 ],
3548 }],
[email protected]819f2192013-12-03 14:33:413549 ['msan==1', {
3550 'target_conditions': [
3551 ['_toolset=="target"', {
3552 'ldflags': [
3553 '-Wl,-R,\$$ORIGIN/instrumented_libraries/msan/lib/:\$$ORIGIN/instrumented_libraries/msan/usr/lib/x86_64-linux-gnu/',
3554 '-Wl,-z,origin',
3555 ],
3556 }],
3557 ],
3558 }],
[email protected]c8103a42013-11-12 13:41:303559 ],
3560 }],
[email protected]22b3f531e2013-12-20 13:07:283561 ['use_custom_libcxx==1', {
3562 'dependencies': [
3563 '<(DEPTH)/third_party/libc++/libc++.gyp:libc++',
3564 '<(DEPTH)/third_party/libc++abi/libc++abi.gyp:libc++abi',
3565 ],
3566 }],
[email protected]8a48f3f2012-12-04 20:14:043567 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443568 'target_conditions' : [
3569 ['_toolset=="target"', {
3570 'cflags': [
3571 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453572 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:243573 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:453574 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443575 ],
3576 }],
[email protected]82e9b002013-07-16 21:04:243577 ['_toolset=="target" and OS=="android"', {
3578 'cflags': [
3579 # Avoids errors with current NDK:
3580 # "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"
3581 '-finstrument-functions-exclude-file-list=arm_neon.h',
3582 ],
3583 }],
[email protected]8a6abd12012-05-16 10:04:443584 ],
3585 }],
[email protected]ce4367d2013-01-15 16:13:103586 ['linux_dump_symbols==1', {
3587 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253588 'conditions': [
[email protected]791262fe2013-02-21 17:20:153589 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253590 'target_conditions': [
3591 ['_toolset=="target"', {
3592 'ldflags': [
[email protected]567370a32013-03-01 00:11:233593 # Workaround for linker OOM.
3594 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253595 ],
3596 }],
3597 ],
3598 }],
3599 ],
[email protected]cbd5fd52009-08-26 00:14:273600 }],
[email protected]3c8fe5482013-05-22 15:17:033601 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083602 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243603 }],
[email protected]8d726a42012-02-09 03:49:003604 ['linux_use_gold_flags==1', {
[email protected]c5a6fe42013-07-21 14:03:333605 'target_conditions': [
3606 ['_toolset=="target"', {
3607 'ldflags': [
3608 # Experimentation found that using four linking threads
3609 # saved ~20% of link time.
3610 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3611 # Only apply this to the target linker, since the host
3612 # linker might not be gold, but isn't used much anyway.
[email protected]21ed97e2014-01-14 23:40:553613 # TODO(raymes): Disable threading because gold is frequently
3614 # crashing on the bots: crbug.com/161942.
3615 # '-Wl,--threads',
3616 # '-Wl,--thread-count=4',
[email protected]c5a6fe42013-07-21 14:03:333617 ],
3618 }],
[email protected]68d01e82012-12-08 03:36:323619 ],
[email protected]8d726a42012-02-09 03:49:003620 'conditions': [
3621 ['release_valgrind_build==0', {
3622 'target_conditions': [
3623 ['_toolset=="target"', {
3624 'ldflags': [
[email protected]ffc46162014-01-16 12:19:493625 # There seems to be a conflict of --icf and -pie
3626 # in gold which can generate crashy binaries. As
3627 # a security measure, -pie takes precendence for
3628 # now.
3629 #'-Wl,--icf=safe',
3630 '-Wl,--icf=none',
[email protected]8d726a42012-02-09 03:49:003631 ],
3632 }],
3633 ],
3634 }],
3635 ],
3636 }],
[email protected]b07806c12012-02-03 22:44:593637 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593638 'ldflags': [
3639 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443640 # We pass the path to gold to the compiler. gyp leaves
3641 # unspecified what the cwd is when running the compiler,
3642 # so the normal gyp path-munging fails us. This hack
3643 # gets the right path.
[email protected]c0dada12013-11-22 20:46:533644 '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold',
[email protected]b07806c12012-02-03 22:44:593645 ],
3646 }],
[email protected]606116d22009-05-06 22:38:233647 ],
[email protected]9d384032009-03-20 23:13:263648 },
3649 }],
[email protected]c51e8d52009-12-11 20:04:063650 # FreeBSD-specific options; note that most FreeBSD options are set above,
3651 # with Linux.
3652 ['OS=="freebsd"', {
3653 'target_defaults': {
3654 'ldflags': [
3655 '-Wl,--no-keep-memory',
3656 ],
3657 },
3658 }],
[email protected]da1c8d692011-09-20 20:35:013659 # Android-specific options; note that most are set above with Linux.
3660 ['OS=="android"', {
3661 'variables': {
[email protected]25036722012-12-11 10:36:173662 # This is a unique identifier for a given build. It's used for
3663 # identifying various build artifacts corresponding to a particular
3664 # build of chrome (e.g. where to find archived symbols).
3665 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013666 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013667 # Use shared stlport library when system one used.
3668 # Figure this out early since it needs symbols from libgcc.a, so it
3669 # has to be before that in the set of libraries.
3670 ['use_system_stlport==1', {
3671 'android_stlport_library': 'stlport',
3672 }, {
[email protected]806b5232012-11-19 21:19:043673 'conditions': [
3674 ['component=="shared_library"', {
3675 'android_stlport_library': 'stlport_shared',
3676 }, {
3677 'android_stlport_library': 'stlport_static',
3678 }],
3679 ],
[email protected]da1c8d692011-09-20 20:35:013680 }],
3681 ],
3682
3683 # Placing this variable here prevents from forking libvpx, used
3684 # by remoting. Remoting is off, so it needn't built,
3685 # so forking it's deps seems like overkill.
3686 # But this variable need defined to properly run gyp.
3687 # A proper solution is to have an OS==android conditional
3688 # in third_party/libvpx/libvpx.gyp to define it.
3689 'libvpx_path': 'lib/linux/arm',
3690 },
3691 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013692 'variables': {
3693 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593694 'conditions': [
3695 # If we're using the components build, append "cr" to all shared
3696 # libraries to avoid naming collisions with android system library
3697 # versions with the same name (e.g. skia, icu).
3698 ['component=="shared_library"', {
3699 'android_product_extension': 'cr.so',
3700 }, {
3701 'android_product_extension': 'so',
3702 } ],
3703 ],
[email protected]8a37e4502012-08-14 22:42:553704 },
[email protected]da1c8d692011-09-20 20:35:013705 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593706 ['_type=="shared_library"', {
3707 'product_extension': '<(android_product_extension)',
3708 }],
3709
[email protected]da1c8d692011-09-20 20:35:013710 # Settings for building device targets using Android's toolchain.
3711 # These are based on the setup.mk file from the Android NDK.
3712 #
3713 # The NDK Android executable link step looks as follows:
3714 # $LDFLAGS
3715 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3716 # $(PRIVATE_OBJECTS) <-- The .o that we built
3717 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3718 # $(TARGET_LIBGCC) <-- libgcc.a
3719 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3720 # $(PRIVATE_LDLIBS) <-- System .so
3721 # $(TARGET_CRTEND_O) <-- crtend.o
3722 #
3723 # For now the above are approximated for executables by adding
3724 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3725 # of 'libraries'.
3726 #
3727 # The NDK Android shared library link step looks as follows:
3728 # $LDFLAGS
3729 # $(PRIVATE_OBJECTS) <-- The .o that we built
3730 # -l,--whole-archive
3731 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3732 # -l,--no-whole-archive
3733 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3734 # $(TARGET_LIBGCC) <-- libgcc.a
3735 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3736 # $(PRIVATE_LDLIBS) <-- System .so
3737 #
[email protected]ad17e342012-07-17 20:45:483738 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013739 #
3740 # For both executables and shared libraries, add the proper
3741 # libgcc.a to the start of libraries which puts it in the
3742 # proper spot after .o and .a files get linked in.
3743 #
3744 # TODO: The proper thing to do longer-tem would be proper gyp
3745 # support for a custom link command line.
3746 ['_toolset=="target"', {
3747 'cflags!': [
3748 '-pthread', # Not supported by Android toolchain.
3749 ],
3750 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013751 '-ffunction-sections',
3752 '-funwind-tables',
3753 '-g',
3754 '-fstack-protector',
3755 '-fno-short-enums',
3756 '-finline-limit=64',
3757 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013758 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013759 ],
3760 'defines': [
3761 'ANDROID',
3762 '__GNU_SOURCE=1', # Necessary for clone()
3763 'USE_STLPORT=1',
3764 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173765 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013766 ],
3767 'ldflags!': [
3768 '-pthread', # Not supported by Android toolchain.
3769 ],
3770 'ldflags': [
3771 '-nostdlib',
3772 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013773 # Don't export symbols from statically linked libraries.
3774 '-Wl,--exclude-libs=ALL',
3775 ],
[email protected]a0e48b02011-11-22 07:53:013776 'libraries': [
3777 '-l<(android_stlport_library)',
3778 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043779 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013780 '-lc',
3781 '-ldl',
[email protected]a0e48b02011-11-22 07:53:013782 '-lm',
[email protected]da1c8d692011-09-20 20:35:013783 ],
3784 'conditions': [
[email protected]806b5232012-11-19 21:19:043785 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473786 'ldflags!': [
3787 '-Wl,--exclude-libs=ALL',
3788 ],
[email protected]806b5232012-11-19 21:19:043789 }],
[email protected]220ea5932012-08-09 10:44:073790 ['clang==1', {
3791 'cflags': [
3792 # Work around incompatibilities between bionic and clang
3793 # headers.
3794 '-D__compiler_offsetof=__builtin_offsetof',
3795 '-Dnan=__builtin_nan',
3796 ],
3797 'conditions': [
3798 ['target_arch=="arm"', {
3799 'cflags': [
3800 '-target arm-linux-androideabi',
3801 '-mllvm -arm-enable-ehabi',
3802 ],
3803 'ldflags': [
3804 '-target arm-linux-androideabi',
3805 ],
3806 }],
3807 ['target_arch=="ia32"', {
3808 'cflags': [
3809 '-target x86-linux-androideabi',
3810 ],
3811 'ldflags': [
3812 '-target x86-linux-androideabi',
3813 ],
3814 }],
3815 ],
3816 }],
[email protected]ed70ed1862012-11-07 12:11:253817 ['asan==1', {
3818 'cflags': [
3819 # Android build relies on -Wl,--gc-sections removing
3820 # unreachable code. ASan instrumentation for globals inhibits
3821 # this and results in a library with unresolvable relocations.
3822 # TODO(eugenis): find a way to reenable this.
3823 '-mllvm -asan-globals=0',
3824 ],
3825 }],
[email protected]d999c3cb2013-03-12 10:22:363826 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463827 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573828 # The NDK has these things, but doesn't define the constants
3829 # to say that it does. Define them here instead.
3830 'HAVE_SYS_UIO_H',
3831 ],
3832 'cflags': [
3833 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463834 ],
[email protected]da1c8d692011-09-20 20:35:013835 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523836 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013837 ],
3838 }],
[email protected]d999c3cb2013-03-12 10:22:363839 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083840 'include_dirs': [
3841 # OpenAL headers from the Android tree.
3842 '<(android_src)/frameworks/wilhelm/include',
3843 ],
3844 'cflags': [
[email protected]04882132012-11-21 12:40:453845 # Android predefines this as 1; undefine it here so Chromium
3846 # can redefine it later to be 2 for chromium code and unset
3847 # for third party code. This works because cflags are added
3848 # before defines.
3849 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553850 # Disable any additional warnings enabled by the Android build system but which
3851 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083852 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553853 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3854 '-Wno-ignored-qualifiers',
3855 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083856 ],
3857 'cflags_cc': [
[email protected]2f34a202013-03-11 13:59:163858 # Other things unrelated to -Wextra:
3859 '-Wno-non-virtual-dtor',
3860 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083861 ],
3862 }],
[email protected]9577be42013-11-01 15:16:303863 ['android_webview_build==1', {
3864 'target_conditions': [
3865 ['chromium_code==0', {
3866 'cflags': [
3867 # There is a class of warning which:
3868 # 1) Android always enables and also treats as errors
3869 # 2) Chromium ignores in third party code
3870 # So we re-enable those warnings when building Android.
3871 '-Wno-address',
3872 '-Wno-format-security',
3873 '-Wno-return-type',
3874 '-Wno-sequence-point',
3875 ],
3876 'cflags_cc': [
3877 '-Wno-non-virtual-dtor',
3878 ],
3879 }],
[email protected]0d7291e2012-10-04 19:16:083880 ],
3881 }],
[email protected]febd3572012-05-03 09:17:453882 ['target_arch == "arm"', {
3883 'ldflags': [
3884 # Enable identical code folding to reduce size.
3885 '-Wl,--icf=safe',
3886 ],
3887 }],
[email protected]da1c8d692011-09-20 20:35:013888 # NOTE: The stlport header include paths below are specified in
3889 # cflags rather than include_dirs because they need to come
3890 # after include_dirs. Think of them like system headers, but
3891 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3892 # toolchain (circa Gingerbread) will exhibit strange errors.
3893 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513894 ['use_system_stlport==1', {
3895 'cflags': [
3896 # For libstdc++/include, which is used by stlport.
3897 '-I<(android_src)/bionic',
3898 '-I<(android_src)/external/stlport/stlport',
3899 ],
3900 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013901 'cflags': [
[email protected]225ec632013-04-03 18:20:223902 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013903 ],
[email protected]225ec632013-04-03 18:20:223904 'ldflags': [
3905 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013906 ],
3907 }],
3908 ['target_arch=="ia32"', {
3909 # The x86 toolchain currently has problems with stack-protector.
3910 'cflags!': [
3911 '-fstack-protector',
3912 ],
3913 'cflags': [
3914 '-fno-stack-protector',
3915 ],
3916 }],
3917 ],
3918 'target_conditions': [
3919 ['_type=="executable"', {
3920 'ldflags': [
3921 '-Bdynamic',
3922 '-Wl,-dynamic-linker,/system/bin/linker',
3923 '-Wl,--gc-sections',
3924 '-Wl,-z,nocopyreloc',
3925 # crtbegin_dynamic.o should be the last item in ldflags.
3926 '<(android_ndk_lib)/crtbegin_dynamic.o',
3927 ],
3928 'libraries': [
3929 # crtend_android.o needs to be the last item in libraries.
3930 # Do not add any libraries after this!
3931 '<(android_ndk_lib)/crtend_android.o',
3932 ],
[email protected]63a131fd2012-11-06 16:01:213933 'conditions': [
3934 ['asan==1', {
3935 'cflags': [
3936 '-fPIE',
3937 ],
3938 'ldflags': [
3939 '-pie',
3940 ],
3941 }],
3942 ],
[email protected]da1c8d692011-09-20 20:35:013943 }],
[email protected]f5c7758a2012-07-25 16:17:573944 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013945 'ldflags': [
3946 '-Wl,-shared,-Bsymbolic',
3947 ],
[email protected]d093fe8b2013-04-30 18:00:233948 'conditions': [
3949 ['android_webview_build==0', {
3950 'ldflags': [
3951 # crtbegin_so.o should be the last item in ldflags.
3952 '<(android_ndk_lib)/crtbegin_so.o',
3953 ],
3954 'libraries': [
3955 # crtend_so.o needs to be the last item in libraries.
3956 # Do not add any libraries after this!
3957 '<(android_ndk_lib)/crtend_so.o',
3958 ],
3959 }],
[email protected]a08029b42012-04-25 03:18:463960 ],
[email protected]da1c8d692011-09-20 20:35:013961 }],
3962 ],
3963 }],
3964 # Settings for building host targets using the system toolchain.
3965 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123966 'cflags!': [
3967 # Due to issues in Clang build system, using ASan on 32-bit
3968 # binaries on x86_64 host is problematic.
3969 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563970 '-fsanitize=address',
3971 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123972 ],
[email protected]da1c8d692011-09-20 20:35:013973 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443974 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013975 '-Wl,-z,noexecstack',
3976 '-Wl,--gc-sections',
3977 '-Wl,-O1',
3978 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:223979 '-Wl,--warn-shared-textrel',
3980 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:013981 ],
3982 }],
[email protected]0ccf578f2013-03-13 11:13:393983 # Settings for building host targets on mac.
3984 ['_toolset=="host" and host_os=="mac"', {
3985 'ldflags!': [
3986 '-Wl,-z,now',
3987 '-Wl,-z,relro',
3988 ],
3989 }],
[email protected]da1c8d692011-09-20 20:35:013990 ],
3991 },
3992 }],
[email protected]93f21e42010-04-01 00:35:153993 ['OS=="solaris"', {
3994 'cflags!': ['-fvisibility=hidden'],
3995 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3996 }],
[email protected]1e013672012-06-29 22:12:203997 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553998 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423999 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:554000 'xcode_settings': {
4001 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:244002 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4003 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:314004 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:044005 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4006 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:044007 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4008 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4009 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:254010 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4011 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:044012 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4013 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4014 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4015 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:554016 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:044017 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:554018 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:044019 'WARNING_CFLAGS': [
4020 '-Wall',
4021 '-Wendif-labels',
4022 '-Wextra',
4023 # Don't warn about unused function parameters.
4024 '-Wno-unused-parameter',
4025 # Don't warn about the "struct foo f = {0};" initialization
4026 # pattern.
4027 '-Wno-missing-field-initializers',
4028 ],
[email protected]b3fb8092009-03-12 19:09:244029 'conditions': [
4030 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:594031 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4032 ],
[email protected]2936b8c2012-10-29 10:57:314033 # Note that the prebuilt Clang binaries should not be used for iOS
4034 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:284035 ['clang==1', {
[email protected]34f40892011-09-06 21:53:304036 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4037 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:384038
[email protected]9e0756c2013-09-01 01:37:024039 # gnu++11 instead of c++11 is needed because some code uses
4040 # typeof() (a GNU extension).
4041 # TODO(thakis): Eventually switch this to c++11 instead of
4042 # gnu++11 (once typeof can be removed, which is blocked on c++11
4043 # being available everywhere).
4044 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
[email protected]3e893e0c2012-11-16 16:58:444045 # Warn if automatic synthesis is triggered with
4046 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534047 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:304048 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:284049 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:074050 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:524051
4052 # This warns on using ints as initializers for floats in
4053 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
4054 # which happens in several places in chrome code. Not sure if
4055 # this is worth fixing.
4056 '-Wno-c++11-narrowing',
4057
[email protected]66733172010-09-22 00:09:284058 # Don't die on dtoa code that uses a char as an array index.
4059 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4060 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:074061
[email protected]a6aef302013-11-09 04:18:214062 # TODO(thakis): This used to be implied by -Wno-unused-function,
4063 # which we no longer use. Check if it makes sense to remove
4064 # this as well. http://crbug.com/316352
4065 '-Wno-unneeded-internal-declaration',
[email protected]9242c7642012-01-29 09:02:104066
4067 # Warns on switches on enums that cover all enum values but
4068 # also contain a default: branch. Chrome is full of that.
4069 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:514070
4071 # Warns when a const char[] is converted to bool.
4072 '-Wstring-conversion',
[email protected]361b47c2013-07-02 15:13:244073
4074 # Clang considers the `register` keyword as deprecated, but e.g.
4075 # code generated by flex (used in angle) contains that keyword.
4076 # http://crbug.com/255186
4077 '-Wno-deprecated-register',
[email protected]66733172010-09-22 00:09:284078 ],
4079 }],
[email protected]2fccd422013-05-21 21:27:574080 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:464081 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:314082 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:464083 ],
4084 }],
[email protected]4a9ac22e2011-12-02 03:41:534085 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:594086 'OTHER_CFLAGS': [
4087 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:534088 ],
4089 }],
4090 ['clang==1 and clang_add_plugin!=""', {
4091 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:594092 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4093 ],
4094 }],
[email protected]2616d45d2012-01-19 03:15:484095 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4096 'OTHER_CFLAGS': [
4097 # See http://crbug.com/110262
4098 '-fcolor-diagnostics',
4099 ],
4100 }],
[email protected]b3fb8092009-03-12 19:09:244101 ],
[email protected]2f80c312009-02-25 21:26:554102 },
[email protected]34f40892011-09-06 21:53:304103 'conditions': [
4104 ['clang==1', {
4105 'variables': {
4106 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4107 },
4108 }],
[email protected]921c7b52011-11-25 10:34:354109 ['asan==1', {
4110 'xcode_settings': {
4111 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:564112 '-fsanitize=address',
4113 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:354114 ],
[email protected]921c7b52011-11-25 10:34:354115 },
4116 'defines': [
4117 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:394118 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:354119 ],
4120 }],
[email protected]544a18ed2014-01-17 21:01:364121 ['asan_coverage!=0', {
[email protected]20a127f2014-01-16 03:25:034122 'target_conditions': [
4123 ['_toolset=="target"', {
4124 'cflags': [
[email protected]544a18ed2014-01-17 21:01:364125 '-mllvm -asan-coverage=<(asan_coverage)',
[email protected]20a127f2014-01-16 03:25:034126 ],
4127 }],
4128 ],
4129 }],
[email protected]34f40892011-09-06 21:53:304130 ],
[email protected]2f80c312009-02-25 21:26:554131 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:554132 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:464133 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:084134 'conditions': [
4135 ['asan==1', {
4136 'xcode_settings': {
4137 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:444138 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:084139 ],
4140 },
4141 }],
[email protected]c9cc9442013-12-28 21:27:444142 ['mac_write_linker_maps==1', {
4143 'xcode_settings': {
4144 'OTHER_LDFLAGS': [
4145 '-Wl,-map,>(_target_name).map',
4146 ],
4147 },
4148 }],
[email protected]4281a4e2012-08-24 19:05:084149 ],
[email protected]5d7dc972009-04-16 15:30:464150 }],
4151 ['_mac_bundle', {
4152 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:314153 'target_conditions': [
4154 ['_type=="executable"', {
4155 'conditions': [
4156 ['asan==1', {
4157 'postbuilds': [
4158 {
4159 'variables': {
4160 # Define copy_asan_dylib_path in a variable ending in
4161 # _path so that gyp understands it's a path and
4162 # performs proper relativization during dict merging.
4163 'copy_asan_dylib_path':
4164 'mac/copy_asan_runtime_dylib.sh',
4165 },
4166 'postbuild_name': 'Copy ASan runtime dylib',
4167 'action': [
4168 '<(copy_asan_dylib_path)',
4169 ],
4170 },
4171 ],
4172 }],
4173 ],
4174 }],
4175 ],
[email protected]87fde4a2009-02-28 00:50:084176 }],
[email protected]2936b8c2012-10-29 10:57:314177 ], # target_conditions
4178 }, # target_defaults
4179 }], # OS=="mac" or OS=="ios"
4180 ['OS=="mac"', {
4181 'target_defaults': {
4182 'variables': {
4183 # These should end with %, but there seems to be a bug with % in
4184 # variables that are intended to be set to different values in
4185 # different targets, like these.
4186 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:314187 # Strip debugging symbols from the target.
4188 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:374189 'conditions': [
4190 ['asan==1', {
4191 'conditions': [
4192 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:354193 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:374194 }, {
4195 'mac_real_dsym': '<(mac_want_real_dsym)'
4196 }],
4197 ],
4198 }, {
4199 'conditions': [
4200 ['mac_want_real_dsym=="default"', {
4201 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4202 }, {
4203 'mac_real_dsym': '<(mac_want_real_dsym)'
4204 }],
4205 ],
4206 }],
4207 ],
[email protected]2936b8c2012-10-29 10:57:314208 },
4209 'xcode_settings': {
4210 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4211 # (Equivalent to -fPIC)
4212 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4213 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4214 # Keep pch files below xcodebuild/.
4215 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:394216 'OTHER_CFLAGS': [
4217 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4218 # xcode_setting, but not until all downstream projects' mac bots are
4219 # using xcode >= 4.6, because that's when the default value of the
4220 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4221 # setting is a no-op as far as xcode is concerned, but the compiler
4222 # behaves differently based on whether -fno-strict-aliasing is
4223 # specified or not.
4224 '-fno-strict-aliasing', # See http://crbug.com/32204.
4225 ],
[email protected]2936b8c2012-10-29 10:57:314226 },
4227 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:104228 ['_type=="executable"', {
4229 'postbuilds': [
4230 {
4231 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:364232 # code execution when running on Mac OS X 10.7 ("Lion"), and
4233 # ensures that the position-independent executable (PIE) bit
4234 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:104235 'variables': {
[email protected]8c40f322011-08-24 03:33:364236 # Define change_mach_o_flags in a variable ending in _path
4237 # so that GYP understands it's a path and performs proper
4238 # relativization during dict merging.
4239 'change_mach_o_flags_path':
4240 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:174241 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134242 ],
4243 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174244 ['mac_pie==0 or release_valgrind_build==1', {
4245 # Don't enable PIE if it's unwanted. It's unwanted if
4246 # the target specifies mac_pie=0 or if building for
4247 # Valgrind, because Valgrind doesn't understand slide.
4248 # See the similar mac_pie/release_valgrind_build check
4249 # below.
[email protected]081c0342011-08-24 14:59:134250 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134251 '--no-pie',
4252 ],
4253 }],
4254 ],
[email protected]6303fed2011-08-11 01:12:104255 },
[email protected]8c40f322011-08-24 03:33:364256 'postbuild_name': 'Change Mach-O Flags',
4257 'action': [
4258 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134259 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364260 ],
[email protected]6303fed2011-08-11 01:12:104261 },
4262 ],
[email protected]5a5d97aa2011-09-02 15:34:004263 'conditions': [
4264 ['asan==1', {
4265 'variables': {
4266 'asan_saves_file': 'asan.saves',
4267 },
4268 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564269 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004270 },
4271 }],
4272 ],
[email protected]162407f2011-09-08 15:33:174273 'target_conditions': [
4274 ['mac_pie==1 and release_valgrind_build==0', {
4275 # Turn on position-independence (ASLR) for executables. When
4276 # PIE is on for the Chrome executables, the framework will
4277 # also be subject to ASLR.
4278 # Don't do this when building for Valgrind, because Valgrind
4279 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4280 # understand slide, and get rid of the Valgrind check.
4281 'xcode_settings': {
4282 'OTHER_LDFLAGS': [
4283 '-Wl,-pie', # Position-independent executable (MH_PIE)
4284 ],
4285 },
4286 }],
4287 ],
[email protected]6a0242bc2011-07-01 00:34:464288 }],
[email protected]9a5e72862010-09-02 16:16:584289 ['(_type=="executable" or _type=="shared_library" or \
4290 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204291 'target_conditions': [
4292 ['mac_real_dsym == 1', {
4293 # To get a real .dSYM bundle produced by dsymutil, set the
4294 # debug information format to dwarf-with-dsym. Since
4295 # strip_from_xcode will not be used, set Xcode to do the
4296 # stripping as well.
4297 'configurations': {
[email protected]5153767c2009-12-22 01:52:504298 'Release_Base': {
[email protected]24700642009-06-01 16:01:204299 'xcode_settings': {
4300 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4301 'DEPLOYMENT_POSTPROCESSING': 'YES',
4302 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074303 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254304 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074305 # The Xcode default is to strip debugging symbols
4306 # only (-S). Local symbols should be stripped as
4307 # well, which will be handled by -x. Xcode will
4308 # continue to insert -S when stripping even when
4309 # additional flags are added with STRIPFLAGS.
4310 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404311 }], # _type=="shared_library" or _type=="loadable_module"
4312 ['_type=="executable"', {
4313 'conditions': [
4314 ['asan==1', {
4315 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4316 }]
4317 ],
4318 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074319 ], # target_conditions
4320 }, # xcode_settings
4321 }, # configuration "Release"
4322 }, # configurations
[email protected]24700642009-06-01 16:01:204323 }, { # mac_real_dsym != 1
4324 # To get a fast fake .dSYM bundle, use a post-build step to
4325 # produce the .dSYM and strip the executable. strip_from_xcode
4326 # only operates in the Release configuration.
4327 'postbuilds': [
4328 {
4329 'variables': {
4330 # Define strip_from_xcode in a variable ending in _path
4331 # so that gyp understands it's a path and performs proper
4332 # relativization during dict merging.
4333 'strip_from_xcode_path': 'mac/strip_from_xcode',
4334 },
4335 'postbuild_name': 'Strip If Needed',
4336 'action': ['<(strip_from_xcode_path)'],
4337 },
[email protected]e14a9f92009-08-05 19:26:074338 ], # postbuilds
4339 }], # mac_real_dsym
4340 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584341 }], # (_type=="executable" or _type=="shared_library" or
4342 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074343 ], # target_conditions
4344 }, # target_defaults
4345 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204346 ['OS=="ios"', {
4347 'target_defaults': {
4348 'xcode_settings' : {
4349 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4350
4351 # This next block is mostly common with the 'mac' section above,
4352 # but keying off (or setting) 'clang' isn't valid for iOS as it
[email protected]7503ad1f2013-09-09 15:59:054353 # also means using Chromium's build of clang.
[email protected]1e013672012-06-29 22:12:204354
[email protected]e31ef5b2013-05-21 11:08:494355 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4356 # section above).
4357 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]3e893e0c2012-11-16 16:58:444358 # Warn if automatic synthesis is triggered with
4359 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534360 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204361 'WARNING_CFLAGS': [
4362 '-Wheader-hygiene',
4363 # Don't die on dtoa code that uses a char as an array index.
4364 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4365 '-Wno-char-subscripts',
[email protected]e3a85452013-11-14 01:46:174366 # See comment in the mac clang section above for this flag.
4367 '-Wno-unneeded-internal-declaration',
[email protected]e31ef5b2013-05-21 11:08:494368 # Match OS X clang C++11 warning settings.
4369 '-Wno-c++11-narrowing',
[email protected]1e013672012-06-29 22:12:204370 ],
4371 },
4372 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474373 ['_toolset=="host"', {
4374 'xcode_settings': {
4375 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4376 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]c3c372e2013-10-29 22:31:514377 'ARCHS': [
4378 'x86_64'
4379 ],
[email protected]296bc452013-05-13 21:29:474380 },
4381 }],
4382 ['_toolset=="target"', {
4383 'xcode_settings': {
4384 # This section should be for overriding host settings. But,
4385 # since we can't negate the iphone deployment target above, we
4386 # instead set it here for target only.
4387 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4388 },
4389 }],
[email protected]1e013672012-06-29 22:12:204390 ['_type=="executable"', {
4391 'configurations': {
4392 'Release_Base': {
4393 'xcode_settings': {
4394 'DEPLOYMENT_POSTPROCESSING': 'YES',
4395 'STRIP_INSTALLED_PRODUCT': 'YES',
4396 },
4397 },
[email protected]3c6aa862012-11-05 17:11:444398 'Debug_Base': {
4399 'xcode_settings': {
4400 # Remove dSYM to reduce build time.
4401 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4402 },
4403 },
[email protected]1e013672012-06-29 22:12:204404 },
[email protected]c3c372e2013-10-29 22:31:514405 'xcode_settings': {
4406 'conditions': [
4407 ['chromium_ios_signing', {
4408 # iOS SDK wants everything for device signed.
4409 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4410 }, {
4411 'CODE_SIGNING_REQUIRED': 'NO',
4412 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4413 }],
4414 ],
4415 },
[email protected]1e013672012-06-29 22:12:204416 }],
4417 ], # target_conditions
4418 }, # target_defaults
4419 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554420 ['OS=="win"', {
4421 'target_defaults': {
4422 'defines': [
[email protected]8e345da2012-07-01 22:10:304423 '_WIN32_WINNT=0x0602',
4424 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554425 'WIN32',
4426 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554427 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284428 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554429 '_CRT_RAND_S',
4430 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4431 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274432 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554433 ],
[email protected]8974e042010-06-21 18:06:524434 'conditions': [
[email protected]2212d272011-12-20 21:37:374435 ['buildtype=="Official"', {
4436 # In official builds, targets can self-select an optimization
4437 # level by defining a variable named 'optimize', and setting it
4438 # to one of
4439 # - "size", optimizes for minimal code size - the default.
4440 # - "speed", optimizes for speed over code size.
4441 # - "max", whole program optimization and link-time code
4442 # generation. This is very expensive and should be used
4443 # sparingly.
4444 'variables': {
4445 'optimize%': 'size',
4446 },
4447 'target_conditions': [
4448 ['optimize=="size"', {
4449 'msvs_settings': {
4450 'VCCLCompilerTool': {
4451 # 1, optimizeMinSpace, Minimize Size (/O1)
4452 'Optimization': '1',
4453 # 2, favorSize - Favor small code (/Os)
4454 'FavorSizeOrSpeed': '2',
4455 },
4456 },
4457 },
4458 ],
4459 ['optimize=="speed"', {
4460 'msvs_settings': {
4461 'VCCLCompilerTool': {
4462 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4463 'Optimization': '2',
4464 # 1, favorSpeed - Favor fast code (/Ot)
4465 'FavorSizeOrSpeed': '1',
4466 },
4467 },
4468 },
4469 ],
4470 ['optimize=="max"', {
4471 'msvs_settings': {
4472 'VCCLCompilerTool': {
4473 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4474 'Optimization': '2',
4475 # 1, favorSpeed - Favor fast code (/Ot)
4476 'FavorSizeOrSpeed': '1',
4477 # This implies link time code generation.
4478 'WholeProgramOptimization': 'true',
4479 },
4480 },
4481 },
4482 ],
4483 ],
4484 },
4485 ],
[email protected]8974e042010-06-21 18:06:524486 ['component=="static_library"', {
4487 'defines': [
4488 '_HAS_EXCEPTIONS=0',
4489 ],
4490 }],
[email protected]3e2648a2011-03-21 20:58:504491 ['secure_atl', {
4492 'defines': [
4493 '_SECURE_ATL',
4494 ],
4495 }],
[email protected]54184ce72012-10-18 07:11:264496 ['msvs_express', {
4497 'configurations': {
4498 'x86_Base': {
4499 'msvs_settings': {
4500 'VCLinkerTool': {
4501 'AdditionalLibraryDirectories':
4502 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4503 },
4504 'VCLibrarianTool': {
4505 'AdditionalLibraryDirectories':
4506 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4507 },
4508 },
4509 },
4510 'x64_Base': {
4511 'msvs_settings': {
4512 'VCLibrarianTool': {
4513 'AdditionalLibraryDirectories':
4514 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4515 },
4516 'VCLinkerTool': {
4517 'AdditionalLibraryDirectories':
4518 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4519 },
4520 },
4521 },
4522 },
4523 'msvs_settings': {
4524 'VCLinkerTool': {
4525 # Explicitly required when using the ATL with express
4526 'AdditionalDependencies': ['atlthunk.lib'],
4527
4528 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4529 # almost eight hundred LNK4254 and LNK4078 warnings:
4530 # - warning LNK4254: section 'ATL' (50000040) merged into
4531 # '.rdata' (40000040) with different attributes
4532 # - warning LNK4078: multiple 'ATL' sections found with
4533 # different attributes
4534 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4535 },
4536 },
4537 'msvs_system_include_dirs': [
4538 '<(windows_driver_kit_path)/inc/atl71',
4539 '<(windows_driver_kit_path)/inc/mfc42',
4540 ],
[email protected]9577be42013-11-01 15:16:304541 'target_conditions': [
4542 ['chromium_code', {
4543 # Workaround for intsafe in 2010 Express + WDK.
4544 # ATL code uses intsafe.h and both intsafe.h and stdint.h
4545 # define INT8_MIN et al.
4546 # We can't use this workaround in third_party code because
4547 # it has various levels of intolerance for including stdint.h.
4548 'msvs_system_include_dirs': [
4549 '<(DEPTH)/build',
4550 ],
4551 'msvs_settings': {
4552 'VCCLCompilerTool': {
4553 'ForcedIncludeFiles': [ 'intsafe_workaround.h', ],
4554 },
4555 },
4556 }],
[email protected]3f3f45f2013-10-28 19:30:434557 ],
[email protected]3f3f45f2013-10-28 19:30:434558 }],
[email protected]8974e042010-06-21 18:06:524559 ],
[email protected]5b5ca7cb2009-07-20 23:00:204560 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054561 '<(windows_sdk_path)/Include/shared',
4562 '<(windows_sdk_path)/Include/um',
4563 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554564 '$(VSInstallDir)/VC/atlmfc/include',
4565 ],
[email protected]a8d99cef2009-08-26 20:47:494566 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]bab6e232013-11-27 22:52:394567 'msvs_cygwin_shell': 0,
[email protected]7815a362013-04-26 08:12:004568 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114569 # TODO(maruel): These warnings are level 4. They will be slowly
4570 # removed as code is fixed.
4571 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004572 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4573 4706,
[email protected]942c3a60f2011-05-03 02:04:114574 ],
[email protected]2f80c312009-02-25 21:26:554575 'msvs_settings': {
4576 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444577 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554578 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554579 'BufferSecurityCheck': 'true',
4580 'EnableFunctionLevelLinking': 'true',
4581 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114582 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554583 'WarnAsError': 'true',
4584 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584585 'conditions': [
[email protected]8974e042010-06-21 18:06:524586 ['component=="shared_library"', {
4587 'ExceptionHandling': '1', # /EHsc
4588 }, {
4589 'ExceptionHandling': '0',
4590 }],
[email protected]3fef6e62009-07-31 19:58:584591 ],
[email protected]2f80c312009-02-25 21:26:554592 },
4593 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164594 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374595 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054596 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374597 ],
[email protected]2f80c312009-02-25 21:26:554598 },
4599 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554600 'AdditionalDependencies': [
4601 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504602 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554603 'version.lib',
4604 'msimg32.lib',
4605 'ws2_32.lib',
4606 'usp10.lib',
4607 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084608 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484609 'winmm.lib',
4610 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554611 ],
[email protected]a78da50e2010-06-09 21:31:374612 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054613 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374614 ],
[email protected]2f80c312009-02-25 21:26:554615 'GenerateDebugInformation': 'true',
4616 'MapFileName': '$(OutDir)\\$(TargetName).map',
4617 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554618 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484619 # SubSystem values:
4620 # 0 == not set
4621 # 1 == /SUBSYSTEM:CONSOLE
4622 # 2 == /SUBSYSTEM:WINDOWS
4623 # Most of the executables we'll ever create are tests
4624 # and utilities with console output.
4625 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554626 },
4627 'VCMIDLTool': {
4628 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094629 'TypeLibraryName': '$(InputName).tlb',
4630 'OutputDirectory': '$(IntDir)',
4631 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334632 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094633 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4634 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554635 },
4636 'VCResourceCompilerTool': {
4637 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384638 'AdditionalIncludeDirectories': [
4639 '<(DEPTH)',
4640 '<(SHARED_INTERMEDIATE_DIR)',
4641 ],
[email protected]2f80c312009-02-25 21:26:554642 },
[email protected]5d60b0b2013-07-30 20:24:304643 'target_conditions': [
4644 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4645 'VCManifestTool': {
4646 'AdditionalManifestFiles': [
4647 '>(win_exe_compatibility_manifest)',
4648 ],
4649 },
4650 }],
4651 ['_type=="executable" and >(win_use_external_manifest)==0', {
4652 'VCManifestTool': {
4653 'EmbedManifest': 'true',
4654 }
4655 }],
4656 ['_type=="executable" and >(win_use_external_manifest)==1', {
4657 'VCManifestTool': {
4658 'EmbedManifest': 'false',
4659 }
4660 }],
4661 ],
[email protected]2f80c312009-02-25 21:26:554662 },
4663 },
4664 }],
[email protected]79e2336c2011-05-12 18:18:344665 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314666 'target_defaults': {
4667 'defines': [
4668 'DISABLE_NACL',
4669 ],
4670 },
4671 }],
[email protected]cfbf9bc2009-12-07 22:07:564672 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194673 'target_defaults': {
4674 'msvs_settings': {
4675 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194676 'DelayLoadDLLs': [
4677 'dbghelp.dll',
4678 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014679 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194680 'uxtheme.dll',
4681 ],
4682 },
4683 },
[email protected]ef4fa4072009-12-04 22:46:504684 'configurations': {
[email protected]5153767c2009-12-22 01:52:504685 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504686 'msvs_settings': {
4687 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164688 'AdditionalOptions': [
4689 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334690 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164691 '/ignore:4199',
4692 '/ignore:4221',
4693 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434694 ],
4695 'conditions': [
4696 ['asan==0', {
4697 'AdditionalOptions': ['/largeaddressaware'],
4698 }],
[email protected]1f9471a2010-01-04 06:40:164699 ],
[email protected]ef4fa4072009-12-04 22:46:504700 },
4701 },
4702 },
[email protected]5153767c2009-12-22 01:52:504703 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504704 'msvs_settings': {
4705 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164706 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504707 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334708 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164709 '/ignore:4199',
4710 '/ignore:4221',
4711 '/nxcompat',
4712 ],
[email protected]ef4fa4072009-12-04 22:46:504713 },
4714 },
4715 },
4716 },
[email protected]48c7af72009-07-03 22:00:194717 },
4718 }],
[email protected]9821d0d2010-04-16 22:40:374719 ['enable_new_npdevice_api==1', {
4720 'target_defaults': {
4721 'defines': [
4722 'ENABLE_NEW_NPDEVICE_API',
4723 ],
4724 },
4725 }],
[email protected]5f683172013-04-27 01:53:194726 # Don't warn about the "typedef 'foo' locally defined but not used"
4727 # for gcc 4.8.
4728 # TODO: remove this flag once all builds work. See crbug.com/227506
4729 ['gcc_version>=48', {
4730 'target_defaults': {
4731 'cflags': [
4732 '-Wno-unused-local-typedefs',
4733 ],
4734 },
4735 }],
[email protected]220ea5932012-08-09 10:44:074736 ['clang==1', {
[email protected]e71a3622013-12-04 07:32:414737 'make_global_settings': [
4738 ['CC', '<(make_clang_dir)/bin/clang'],
4739 ['CXX', '<(make_clang_dir)/bin/clang++'],
4740 ['CC.host', '$(CC)'],
4741 ['CXX.host', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:304742 ],
4743 }],
[email protected]615fa6642012-08-14 19:17:074744 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274745 # Hardcode the compiler names in the Makefile so that
4746 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114747 'make_global_settings': [
[email protected]e71a3622013-12-04 07:32:414748 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
4749 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
4750 ['CC.host', '<!(which gcc)'],
4751 ['CXX.host', '<!(which g++)'],
[email protected]d10e2cc2012-03-20 10:45:274752 ],
4753 }],
[email protected]23eea4a42013-04-27 04:10:264754 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464755 'make_global_settings': [
4756 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4757 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
[email protected]eb5f1672013-01-31 07:56:464758 ['CC.host', '<!(which gcc)'],
4759 ['CXX.host', '<!(which g++)'],
[email protected]eb5f1672013-01-31 07:56:464760 ],
4761 }],
[email protected]e71a3622013-12-04 07:32:414762
4763 # TODO(yyanagisawa): supports GENERATOR==make
4764 # make generator doesn't support CC_wrapper without CC
4765 # in make_global_settings yet.
4766 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', {
4767 'make_global_settings': [
4768 ['CC_wrapper', '<(gomadir)/gomacc'],
4769 ['CXX_wrapper', '<(gomadir)/gomacc'],
4770 ['CC.host_wrapper', '<(gomadir)/gomacc'],
4771 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
4772 ],
4773 }],
[email protected]2f80c312009-02-25 21:26:554774 ],
4775 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504776 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4777 # This block adds *project-wide* configuration settings to each project
4778 # file. It's almost always wrong to put things here. Specify your
4779 # custom xcode_settings in target_defaults to add them to targets instead.
4780
[email protected]1e013672012-06-29 22:12:204781 'conditions': [
[email protected]fca3d812012-07-27 00:55:364782 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4783 # setting sets the SDK on a project-wide basis. In order to get the
4784 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4785 # here at the project level.
[email protected]2c261532012-10-06 00:46:294786 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364787 'conditions': [
[email protected]2c261532012-10-06 00:46:294788 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364789 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294790 }, {
4791 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364792 }],
4793 ],
[email protected]2c261532012-10-06 00:46:294794 }],
4795 ['OS=="ios"', {
4796 'conditions': [
4797 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404798 'conditions': [
4799 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]c3c372e2013-10-29 22:31:514800 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404801 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:384802 }, {
4803 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:404804 }],
4805 ],
[email protected]2c261532012-10-06 00:46:294806 }, {
4807 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4808 }],
4809 ],
[email protected]1e013672012-06-29 22:12:204810 }],
4811 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204812 # Target both iPhone and iPad.
4813 'TARGETED_DEVICE_FAMILY': '1,2',
[email protected]c3c372e2013-10-29 22:31:514814 'VALID_ARCHS': 'armv7 i386',
[email protected]72c0d3652013-11-05 19:11:424815 }, { # OS!="ios"
4816 'conditions': [
4817 ['target_arch=="x64"', {
4818 'ARCHS': [
4819 'x86_64'
4820 ],
4821 }],
4822 ['target_arch=="ia32"', {
4823 'ARCHS': [
4824 'i386'
4825 ],
4826 }],
4827 ],
[email protected]d64554012013-10-31 18:40:004828 }],
[email protected]1e013672012-06-29 22:12:204829 ],
[email protected]0c8ab452009-11-06 21:57:504830
[email protected]2f80c312009-02-25 21:26:554831 # The Xcode generator will look for an xcode_settings section at the root
4832 # of each dict and use it to apply settings on a file-wide basis. Most
4833 # settings should not be here, they should be in target-specific
4834 # xcode_settings sections, or better yet, should use non-Xcode-specific
4835 # settings in target dicts. SYMROOT is a special case, because many other
4836 # Xcode variables depend on it, including variables such as
4837 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4838 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4839 # files to appear (when present) in the UI as actual files and not red
4840 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4841 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164842 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554843 },
[email protected]ee28c9f2009-09-04 01:53:014844}