blob: 33a372671a37e7a22829caf30d355d9d9702d280 [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]ff78e4e2013-05-03 19:19:1530 # Use a raw surface abstraction.
31 'use_ozone%': 0,
[email protected]8796d922012-08-07 01:23:1132 },
33 # Copy conditionally-set variables out one scope.
34 'chromeos%': '<(chromeos)',
35 'use_aura%': '<(use_aura)',
36 'use_ash%': '<(use_ash)',
[email protected]ff78e4e2013-05-03 19:19:1537 'use_ozone%': '<(use_ozone)',
[email protected]e72e55b2011-01-06 22:19:3038
[email protected]3fa441d2011-09-18 17:28:5039 # Whether we are using Views Toolkit
40 'toolkit_views%': 0,
41
[email protected]e0b85a52011-10-06 03:30:4242 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
43 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2744
[email protected]7ddea9802012-02-22 23:08:0545 # Disable viewport meta tag by default.
46 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2447
48 # Enable HiDPI support.
49 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4050
[email protected]6155e702012-05-02 17:56:0651 # Enable touch optimized art assets and metrics.
52 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1853
[email protected]f1f362b42012-05-15 17:46:5854 # Override buildtype to select the desired build flavor.
55 # Dev - everyday build for development/testing
56 # Official - release build (generally implies additional processing)
57 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
58 # conversion is done), some of the things which are now controlled by
59 # 'branding', such as symbol generation, will need to be refactored
60 # based on 'buildtype' (i.e. we don't care about saving symbols for
61 # non-Official # builds).
62 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1163
[email protected]e2aaaac2013-05-08 07:20:0964 # Override branding to select the desired branding flavor.
65 'branding%': 'Chromium',
66
[email protected]8796d922012-08-07 01:23:1167 'conditions': [
[email protected]d7a94fb2013-07-27 23:14:3768 # ChromeOS implies ash.
69 ['chromeos==1', {
[email protected]8796d922012-08-07 01:23:1170 'use_ash%': 1,
71 'use_aura%': 1,
72 }],
[email protected]020648aa2013-06-08 17:16:4773
[email protected]e9c4c1c2013-02-06 06:46:4874 # For now, Windows builds that |use_aura| should also imply using
75 # ash. This rule should be removed for the future when Windows is
76 # using the aura windows without the ash interface.
77 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1178 'use_ash%': 1,
79 }],
80 ['use_ash==1', {
81 'use_aura%': 1,
82 }],
[email protected]94cdbf42012-12-11 19:49:2283
84 # Compute the architecture that we're building on.
85 ['OS=="win" or OS=="mac" or OS=="ios"', {
86 'host_arch%': 'ia32',
87 }, {
88 # This handles the Unix platforms for which there is some support.
89 # Anything else gets passed through, which probably won't work
90 # very well; such hosts should pass an explicit target_arch to
91 # gyp.
92 'host_arch%':
93 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
94 }],
[email protected]8796d922012-08-07 01:23:1195 ],
[email protected]bb6aba32011-01-07 19:04:4396 },
97 # Copy conditionally-set variables out one scope.
98 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5899 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16100 'use_ash%': '<(use_ash)',
[email protected]ff78e4e2013-05-03 19:19:15101 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42102 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05103 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24104 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06105 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58106 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09107 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22108 'host_arch%': '<(host_arch)',
109
110 # Default architecture we're building for is the architecture we're
111 # building on.
112 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58113
[email protected]d999c3cb2013-03-12 10:22:36114 # This is set when building the Android WebView inside the Android
115 # build system, using the 'android' gyp backend. The WebView code is
116 # still built when this is unset, but builds using the normal chromium
117 # build system.
118 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53119
[email protected]55d92492013-01-31 05:03:39120 # Sets whether chrome is built for google tv device.
121 'google_tv%': 0,
122
[email protected]7d6763422013-04-26 12:06:54123 # Set ARM architecture version.
124 'arm_version%': 7,
125
[email protected]e72e55b2011-01-06 22:19:30126 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50127 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35128 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43129 'toolkit_views%': 1,
130 }, {
131 'toolkit_views%': 0,
132 }],
[email protected]1efbaaa2012-04-24 02:43:24133
[email protected]8796d922012-08-07 01:23:11134 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]1201dd0f2013-05-03 23:39:54135 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_ozone==0', {
[email protected]8796d922012-08-07 01:23:11136 'toolkit_uses_gtk%': 1,
137 }, {
138 'toolkit_uses_gtk%': 0,
139 }],
140
[email protected]3aa8a682012-08-11 00:04:29141 # Enable HiDPI on Mac OS and Chrome OS.
142 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24143 'enable_hidpi%': 1,
144 }],
[email protected]219c7312012-05-10 20:32:40145
[email protected]c71fe6402012-08-15 15:22:55146 # Enable touch UI on Metro.
147 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06148 'enable_touch_ui%': 1,
149 }],
[email protected]dc4e8b82012-11-15 03:58:16150
[email protected]b1a2b542013-01-10 07:33:09151 # Enable App Launcher only on ChromeOS, Windows and OSX.
152 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16153 'enable_app_list%': 1,
154 }, {
155 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09156 }],
157
[email protected]cb800562012-11-20 22:36:07158 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26159 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07160 }, {
161 'use_default_render_theme%': 0,
162 }],
[email protected]e2aaaac2013-05-08 07:20:09163
164 # TODO(thestig) Remove the linux_lsb_release check after all the
165 # official Ubuntu Lucid builder are gone.
166 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
167 'linux_lsb_release%': '<!(lsb_release -r -s)',
168 }, {
169 'linux_lsb_release%': '',
170 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e72e55b2011-01-06 22:19:30171 ],
172 },
173
174 # Copy conditionally-set variables out one scope.
175 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30176 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22177 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43178 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11179 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58180 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16181 'use_ash%': '<(use_ash)',
[email protected]ff78e4e2013-05-03 19:19:15182 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42183 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05184 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24185 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06186 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36187 'android_webview_build%': '<(android_webview_build)',
[email protected]55d92492013-01-31 05:03:39188 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16189 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07190 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22191 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09192 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54193 'arm_version%': '<(arm_version)',
[email protected]e2aaaac2013-05-08 07:20:09194 'linux_lsb_release%': '<(linux_lsb_release)',
[email protected]e14a9f92009-08-05 19:26:07195
[email protected]c86fd472013-04-02 19:42:30196 # Set to 1 to enable fast builds. Set to 2 for even faster builds
197 # (it disables debug info for fastest compilation - only for use
198 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30199 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49200
[email protected]20960e072011-09-20 20:59:01201 # Set to 1 to enable dcheck in release without having to use the flag.
202 'dcheck_always_on%': 0,
203
[email protected]65b0819e2013-06-21 15:24:00204 # Set to 1 to make a build that logs like an official build, but is not
205 # necessarily an official build, ie DCHECK and DLOG are disabled and
206 # removed completely in release builds, to minimize binary footprint.
207 # Note: this setting is ignored if buildtype=="Official".
208 'logging_like_official_build%': 0,
209
[email protected]a1e87422013-07-09 21:47:01210 # Set to 1 to make a build that disables unshipped tracing events.
211 # Note: this setting is ignored if buildtype=="Official".
212 'tracing_like_official_build%': 0,
213
[email protected]464750f2011-10-24 23:16:18214 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51215 'file_manager_extension%': 0,
216
[email protected]77a848262013-02-22 11:17:25217 # Disable image loader component extension by default.
218 'image_loader_extension%': 0,
219
[email protected]e72e55b2011-01-06 22:19:30220 # Python version.
[email protected]a43c5a02011-05-27 06:54:51221 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17222
[email protected]e72e55b2011-01-06 22:19:30223
[email protected]7d6763422013-04-26 12:06:54224 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30225 'arm_neon%': 1,
226
[email protected]7d6763422013-04-26 12:06:54227 # Detect NEON support at run-time.
228 'arm_neon_optional%': 0,
229
[email protected]e72e55b2011-01-06 22:19:30230 # The system root for cross-compiles. Default: none.
231 'sysroot%': '',
232
[email protected]945361a2011-09-30 04:38:43233 # The system libdir used for this ABI.
234 'system_libdir%': 'lib',
235
[email protected]e72e55b2011-01-06 22:19:30236 # On Linux, we build with sse2 for Chromium builds.
237 'disable_sse2%': 0,
238
239 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03240 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30241
[email protected]d9113542012-07-18 17:11:28242 # Use system libjpeg. Note that the system's libjepg will be used even if
243 # use_libjpeg_turbo is set.
244 'use_system_libjpeg%': 0,
245
[email protected]aa5e01fc2013-03-06 14:06:17246 # By default, component is set to static_library and it can be overriden
247 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53248 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30249
[email protected]bb6aba32011-01-07 19:04:43250 # Set to select the Title Case versions of strings in GRD files.
251 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21252
[email protected]98da0042011-02-02 00:10:27253 # Use translations provided by volunteers at launchpad.net. This
254 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19255 'use_third_party_translations%': 0,
256
[email protected]9a425422011-01-11 00:53:18257 # Remoting compilation is enabled by default. Set to 0 to disable.
258 'remoting%': 1,
259
[email protected]1ec68c42011-06-01 13:56:25260 # Configuration policy is enabled by default. Set to 0 to disable.
261 'configuration_policy%': 1,
262
[email protected]6c521fed2012-11-29 17:00:03263 # Variable safe_browsing is used to control the build time configuration
264 # for safe browsing feature. Safe browsing can be compiled in 3 different
265 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
266 # reporting features without enabling phishing and malware detection. This
267 # is useful to integrate a third party phishing/malware detection to
268 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56269 'safe_browsing%': 1,
270
[email protected]9eb100e2011-10-14 05:08:22271 # Speech input is compiled in by default. Set to 0 to disable.
272 'input_speech%': 1,
273
[email protected]7cce3232011-10-28 10:41:57274 # Notifications are compiled in by default. Set to 0 to disable.
275 'notifications%' : 1,
276
[email protected]970fd4e2012-12-19 11:09:37277 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
278 # regular builds and 1 for ASan builds.
279 'mac_want_real_dsym%': 'default',
280
[email protected]5d451ad2011-02-11 16:43:46281 # If this is set, the clang plugins used on the buildbot will be used.
282 # Run tools/clang/scripts/update.sh to make sure they are compiled.
283 # This causes 'clang_chrome_plugins_flags' to be set.
284 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08285 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46286
[email protected]2e82fa52012-11-27 23:41:44287 # Enable building with ASAN (Clang's -fsanitize=address option).
288 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06289 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
290 'asan%': 0,
291
[email protected]062522a2013-06-13 15:49:55292 # Enable building with LSan (Clang's -fsanitize=leak option).
293 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
294 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
295 'lsan%': 0,
296
[email protected]927a9d672012-11-09 11:28:20297 # Enable building with TSAN (Clang's -fsanitize=thread option).
298 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12299 # See http://clang.llvm.org/docs/ThreadSanitizer.html
300 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16301 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12302
[email protected]a10ddd2d2013-02-26 20:06:59303 # Enable building with MSAN (Clang's -fsanitize=memory option).
304 # MemorySanitizer only works with clang, but msan=1 implies clang=1
305 # See http://clang.llvm.org/docs/MemorySanitizer.html
306 'msan%': 0,
307
[email protected]7ce58b22012-09-26 05:17:25308 # Use a modified version of Clang to intercept allocated types and sizes
309 # for allocated objects. clang_type_profiler=1 implies clang=1.
310 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
311 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
312 'clang_type_profiler%': 0,
313
[email protected]8a6abd12012-05-16 10:04:44314 # Set to true to instrument the code with function call logger.
315 # See src/third_party/cygprofile/cyg-profile.cc for details.
316 'order_profiling%': 0,
317
[email protected]00b0a7f2012-01-25 15:30:46318 # Use the provided profiled order file to link Chrome image with it.
319 # This makes Chrome faster by better using CPU cache when executing code.
320 # This is known as PGO (profile guided optimization).
321 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
322 'order_text_section%' : "",
323
[email protected]1ad5a7b2011-06-24 03:15:13324 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
325 # libraries on linux x86-64 and arm, plus ASLR.
326 'linux_fpic%': 1,
327
[email protected]bd7b6fe2012-03-05 21:02:40328 # Whether one-click signin is enabled or not.
329 'enable_one_click_signin%': 0,
330
[email protected]6a3cd37e2012-04-17 17:13:34331 # Enable Chrome browser extensions
332 'enable_extensions%': 1,
333
[email protected]658677f2012-06-09 06:04:02334 # Enable browser automation.
335 'enable_automation%': 1,
336
[email protected]6ee43a72012-12-07 22:44:40337 # Enable Google Now.
338 'enable_google_now%': 1,
339
[email protected]658677f2012-06-09 06:04:02340 # Enable printing support and UI.
341 'enable_printing%': 1,
342
[email protected]dda90ae2011-07-19 22:07:48343 # Webrtc compilation is enabled by default. Set to 0 to disable.
344 'enable_webrtc%': 1,
345
[email protected]cdb756ef2012-04-05 18:34:53346 # Enables use of the session service, which is enabled by default.
347 # Support for disabling depends on the platform.
348 'enable_session_service%': 1,
349
[email protected]6b40bb582012-03-15 20:50:38350 # Enables theme support, which is enabled by default. Support for
351 # disabling depends on the platform.
352 'enable_themes%': 1,
353
[email protected]57e67ac2013-02-22 03:37:22354 # Enables autofill dialog and associated features; disabled by default.
355 'enable_autofill_dialog%' : 0,
356
[email protected]0acdd772012-04-05 22:53:00357 # Enables support for background apps.
358 'enable_background%': 1,
359
[email protected]44879ed2012-04-06 01:11:02360 # Enable the task manager by default.
361 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45362
[email protected]9bfe0ab2012-08-30 13:18:11363 # Enable FTP support by default.
364 'disable_ftp_support%': 0,
365
[email protected]22d6dd72012-05-15 07:29:55366 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
367 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
368 # the input value also defines the required XI2 minor minimum version.
369 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
370 'use_xi2_mt%': 0,
371
[email protected]9061bee82012-01-16 11:45:17372 # Use of precompiled headers on Windows.
373 #
[email protected]9061bee82012-01-16 11:45:17374 # This variable may be explicitly set to 1 (enabled) or 0
375 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
376 # This setting will override the default.
377 #
[email protected]c3340fb32012-12-20 20:45:39378 # See
[email protected]9061bee82012-01-16 11:45:17379 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
380 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16381 'chromium_win_pch%': 0,
382
[email protected]3bb37e62012-04-19 03:40:08383 # Set this to true when building with Clang.
384 # See http://code.google.com/p/chromium/wiki/Clang for details.
385 'clang%': 0,
386
[email protected]18e0f39b2012-01-17 16:47:34387 # Enable plug-in installation by default.
388 'enable_plugin_installation%': 1,
389
[email protected]6d17f6392012-12-05 05:24:54390 # Enable PPAPI and NPAPI by default.
391 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
392 # as PPAPI; see crbug.com/162667.
393 'enable_plugins%': 1,
394
[email protected]62424a52012-03-18 03:09:50395 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42396 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35397 # Chrome UI.
398 # TODO(asvitkine): Enable this on all platforms and delete this flag.
399 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50400 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35401
[email protected]a9318c72012-03-01 01:29:47402 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
403 # with one of those tools.
404 'build_for_tool%': '',
405
[email protected]37138132013-01-17 23:08:52406 # If no directory is specified then a temporary directory will be used.
407 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47408 # True if isolate should fail if the isolate files refer to files
409 # that are missing.
410 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56411
[email protected]740ebed2012-06-27 19:14:06412 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12413 'wix_path%': '<(DEPTH)/third_party/wix',
414
[email protected]0850e842013-01-19 03:44:31415 # Managed users are enabled by default.
416 'enable_managed_users%': 1,
417
[email protected]1591c44d2013-07-15 13:28:43418 # Platform natively supports discardable memory.
419 'native_discardable_memory%': 0,
420
421 # Platform sends memory pressure signals natively.
422 'native_memory_pressure_signals%': 0,
423
[email protected]199def22013-02-21 17:52:29424 'spdy_proxy_auth_origin%' : '',
425 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25426 'spdy_proxy_auth_value%' : '',
[email protected]5e131c9f2013-07-10 19:21:05427 'enable_mdns%' : 0,
[email protected]199def22013-02-21 17:52:29428
[email protected]bb6aba32011-01-07 19:04:43429 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34430 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37431 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34432 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37433 }, {
434 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34435 }],
436
[email protected]df9167b2011-11-14 19:15:25437 # A flag for BSD platforms
438 ['OS=="freebsd" or OS=="openbsd"', {
439 'os_bsd%': 1,
440 }, {
441 'os_bsd%': 0,
442 }],
443
[email protected]7d6763422013-04-26 12:06:54444 # Set armv7 for backward compatibility.
445 ['arm_version==7', {
446 'armv7': 1,
447 }, {
448 'armv7': 0,
449 }],
450
[email protected]c329adf82011-10-05 14:34:57451 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42452 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57453 'use_nss%': 1,
454 }, {
455 'use_nss%': 0,
456 }],
[email protected]e0b85a52011-10-06 03:30:42457
[email protected]c335f4802013-04-06 04:51:21458 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54459 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34460 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37461 }, {
[email protected]c49ab0c2011-05-18 17:25:37462 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34463 }],
[email protected]9a8175892012-03-20 02:11:58464
[email protected]26bade892013-05-23 21:44:15465 # Flags to use pango and glib on non-Mac POSIX platforms.
[email protected]c335f4802013-04-06 04:51:21466 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
467 'use_glib%': 0,
[email protected]26bade892013-05-23 21:44:15468 'use_pango%': 0,
[email protected]c335f4802013-04-06 04:51:21469 }, {
470 'use_glib%': 1,
[email protected]26bade892013-05-23 21:44:15471 'use_pango%': 1,
[email protected]c335f4802013-04-06 04:51:21472 }],
473
[email protected]efadeacf2011-10-27 19:01:00474 # We always use skia text rendering in Aura on Windows, since GDI
475 # doesn't agree with our BackingStore.
476 # TODO(beng): remove once skia text rendering is on by default.
477 ['use_aura==1 and OS=="win"', {
478 'enable_skia_text%': 1,
479 }],
[email protected]9edeb712011-09-20 21:20:33480
[email protected]63692212010-09-16 00:22:21481 # A flag to enable or disable our compile-time dependency
482 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
483 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49484 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50485 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21486 'use_gnome_keyring%': 0,
487 }, {
488 'use_gnome_keyring%': 1,
489 }],
[email protected]0afe5212010-10-01 18:56:11490
[email protected]8796d922012-08-07 01:23:11491 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20492 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43493 'use_titlecase_in_grd_files%': 1,
494 }],
495
[email protected]77a848262013-02-22 11:17:25496 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06497 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50498 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25499 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50500 }, {
[email protected]3d38d8e2011-04-16 20:48:51501 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25502 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51503 }],
[email protected]7de46352011-09-12 15:39:19504
[email protected]c79d1972013-02-06 18:47:29505 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01506 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51507 }],
508
[email protected]da1c8d692011-09-20 20:35:01509 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49510 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46511 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40512 'enable_google_now%': 0,
[email protected]55e02302012-08-21 00:50:46513 'enable_printing%': 0,
514 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46515 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58516 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54517 'arm_neon%': 0,
518 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43519 'native_discardable_memory%': 1,
520 'native_memory_pressure_signals%': 1,
[email protected]da1c8d692011-09-20 20:35:01521 }],
[email protected]839d5172011-10-13 17:18:11522
[email protected]57e67ac2013-02-22 03:37:22523 # Enable autofill dialog for Android and Views-enabled platforms for now.
[email protected]c2ecbcf2013-06-07 21:38:38524 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22525 'enable_autofill_dialog%': 1
526 }],
527
[email protected]d999c3cb2013-03-12 10:22:36528 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43529 'enable_webrtc%': 1,
530 }],
531
532 # Disable WebRTC for building WebView as part of Android system.
533 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
534 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36535 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43536 'enable_webrtc%': 0,
537 }],
538
[email protected]0d16f292012-07-02 22:10:48539 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24540 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11541 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24542 'enable_automation%': 0,
543 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40544 'enable_google_now%': 0,
[email protected]c4ac4d12012-09-12 12:02:24545 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44546 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24547 'enable_themes%': 0,
548 'enable_webrtc%': 0,
549 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48550 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44551 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31552 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48553 }],
554
[email protected]839d5172011-10-13 17:18:11555 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27556 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01557 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33558 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11559 }, {
[email protected]1ee7c56c2011-10-19 14:51:33560 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11561 }],
[email protected]9061bee82012-01-16 11:45:17562
[email protected]c3340fb32012-12-20 20:45:39563 # Turn precompiled headers on by default.
564 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17565 'chromium_win_pch%': 1
566 }],
[email protected]18e0f39b2012-01-17 16:47:34567
[email protected]deb8b3cd2013-05-07 19:52:10568 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34569 'enable_plugin_installation%': 0,
570 }, {
571 'enable_plugin_installation%': 1,
572 }],
[email protected]b07806c12012-02-03 22:44:59573
[email protected]55d92492013-01-31 05:03:39574 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54575 'enable_plugins%': 0,
576 }, {
577 'enable_plugins%': 1,
578 }],
579
[email protected]8d726a42012-02-09 03:49:00580 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56581 # third_party/gold. Gold is not used for 32-bit linux builds
582 # as it runs out of address space.
583 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51584 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17585 }, {
[email protected]bd68ea52013-03-26 09:49:37586 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34587 }],
588
589 # linux_use_gold_flags: whether to use build flags that rely on gold.
590 # On by default for x64 Linux. Temporarily off for ChromeOS as
591 # it failed on a buildbot.
592 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
593 'linux_use_gold_flags%': 1,
594 }, {
[email protected]8d726a42012-02-09 03:49:00595 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59596 }],
[email protected]2e22e2f2012-03-15 21:53:10597
[email protected]9394a3a2012-12-19 19:22:39598 ['chromeos==1', {
599 'linux_use_libgps%': 1,
600 }, { # chromeos==0
601 # Do not use libgps on desktop Linux by default,
602 # see http://crbug.com/103751.
603 'linux_use_libgps%': 0,
604 }],
605
[email protected]a95d5302012-11-03 00:02:19606 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32607 'enable_captive_portal_detection%': 0,
608 }, {
609 'enable_captive_portal_detection%': 1,
610 }],
611
[email protected]3bd47e022012-03-22 04:19:12612 # Enable Skia UI text drawing incrementally on different platforms.
613 # http://crbug.com/105550
614 #
615 # On Aura, this allows per-tile painting to be used in the browser
616 # compositor.
[email protected]9197a9282012-05-30 14:12:32617 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12618 'use_canvas_skia%': 1,
619 }],
[email protected]adb44342012-07-23 13:36:12620
[email protected]0753ea42012-08-30 20:15:44621 ['chromeos==1', {
622 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
623 'use_libjpeg_turbo%': 0,
624 }],
625
[email protected]adb44342012-07-23 13:36:12626 ['OS=="android"', {
627 # When building as part of the Android system, use system libraries
628 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36629 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12630 }],
[email protected]8a46f5f2012-12-05 00:47:12631
[email protected]5be161f2013-06-18 11:09:33632 # Do not enable the Settings App on ChromeOS.
633 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12634 'enable_settings_app%': 1,
635 }, {
636 'enable_settings_app%': 0,
637 }],
[email protected]94cdbf42012-12-11 19:49:22638
639 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
640 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22641 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43642 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22643 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43644 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22645 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46646
[email protected]e2aaaac2013-05-08 07:20:09647 ['linux_lsb_release=="12.04"', {
648 'conditions': [
649 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43650 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09651 }],
652 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43653 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09654 }],
655 ],
656 }], # linux_lsb_release=="12.04"
657
[email protected]59e85f472013-06-28 18:20:44658 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07659 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28660 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46661 }],
[email protected]5b38a522013-03-20 17:00:47662
663 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01664 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47665 # e.g. base_unittests_run runs the target base_unittests. The test
666 # target always calls tools/swarm_client/isolate.py. See the script's
667 # --help for more information and the valid --mode values. Meant to be
668 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01669 # TODO(maruel): Remove the conditions as more configurations are
670 # supported.
[email protected]349f3062013-04-10 20:44:51671 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
672 # again.
[email protected]93fe4002013-04-10 00:17:01673 # NOTE: The check for disable_nacl==0 and component=="static_library"
674 # can't be used here because these variables are not defined yet, but it
675 # is still not supported.
[email protected]0dc310a32013-05-08 23:52:44676 ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47677 'test_isolation_mode%': 'check',
678 }, {
679 'test_isolation_mode%': 'noop',
680 }],
[email protected]5cbeb502013-04-23 19:25:27681 # Whether Android ARM build uses OpenMAX DL FFT.
[email protected]fc3ab0c2013-04-17 15:26:34682 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]6558fd4f2013-04-17 18:51:38683 # Currently only supported on Android ARM, without webview.
684 # When enabled, this will also enable WebAudio on Android
[email protected]330f3a32013-04-23 05:47:58685 # ARM. Default is enabled.
686 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53687 }, {
688 'use_openmax_dl_fft%': 0,
689 }],
[email protected]5e131c9f2013-07-10 19:21:05690 ['OS=="win" or OS=="linux"', {
691 'enable_mdns%' : 1,
692 }]
[email protected]b3f23ba2010-04-26 22:58:17693 ],
[email protected]2b113652012-09-17 17:01:39694
[email protected]a3a720f2013-04-25 19:35:42695 # Set this to 1 to enable use of concatenated impulse responses
696 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26697 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42698
[email protected]f2817cf2013-05-16 11:39:54699 # You can set the variable 'use_official_google_api_keys' to 1
700 # to use the Google-internal file containing official API keys
701 # for Google Chrome even in a developer build. Setting this
702 # variable explicitly to 1 will cause your build to fail if the
703 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39704 #
[email protected]f2817cf2013-05-16 11:39:54705 # The variable is documented here, but not handled in this file;
706 # see //google_apis/determine_use_official_keys.gypi for the
707 # implementation.
[email protected]2b113652012-09-17 17:01:39708 #
[email protected]f2817cf2013-05-16 11:39:54709 # Set the variable to 0 to not use the internal file, even when
710 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39711 #
[email protected]f2817cf2013-05-16 11:39:54712 # Leave it unset in your include.gypi to have the variable
713 # implicitly set to 1 if you have
714 # src/google_apis/internal/google_chrome_api_keys.h in your
715 # checkout, and implicitly set to 0 if not.
716 #
717 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39718 # was explicitly set to 1, i.e. they always use official keys,
719 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54720 #
721 # NOTE: You MUST NOT explicitly set the variable to 2 in your
722 # include.gypi or by other means. Due to subtleties of GYP, this
723 # is not the same as leaving the variable unset, even though its
724 # default value in
725 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39726
727 # Set these to bake the specified API keys and OAuth client
728 # IDs/secrets into your build.
729 #
730 # If you create a build without values baked in, you can instead
731 # set environment variables to provide the keys at runtime (see
732 # src/google_apis/google_api_keys.h for details). Features that
733 # require server-side APIs may fail to work if no keys are
734 # provided.
735 #
736 # Note that if you are building an official build or if
737 # use_official_google_api_keys has been set to 1 (explicitly or
738 # implicitly), these values will be ignored and the official
739 # keys will be used instead.
740 'google_api_key%': '',
741 'google_default_client_id%': '',
742 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07743 },
744
[email protected]e72e55b2011-01-06 22:19:30745 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07746 'branding%': '<(branding)',
747 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27748 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59749 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44750 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33751 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58752 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16753 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42754 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57755 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25756 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34757 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19758 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15759 'use_pango%': '<(use_pango)',
[email protected]ff78e4e2013-05-03 19:19:15760 'use_ozone%': '<(use_ozone)',
[email protected]79e2336c2011-05-12 18:18:34761 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
762 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21763 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11764 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44765 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05766 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24767 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06768 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35769 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20770 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25771 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54772 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01773 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]65b0819e2013-06-21 15:24:00774 'logging_like_official_build%': '<(logging_like_official_build)',
[email protected]a1e87422013-07-09 21:47:01775 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]a76fe1a2010-03-01 23:39:36776 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54777 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43778 'armv7%': '<(armv7)',
779 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54780 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23781 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43782 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52783 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43784 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17785 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18786 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40787 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48788 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16789 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25790 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56791 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22792 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57793 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46794 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37795 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06796 'asan%': '<(asan)',
[email protected]062522a2013-06-13 15:49:55797 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59798 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12799 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16800 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25801 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44802 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46803 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34804 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34805 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54806 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53807 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38808 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22809 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]0acdd772012-04-05 22:53:00810 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59811 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00812 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39813 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50814 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33815 'test_isolation_mode%': '<(test_isolation_mode)',
816 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47817 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10818 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02819 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40820 'enable_google_now%': '<(enable_google_now)',
[email protected]e6026962012-06-14 21:28:32821 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11822 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02823 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06824 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12825 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44826 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12827 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36828 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46829 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:07830 'create_standalone_apk%': 1,
[email protected]55d92492013-01-31 05:03:39831 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16832 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07833 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16834 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39835 'google_api_key%': '<(google_api_key)',
836 'google_default_client_id%': '<(google_default_client_id)',
837 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31838 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:43839 'native_discardable_memory%': '<(native_discardable_memory)',
840 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]199def22013-02-21 17:52:29841 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
842 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25843 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]5e131c9f2013-07-10 19:21:05844 'enable_mdns%' : '<(enable_mdns)',
[email protected]01971642012-03-07 14:39:56845
[email protected]46aa05cc42013-01-15 17:34:31846 # Use system mesa instead of bundled one.
847 'use_system_mesa%': 0,
848
[email protected]c486e4e2013-01-08 16:49:07849 # Use system nspr instead of the bundled one.
850 'use_system_nspr%': 0,
851
[email protected]2f325672012-10-31 23:29:37852 # Use system protobuf instead of bundled one.
853 'use_system_protobuf%': 0,
854
[email protected]371e1092011-10-12 20:37:36855 # Use system yasm instead of bundled one.
856 'use_system_yasm%': 0,
857
[email protected]ea02e962013-04-26 11:18:16858 # Use system ICU instead of bundled one.
859 'use_system_icu%' : 0,
860
[email protected]cd00bd862012-02-29 00:40:36861 # Default to enabled PIE; this is important for ASLR but we may need to be
862 # able to turn it off for various reasons.
863 'linux_disable_pie%': 0,
864
[email protected]caa95c82009-11-23 22:39:32865 # The release channel that this build targets. This is used to restrict
866 # channel-specific build options, like which installer packages to create.
867 # The default is 'all', which does no channel-specific filtering.
868 'channel%': 'all',
869
[email protected]b3fb8092009-03-12 19:09:24870 # Override chromium_mac_pch and set it to 0 to suppress the use of
871 # precompiled headers on the Mac. Prefix header injection may still be
872 # used, but prefix headers will not be precompiled. This is useful when
873 # using distcc to distribute a build to compile slaves that don't
874 # share the same compiler executable as the system driving the compilation,
875 # because precompiled headers rely on pointers into a specific compiler
876 # executable's image. Setting this to 0 is needed to use an experimental
877 # Linux-Mac cross compiler distcc farm.
878 'chromium_mac_pch%': 1,
879
[email protected]27b687ec42012-03-26 22:22:15880 # The default value for mac_strip in target_defaults. This cannot be
881 # set there, per the comment about variable% in a target_defaults.
882 'mac_strip_release%': 1,
883
[email protected]f5ecbba12009-04-03 04:35:18884 # Set to 1 to enable code coverage. In addition to build changes
885 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
886 # project file called "coverage".
887 # Currently ignored on Windows.
888 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49889
[email protected]9619e65d2012-05-23 19:06:52890 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
891 # This is useful for parallel compilation tools which can't support /Zi.
892 # Only used on Windows.
893 'win_z7%' : 0,
894
[email protected]7477ea6f2009-12-22 23:28:15895 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47896 # environment variable, the libcmt shim it uses sometimes gets in
897 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
898 # 'win_use_allocator_shim': 0,
899 # 'win_release_RuntimeLibrary': 2
900 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52901 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11902
[email protected]95ff8082009-11-13 22:21:01903 # Whether usage of OpenMAX is enabled.
904 'enable_openmax%': 0,
905
[email protected]d01120e62010-05-10 17:04:48906 # Whether proprietary audio/video codecs are assumed to be included with
907 # this build (only meaningful if branding!=Chrome).
908 'proprietary_codecs%': 0,
909
[email protected]e5b2eaa2009-04-14 01:39:12910 # TODO(bradnelson): eliminate this when possible.
911 # To allow local gyp files to prevent release.vsprops from being included.
912 # Yes(1) means include release.vsprops.
913 # Once all vsprops settings are migrated into gyp, this can go away.
914 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23915
[email protected]cbd5fd52009-08-26 00:14:27916 # TODO(bradnelson): eliminate this when possible.
917 # To allow local gyp files to override additional linker options for msvs.
918 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19919 'msvs_use_common_linker_extras%': 1,
920
[email protected]1ffb6502009-06-02 07:46:24921 # TODO(sgk): eliminate this if possible.
922 # It would be nicer to support this via a setting in 'target_defaults'
923 # in chrome/app/locales/locales.gypi overriding the setting in the
924 # 'Debug' configuration in the 'target_defaults' dict below,
925 # but that doesn't work as we'd like.
926 'msvs_debug_link_incremental%': '2',
927
[email protected]1f790ef2011-01-11 20:45:36928 # Needed for some of the largest modules.
929 'msvs_debug_link_nonincremental%': '1',
930
[email protected]6f390be2012-08-16 18:57:10931 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06932 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26933 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06934
[email protected]1ff64292013-07-18 20:37:15935 # Experimental setting to break chrome.dll into multiple pieces based on
936 # process type.
937 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:02938
[email protected]c54b41cb2012-08-24 20:58:24939 # The default settings for third party code for treating
940 # warnings-as-errors. Ideally, this would not be required, however there
941 # is some third party code that takes a long time to fix/roll. So, this
942 # flag allows us to have warnings as errors in general to prevent
943 # regressions in most modules, while working on the bits that are
944 # remaining.
945 'win_third_party_warn_as_error%': 'true',
946
[email protected]573136142009-07-15 22:48:37947 # This is the location of the sandbox binary. Chrome looks for this before
948 # running the zygote process. If found, and SUID, it will be used to
949 # sandbox the zygote process and, thus, all renderer processes.
950 'linux_sandbox_path%': '',
951
[email protected]3bb37e62012-04-19 03:40:08952 # Clang stuff.
953 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24954 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15955
[email protected]5e781232011-01-28 02:57:59956 # These two variables can be set in GYP_DEFINES while running
957 # |gclient runhooks| to let clang run a plugin in every compilation.
958 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
959 # Example:
[email protected]93120fe2011-02-03 20:46:42960 # 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:59961
962 'clang_load%': '',
963 'clang_add_plugin%': '',
964
[email protected]da1c8d692011-09-20 20:35:01965 # The default type of gtest.
966 'gtest_target_type%': 'executable',
967
[email protected]7664ab32011-02-01 23:35:25968 # Enable sampling based profiler.
969 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
970 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:58971 # Profile without optimizing out stack frames when profiling==1.
972 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:25973
[email protected]93b373502011-08-16 19:06:22974 # Enable strict glibc debug mode.
975 'glibcxx_debug%': 0,
[email protected]36532f332010-08-25 00:22:01976 # And if we want to dump symbols for Breakpad-enabled builds.
977 'linux_dump_symbols%': 0,
978 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03979 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49980 # Strip the test binaries needed for Linux reliability tests.
981 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03982
[email protected]46ce5b562010-06-16 18:39:53983 # Enable TCMalloc.
984 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:03985 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:24986
[email protected]d8b60602010-03-26 09:41:22987 # Disable TCMalloc's heapchecker.
988 'linux_use_heapchecker%': 0,
989
[email protected]64e2d4a42010-08-27 10:13:21990 # Disable shadow stack keeping used by heapcheck to unwind the stacks
991 # better.
992 'linux_keep_shadow_stacks%': 0,
993
[email protected]556c5d72010-06-10 05:45:01994 # Set to 1 to link against libgnome-keyring instead of using dlopen().
995 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35996 # Set to 1 to link against gsettings APIs instead of using dlopen().
997 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01998
[email protected]23eea4a42013-04-27 04:10:26999 # Default arch variant for MIPS.
1000 'mips_arch_variant%': 'mips32r2',
1001
[email protected]a63e8d22013-03-23 16:17:081002 # Enable use of OpenMAX DL FFT routines.
1003 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341004
[email protected]9821d0d2010-04-16 22:40:371005 # Enable new NPDevice API.
1006 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501007
1008 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141009 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501010
[email protected]6f51b27e2010-06-22 20:43:531011 # Enable a variable used elsewhere throughout the GYP files to determine
1012 # whether to compile in the sources for the GPU plugin / process.
1013 'enable_gpu%': 1,
1014
[email protected]e72e55b2011-01-06 22:19:301015 # .gyp files or targets should set chromium_code to 1 if they build
1016 # Chromium-specific code, as opposed to external code. This variable is
1017 # used to control such things as the set of warnings to enable, and
1018 # whether warnings are treated as errors.
1019 'chromium_code%': 0,
1020
[email protected]8d726a42012-02-09 03:49:001021 'release_valgrind_build%': 0,
1022
[email protected]b1eb341c2011-11-09 18:46:071023 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1024 'enable_wexit_time_destructors%': 0,
1025
[email protected]e72e55b2011-01-06 22:19:301026 # Set to 1 to compile with the built in pdf viewer.
1027 'internal_pdf%': 0,
1028
[email protected]9e1149d72012-07-24 01:27:171029 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1030 'internal_gles2_conform_tests%': 0,
1031
[email protected]e72e55b2011-01-06 22:19:301032 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1033 # so Cocoa is happy (http://crbug.com/20441).
1034 'locales': [
1035 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1036 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1037 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411038 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301039 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1040 'vi', 'zh-CN', 'zh-TW',
1041 ],
1042
[email protected]cc0322d2011-07-24 09:29:191043 # Pseudo locales are special locales which are used for testing and
1044 # debugging. They don't get copied to the final app. For more info,
1045 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1046 'pseudo_locales': [
1047 'fake-bidi',
1048 ],
1049
[email protected]bb6aba32011-01-07 19:04:431050 'grit_defines': [],
1051
[email protected]bd3bd442011-03-28 07:58:511052 # If debug_devtools is set to 1, JavaScript files for DevTools are
1053 # stored as is and loaded from disk. Otherwise, a concatenated file
1054 # is stored in resources.pak. It is still possible to load JS files
1055 # from disk by passing --debug-devtools cmdline switch.
1056 'debug_devtools%': 0,
1057
[email protected]464750f2011-10-24 23:16:181058 # The Java Bridge is not compiled in by default.
1059 'java_bridge%': 0,
1060
[email protected]1e013672012-06-29 22:12:201061 # Code signing for iOS binaries. The bots need to be able to disable this.
1062 'chromium_ios_signing%': 1,
1063
[email protected]33e1c372011-12-14 16:32:071064 # This flag is only used when disable_nacl==0 and disables all those
1065 # subcomponents which would require the installation of a native_client
1066 # untrusted toolchain.
1067 'disable_nacl_untrusted%': 0,
1068
[email protected]407dfa632011-12-23 11:59:351069 # Disable Dart by default.
1070 'enable_dart%': 0,
1071
[email protected]ff10b132012-02-29 22:53:301072 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1073 'msbuild_toolset%': '',
1074
[email protected]836285f22012-04-03 16:19:261075 # Native Client is enabled by default.
1076 'disable_nacl%': 0,
1077
[email protected]1e40ba002013-03-07 22:07:331078 # Portable Native Client is enabled by default.
1079 'disable_pnacl%': 0,
1080
[email protected]fa9d4e262012-08-21 04:39:001081 # Whether to build full debug version for Debug configuration on Android.
1082 # Compared to full debug version, the default Debug configuration on Android
1083 # has no full v8 debug, has size optimization and linker gc section, so that
1084 # we can build a debug version with acceptable size and performance.
1085 'android_full_debug%': 0,
1086
[email protected]65885272012-10-05 23:55:501087 # Sets the default version name and code for Android app, by default we
1088 # do a developer build.
1089 'android_app_version_name%': 'Developer Build',
1090 'android_app_version_code%': 0,
1091
[email protected]014d1ff12013-07-02 01:52:331092 # Contains data about the attached devices for gyp_managed_install.
1093 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1094
[email protected]740ebed2012-06-27 19:14:061095 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121096 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1097
[email protected]1f8d9402012-07-06 22:47:561098 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1099 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051100
[email protected]fd6d8822012-12-08 06:56:111101 # Whether we are using the rlz library or not. Platforms like Android send
1102 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221103 'enable_rlz%': 0,
1104
[email protected]72beea82013-07-15 10:03:261105 # Turns on compiler optimizations in V8 in Debug build.
[email protected]a81935a2013-07-16 11:34:411106 'v8_optimized_debug': 1,
[email protected]72beea82013-07-15 10:03:261107
[email protected]3b4038e2013-07-28 08:59:541108 # Turns on the i18n support in V8.
1109 'v8_enable_i18n_support': 1,
1110
[email protected]912c55c2009-07-31 23:33:551111 'conditions': [
[email protected]5f683172013-04-27 01:53:191112 # The version of GCC in use, set later in platforms that use GCC and have
1113 # not explicitly chosen to build with clang. Currently, this means all
1114 # platforms except Windows, Mac and iOS.
1115 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1116 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551117 ['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]5f683172013-04-27 01:53:191118 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1119 }, {
1120 'gcc_version%': 0,
1121 }],
[email protected]1f8d9402012-07-06 22:47:561122 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1123 'windows_sdk_path%': '<(windows_sdk_default_path)',
1124 }, {
1125 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1126 }],
1127 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1128 'directx_sdk_path%': '<(directx_sdk_default_path)',
1129 }, {
1130 'directx_sdk_path%': '$(DXSDK_DIR)',
1131 }],
[email protected]54184ce72012-10-18 07:11:261132 ['OS=="win"', {
1133 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071134 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1135 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1136 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261137 }],
[email protected]1e013672012-06-29 22:12:201138 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231139 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431140 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:271141 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461142 ['target_arch=="mipsel"', {
1143 'werror%': '',
1144 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461145 'nacl_untrusted_build%': 0,
1146 'linux_use_tcmalloc%': 0,
[email protected]59e85f472013-06-28 18:20:441147 }],
1148 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461149 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281150 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461151 }],
[email protected]4c9cc6c2009-10-01 18:54:571152 # All Chrome builds have breakpad symbols, but only process the
1153 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081154 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571155 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571156 }],
[email protected]cbd5fd52009-08-26 00:14:271157 ],
[email protected]1e013672012-06-29 22:12:201158 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481159 ['OS=="ios"', {
1160 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191161 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151162 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071163 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351164 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131165 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471166 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411167 'locales==': [
1168 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
[email protected]6e9c15f2013-06-13 16:03:441169 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', 'nl',
1170 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
[email protected]b6fbd6742013-03-15 11:15:411171 'zh-CN', 'zh-TW',
1172 ],
[email protected]57871bc2012-08-20 16:28:121173
1174 # The Mac SDK is set for iOS builds and passed through to Mac
1175 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1176 # overridden from the command line the same way it is for a Mac build.
1177 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291178
1179 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1180 # what is required, but the value is left blank so when it is set in
1181 # the project files it will be the "current" iOS SDK. Forcing 5.0
1182 # even though it is "current" causes Xcode to spit out a warning for
1183 # every single project file for not using the "current" SDK.
1184 'ios_sdk%': '',
1185 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181186 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321187
1188 'conditions': [
1189 # ios_product_name is set to the name of the .app bundle as it should
1190 # appear on disk.
1191 ['branding=="Chrome"', {
1192 'ios_product_name%': 'Chrome',
1193 }, { # else: branding!="Chrome"
1194 'ios_product_name%': 'Chromium',
1195 }],
1196 ['branding=="Chrome" and buildtype=="Official"', {
1197 'ios_breakpad%': 1,
1198 }, { # else: branding!="Chrome" or buildtype!="Official"
1199 'ios_breakpad%': 0,
1200 }],
1201 ],
1202 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011203 ['OS=="android"', {
1204 # Location of Android NDK.
1205 'variables': {
1206 'variables': {
[email protected]5061d152013-01-16 17:45:571207 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1208 # they're passed to ant which uses a different relative path from
1209 # gyp.
1210 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1211 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1212 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041213 # Android API-level of the SDK used for compilation.
1214 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011215 },
[email protected]5061d152013-01-16 17:45:571216 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011217 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571218 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041219 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221220 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]5061d152013-01-16 17:45:571221
[email protected]e20a8ad2013-03-18 15:05:041222 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571223
[email protected]5cfec2b2013-03-05 20:54:331224 # Android API level 14 is ICS (Android 4.0) which is the minimum
1225 # platform requirement for Chrome on Android, we use it for native
1226 # code compilation.
[email protected]5061d152013-01-16 17:45:571227 'conditions': [
1228 ['target_arch == "ia32"', {
1229 'android_app_abi%': 'x86',
1230 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331231 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571232 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1233 }],
1234 ['target_arch=="arm"', {
1235 'conditions': [
[email protected]7d6763422013-04-26 12:06:541236 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571237 'android_app_abi%': 'armeabi',
1238 }, {
1239 'android_app_abi%': 'armeabi-v7a',
1240 }],
1241 ],
1242 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331243 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571244 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1245 }],
[email protected]23eea4a42013-04-27 04:10:261246 ['target_arch == "mipsel"', {
1247 'android_app_abi%': 'mips',
1248 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1249 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471250 '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:261251 }],
[email protected]5061d152013-01-16 17:45:571252 ],
[email protected]da1c8d692011-09-20 20:35:011253 },
[email protected]5061d152013-01-16 17:45:571254 # Copy conditionally-set variables out one scope.
1255 'android_app_abi%': '<(android_app_abi)',
1256 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011257 'android_ndk_root%': '<(android_ndk_root)',
1258 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571259 'android_sdk_root%': '<(android_sdk_root)',
1260 'android_sdk_version%': '<(android_sdk_version)',
1261 'android_toolchain%': '<(android_toolchain)',
1262
[email protected]da1c8d692011-09-20 20:35:011263 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1264 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571265 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041266 'android_sdk%': '<(android_sdk)',
1267 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011268
[email protected]225ec632013-04-03 18:20:221269 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221270 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221271 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]225ec632013-04-03 18:20:221272
[email protected]c0f76312012-08-16 13:52:041273 # Location of the "strip" binary, used by both gyp and scripts.
1274 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1275
[email protected]225ec632013-04-03 18:20:221276 # Location of the "readelf" binary.
1277 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1278
[email protected]ef7ed7a2012-05-29 23:19:131279 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1280 # to specify the output directory for Ant in the Android build.
1281 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1282
[email protected]d8621ce2013-02-22 00:37:331283 # Determines whether we should optimize JNI generation at the cost of
1284 # breaking assumptions in the build system that when inputs have changed
1285 # the outputs should always change as well. This is meant purely for
1286 # developer builds, to avoid spurious re-linking of native files.
1287 'optimize_jni_generation%': 0,
1288
[email protected]da1c8d692011-09-20 20:35:011289 # Always uses openssl.
1290 'use_openssl%': 1,
1291
1292 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021293 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071294 'safe_browsing%': 2,
[email protected]9eb100e2011-10-14 05:08:221295 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021296 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181297 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581298 'build_ffmpegsumo%': 0,
1299 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021300
[email protected]ad17e342012-07-17 20:45:481301 # Disable Native Client.
1302 'disable_nacl%': 1,
1303
[email protected]58242012012-04-12 16:14:311304 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001305 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111306
[email protected]cdb756ef2012-04-05 18:34:531307 # Sessions are store separately in the Java side.
1308 'enable_session_service%': 0,
1309
[email protected]5fd2e842012-03-01 00:29:111310 # Set to 1 once we have a notification system for Android.
1311 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571312 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011313
[email protected]ad17e342012-07-17 20:45:481314 'p2p_apis%' : 0,
1315
[email protected]48de0fc2012-08-02 11:03:581316 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011317
1318 # Uses system APIs for decoding audio and video.
1319 'use_libffmpeg%': '0',
1320
[email protected]f1dc1e52012-12-12 21:39:001321 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011322 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011323
[email protected]adb44342012-07-23 13:36:121324 # When building as part of the Android system, use system libraries
1325 # where possible to reduce ROM size.
1326 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361327 'use_system_sqlite%': 0, # '<(android_webview_build)',
1328 'use_system_expat%': '<(android_webview_build)',
1329 'use_system_icu%': '<(android_webview_build)',
1330 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121331
[email protected]0850e842013-01-19 03:44:311332 'enable_managed_users%': 0,
1333
[email protected]da1c8d692011-09-20 20:35:011334 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361335 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011336 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121337 ['android_webview_build==1', {
1338 # When building the WebView in the Android tree, jarjar will remap all
1339 # the class names, so the JNI generator needs to know this.
1340 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1341 }],
[email protected]e14a9f92009-08-05 19:26:071342 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471343 # Enable clang on mac by default!
1344 'clang%': 1,
1345 }], # OS=="mac"
1346 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291347 'variables': {
1348 # Mac OS X SDK and deployment target support. The SDK identifies
1349 # the version of the system headers that will be used, and
1350 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1351 # macro. "Maximum allowed" refers to the operating system version
1352 # whose APIs are available in the headers. The deployment target
1353 # identifies the minimum system version that the built products are
1354 # expected to function on. It corresponds to the
1355 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1356 # macros are available, #include <AvailabilityMacros.h>. Additional
1357 # documentation on these macros is available at
1358 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1359 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1360 # deployment target to 10.6. Other projects, such as O3D, may
1361 # override these defaults.
1362
1363 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1364 # about that is at least the specified version. In official builds,
1365 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1366 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1367 # path to the SDK; when set to a non-empty string, SDK detection
1368 # based on mac_sdk_min will be bypassed entirely.
1369 'mac_sdk_min%': '10.6',
1370 'mac_sdk_path%': '',
1371
1372 'mac_deployment_target%': '10.6',
1373 },
1374
1375 'mac_sdk_min': '<(mac_sdk_min)',
1376 'mac_sdk_path': '<(mac_sdk_path)',
1377 'mac_deployment_target': '<(mac_deployment_target)',
1378
[email protected]794fb4782011-12-14 19:10:561379 # Compile in Breakpad support by default so that it can be
1380 # tested, even if it is not enabled by default at runtime.
1381 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071382 'conditions': [
1383 # mac_product_name is set to the name of the .app bundle as it should
1384 # appear on disk. This duplicates data from
1385 # chrome/app/theme/chromium/BRANDING and
1386 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1387 # these names into the build system.
1388 ['branding=="Chrome"', {
1389 'mac_product_name%': 'Google Chrome',
1390 }, { # else: branding!="Chrome"
1391 'mac_product_name%': 'Chromium',
1392 }],
1393
[email protected]e14a9f92009-08-05 19:26:071394 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291395 '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:561396 # Enable uploading crash dumps.
1397 'mac_breakpad_uploads%': 1,
1398 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071399 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561400 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071401 'mac_keystone%': 1,
1402 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291403 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561404 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071405 'mac_breakpad%': 0,
1406 'mac_keystone%': 0,
1407 }],
1408 ],
[email protected]296bc452013-05-13 21:29:471409 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551410 ['OS=="win"', {
1411 'conditions': [
[email protected]8974e042010-06-21 18:06:521412 ['component=="shared_library"', {
1413 'win_use_allocator_shim%': 0,
1414 }],
[email protected]fa0f16e2012-08-20 22:30:041415 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101416 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041417 # Not enabled for component=static_library because some targets
1418 # are too large and the toolchain fails due to the size of the
1419 # .obj files.
[email protected]6f390be2012-08-16 18:57:101420 'incremental_chrome_dll%': 1,
1421 }],
[email protected]10bb8c92009-08-07 21:16:031422 # Don't do incremental linking for large modules on 32-bit.
1423 ['MSVS_OS_BITS==32', {
1424 'msvs_large_module_debug_link_mode%': '1', # No
1425 },{
1426 'msvs_large_module_debug_link_mode%': '2', # Yes
1427 }],
[email protected]78764182013-01-23 20:32:511428 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501429 'msvs_express%': 1,
1430 'secure_atl%': 0,
1431 },{
1432 'msvs_express%': 0,
1433 'secure_atl%': 1,
1434 }],
[email protected]912c55c2009-07-31 23:33:551435 ],
[email protected]ef4fa4072009-12-04 22:46:501436 'nacl_win64_defines': [
1437 # This flag is used to minimize dependencies when building
1438 # Native Client loader for 64-bit Windows.
1439 'NACL_WIN64',
1440 ],
[email protected]912c55c2009-07-31 23:33:551441 }],
[email protected]bb6aba32011-01-07 19:04:431442
[email protected]a35aa362012-10-30 13:55:071443 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441444 'use_cups%': 1,
1445 }, {
1446 'use_cups%': 0,
1447 }],
[email protected]bb6aba32011-01-07 19:04:431448
[email protected]280755c2013-05-23 10:44:351449 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
1450 'enable_pepper_cdms%': 1,
1451 }, {
1452 'enable_pepper_cdms%': 0,
1453 }],
1454
[email protected]eb5f1672013-01-31 07:56:461455 # Native Client glibc toolchain is enabled
1456 # by default except on arm and mips.
1457 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321458 'disable_glibc%': 1,
1459 }, {
1460 'disable_glibc%': 0,
1461 }],
1462
[email protected]712c3da2012-09-24 21:31:241463 # Disable SSE2 when building for ARM or MIPS.
1464 ['target_arch=="arm" or target_arch=="mipsel"', {
1465 'disable_sse2%': 1,
1466 }, {
1467 'disable_sse2%': '<(disable_sse2)',
1468 }],
1469
[email protected]19fe8f0b2010-12-07 07:27:271470 # Set the relative path from this file to the GYP file of the JPEG
1471 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281472 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1473 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271474 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281475 }, {
1476 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1477 }],
[email protected]bb6aba32011-01-07 19:04:431478
[email protected]abcc9ac2011-05-16 20:04:351479 # Options controlling the use of GConf (the classic GNOME configuration
1480 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311481 ['chromeos==1', {
1482 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351483 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311484 }, {
1485 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351486 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311487 }],
1488
[email protected]4de39f82011-03-28 12:01:291489 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291490 ['branding=="Chrome"', {
1491 # TODO(mmoss) The .grd files look for _google_chrome, but for
1492 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291493 'grit_defines': ['-D', '_google_chrome',
1494 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291495 }, {
[email protected]4de39f82011-03-28 12:01:291496 'grit_defines': ['-D', '_chromium',
1497 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291498 }],
[email protected]bb6aba32011-01-07 19:04:431499 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131500 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431501 }],
1502 ['toolkit_views==1', {
1503 'grit_defines': ['-D', 'toolkit_views'],
1504 }],
[email protected]8dd791d2011-09-16 16:37:301505 ['use_aura==1', {
1506 'grit_defines': ['-D', 'use_aura'],
1507 }],
[email protected]ed329be2012-01-03 22:02:161508 ['use_ash==1', {
1509 'grit_defines': ['-D', 'use_ash'],
1510 }],
[email protected]c329adf82011-10-05 14:34:571511 ['use_nss==1', {
1512 'grit_defines': ['-D', 'use_nss'],
1513 }],
[email protected]ff78e4e2013-05-03 19:19:151514 ['use_ozone==1', {
1515 'grit_defines': ['-D', 'use_ozone'],
1516 }],
[email protected]e47c32032011-03-01 19:26:201517 ['file_manager_extension==1', {
1518 'grit_defines': ['-D', 'file_manager_extension'],
1519 }],
[email protected]77a848262013-02-22 11:17:251520 ['image_loader_extension==1', {
1521 'grit_defines': ['-D', 'image_loader_extension'],
1522 }],
[email protected]9a425422011-01-11 00:53:181523 ['remoting==1', {
1524 'grit_defines': ['-D', 'remoting'],
1525 }],
[email protected]bb6aba32011-01-07 19:04:431526 ['use_titlecase_in_grd_files==1', {
1527 'grit_defines': ['-D', 'use_titlecase'],
1528 }],
[email protected]00dc155832011-02-01 18:51:191529 ['use_third_party_translations==1', {
1530 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121531 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161532 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1533 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121534 ],
[email protected]00dc155832011-02-01 18:51:191535 }],
[email protected]da1c8d692011-09-20 20:35:011536 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171537 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571538 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]7a2ce042013-05-28 03:20:351539 'conditions': [
1540 ['google_tv==1', {
1541 'grit_defines': ['-D', 'google_tv'],
1542 }],
1543 ],
[email protected]da1c8d692011-09-20 20:35:011544 }],
[email protected]cc1f0572013-07-31 05:41:031545 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:231546 'grit_defines': ['-D', 'scale_factors=2x'],
1547 }],
[email protected]ad563d02012-10-03 10:37:031548 ['OS == "ios"', {
1549 'grit_defines': [
1550 # define for iOS specific resources.
1551 '-D', 'ios',
1552 # iOS uses a whitelist to filter resources.
1553 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1554 ],
[email protected]b4530c82013-05-09 09:20:011555
1556 # Enable clang and host builds when generating with ninja-ios.
1557 'conditions': [
1558 ['"<(GENERATOR)"=="ninja"', {
1559 'clang%': 1,
1560 'host_os%': "mac",
1561 }]
1562 ],
[email protected]ad563d02012-10-03 10:37:031563 }],
[email protected]6a3cd37e2012-04-17 17:13:341564 ['enable_extensions==1', {
1565 'grit_defines': ['-D', 'enable_extensions'],
1566 }],
[email protected]658677f2012-06-09 06:04:021567 ['enable_printing==1', {
1568 'grit_defines': ['-D', 'enable_printing'],
1569 }],
[email protected]c2aad542012-07-31 20:40:331570 ['enable_themes==1', {
1571 'grit_defines': ['-D', 'enable_themes'],
1572 }],
[email protected]ef1dd5062012-12-17 06:41:331573 ['enable_app_list==1', {
1574 'grit_defines': ['-D', 'enable_app_list'],
1575 }],
[email protected]dc4e8b82012-11-15 03:58:161576 ['enable_settings_app==1', {
1577 'grit_defines': ['-D', 'enable_settings_app'],
1578 }],
[email protected]5411d8202013-01-30 01:32:151579 ['enable_google_now==1', {
1580 'grit_defines': ['-D', 'enable_google_now'],
1581 }],
[email protected]a3a720f2013-04-25 19:35:421582 ['use_concatenated_impulse_responses==1', {
1583 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1584 }],
[email protected]f66ddbd2013-06-27 14:17:041585 ['enable_webrtc==1', {
1586 'grit_defines': ['-D', 'enable_webrtc'],
1587 }],
[email protected]3bb37e62012-04-19 03:40:081588 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071589 'clang_chrome_plugins_flags': [
1590 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311591 ],
[email protected]5d451ad2011-02-11 16:43:461592 }],
[email protected]cfa2e1102011-04-27 22:30:231593
[email protected]696de4e62012-11-21 21:18:541594 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061595 'clang%': 1,
1596 }],
[email protected]f5d8c222012-08-29 17:47:021597 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091598 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571599 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091600 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021601 }],
[email protected]062522a2013-06-13 15:49:551602 ['lsan==1', {
1603 'clang%': 1,
1604 }],
[email protected]c9a829272012-07-04 07:51:121605 ['tsan==1', {
1606 'clang%': 1,
1607 }],
[email protected]a10ddd2d2013-02-26 20:06:591608 ['msan==1', {
1609 'clang%': 1,
1610 }],
[email protected]c9a829272012-07-04 07:51:121611
[email protected]7ce58b22012-09-26 05:17:251612 ['OS=="linux" and clang_type_profiler==1', {
1613 'clang%': 1,
1614 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321615 'conditions': [
1616 ['host_arch=="x64"', {
1617 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1618 }],
1619 ['host_arch=="ia32"', {
1620 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1621 # Clang in this directory at your own risk if needed for some
1622 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1623 # usage). Any failure by this compiler should not close the tree.
1624 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1625 }],
1626 ],
[email protected]7ce58b22012-09-26 05:17:251627 }],
1628
[email protected]a9318c72012-03-01 01:29:471629 # On valgrind bots, override the optimizer settings so we don't inline too
1630 # much and make the stacks harder to figure out.
1631 #
1632 # TODO(rnk): Kill off variables that no one else uses and just implement
1633 # them under a build_for_tool== condition.
1634 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1635 # gcc flags
1636 'mac_debug_optimization': '1',
1637 'mac_release_optimization': '1',
1638 'release_optimize': '1',
1639 'no_gc_sections': 1,
1640 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1641 '-fno-builtin -fno-optimize-sibling-calls',
1642 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1643 '-fno-builtin -fno-optimize-sibling-calls',
1644
1645 # MSVS flags for TSan on Pin and Windows.
1646 'win_debug_RuntimeChecks': '0',
1647 'win_debug_disable_iterator_debugging': '1',
1648 'win_debug_Optimization': '1',
1649 'win_debug_InlineFunctionExpansion': '0',
1650 'win_release_InlineFunctionExpansion': '0',
1651 'win_release_OmitFramePointers': '0',
1652
1653 'linux_use_tcmalloc': 1,
1654 'release_valgrind_build': 1,
1655 'werror': '',
1656 'component': 'static_library',
1657 'use_system_zlib': 0,
1658 }],
1659
1660 # Build tweaks for DrMemory.
1661 # TODO(rnk): Combine with tsan config to share the builder.
1662 # http://crbug.com/108155
1663 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471664 # These runtime checks force initialization of stack vars which blocks
1665 # DrMemory's uninit detection.
1666 'win_debug_RuntimeChecks': '0',
1667 # Iterator debugging is slow.
1668 'win_debug_disable_iterator_debugging': '1',
1669 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161670 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1671 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1672 # compiler bug, so we use /Ob1 instead.
1673 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471674 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501675 # Ditto for debug, to support bumping win_debug_Optimization.
1676 'win_debug_InlineFunctionExpansion': 0,
1677 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471678 # Keep the code under #ifndef NVALGRIND.
1679 'release_valgrind_build': 1,
1680 }],
[email protected]b6a5ac92012-10-29 18:17:221681
[email protected]f40a6912012-12-10 21:52:411682 # Enable RLZ on Win, Mac and ChromeOS.
1683 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221684 'enable_rlz%': 1,
1685 }],
[email protected]7d6763422013-04-26 12:06:541686
1687 # Set default compiler flags depending on ARM version.
1688 ['arm_version==5 and android_webview_build==0', {
1689 # Flags suitable for Android emulator
1690 'arm_arch%': 'armv5te',
1691 'arm_tune%': 'xscale',
1692 'arm_fpu%': '',
1693 'arm_float_abi%': 'soft',
1694 'arm_thumb%': 0,
1695 }],
1696 ['arm_version==6 and android_webview_build==0', {
1697 'arm_arch%': 'armv6',
1698 'arm_tune%': '',
1699 'arm_fpu%': '',
1700 'arm_float_abi%': 'soft',
1701 'arm_thumb%': 0,
1702 }],
1703 ['arm_version==7 and android_webview_build==0', {
1704 'arm_arch%': 'armv7-a',
1705 'arm_tune%': 'cortex-a8',
1706 'conditions': [
1707 ['arm_neon==1', {
1708 'arm_fpu%': 'neon',
1709 }, {
1710 'arm_fpu%': 'vfpv3-d16',
1711 }],
1712 ],
1713 'arm_float_abi%': 'softfp',
1714 'arm_thumb%': 1,
1715 }],
1716
1717 ['android_webview_build==1', {
1718 # The WebView build gets its cpu-specific flags from the Android build system.
1719 'arm_arch%': '',
1720 'arm_tune%': '',
1721 'arm_fpu%': '',
1722 'arm_float_abi%': '',
1723 'arm_thumb%': 0,
1724 }],
[email protected]912c55c2009-07-31 23:33:551725 ],
[email protected]a9318c72012-03-01 01:29:471726
[email protected]c91dc722013-06-12 22:53:011727
1728 # The path to the ANGLE library. TODO(apatrick): This is to help
1729 # transition to a new version of ANGLE at a new location. After the
1730 # transition is complete, this can be removed.
[email protected]a4f18a802013-06-24 10:40:261731 'angle_path': '<(DEPTH)/third_party/angle_dx11',
[email protected]c91dc722013-06-12 22:53:011732
[email protected]35958422011-09-28 02:03:591733 # List of default apps to install in new profiles. The first list contains
1734 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061735 # contains the destination location for each of the files. When a crx
1736 # is added or removed from the list, the chrome/browser/resources/
1737 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591738 'default_apps_list': [
1739 'browser/resources/default_apps/external_extensions.json',
1740 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061741 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591742 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001743 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231744 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591745 ],
1746 'default_apps_list_linux_dest': [
1747 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1748 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061749 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591750 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001751 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231752 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591753 ],
[email protected]2f80c312009-02-25 21:26:551754 },
1755 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261756 'variables': {
[email protected]a6e22132010-02-10 20:43:181757 # The condition that operates on chromium_code is in a target_conditions
1758 # section, and will not have access to the default fallback value of
1759 # chromium_code at the top of this file, or to the chromium_code
1760 # variable placed at the root variables scope of .gyp files, because
1761 # those variables are not set at target scope. As a workaround,
1762 # if chromium_code is not set at target scope, define it in target scope
1763 # to contain whatever value it has during early variable expansion.
1764 # That's enough to make it available during target conditional
1765 # processing.
1766 'chromium_code%': '<(chromium_code)',
1767
[email protected]7e0d664a2009-12-03 21:07:471768 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1769 'win_release_Optimization%': '2', # 2 = /Os
1770 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331771
1772 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241773 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111774 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241775 # Tri-state: blank is default, 1 on, 0 off
1776 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331777
[email protected]6b0507b2010-05-07 07:41:211778 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1779 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331780
[email protected]6b0507b2010-05-07 07:41:211781 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151782 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1783 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331784
[email protected]fac10d12010-11-08 16:00:311785 # VS inserts quite a lot of extra checks to algorithms like
1786 # std::partial_sort in Debug build which make them O(N^2)
1787 # instead of O(N*logN). This is particularly slow under memory
1788 # tools like ThreadSanitizer so we want it to be disablable.
1789 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1790 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471791
[email protected]5d60b0b2013-07-30 20:24:301792 # An application manifest fragment to declare compatibility settings for
1793 # 'executable' targets. Ignored in other target type.
1794 'win_exe_compatibility_manifest%':
1795 '<(DEPTH)\\build\\win\\compatibility.manifest',
1796
1797 # Set to 1 to generate external manifest instead of embedding it for
1798 # 'executable' target. Does nothing for other target type. This flag is
1799 # used to make mini_installer compatible with the component build.
1800 # See http://crbug.com/127233
1801 'win_use_external_manifest%': 0,
1802
[email protected]ffd984b12009-09-11 19:37:001803 'release_extra_cflags%': '',
1804 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001805
1806 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521807
[email protected]ef5c5f1b2011-12-17 02:16:241808 # the non-qualified versions are widely assumed to be *nix-only
1809 'win_release_extra_cflags%': '',
1810 'win_debug_extra_cflags%': '',
1811
[email protected]b1eb341c2011-11-09 18:46:071812 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1813 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1814
[email protected]ef3326702011-10-06 18:06:441815 # Only used by Windows build for now. Can be used to build into a
1816 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1817 # output files in src/build/VS2010_{Debug,Release}.
1818 'build_dir_prefix%': '',
1819
[email protected]9ac2db692012-06-08 01:01:571820 # Targets are by default not nacl untrusted code.
1821 'nacl_untrusted_build%': 0,
1822
[email protected]9c55d9d2012-11-15 23:28:441823 'pnacl_compile_flags': [
1824 # pnacl uses the clang compiler so we need to supress all the
1825 # same warnings as we do for clang.
1826 # TODO(sbc): Remove these if/when they are removed from the clang
1827 # build.
1828 '-Wno-unused-function',
1829 '-Wno-char-subscripts',
1830 '-Wno-c++11-extensions',
1831 '-Wno-unnamed-type-template-args',
1832 ],
1833
[email protected]8974e042010-06-21 18:06:521834 'conditions': [
1835 ['OS=="win" and component=="shared_library"', {
1836 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161837 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1838 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521839 }, {
1840 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1841 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1842 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1843 }],
[email protected]1e013672012-06-29 22:12:201844 ['OS=="ios"', {
1845 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1846 'mac_release_optimization%': 's', # Use -Os unless overridden
1847 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1848 }, {
1849 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1850 'mac_release_optimization%': '3', # Use -O3 unless overridden
1851 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1852 }],
[email protected]8974e042010-06-21 18:06:521853 ],
[email protected]1c966092009-08-20 21:19:261854 },
[email protected]c91dc722013-06-12 22:53:011855 'defines': [
1856 # Set this to use the new DX11 version of ANGLE.
1857 # TODO(apatrick): Remove this when the transition is complete.
[email protected]a4f18a802013-06-24 10:40:261858 'ANGLE_DX11',
[email protected]c91dc722013-06-12 22:53:011859 ],
[email protected]32aa8cc2009-03-04 21:36:391860 'conditions': [
[email protected]d808e212013-03-12 14:06:161861 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311862 'dependencies': [
1863 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1864 ],
1865 }],
[email protected]7ce58b22012-09-26 05:17:251866 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1867 'cflags_cc!': ['-fno-rtti'],
1868 'cflags_cc+': [
1869 '-frtti',
1870 '-gline-tables-only',
1871 '-fintercept-allocation-functions',
1872 ],
1873 'defines': ['TYPE_PROFILING'],
1874 'dependencies': [
1875 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1876 ],
1877 }],
[email protected]1ff64292013-07-18 20:37:151878 ['chrome_multiple_dll', {
1879 'defines': ['CHROME_MULTIPLE_DLL'],
[email protected]56c248b2013-05-08 17:51:021880 }],
[email protected]b0c45722013-01-23 04:47:321881 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1882 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1883 # See http://crbug.com/162818.
1884 'cflags+': ['-Wno-sentinel'],
1885 }],
[email protected]ff10b132012-02-29 22:53:301886 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1887 'msbuild_toolset': '<(msbuild_toolset)',
1888 }],
[email protected]32aa8cc2009-03-04 21:36:391889 ['branding=="Chrome"', {
1890 'defines': ['GOOGLE_CHROME_BUILD'],
1891 }, { # else: branding!="Chrome"
1892 'defines': ['CHROMIUM_BUILD'],
1893 }],
[email protected]286d9a12012-05-30 16:20:381894 ['OS=="mac" and component=="shared_library"', {
1895 'xcode_settings': {
1896 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1897 'LD_RUNPATH_SEARCH_PATHS': [
1898 # For unbundled binaries.
1899 '@loader_path/.',
1900 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1901 '@loader_path/../../..',
1902 ],
1903 },
1904 }],
[email protected]b6a5ac92012-10-29 18:17:221905 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171906 'defines': ['ENABLE_RLZ'],
1907 }],
[email protected]63e39a282011-07-13 20:41:281908 ['component=="shared_library"', {
1909 'defines': ['COMPONENT_BUILD'],
1910 }],
[email protected]06c756182010-04-27 18:31:311911 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171912 'defines': ['TOOLKIT_VIEWS=1'],
1913 }],
[email protected]1ee7c56c2011-10-19 14:51:331914 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111915 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1916 }],
[email protected]41423092011-08-25 15:39:581917 ['use_aura==1', {
1918 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351919 }],
[email protected]ed329be2012-01-03 22:02:161920 ['use_ash==1', {
1921 'defines': ['USE_ASH=1'],
1922 }],
[email protected]ff78e4e2013-05-03 19:19:151923 ['use_ozone==1', {
1924 'defines': ['USE_OZONE=1'],
1925 }],
[email protected]cb800562012-11-20 22:36:071926 ['use_default_render_theme==1', {
1927 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1928 }],
[email protected]e190d272012-08-30 17:36:441929 ['use_libjpeg_turbo==1', {
1930 'defines': ['USE_LIBJPEG_TURBO=1'],
1931 }],
[email protected]c329adf82011-10-05 14:34:571932 ['use_nss==1', {
1933 'defines': ['USE_NSS=1'],
1934 }],
[email protected]2fa2f2d82013-04-29 18:13:121935 ['use_x11==1', {
1936 'defines': ['USE_X11=1'],
1937 }],
[email protected]bd7b6fe2012-03-05 21:02:401938 ['enable_one_click_signin==1', {
1939 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1940 }],
[email protected]a47aa892011-11-22 03:12:311941 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1942 # TODO(erg): We are progressively sealing up use of deprecated features
1943 # in gtk in preparation for an eventual porting to gtk3.
1944 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1945 }],
[email protected]fdc5bed2010-01-09 01:16:571946 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291947 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501948 }],
[email protected]55d92492013-01-31 05:03:391949 ['google_tv==1', {
1950 'defines': ['GOOGLE_TV=1'],
1951 }],
[email protected]f56797b2011-09-25 00:04:351952 ['use_xi2_mt!=0', {
1953 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1954 }],
[email protected]e47c32032011-03-01 19:26:201955 ['file_manager_extension==1', {
1956 'defines': ['FILE_MANAGER_EXTENSION=1'],
1957 }],
[email protected]77a848262013-02-22 11:17:251958 ['image_loader_extension==1', {
1959 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1960 }],
[email protected]7664ab32011-02-01 23:35:251961 ['profiling==1', {
1962 'defines': ['ENABLE_PROFILING=1'],
1963 }],
[email protected]93b373502011-08-16 19:06:221964 ['OS=="linux" and glibcxx_debug==1', {
1965 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591966 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221967 }],
[email protected]542bf24a2010-06-11 23:08:171968 ['remoting==1', {
1969 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001970 }],
[email protected]5b87e782012-02-09 18:19:321971 ['enable_webrtc==1', {
1972 'defines': ['ENABLE_WEBRTC=1'],
1973 }],
[email protected]d01120e62010-05-10 17:04:481974 ['proprietary_codecs==1', {
1975 'defines': ['USE_PROPRIETARY_CODECS'],
1976 }],
[email protected]7ddea9802012-02-22 23:08:051977 ['enable_viewport==1', {
1978 'defines': ['ENABLE_VIEWPORT'],
1979 }],
[email protected]280755c2013-05-23 10:44:351980 ['enable_pepper_cdms==1', {
1981 'defines': ['ENABLE_PEPPER_CDMS'],
1982 }],
[email protected]f31e2e52011-07-14 16:01:191983 ['configuration_policy==1', {
1984 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1985 }],
[email protected]9eb100e2011-10-14 05:08:221986 ['input_speech==1', {
1987 'defines': ['ENABLE_INPUT_SPEECH'],
1988 }],
[email protected]7cce3232011-10-28 10:41:571989 ['notifications==1', {
1990 'defines': ['ENABLE_NOTIFICATIONS'],
1991 }],
[email protected]1efbaaa2012-04-24 02:43:241992 ['enable_hidpi==1', {
1993 'defines': ['ENABLE_HIDPI=1'],
1994 }],
[email protected]9c1949e2009-10-02 19:59:541995 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:311996 'xcode_settings': {
1997 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1998 },
[email protected]9c1949e2009-10-02 19:59:541999 'conditions': [
[email protected]7df38122012-11-05 23:54:432000 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:302001 # Clang creates chubby debug information, which makes linking very
2002 # slow. For now, don't create debug information with clang. See
2003 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432004 'conditions': [
2005 ['OS=="linux"', {
2006 'variables': {
2007 'debug_extra_cflags': '-g0',
2008 },
2009 }],
2010 # Android builds symbols on release by default, disable them.
2011 ['OS=="android"', {
2012 'variables': {
2013 'debug_extra_cflags': '-g0',
2014 'release_extra_cflags': '-g0',
2015 },
2016 }],
2017 ],
2018 }, { # else clang!=1
2019 'conditions': [
[email protected]c86fd472013-04-02 19:42:302020 ['OS=="win" and fastbuild==2', {
2021 # Completely disable debug information.
2022 'msvs_settings': {
2023 'VCLinkerTool': {
2024 'GenerateDebugInformation': 'false',
2025 },
2026 'VCCLCompilerTool': {
2027 'DebugInformationFormat': '0',
2028 },
2029 },
2030 }],
2031 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432032 'msvs_settings': {
2033 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312034 # This tells the linker to generate .pdbs, so that
2035 # we can get meaningful stack traces.
2036 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432037 },
2038 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312039 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432040 'DebugInformationFormat': '0',
2041 },
2042 },
2043 }],
[email protected]c86fd472013-04-02 19:42:302044 ['OS=="linux" and fastbuild==2', {
2045 'variables': {
2046 'debug_extra_cflags': '-g0',
2047 },
2048 }],
2049 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432050 'variables': {
2051 'debug_extra_cflags': '-g1',
2052 },
2053 }],
[email protected]c86fd472013-04-02 19:42:302054 ['OS=="android" and fastbuild==2', {
2055 'variables': {
2056 'debug_extra_cflags': '-g0',
2057 'release_extra_cflags': '-g0',
2058 },
2059 }],
2060 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432061 'variables': {
2062 'debug_extra_cflags': '-g1',
2063 'release_extra_cflags': '-g1',
2064 },
2065 }],
2066 ],
2067 }], # clang!=1
2068 ],
[email protected]9c1949e2009-10-02 19:59:542069 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012070 ['dcheck_always_on!=0', {
2071 'defines': ['DCHECK_ALWAYS_ON=1'],
2072 }], # dcheck_always_on!=0
[email protected]65b0819e2013-06-21 15:24:002073 ['logging_like_official_build!=0', {
2074 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2075 }], # logging_like_official_build!=0
[email protected]a1e87422013-07-09 21:47:012076 ['tracing_like_official_build!=0', {
2077 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2078 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472079 ['win_use_allocator_shim==0', {
2080 'conditions': [
2081 ['OS=="win"', {
2082 'defines': ['NO_TCMALLOC'],
2083 }],
2084 ],
2085 }],
[email protected]43f28f832010-02-03 02:28:482086 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:152087 'defines': [
2088 'ENABLE_GPU=1',
2089 ],
2090 }],
[email protected]b1c2a5542010-10-08 12:44:402091 ['use_openssl==1', {
2092 'defines': [
2093 'USE_OPENSSL=1',
2094 ],
2095 }],
[email protected]ed154592010-04-29 00:18:502096 ['enable_eglimage==1', {
2097 'defines': [
2098 'ENABLE_EGLIMAGE=1',
2099 ],
2100 }],
[email protected]696de4e62012-11-21 21:18:542101 ['asan==1 and OS=="win"', {
2102 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2103 # produce appropriate pdbs.
2104 'msvs_settings': {
2105 'VCLinkerTool': {
2106 'Profile': 'true',
2107 },
2108 },
[email protected]2f047202013-06-14 06:36:392109 'defines': [
[email protected]bba0fea32013-06-14 12:29:352110 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:392111 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2112 ],
[email protected]696de4e62012-11-21 21:18:542113 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182114 ['coverage!=0', {
2115 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032116 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182117 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042118 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2119 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472120 },
[email protected]fc642ec2012-10-12 19:07:032121 }],
2122 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432123 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102124 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432125 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182126 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432127 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182128 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472129 }],
2130 ],
2131 }],
[email protected]da1c8d692011-09-20 20:35:012132 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182133 'cflags': [ '-ftest-coverage',
2134 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002135 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182136 }],
[email protected]e8f6ff42009-07-07 18:20:532137 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072138 'variables': {
2139 # Disable incremental linking for all modules.
2140 # 0: inherit, 1: disabled, 2: enabled.
2141 'msvs_debug_link_incremental': '1',
2142 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292143 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2144 # binaries for now.
2145 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072146 },
2147 'defines': [
2148 # Disable iterator debugging (huge speed boost without any
2149 # change in coverage results).
2150 '_HAS_ITERATOR_DEBUGGING=0',
2151 ],
[email protected]e8f6ff42009-07-07 18:20:532152 'msvs_settings': {
2153 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072154 # Enable profile information (necessary for coverage
2155 # instrumentation). This is incompatible with incremental
2156 # linking.
[email protected]e8f6ff42009-07-07 18:20:532157 'Profile': 'true',
2158 },
[email protected]e8f6ff42009-07-07 18:20:532159 }
2160 }], # OS==win
2161 ], # conditions for coverage
2162 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382163 ['OS=="win"', {
2164 'defines': [
2165 '__STD_C',
2166 '_CRT_SECURE_NO_DEPRECATE',
2167 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102168 # This define is required to pull in the new Win8 interfaces from
2169 # system headers like ShObjIdl.h.
2170 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382171 ],
2172 'include_dirs': [
2173 '<(DEPTH)/third_party/wtl/include',
2174 ],
[email protected]9619e65d2012-05-23 19:06:522175 'conditions': [
2176 ['win_z7!=0', {
2177 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092178 # Generates debug info when win_z7=1
2179 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2180 'VCLinkerTool': {
2181 'GenerateDebugInformation': 'true',
2182 },
[email protected]9619e65d2012-05-23 19:06:522183 'VCCLCompilerTool': {
2184 'DebugInformationFormat': '1',
2185 }
2186 }
2187 }],
[email protected]45a77072012-11-17 00:28:422188 ['"<(GENERATOR)"=="msvs"', {
2189 'msvs_settings': {
2190 'VCLinkerTool': {
2191 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2192 # have foo.pdb. The ninja generator already defaults to this and
2193 # can't handle the $(TargetPath) macro.
2194 'ProgramDatabaseFile': '$(TargetPath).pdb',
2195 }
2196 },
2197 }],
[email protected]9619e65d2012-05-23 19:06:522198 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382199 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022200 ['enable_task_manager==1', {
2201 'defines': [
2202 'ENABLE_TASK_MANAGER=1',
2203 ],
2204 }],
[email protected]6a3cd37e2012-04-17 17:13:342205 ['enable_extensions==1', {
2206 'defines': [
2207 'ENABLE_EXTENSIONS=1',
2208 ],
2209 }],
[email protected]13eb97d2012-01-05 01:07:122210 ['OS=="win" and branding=="Chrome"', {
2211 'defines': ['ENABLE_SWIFTSHADER'],
2212 }],
[email protected]407dfa632011-12-23 11:59:352213 ['enable_dart==1', {
2214 'defines': ['WEBKIT_USING_DART=1'],
2215 }],
[email protected]18e0f39b2012-01-17 16:47:342216 ['enable_plugin_installation==1', {
2217 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2218 }],
[email protected]6d17f6392012-12-05 05:24:542219 ['enable_plugins==1', {
2220 'defines': ['ENABLE_PLUGINS=1'],
2221 }],
[email protected]cdb756ef2012-04-05 18:34:532222 ['enable_session_service==1', {
2223 'defines': ['ENABLE_SESSION_SERVICE=1'],
2224 }],
[email protected]6b40bb582012-03-15 20:50:382225 ['enable_themes==1', {
2226 'defines': ['ENABLE_THEMES=1'],
2227 }],
[email protected]57e67ac2013-02-22 03:37:222228 ['enable_autofill_dialog==1', {
2229 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2230 }],
[email protected]0acdd772012-04-05 22:53:002231 ['enable_background==1', {
2232 'defines': ['ENABLE_BACKGROUND=1'],
2233 }],
[email protected]2e22e2f2012-03-15 21:53:102234 ['enable_automation==1', {
2235 'defines': ['ENABLE_AUTOMATION=1'],
2236 }],
[email protected]6ee43a72012-12-07 22:44:402237 ['enable_google_now==1', {
2238 'defines': ['ENABLE_GOOGLE_NOW=1'],
2239 }],
[email protected]658677f2012-06-09 06:04:022240 ['enable_printing==1', {
2241 'defines': ['ENABLE_PRINTING=1'],
2242 }],
[email protected]e6026962012-06-14 21:28:322243 ['enable_captive_portal_detection==1', {
2244 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2245 }],
[email protected]dc4e8b82012-11-15 03:58:162246 ['enable_app_list==1', {
2247 'defines': ['ENABLE_APP_LIST=1'],
2248 }],
2249 ['enable_settings_app==1', {
2250 'defines': ['ENABLE_SETTINGS_APP=1'],
2251 }],
[email protected]9bfe0ab2012-08-30 13:18:112252 ['disable_ftp_support==1', {
2253 'defines': ['DISABLE_FTP_SUPPORT=1'],
2254 }],
[email protected]0850e842013-01-19 03:44:312255 ['enable_managed_users==1', {
2256 'defines': ['ENABLE_MANAGED_USERS=1'],
2257 }],
[email protected]199def22013-02-21 17:52:292258 ['spdy_proxy_auth_origin != ""', {
2259 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2260 }],
2261 ['spdy_proxy_auth_property != ""', {
2262 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2263 }],
[email protected]f37e9412013-05-27 23:18:252264 ['spdy_proxy_auth_value != ""', {
2265 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2266 }],
[email protected]5cbeb502013-04-23 19:25:272267 ['enable_mdns==1', {
2268 'defines': ['ENABLE_MDNS=1'],
2269 }]
[email protected]a6e22132010-02-10 20:43:182270 ], # conditions for 'target_defaults'
2271 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072272 ['enable_wexit_time_destructors==1', {
2273 'conditions': [
2274 [ 'clang==1', {
2275 'cflags': [
2276 '-Wexit-time-destructors',
2277 ],
2278 'xcode_settings': {
2279 'WARNING_CFLAGS': [
2280 '-Wexit-time-destructors',
2281 ],
2282 },
2283 }],
2284 ],
2285 }],
[email protected]c14d8e772010-02-09 22:06:152286 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282287 'conditions': [
[email protected]1e013672012-06-29 22:12:202288 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332289 # We don't want to get warnings from third-party code,
2290 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282291 'cflags!': [
2292 '-Wall',
2293 '-Wextra',
[email protected]d8543312010-02-10 17:43:282294 ],
[email protected]167ec822011-10-24 22:05:272295 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002296 # Don't warn about hash_map in third-party code.
2297 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272298 ],
2299 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332300 # Don't warn about printf format problems.
2301 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222302 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002303 ],
[email protected]d16bd642011-07-25 23:59:182304 'cflags_cc!': [
2305 # TODO(fischman): remove this.
2306 # http://code.google.com/p/chromium/issues/detail?id=90453
2307 '-Wsign-compare',
2308 ]
[email protected]d8543312010-02-10 17:43:282309 }],
[email protected]82dd5eb32012-08-18 04:24:322310 # TODO: Fix all warnings on chromeos too.
2311 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2312 'cflags!': [
2313 '-Werror',
2314 ],
2315 }],
[email protected]bc073c062012-01-13 06:28:032316 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112317 'cflags': [
2318 # Don't warn about ignoring the return value from e.g. close().
2319 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032320 # BSD systems do not support this option, since they are usually
2321 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112322 '-Wno-unused-result',
2323 ],
2324 }],
[email protected]d8543312010-02-10 17:43:282325 [ 'OS=="win"', {
2326 'defines': [
2327 '_CRT_SECURE_NO_DEPRECATE',
2328 '_CRT_NONSTDC_NO_WARNINGS',
2329 '_CRT_NONSTDC_NO_DEPRECATE',
2330 '_SCL_SECURE_NO_DEPRECATE',
2331 ],
2332 'msvs_disabled_warnings': [4800],
2333 'msvs_settings': {
2334 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112335 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242336 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282337 'Detect64BitPortabilityProblems': 'false',
2338 },
2339 },
[email protected]c54b41cb2012-08-24 20:58:242340 'conditions': [
2341 ['buildtype=="Official"', {
2342 'msvs_settings': {
2343 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2344 }
2345 }],
2346 ],
[email protected]d8543312010-02-10 17:43:282347 }],
[email protected]0915c3b2012-11-22 17:24:072348 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422349 [ 'OS=="win" and component=="shared_library"', {
2350 'msvs_disabled_warnings': [
2351 4251, # class 'std::xx' needs to have dll-interface.
2352 ],
2353 }],
[email protected]1e013672012-06-29 22:12:202354 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282355 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062356 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282357 },
[email protected]3a352c362012-05-08 19:45:492358 'conditions': [
2359 ['buildtype=="Official"', {
2360 'xcode_settings': {
2361 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2362 },
2363 }],
2364 ],
[email protected]d8543312010-02-10 17:43:282365 }],
[email protected]1e013672012-06-29 22:12:202366 [ 'OS=="ios"', {
2367 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222368 # TODO(ios): Fix remaining warnings in third-party code, then
2369 # remove this; the Mac cleanup didn't get everything that's
2370 # flagged in an iOS build.
2371 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202372 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2373 },
2374 }],
[email protected]c14d8e772010-02-09 22:06:152375 ],
2376 }, {
[email protected]a5c598152012-01-27 04:55:132377 'includes': [
2378 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2379 'filename_rules.gypi',
2380 ],
[email protected]41af4f82012-11-08 00:09:312381 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152382 # C99 macros on Mac and Linux.
2383 'defines': [
[email protected]41af4f82012-11-08 00:09:312384 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152385 '__STDC_FORMAT_MACROS',
2386 ],
2387 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152388 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072389 # turn on warnings for signed/unsigned mismatch on chromium code.
2390 'msvs_settings': {
2391 'VCCLCompilerTool': {
2392 'AdditionalOptions': ['/we4389'],
2393 },
2394 },
[email protected]c14d8e772010-02-09 22:06:152395 }],
[email protected]63e39a282011-07-13 20:41:282396 ['OS=="win" and component=="shared_library"', {
2397 'msvs_disabled_warnings': [
2398 4251, # class 'std::xx' needs to have dll-interface.
2399 ],
2400 }],
[email protected]c14d8e772010-02-09 22:06:152401 ],
2402 }],
[email protected]a6e22132010-02-10 20:43:182403 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552404 'default_configuration': 'Debug',
2405 'configurations': {
[email protected]5153767c2009-12-22 01:52:502406 # VCLinkerTool LinkIncremental values below:
2407 # 0 == default
2408 # 1 == /INCREMENTAL:NO
2409 # 2 == /INCREMENTAL
2410 # Debug links incremental, Release does not.
2411 #
[email protected]7b99801e2010-11-03 17:26:232412 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502413 #
2414 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562415 'abstract': 1,
2416 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512417 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562418 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2419 'CharacterSet': '1',
2420 },
[email protected]f59e1302013-02-15 13:48:402421 # Add the default import libs.
2422 'msvs_settings':{
2423 'VCLinkerTool': {
2424 'AdditionalDependencies': [
2425 'kernel32.lib',
2426 'gdi32.lib',
2427 'winspool.lib',
2428 'comdlg32.lib',
2429 'advapi32.lib',
2430 'shell32.lib',
2431 'ole32.lib',
2432 'oleaut32.lib',
2433 'user32.lib',
2434 'uuid.lib',
2435 'odbc32.lib',
2436 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392437 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402438 ],
2439 },
2440 },
[email protected]5153767c2009-12-22 01:52:502441 },
2442 'x86_Base': {
2443 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502444 'msvs_settings': {
2445 'VCLinkerTool': {
2446 'TargetMachine': '1',
2447 },
2448 },
[email protected]2fa40782009-11-01 21:17:342449 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562450 },
[email protected]5153767c2009-12-22 01:52:502451 'x64_Base': {
2452 'abstract': 1,
2453 'msvs_configuration_platform': 'x64',
2454 'msvs_settings': {
2455 'VCLinkerTool': {
2456 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502457 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052458 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502459 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052460 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362461 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2462 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502463 },
[email protected]d26b4418ab2010-03-24 22:06:352464 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502465 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052466 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502467 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052468 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502469 },
2470 },
[email protected]5153767c2009-12-22 01:52:502471 },
2472 'Debug_Base': {
2473 'abstract': 1,
[email protected]14339762011-04-05 07:36:582474 'defines': [
2475 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2476 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2477 ],
[email protected]1c966092009-08-20 21:19:262478 'xcode_settings': {
2479 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292480 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492481 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492482 '<@(debug_extra_cflags)',
2483 ],
[email protected]1c966092009-08-20 21:19:262484 },
[email protected]bb05e452009-10-29 21:24:562485 'msvs_settings': {
2486 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472487 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562488 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212489 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472490 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152491 'conditions': [
2492 # According to MSVS, InlineFunctionExpansion=0 means
2493 # "default inlining", not "/Ob0".
2494 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2495 ['win_debug_InlineFunctionExpansion==0', {
2496 'AdditionalOptions': ['/Ob0'],
2497 }],
2498 ['win_debug_InlineFunctionExpansion!=""', {
2499 'InlineFunctionExpansion':
2500 '<(win_debug_InlineFunctionExpansion)',
2501 }],
[email protected]fac10d12010-11-08 16:00:312502 ['win_debug_disable_iterator_debugging==1', {
2503 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2504 }],
[email protected]ef5c5f1b2011-12-17 02:16:242505
2506 # if win_debug_OmitFramePointers is blank, leave as default
2507 ['win_debug_OmitFramePointers==1', {
2508 'OmitFramePointers': 'true',
2509 }],
2510 ['win_debug_OmitFramePointers==0', {
2511 'OmitFramePointers': 'false',
2512 # The above is not sufficient (http://crbug.com/106711): it
2513 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2514 # perform FPO regardless, so we must explicitly disable.
2515 # We still want the false setting above to avoid having
2516 # "/Oy /Oy-" and warnings about overriding.
2517 'AdditionalOptions': ['/Oy-'],
2518 }],
[email protected]2ae6e022010-05-07 13:19:152519 ],
[email protected]ef5c5f1b2011-12-17 02:16:242520 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562521 },
2522 'VCLinkerTool': {
2523 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332524 # ASLR makes debugging with windbg difficult because Chrome.exe and
2525 # Chrome.dll share the same base name. As result, windbg will
2526 # name the Chrome.dll module like chrome_<base address>, where
2527 # <base address> typically changes with each launch. This in turn
2528 # means that breakpoints in Chrome.dll don't stick from one launch
2529 # to the next. For this reason, we turn ASLR off in debug builds.
2530 # Note that this is a three-way bool, where 0 means to pick up
2531 # the default setting, 1 is off and 2 is on.
2532 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562533 },
2534 'VCResourceCompilerTool': {
2535 'PreprocessorDefinitions': ['_DEBUG'],
2536 },
2537 },
[email protected]2f80c312009-02-25 21:26:552538 'conditions': [
[email protected]78204c92012-09-14 04:42:552539 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542540 'target_conditions': [
2541 ['_toolset=="target"', {
2542 'cflags': [
2543 '<@(debug_extra_cflags)',
2544 ],
2545 }],
[email protected]bb05e452009-10-29 21:24:562546 ],
[email protected]2f80c312009-02-25 21:26:552547 }],
[email protected]1e013672012-06-29 22:12:202548 # Disabled on iOS because it was causing a crash on startup.
2549 # TODO(michelea): investigate, create a reduced test and possibly
2550 # submit a radar.
2551 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352552 'xcode_settings': {
2553 'OTHER_CFLAGS': [
2554 '-fstack-protector-all', # Implies -fstack-protector
2555 ],
2556 },
2557 }],
[email protected]2f80c312009-02-25 21:26:552558 ],
2559 },
[email protected]5153767c2009-12-22 01:52:502560 'Release_Base': {
2561 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552562 'defines': [
2563 'NDEBUG',
2564 ],
[email protected]1c966092009-08-20 21:19:262565 'xcode_settings': {
2566 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2567 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002568 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262569 },
[email protected]bb05e452009-10-29 21:24:562570 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472571 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472572 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152573 'conditions': [
[email protected]2212d272011-12-20 21:37:372574 # In official builds, each target will self-select
2575 # an optimization level.
2576 ['buildtype!="Official"', {
2577 'Optimization': '<(win_release_Optimization)',
2578 },
2579 ],
[email protected]2ae6e022010-05-07 13:19:152580 # According to MSVS, InlineFunctionExpansion=0 means
2581 # "default inlining", not "/Ob0".
2582 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2583 ['win_release_InlineFunctionExpansion==0', {
2584 'AdditionalOptions': ['/Ob0'],
2585 }],
2586 ['win_release_InlineFunctionExpansion!=""', {
2587 'InlineFunctionExpansion':
2588 '<(win_release_InlineFunctionExpansion)',
2589 }],
[email protected]626d2d22011-10-11 15:47:332590
[email protected]ef5c5f1b2011-12-17 02:16:242591 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332592 ['win_release_OmitFramePointers==1', {
2593 'OmitFramePointers': 'true',
2594 }],
2595 ['win_release_OmitFramePointers==0', {
2596 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242597 # The above is not sufficient (http://crbug.com/106711): it
2598 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2599 # perform FPO regardless, so we must explicitly disable.
2600 # We still want the false setting above to avoid having
2601 # "/Oy /Oy-" and warnings about overriding.
2602 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332603 }],
[email protected]2ae6e022010-05-07 13:19:152604 ],
[email protected]ef5c5f1b2011-12-17 02:16:242605 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472606 },
[email protected]bb05e452009-10-29 21:24:562607 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342608 # LinkIncremental is a tri-state boolean, where 0 means default
2609 # (i.e., inherit from parent solution), 1 means false, and
2610 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562611 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342612 # This corresponds to the /PROFILE flag which ensures the PDB
2613 # file contains FIXUP information (growing the PDB file by about
2614 # 5%) but does not otherwise alter the output binary. This
2615 # information is used by the Syzygy optimization tool when
2616 # decomposing the release image.
2617 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562618 },
2619 },
[email protected]2f80c312009-02-25 21:26:552620 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162621 ['msvs_use_common_release', {
2622 'includes': ['release.gypi'],
2623 }],
[email protected]7bdd7d7c2012-11-01 10:36:162624 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582625 'defines': [
2626 'NVALGRIND',
2627 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2628 ],
[email protected]ee857512010-05-14 08:24:422629 }, {
[email protected]14339762011-04-05 07:36:582630 'defines': [
[email protected]2f047202013-06-14 06:36:392631 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582632 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2633 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2634 ],
[email protected]92822e82009-09-18 14:26:562635 }],
[email protected]7e0d664a2009-12-03 21:07:472636 ['win_use_allocator_shim==0', {
2637 'defines': ['NO_TCMALLOC'],
2638 }],
[email protected]37305ae2012-12-11 01:54:582639 ['os_posix==1 and chromium_code==1', {
2640 # Non-chromium code is not guaranteed to compile cleanly
2641 # with _FORTIFY_SOURCE. Also, fortified build may fail
2642 # when optimizations are disabled, so only do that for Release
2643 # build.
2644 'defines': [
2645 '_FORTIFY_SOURCE=2',
2646 ],
2647 }],
[email protected]7df38122012-11-05 23:54:432648 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542649 'target_conditions': [
2650 ['_toolset=="target"', {
2651 'cflags': [
2652 '<@(release_extra_cflags)',
2653 ],
2654 }],
[email protected]bb05e452009-10-29 21:24:562655 ],
2656 }],
[email protected]b64ec822013-05-23 12:57:412657 ['OS=="ios"', {
2658 'defines': [
2659 'NS_BLOCK_ASSERTIONS=1',
2660 ],
2661 }],
[email protected]2f80c312009-02-25 21:26:552662 ],
2663 },
[email protected]5153767c2009-12-22 01:52:502664 #
2665 # Concrete configurations
2666 #
2667 'Debug': {
2668 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2669 },
2670 'Release': {
2671 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502672 },
[email protected]f926fa0a2009-08-04 22:50:132673 'conditions': [
2674 [ 'OS=="win"', {
2675 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502676 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502677 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302678 },
2679 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502680 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302681 },
[email protected]f926fa0a2009-08-04 22:50:132682 }],
2683 ],
[email protected]2f80c312009-02-25 21:26:552684 },
2685 },
2686 'conditions': [
[email protected]43539ec2012-11-20 22:35:252687 ['os_posix==1', {
2688 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252689 'ldflags': [
2690 '-Wl,-z,now',
2691 '-Wl,-z,relro',
2692 ],
[email protected]43539ec2012-11-20 22:35:252693 },
2694 }],
[email protected]d2ca75c2013-02-01 05:47:172695 ['os_posix==1 and chromeos==0', {
2696 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2697 # and we want to avoid overriding this, so stack-protector is only
2698 # enabled when not building on Chrome OS.
2699 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2700 # supports it.
2701 'target_defaults': {
2702 'cflags': [
2703 '-fstack-protector',
2704 '--param=ssp-buffer-size=4',
2705 ],
2706 },
2707 }],
[email protected]1e013672012-06-29 22:12:202708 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262709 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272710 # Enable -Werror by default, but put it in a variable so it can
2711 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2712 'variables': {
[email protected]cbbb3472012-01-25 18:32:312713 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202714 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272715 },
[email protected]6863896f2012-01-25 17:51:362716 'defines': [
2717 '_FILE_OFFSET_BITS=64',
2718 ],
[email protected]9d384032009-03-20 23:13:262719 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162720 '<(werror)', # See note above about the werror variable.
2721 '-pthread',
2722 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292723 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162724 '-Wall',
[email protected]0fa17082010-03-26 00:48:052725 # TODO(evan): turn this back on once all the builds work.
2726 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202727 # Don't warn about unused function params. We use those everywhere.
2728 '-Wno-unused-parameter',
2729 # Don't warn about the "struct foo f = {0};" initialization pattern.
2730 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122731 # Don't export any symbols (for example, to plugins we dlopen()).
2732 # Note: this is *required* to make some plugins work.
2733 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352734 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242735 ],
2736 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222737 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242738 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362739 # Make inline functions have hidden visiblity by default.
2740 # Surprisingly, not covered by -fvisibility=hidden.
2741 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172742 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2743 # so we specify it explicitly.
2744 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182745 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172746 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262747 ],
[email protected]a6cf87e2009-04-03 04:07:382748 'ldflags': [
[email protected]138241f2010-03-30 23:53:102749 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262750 ],
[email protected]1e013672012-06-29 22:12:202751 'libraries' : [
2752 '<(libraries_for_target)',
2753 ],
[email protected]3aacaf952009-04-02 15:34:092754 'configurations': {
[email protected]5153767c2009-12-22 01:52:502755 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312756 'variables': {
2757 'debug_optimize%': '0',
2758 },
[email protected]3aacaf952009-04-02 15:34:092759 'defines': [
2760 '_DEBUG',
2761 ],
2762 'cflags': [
[email protected]95ad2032012-08-24 00:49:252763 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092764 '-g',
2765 ],
[email protected]da1c8d692011-09-20 20:35:012766 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342767 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:342768 'ldflags': [
[email protected]933d0722013-07-03 04:32:492769 '-Wl,--fatal-warnings',
2770 # Only link with needed input sections. This is to avoid
2771 # getting undefined reference to __cxa_bad_typeid in the CDU
2772 # library.
[email protected]3f05e912013-04-11 20:38:342773 '-Wl,--gc-sections',
[email protected]933d0722013-07-03 04:32:492774 # Warn in case of text relocations.
2775 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:342776 ],
2777 }],
[email protected]36c78a632013-07-03 08:58:362778 ['OS=="android" and android_webview_build==1', {
2779 'ldflags!': [
[email protected]e8831e92013-07-03 20:05:252780 # Must not turn on --fatal-warnings or warn-shared-textrel,
2781 # see crbug.com/157326.
[email protected]36c78a632013-07-03 08:58:362782 '-Wl,--fatal-warnings',
[email protected]e8831e92013-07-03 20:05:252783 '-Wl,--warn-shared-textrel',
[email protected]36c78a632013-07-03 08:58:362784 ],
2785 }],
[email protected]fa9d4e262012-08-21 04:39:002786 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552787 # Some configurations are copied from Release_Base to reduce
2788 # the binary size.
2789 'variables': {
2790 'debug_optimize%': 's',
2791 },
[email protected]da1c8d692011-09-20 20:35:012792 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552793 '-fomit-frame-pointer',
2794 '-fdata-sections',
2795 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012796 ],
[email protected]8a37e4502012-08-14 22:42:552797 'ldflags': [
2798 '-Wl,-O1',
2799 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552800 ],
[email protected]da1c8d692011-09-20 20:35:012801 }],
[email protected]d4c0ec5b2013-03-10 03:07:452802 ['OS=="linux" and target_arch=="ia32"', {
2803 'ldflags': [
2804 '-Wl,--no-as-needed',
2805 ],
2806 }],
[email protected]da1c8d692011-09-20 20:35:012807 ],
[email protected]5315f2842009-04-28 00:43:272808 },
[email protected]5153767c2009-12-22 01:52:502809 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012810 'variables': {
2811 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512812 # Binaries become big and gold is unable to perform GC
2813 # and remove unused sections for some of test targets
2814 # on 32 bit platform.
2815 # (This is currently observed only in chromeos valgrind bots)
2816 # The following flag is to disable --gc-sections linker
2817 # option for these bots.
2818 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122819
2820 # TODO(bradnelson): reexamine how this is done if we change the
2821 # expansion of configurations
2822 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012823 },
[email protected]3aacaf952009-04-02 15:34:092824 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182825 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532826 # Don't emit the GCC version ident directives, they just end up
2827 # in the .comment section taking up binary size.
2828 '-fno-ident',
2829 # Put data and code in their own sections, so that unused symbols
2830 # can be removed at link time with --gc-sections.
2831 '-fdata-sections',
2832 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092833 ],
[email protected]c902f2c2010-08-06 20:04:182834 'ldflags': [
2835 # Specifically tell the linker to perform optimizations.
2836 # See http://lwn.net/Articles/192624/ .
2837 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222838 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182839 ],
[email protected]1dd529642010-05-15 01:02:512840 'conditions' : [
2841 ['no_gc_sections==0', {
2842 'ldflags': [
2843 '-Wl,--gc-sections',
2844 ],
2845 }],
[email protected]da1c8d692011-09-20 20:35:012846 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582847 'variables': {
2848 'release_optimize%': 's',
2849 },
[email protected]da1c8d692011-09-20 20:35:012850 'cflags': [
2851 '-fomit-frame-pointer',
2852 ],
[email protected]933d0722013-07-03 04:32:492853 'ldflags': [
2854 '-Wl,--fatal-warnings',
2855 # Warn in case of text relocations.
2856 '-Wl,--warn-shared-textrel',
2857 ],
[email protected]da1c8d692011-09-20 20:35:012858 }],
[email protected]36c78a632013-07-03 08:58:362859 ['OS=="android" and android_webview_build==1', {
2860 'ldflags!': [
[email protected]e8831e92013-07-03 20:05:252861 # Must not turn on --fatal-warnings or
2862 # shared-text-rel, see crbug.com/157326.
[email protected]36c78a632013-07-03 08:58:362863 '-Wl,--fatal-warnings',
[email protected]e8831e92013-07-03 20:05:252864 '-Wl,--warn-shared-textrel',
[email protected]36c78a632013-07-03 08:58:362865 ],
2866 }],
[email protected]ecf7b6482010-10-13 09:15:202867 ['clang==1', {
2868 'cflags!': [
2869 '-fno-ident',
2870 ],
2871 }],
[email protected]7664ab32011-02-01 23:35:252872 ['profiling==1', {
2873 'cflags': [
2874 '-fno-omit-frame-pointer',
2875 '-g',
2876 ],
[email protected]0358c4832013-06-23 14:17:582877 'conditions' : [
2878 ['profiling_full_stack_frames==1', {
2879 'cflags': [
2880 '-fno-inline',
2881 '-fno-optimize-sibling-calls',
2882 ],
2883 }],
2884 ],
[email protected]7664ab32011-02-01 23:35:252885 }],
[email protected]bdbe3d22013-02-22 04:10:352886 # Can be omitted to reduce output size. Does not seem to affect
2887 # crash reporting.
2888 ['target_arch=="ia32"', {
2889 'cflags': [
2890 '-fno-unwind-tables',
2891 '-fno-asynchronous-unwind-tables',
2892 ],
2893 }],
[email protected]8d726a42012-02-09 03:49:002894 ],
[email protected]3aacaf952009-04-02 15:34:092895 },
2896 },
[email protected]601b540222009-04-03 21:32:042897 'variants': {
2898 'coverage': {
2899 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2900 'ldflags': ['-fprofile-arcs'],
2901 },
2902 'profile': {
2903 'cflags': ['-pg', '-g'],
2904 'ldflags': ['-pg'],
2905 },
2906 'symbols': {
2907 'cflags': ['-g'],
2908 },
2909 },
[email protected]606116d22009-05-06 22:38:232910 'conditions': [
[email protected]04b482602011-09-14 02:36:212911 ['target_arch=="ia32"', {
2912 'target_conditions': [
2913 ['_toolset=="target"', {
2914 'asflags': [
2915 # Needed so that libs with .s files (e.g. libicudata.a)
2916 # are compatible with the general 32-bit-ness.
2917 '-32',
2918 ],
2919 # All floating-point computations on x87 happens in 80-bit
2920 # precision. Because the C and C++ language standards allow
2921 # the compiler to keep the floating-point values in higher
2922 # precision than what's specified in the source and doing so
2923 # is more efficient than constantly rounding up to 64-bit or
2924 # 32-bit precision as specified in the source, the compiler,
2925 # especially in the optimized mode, tries very hard to keep
2926 # values in x87 floating-point stack (in 80-bit precision)
2927 # as long as possible. This has important side effects, that
2928 # the real value used in computation may change depending on
2929 # how the compiler did the optimization - that is, the value
2930 # kept in 80-bit is different than the value rounded down to
2931 # 64-bit or 32-bit. There are possible compiler options to
2932 # make this behavior consistent (e.g. -ffloat-store would keep
2933 # all floating-values in the memory, thus force them to be
2934 # rounded to its original precision) but they have significant
2935 # runtime performance penalty.
2936 #
2937 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2938 # which keep floating-point values in SSE registers in its
2939 # native precision (32-bit for single precision, and 64-bit
2940 # for double precision values). This means the floating-point
2941 # value used during computation does not change depending on
2942 # how the compiler optimized the code, since the value is
2943 # always kept in its specified precision.
2944 'conditions': [
2945 ['branding=="Chromium" and disable_sse2==0', {
2946 'cflags': [
2947 '-march=pentium4',
2948 '-msse2',
2949 '-mfpmath=sse',
2950 ],
2951 }],
2952 # ChromeOS targets Pinetrail, which is sse3, but most of the
2953 # benefit comes from sse2 so this setting allows ChromeOS
2954 # to build on other CPUs. In the future -march=atom would
2955 # help but requires a newer compiler.
2956 ['chromeos==1 and disable_sse2==0', {
2957 'cflags': [
2958 '-msse2',
2959 ],
2960 }],
[email protected]0a0063c52013-03-29 06:36:212961 # Use gold linker for Android ia32 target.
2962 ['OS=="android"', {
2963 'cflags': [
2964 '-fuse-ld=gold',
2965 ],
2966 'ldflags': [
2967 '-fuse-ld=gold',
2968 ],
2969 }],
[email protected]04b482602011-09-14 02:36:212970 # Install packages have started cropping up with
2971 # different headers between the 32-bit and 64-bit
2972 # versions, so we have to shadow those differences off
2973 # and make sure a 32-bit-on-64-bit build picks up the
2974 # right files.
[email protected]32594022012-05-10 03:22:282975 # For android build, use NDK headers instead of host headers
2976 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212977 'include_dirs+': [
2978 '/usr/include32',
2979 ],
2980 }],
2981 ],
2982 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2983 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062984 'cflags': [
[email protected]04b482602011-09-14 02:36:212985 '-m32',
2986 '-mmmx',
2987 ],
2988 'ldflags': [
2989 '-m32',
[email protected]ffde7932009-05-29 00:39:062990 ],
2991 }],
[email protected]606116d22009-05-06 22:38:232992 ],
2993 }],
[email protected]3dda8a962009-08-10 18:58:072994 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292995 'target_conditions': [
2996 ['_toolset=="target"', {
2997 'cflags_cc': [
2998 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2999 # has changed whenever it encounters a varargs function. This
3000 # silences those warnings, as they are not helpful and
3001 # clutter legitimate warnings.
3002 '-Wno-abi',
3003 ],
3004 'conditions': [
[email protected]7d6763422013-04-26 12:06:543005 ['arm_arch!=""', {
3006 'cflags': [
3007 '-march=<(arm_arch)',
3008 ],
3009 }],
3010 ['arm_tune!=""', {
3011 'cflags': [
3012 '-mtune=<(arm_tune)',
3013 ],
3014 }],
3015 ['arm_fpu!=""', {
3016 'cflags': [
3017 '-mfpu=<(arm_fpu)',
3018 ],
3019 }],
3020 ['arm_float_abi!=""', {
3021 'cflags': [
3022 '-mfloat-abi=<(arm_float_abi)',
3023 ],
3024 }],
3025 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293026 'cflags': [
3027 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293028 ]
3029 }],
[email protected]da1c8d692011-09-20 20:35:013030 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533031 # Most of the following flags are derived from what Android
3032 # uses by default when building for arm, reference for which
3033 # can be found in the following file in the Android NDK:
3034 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3035 'cflags': [
3036 # The tree-sra optimization (scalar replacement for
3037 # aggregates enabling subsequent optimizations) leads to
3038 # invalid code generation when using the Android NDK's
3039 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433040 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533041 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483042 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533043 '-Wno-psabi',
3044 ],
[email protected]ad17e342012-07-17 20:45:483045 # Android now supports .relro sections properly.
3046 # NOTE: While these flags enable the generation of .relro
3047 # sections, the generated libraries can still be loaded on
3048 # older Android platform versions.
3049 'ldflags': [
3050 '-Wl,-z,relro',
3051 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483052 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483053 ],
[email protected]da1c8d692011-09-20 20:35:013054 'conditions': [
[email protected]7d6763422013-04-26 12:06:543055 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223056 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013057 }],
[email protected]4c48ef102012-11-29 22:00:383058 ['profiling==1', {
3059 'cflags': [
3060 '-marm', # Probably reduntant, but recommend by "perf" docs.
3061 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3062 ],
3063 }],
[email protected]220ea5932012-08-09 10:44:073064 ['clang==1', {
3065 'cflags!': [
3066 # Clang does not support the following options.
3067 '-mthumb-interwork',
3068 '-finline-limit=64',
3069 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483070 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073071 '-Wno-psabi',
3072 ],
3073 }],
[email protected]da1c8d692011-09-20 20:35:013074 ],
3075 }],
[email protected]3dda8a962009-08-10 18:58:073076 ],
3077 }],
3078 ],
3079 }],
[email protected]23eea4a42013-04-27 04:10:263080 ['target_arch=="mipsel"', {
3081 'target_conditions': [
3082 ['_toolset=="target"', {
3083 'conditions': [
[email protected]3a626e02013-06-27 12:58:343084 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263085 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343086 }],
3087 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263088 'cflags': ['-mips32', '-Wa,-mips32'],
3089 }],
3090 ],
3091 'cflags': [
3092 '-EL',
3093 '-mhard-float',
3094 ],
3095 'ldflags': [
3096 '-EL',
3097 '-Wl,--no-keep-memory'
3098 ],
3099 'cflags_cc': [
3100 '-Wno-uninitialized',
3101 ],
3102 }],
3103 ],
3104 }],
[email protected]2fb843b2010-08-12 02:11:083105 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583106 'cflags': [
3107 '-fPIC',
3108 ],
[email protected]d3f692b32011-12-14 19:04:353109 'ldflags': [
3110 '-fPIC',
3111 ],
[email protected]c76723a2010-01-25 23:10:583112 }],
[email protected]ee28c9f2009-09-04 01:53:013113 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573114 'target_conditions': [
3115 ['_toolset=="target"', {
3116 'cflags': [
3117 '--sysroot=<(sysroot)',
3118 ],
3119 'ldflags': [
3120 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153121 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573122 ],
3123 }]]
[email protected]ee28c9f2009-09-04 01:53:013124 }],
[email protected]58680ce2010-09-18 00:09:153125 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123126 'cflags': [
3127 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073128
[email protected]7ddcb1d2013-04-19 04:52:533129 # Don't die on dtoa code that uses a char as an array index.
3130 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073131
3132 # Clang spots more unused functions.
3133 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103134
3135 # Warns on switches on enums that cover all enum values but
3136 # also contain a default: branch. Chrome is full of that.
3137 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513138
3139 # Warns when a const char[] is converted to bool.
3140 '-Wstring-conversion',
[email protected]ce889c22013-07-16 22:37:183141
3142 # C++11-related flags:
3143
[email protected]8dec02e2013-04-30 21:40:073144 # This warns on using ints as initializers for floats in
3145 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3146 # which happens in several places in chrome code. Not sure if
3147 # this is worth fixing.
3148 '-Wno-c++11-narrowing',
3149
[email protected]00c83cc2013-07-25 00:55:503150 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:073151 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243152
3153 # Clang considers the `register` keyword as deprecated, but e.g.
3154 # code generated by flex (used in angle) contains that keyword.
3155 # http://crbug.com/255186
3156 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073157 ],
[email protected]ce889c22013-07-16 22:37:183158 'cflags!': [
3159 # Clang doesn't seem to know know this flag.
3160 '-mfpmath=sse',
3161 ],
[email protected]8dec02e2013-04-30 21:40:073162 'cflags_cc': [
3163 # See the comment in the Mac section for what it takes to move
3164 # this to -std=c++11.
3165 '-std=gnu++11',
3166 ],
3167 }],
[email protected]bca3e082013-05-30 21:13:443168 ['clang==1 and OS=="android"', {
[email protected]ce889c22013-07-16 22:37:183169 # Android uses stlport, whose include/new defines
3170 # `void operator delete[](void* ptr) throw();`, which
3171 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3172 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3173 # via -isystem instead.
3174 'cflags_cc': [
3175 '-Wno-implicit-exception-spec-mismatch',
[email protected]8dec02e2013-04-30 21:40:073176 ],
3177 }],
[email protected]5d451ad2011-02-11 16:43:463178 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263179 'cflags': [
[email protected]c872dc52012-05-19 06:36:313180 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263181 ],
[email protected]5d451ad2011-02-11 16:43:463182 }],
[email protected]4a9ac22e2011-12-02 03:41:533183 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263184 'cflags': [
3185 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533186 ],
3187 }],
3188 ['clang==1 and clang_add_plugin!=""', {
3189 'cflags': [
[email protected]d23720682011-08-11 00:16:263190 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3191 ],
[email protected]5e781232011-01-28 02:57:593192 }],
[email protected]49110f02013-04-22 22:51:343193 ['clang==1 and target_arch=="ia32"', {
3194 'cflags': [
3195 # Else building libyuv gives clang's register allocator issues,
3196 # see llvm.org/PR15798 / crbug.com/233709
3197 '-momit-leaf-frame-pointer',
3198 ],
3199 }],
[email protected]2616d45d2012-01-19 03:15:483200 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3201 'cflags': [
3202 # See http://crbug.com/110262
3203 '-fcolor-diagnostics',
3204 ],
3205 }],
[email protected]062522a2013-06-13 15:49:553206 # Common options for AddressSanitizer, LeakSanitizer,
3207 # ThreadSanitizer and MemorySanitizer.
3208 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543209 'target_conditions': [
3210 ['_toolset=="target"', {
3211 'cflags': [
3212 '-fno-omit-frame-pointer',
3213 '-gline-tables-only',
3214 ],
[email protected]49110f02013-04-22 22:51:343215 'ldflags!': [
3216 # Functions interposed by the sanitizers can make ld think
3217 # that some libraries aren't needed when they actually are,
3218 # http://crbug.com/234010. As workaround, disable --as-needed.
3219 '-Wl,--as-needed',
3220 ],
[email protected]2f047202013-06-14 06:36:393221 'defines': [
3222 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3223 ],
[email protected]cf351c22013-04-19 13:00:543224 }],
[email protected]a26740dd2013-05-28 11:50:493225 ['_toolset=="target" and OS=="linux"', {
3226 'ldflags': [
3227 # http://crbug.com/234010.
3228 '-lrt',
3229 ],
3230 }],
[email protected]cf351c22013-04-19 13:00:543231 ],
3232 }],
[email protected]92799b632011-08-15 14:33:063233 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423234 'target_conditions': [
3235 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453236 'cflags': [
[email protected]48688df02012-11-27 21:04:563237 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563238 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453239 ],
3240 'ldflags': [
[email protected]48688df02012-11-27 21:04:563241 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453242 ],
3243 'defines': [
3244 'ADDRESS_SANITIZER',
3245 ],
[email protected]1ffc3b3962012-05-16 14:08:423246 }],
[email protected]921c7b52011-11-25 10:34:353247 ],
[email protected]1d3bc322013-04-12 14:26:373248 'conditions': [
3249 ['OS=="mac"', {
3250 'cflags': [
3251 '-mllvm -asan-globals=0', # http://crbug.com/196561
3252 ],
3253 }],
3254 ],
[email protected]92799b632011-08-15 14:33:063255 }],
[email protected]062522a2013-06-13 15:49:553256 ['lsan==1', {
3257 'target_conditions': [
3258 ['_toolset=="target"', {
3259 'cflags': [
3260 '-fsanitize=leak',
3261 ],
3262 'ldflags': [
3263 '-fsanitize=leak',
3264 ],
3265 'defines': [
3266 'LEAK_SANITIZER',
3267 ],
3268 }],
3269 ],
3270 }],
[email protected]c9a829272012-07-04 07:51:123271 ['tsan==1', {
3272 'target_conditions': [
3273 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453274 'cflags': [
[email protected]927a9d672012-11-09 11:28:203275 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293276 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203277 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453278 ],
3279 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203280 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453281 ],
3282 'defines': [
3283 'THREAD_SANITIZER',
3284 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163285 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453286 ],
3287 'target_conditions': [
3288 ['_type=="executable"', {
3289 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123290 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453291 ],
3292 }],
3293 ],
[email protected]c9a829272012-07-04 07:51:123294 }],
3295 ],
3296 }],
[email protected]a10ddd2d2013-02-26 20:06:593297 ['msan==1', {
3298 'target_conditions': [
3299 ['_toolset=="target"', {
3300 'cflags': [
3301 '-fsanitize=memory',
3302 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593303 '-fPIC',
3304 ],
3305 'ldflags': [
3306 '-fsanitize=memory',
3307 ],
3308 'defines': [
3309 'MEMORY_SANITIZER',
3310 ],
3311 'target_conditions': [
3312 ['_type=="executable"', {
3313 'ldflags': [
3314 '-pie',
3315 ],
3316 }],
3317 ],
3318 }],
3319 ],
3320 }],
[email protected]8a48f3f2012-12-04 20:14:043321 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443322 'target_conditions' : [
3323 ['_toolset=="target"', {
3324 'cflags': [
3325 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453326 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:243327 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:453328 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443329 ],
3330 }],
[email protected]82e9b002013-07-16 21:04:243331 ['_toolset=="target" and OS=="android"', {
3332 'cflags': [
3333 # Avoids errors with current NDK:
3334 # "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"
3335 '-finstrument-functions-exclude-file-list=arm_neon.h',
3336 ],
3337 }],
[email protected]8a6abd12012-05-16 10:04:443338 ],
3339 }],
[email protected]ce4367d2013-01-15 16:13:103340 ['linux_dump_symbols==1', {
3341 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253342 'conditions': [
[email protected]791262fe2013-02-21 17:20:153343 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253344 'target_conditions': [
3345 ['_toolset=="target"', {
3346 'ldflags': [
[email protected]567370a32013-03-01 00:11:233347 # Workaround for linker OOM.
3348 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253349 ],
3350 }],
3351 ],
3352 }],
3353 ],
[email protected]cbd5fd52009-08-26 00:14:273354 }],
[email protected]d8b60602010-03-26 09:41:223355 ['linux_use_heapchecker==1', {
3356 'variables': {'linux_use_tcmalloc%': 1},
[email protected]2f047202013-06-14 06:36:393357 'defines': [
[email protected]bba0fea32013-06-14 12:29:353358 'USE_HEAPCHECKER',
[email protected]2f047202013-06-14 06:36:393359 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3360 ],
[email protected]272ef0b2013-05-14 12:32:453361 'conditions': [
3362 ['component=="shared_library"', {
3363 # See crbug.com/112389
3364 # TODO(glider): replace with --dynamic-list or something
3365 'ldflags': ['-rdynamic'],
3366 }],
3367 ],
[email protected]d8b60602010-03-26 09:41:223368 }],
[email protected]3c8fe5482013-05-22 15:17:033369 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083370 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243371 }],
[email protected]64e2d4a42010-08-27 10:13:213372 ['linux_keep_shadow_stacks==1', {
3373 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513374 'cflags': [
3375 '-finstrument-functions',
3376 # Allow mmx intrinsics to inline, so that the compiler can expand
3377 # the intrinsics.
3378 '-finstrument-functions-exclude-file-list=mmintrin.h',
3379 ],
[email protected]64e2d4a42010-08-27 10:13:213380 }],
[email protected]8d726a42012-02-09 03:49:003381 ['linux_use_gold_flags==1', {
[email protected]c5a6fe42013-07-21 14:03:333382 'target_conditions': [
3383 ['_toolset=="target"', {
3384 'ldflags': [
3385 # Experimentation found that using four linking threads
3386 # saved ~20% of link time.
3387 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3388 # Only apply this to the target linker, since the host
3389 # linker might not be gold, but isn't used much anyway.
3390 '-Wl,--threads',
3391 '-Wl,--thread-count=4',
3392 ],
3393 }],
[email protected]68d01e82012-12-08 03:36:323394 ],
[email protected]8d726a42012-02-09 03:49:003395 'conditions': [
3396 ['release_valgrind_build==0', {
3397 'target_conditions': [
3398 ['_toolset=="target"', {
3399 'ldflags': [
3400 # There seems to be a conflict of --icf and -pie
3401 # in gold which can generate crashy binaries. As
3402 # a security measure, -pie takes precendence for
3403 # now.
3404 #'-Wl,--icf=safe',
3405 '-Wl,--icf=none',
3406 ],
3407 }],
3408 ],
3409 }],
3410 ],
3411 }],
[email protected]b07806c12012-02-03 22:44:593412 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593413 'ldflags': [
3414 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443415 # We pass the path to gold to the compiler. gyp leaves
3416 # unspecified what the cwd is when running the compiler,
3417 # so the normal gyp path-munging fails us. This hack
3418 # gets the right path.
3419 '-B<(PRODUCT_DIR)/../../third_party/gold',
[email protected]b07806c12012-02-03 22:44:593420 ],
3421 }],
[email protected]1591c44d2013-07-15 13:28:433422 ['native_discardable_memory', {
3423 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
3424 }],
3425 ['native_memory_pressure_signals', {
3426 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
3427 }],
[email protected]606116d22009-05-06 22:38:233428 ],
[email protected]9d384032009-03-20 23:13:263429 },
3430 }],
[email protected]c51e8d52009-12-11 20:04:063431 # FreeBSD-specific options; note that most FreeBSD options are set above,
3432 # with Linux.
3433 ['OS=="freebsd"', {
3434 'target_defaults': {
3435 'ldflags': [
3436 '-Wl,--no-keep-memory',
3437 ],
3438 },
3439 }],
[email protected]da1c8d692011-09-20 20:35:013440 # Android-specific options; note that most are set above with Linux.
3441 ['OS=="android"', {
3442 'variables': {
[email protected]25036722012-12-11 10:36:173443 # This is a unique identifier for a given build. It's used for
3444 # identifying various build artifacts corresponding to a particular
3445 # build of chrome (e.g. where to find archived symbols).
3446 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013447 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013448 # Use shared stlport library when system one used.
3449 # Figure this out early since it needs symbols from libgcc.a, so it
3450 # has to be before that in the set of libraries.
3451 ['use_system_stlport==1', {
3452 'android_stlport_library': 'stlport',
3453 }, {
[email protected]806b5232012-11-19 21:19:043454 'conditions': [
3455 ['component=="shared_library"', {
3456 'android_stlport_library': 'stlport_shared',
3457 }, {
3458 'android_stlport_library': 'stlport_static',
3459 }],
3460 ],
[email protected]da1c8d692011-09-20 20:35:013461 }],
3462 ],
3463
3464 # Placing this variable here prevents from forking libvpx, used
3465 # by remoting. Remoting is off, so it needn't built,
3466 # so forking it's deps seems like overkill.
3467 # But this variable need defined to properly run gyp.
3468 # A proper solution is to have an OS==android conditional
3469 # in third_party/libvpx/libvpx.gyp to define it.
3470 'libvpx_path': 'lib/linux/arm',
3471 },
3472 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013473 'variables': {
3474 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593475 'conditions': [
3476 # If we're using the components build, append "cr" to all shared
3477 # libraries to avoid naming collisions with android system library
3478 # versions with the same name (e.g. skia, icu).
3479 ['component=="shared_library"', {
3480 'android_product_extension': 'cr.so',
3481 }, {
3482 'android_product_extension': 'so',
3483 } ],
3484 ],
[email protected]8a37e4502012-08-14 22:42:553485 },
[email protected]da1c8d692011-09-20 20:35:013486 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593487 ['_type=="shared_library"', {
3488 'product_extension': '<(android_product_extension)',
3489 }],
3490
[email protected]da1c8d692011-09-20 20:35:013491 # Settings for building device targets using Android's toolchain.
3492 # These are based on the setup.mk file from the Android NDK.
3493 #
3494 # The NDK Android executable link step looks as follows:
3495 # $LDFLAGS
3496 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3497 # $(PRIVATE_OBJECTS) <-- The .o that we built
3498 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3499 # $(TARGET_LIBGCC) <-- libgcc.a
3500 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3501 # $(PRIVATE_LDLIBS) <-- System .so
3502 # $(TARGET_CRTEND_O) <-- crtend.o
3503 #
3504 # For now the above are approximated for executables by adding
3505 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3506 # of 'libraries'.
3507 #
3508 # The NDK Android shared library link step looks as follows:
3509 # $LDFLAGS
3510 # $(PRIVATE_OBJECTS) <-- The .o that we built
3511 # -l,--whole-archive
3512 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3513 # -l,--no-whole-archive
3514 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3515 # $(TARGET_LIBGCC) <-- libgcc.a
3516 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3517 # $(PRIVATE_LDLIBS) <-- System .so
3518 #
[email protected]ad17e342012-07-17 20:45:483519 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013520 #
3521 # For both executables and shared libraries, add the proper
3522 # libgcc.a to the start of libraries which puts it in the
3523 # proper spot after .o and .a files get linked in.
3524 #
3525 # TODO: The proper thing to do longer-tem would be proper gyp
3526 # support for a custom link command line.
3527 ['_toolset=="target"', {
3528 'cflags!': [
3529 '-pthread', # Not supported by Android toolchain.
3530 ],
3531 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013532 '-ffunction-sections',
3533 '-funwind-tables',
3534 '-g',
3535 '-fstack-protector',
3536 '-fno-short-enums',
3537 '-finline-limit=64',
3538 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013539 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013540 ],
3541 'defines': [
3542 'ANDROID',
3543 '__GNU_SOURCE=1', # Necessary for clone()
3544 'USE_STLPORT=1',
3545 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173546 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013547 ],
3548 'ldflags!': [
3549 '-pthread', # Not supported by Android toolchain.
3550 ],
3551 'ldflags': [
3552 '-nostdlib',
3553 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013554 # Don't export symbols from statically linked libraries.
3555 '-Wl,--exclude-libs=ALL',
3556 ],
[email protected]a0e48b02011-11-22 07:53:013557 'libraries': [
3558 '-l<(android_stlport_library)',
3559 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043560 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013561 '-lc',
3562 '-ldl',
[email protected]a0e48b02011-11-22 07:53:013563 '-lm',
[email protected]da1c8d692011-09-20 20:35:013564 ],
3565 'conditions': [
[email protected]806b5232012-11-19 21:19:043566 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473567 'ldflags!': [
3568 '-Wl,--exclude-libs=ALL',
3569 ],
[email protected]806b5232012-11-19 21:19:043570 }],
[email protected]220ea5932012-08-09 10:44:073571 ['clang==1', {
3572 'cflags': [
3573 # Work around incompatibilities between bionic and clang
3574 # headers.
3575 '-D__compiler_offsetof=__builtin_offsetof',
3576 '-Dnan=__builtin_nan',
3577 ],
3578 'conditions': [
3579 ['target_arch=="arm"', {
3580 'cflags': [
3581 '-target arm-linux-androideabi',
3582 '-mllvm -arm-enable-ehabi',
3583 ],
3584 'ldflags': [
3585 '-target arm-linux-androideabi',
3586 ],
3587 }],
3588 ['target_arch=="ia32"', {
3589 'cflags': [
3590 '-target x86-linux-androideabi',
3591 ],
3592 'ldflags': [
3593 '-target x86-linux-androideabi',
3594 ],
3595 }],
3596 ],
3597 }],
[email protected]ed70ed1862012-11-07 12:11:253598 ['asan==1', {
3599 'cflags': [
3600 # Android build relies on -Wl,--gc-sections removing
3601 # unreachable code. ASan instrumentation for globals inhibits
3602 # this and results in a library with unresolvable relocations.
3603 # TODO(eugenis): find a way to reenable this.
3604 '-mllvm -asan-globals=0',
3605 ],
3606 }],
[email protected]d999c3cb2013-03-12 10:22:363607 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463608 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573609 # The NDK has these things, but doesn't define the constants
3610 # to say that it does. Define them here instead.
3611 'HAVE_SYS_UIO_H',
3612 ],
3613 'cflags': [
3614 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463615 ],
[email protected]da1c8d692011-09-20 20:35:013616 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523617 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013618 ],
3619 }],
[email protected]d999c3cb2013-03-12 10:22:363620 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083621 'include_dirs': [
3622 # OpenAL headers from the Android tree.
3623 '<(android_src)/frameworks/wilhelm/include',
3624 ],
3625 'cflags': [
[email protected]04882132012-11-21 12:40:453626 # Android predefines this as 1; undefine it here so Chromium
3627 # can redefine it later to be 2 for chromium code and unset
3628 # for third party code. This works because cflags are added
3629 # before defines.
3630 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553631 # Disable any additional warnings enabled by the Android build system but which
3632 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083633 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553634 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3635 '-Wno-ignored-qualifiers',
3636 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083637 ],
3638 'cflags_cc': [
3639 # Disabling c++0x-compat should be handled in WebKit, but
3640 # this currently doesn't work because gcc_version is not set
3641 # correctly when building with the Android build system.
3642 # TODO(torne): Fix this in WebKit.
3643 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163644 # Other things unrelated to -Wextra:
3645 '-Wno-non-virtual-dtor',
3646 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083647 ],
3648 }],
[email protected]d999c3cb2013-03-12 10:22:363649 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083650 'cflags': [
3651 # There is a class of warning which:
3652 # 1) Android always enables and also treats as errors
3653 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163654 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553655 '-Wno-address',
3656 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553657 '-Wno-return-type',
3658 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083659 ],
[email protected]2f34a202013-03-11 13:59:163660 'cflags_cc': [
3661 '-Wno-non-virtual-dtor',
3662 ]
[email protected]0d7291e2012-10-04 19:16:083663 }],
[email protected]febd3572012-05-03 09:17:453664 ['target_arch == "arm"', {
3665 'ldflags': [
3666 # Enable identical code folding to reduce size.
3667 '-Wl,--icf=safe',
3668 ],
3669 }],
[email protected]da1c8d692011-09-20 20:35:013670 # NOTE: The stlport header include paths below are specified in
3671 # cflags rather than include_dirs because they need to come
3672 # after include_dirs. Think of them like system headers, but
3673 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3674 # toolchain (circa Gingerbread) will exhibit strange errors.
3675 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513676 ['use_system_stlport==1', {
3677 'cflags': [
3678 # For libstdc++/include, which is used by stlport.
3679 '-I<(android_src)/bionic',
3680 '-I<(android_src)/external/stlport/stlport',
3681 ],
3682 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013683 'cflags': [
[email protected]225ec632013-04-03 18:20:223684 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013685 ],
[email protected]225ec632013-04-03 18:20:223686 'ldflags': [
3687 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013688 ],
3689 }],
3690 ['target_arch=="ia32"', {
3691 # The x86 toolchain currently has problems with stack-protector.
3692 'cflags!': [
3693 '-fstack-protector',
3694 ],
3695 'cflags': [
3696 '-fno-stack-protector',
3697 ],
3698 }],
3699 ],
3700 'target_conditions': [
3701 ['_type=="executable"', {
3702 'ldflags': [
3703 '-Bdynamic',
3704 '-Wl,-dynamic-linker,/system/bin/linker',
3705 '-Wl,--gc-sections',
3706 '-Wl,-z,nocopyreloc',
3707 # crtbegin_dynamic.o should be the last item in ldflags.
3708 '<(android_ndk_lib)/crtbegin_dynamic.o',
3709 ],
3710 'libraries': [
3711 # crtend_android.o needs to be the last item in libraries.
3712 # Do not add any libraries after this!
3713 '<(android_ndk_lib)/crtend_android.o',
3714 ],
[email protected]63a131fd2012-11-06 16:01:213715 'conditions': [
3716 ['asan==1', {
3717 'cflags': [
3718 '-fPIE',
3719 ],
3720 'ldflags': [
3721 '-pie',
3722 ],
3723 }],
3724 ],
[email protected]da1c8d692011-09-20 20:35:013725 }],
[email protected]f5c7758a2012-07-25 16:17:573726 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013727 'ldflags': [
3728 '-Wl,-shared,-Bsymbolic',
3729 ],
[email protected]d093fe8b2013-04-30 18:00:233730 'conditions': [
3731 ['android_webview_build==0', {
3732 'ldflags': [
3733 # crtbegin_so.o should be the last item in ldflags.
3734 '<(android_ndk_lib)/crtbegin_so.o',
3735 ],
3736 'libraries': [
3737 # crtend_so.o needs to be the last item in libraries.
3738 # Do not add any libraries after this!
3739 '<(android_ndk_lib)/crtend_so.o',
3740 ],
3741 }],
[email protected]a08029b42012-04-25 03:18:463742 ],
[email protected]da1c8d692011-09-20 20:35:013743 }],
[email protected]7b1eac42013-05-09 20:55:133744 # ndk-build copies .a's around the filesystem, breaking
3745 # relative paths in thin archives. Disable using thin
3746 # archives to avoid problems until one of these is fixed:
3747 # http://code.google.com/p/android/issues/detail?id=40302
3748 # http://code.google.com/p/android/issues/detail?id=40303
3749 ['_type=="static_library"', {
3750 'standalone_static_library': 1,
3751 }],
[email protected]da1c8d692011-09-20 20:35:013752 ],
3753 }],
3754 # Settings for building host targets using the system toolchain.
3755 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123756 'cflags!': [
3757 # Due to issues in Clang build system, using ASan on 32-bit
3758 # binaries on x86_64 host is problematic.
3759 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563760 '-fsanitize=address',
3761 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123762 ],
[email protected]da1c8d692011-09-20 20:35:013763 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443764 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013765 '-Wl,-z,noexecstack',
3766 '-Wl,--gc-sections',
3767 '-Wl,-O1',
3768 '-Wl,--as-needed',
3769 ],
3770 }],
[email protected]0ccf578f2013-03-13 11:13:393771 # Settings for building host targets on mac.
3772 ['_toolset=="host" and host_os=="mac"', {
3773 'ldflags!': [
3774 '-Wl,-z,now',
3775 '-Wl,-z,relro',
3776 ],
3777 }],
[email protected]da1c8d692011-09-20 20:35:013778 ],
3779 },
3780 }],
[email protected]93f21e42010-04-01 00:35:153781 ['OS=="solaris"', {
3782 'cflags!': ['-fvisibility=hidden'],
3783 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3784 }],
[email protected]1e013672012-06-29 22:12:203785 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553786 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423787 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553788 'xcode_settings': {
3789 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243790 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3791 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043792 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3793 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043794 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3795 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3796 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253797 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3798 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043799 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3800 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3801 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3802 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553803 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043804 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553805 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043806 'WARNING_CFLAGS': [
3807 '-Wall',
3808 '-Wendif-labels',
3809 '-Wextra',
3810 # Don't warn about unused function parameters.
3811 '-Wno-unused-parameter',
3812 # Don't warn about the "struct foo f = {0};" initialization
3813 # pattern.
3814 '-Wno-missing-field-initializers',
3815 ],
[email protected]b3fb8092009-03-12 19:09:243816 'conditions': [
3817 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593818 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3819 ],
[email protected]2936b8c2012-10-29 10:57:313820 # Note that the prebuilt Clang binaries should not be used for iOS
3821 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283822 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303823 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3824 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383825
[email protected]6c648f12011-12-24 07:50:433826 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533827 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433828 # override keyword is used via the OVERRIDE macro from
3829 # base/compiler_specific.h.
3830 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443831 # Warn if automatic synthesis is triggered with
3832 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533833 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303834 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283835 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073836 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523837
3838 # This warns on using ints as initializers for floats in
3839 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3840 # which happens in several places in chrome code. Not sure if
3841 # this is worth fixing.
3842 '-Wno-c++11-narrowing',
3843
[email protected]66733172010-09-22 00:09:283844 # Don't die on dtoa code that uses a char as an array index.
3845 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3846 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073847
[email protected]25d3bb722010-11-22 14:31:453848 # Clang spots more unused functions.
3849 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103850
3851 # Warns on switches on enums that cover all enum values but
3852 # also contain a default: branch. Chrome is full of that.
3853 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513854
3855 # Warns when a const char[] is converted to bool.
3856 '-Wstring-conversion',
[email protected]361b47c2013-07-02 15:13:243857
3858 # Clang considers the `register` keyword as deprecated, but e.g.
3859 # code generated by flex (used in angle) contains that keyword.
3860 # http://crbug.com/255186
3861 '-Wno-deprecated-register',
[email protected]66733172010-09-22 00:09:283862 ],
[email protected]c67e8ca2012-12-04 16:01:523863 'OTHER_CPLUSPLUSFLAGS': [
[email protected]a7cd1a52013-05-09 00:27:443864 # gnu++11 instead of c++11 is needed because some code uses
3865 # typeof() (a GNU extension).
[email protected]c67e8ca2012-12-04 16:01:523866 # TODO(thakis): Eventually switch this to c++11 instead of
3867 # gnu++11 (once typeof can be removed, which is blocked on c++11
3868 # being available everywhere).
[email protected]a7cd1a52013-05-09 00:27:443869 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3870 # bots use xcode 4 -- http://crbug.com/147515).
[email protected]c67e8ca2012-12-04 16:01:523871 '$(inherited)', '-std=gnu++11',
3872 ],
[email protected]66733172010-09-22 00:09:283873 }],
[email protected]2fccd422013-05-21 21:27:573874 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:463875 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313876 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463877 ],
3878 }],
[email protected]4a9ac22e2011-12-02 03:41:533879 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593880 'OTHER_CFLAGS': [
3881 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533882 ],
3883 }],
3884 ['clang==1 and clang_add_plugin!=""', {
3885 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593886 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3887 ],
3888 }],
[email protected]2616d45d2012-01-19 03:15:483889 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3890 'OTHER_CFLAGS': [
3891 # See http://crbug.com/110262
3892 '-fcolor-diagnostics',
3893 ],
3894 }],
[email protected]b3fb8092009-03-12 19:09:243895 ],
[email protected]2f80c312009-02-25 21:26:553896 },
[email protected]34f40892011-09-06 21:53:303897 'conditions': [
3898 ['clang==1', {
3899 'variables': {
3900 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3901 },
3902 }],
[email protected]921c7b52011-11-25 10:34:353903 ['asan==1', {
3904 'xcode_settings': {
3905 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563906 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373907 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563908 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353909 ],
[email protected]921c7b52011-11-25 10:34:353910 },
3911 'defines': [
3912 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:393913 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:353914 ],
3915 }],
[email protected]34f40892011-09-06 21:53:303916 ],
[email protected]2f80c312009-02-25 21:26:553917 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553918 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463919 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083920 'conditions': [
3921 ['asan==1', {
3922 'xcode_settings': {
3923 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443924 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083925 ],
3926 },
3927 }],
3928 ],
[email protected]5d7dc972009-04-16 15:30:463929 }],
3930 ['_mac_bundle', {
3931 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313932 'target_conditions': [
3933 ['_type=="executable"', {
3934 'conditions': [
3935 ['asan==1', {
3936 'postbuilds': [
3937 {
3938 'variables': {
3939 # Define copy_asan_dylib_path in a variable ending in
3940 # _path so that gyp understands it's a path and
3941 # performs proper relativization during dict merging.
3942 'copy_asan_dylib_path':
3943 'mac/copy_asan_runtime_dylib.sh',
3944 },
3945 'postbuild_name': 'Copy ASan runtime dylib',
3946 'action': [
3947 '<(copy_asan_dylib_path)',
3948 ],
3949 },
3950 ],
3951 }],
3952 ],
3953 }],
3954 ],
[email protected]87fde4a2009-02-28 00:50:083955 }],
[email protected]2936b8c2012-10-29 10:57:313956 ], # target_conditions
3957 }, # target_defaults
3958 }], # OS=="mac" or OS=="ios"
3959 ['OS=="mac"', {
3960 'target_defaults': {
3961 'variables': {
3962 # These should end with %, but there seems to be a bug with % in
3963 # variables that are intended to be set to different values in
3964 # different targets, like these.
3965 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313966 # Strip debugging symbols from the target.
3967 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373968 'conditions': [
3969 ['asan==1', {
3970 'conditions': [
3971 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353972 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373973 }, {
3974 'mac_real_dsym': '<(mac_want_real_dsym)'
3975 }],
3976 ],
3977 }, {
3978 'conditions': [
3979 ['mac_want_real_dsym=="default"', {
3980 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3981 }, {
3982 'mac_real_dsym': '<(mac_want_real_dsym)'
3983 }],
3984 ],
3985 }],
3986 ],
[email protected]2936b8c2012-10-29 10:57:313987 },
3988 'xcode_settings': {
3989 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3990 # (Equivalent to -fPIC)
3991 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3992 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3993 # Keep pch files below xcodebuild/.
3994 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:393995 'OTHER_CFLAGS': [
3996 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
3997 # xcode_setting, but not until all downstream projects' mac bots are
3998 # using xcode >= 4.6, because that's when the default value of the
3999 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4000 # setting is a no-op as far as xcode is concerned, but the compiler
4001 # behaves differently based on whether -fno-strict-aliasing is
4002 # specified or not.
4003 '-fno-strict-aliasing', # See http://crbug.com/32204.
4004 ],
[email protected]2936b8c2012-10-29 10:57:314005 },
4006 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:104007 ['_type=="executable"', {
4008 'postbuilds': [
4009 {
4010 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:364011 # code execution when running on Mac OS X 10.7 ("Lion"), and
4012 # ensures that the position-independent executable (PIE) bit
4013 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:104014 'variables': {
[email protected]8c40f322011-08-24 03:33:364015 # Define change_mach_o_flags in a variable ending in _path
4016 # so that GYP understands it's a path and performs proper
4017 # relativization during dict merging.
4018 'change_mach_o_flags_path':
4019 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:174020 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134021 ],
4022 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174023 ['mac_pie==0 or release_valgrind_build==1', {
4024 # Don't enable PIE if it's unwanted. It's unwanted if
4025 # the target specifies mac_pie=0 or if building for
4026 # Valgrind, because Valgrind doesn't understand slide.
4027 # See the similar mac_pie/release_valgrind_build check
4028 # below.
[email protected]081c0342011-08-24 14:59:134029 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134030 '--no-pie',
4031 ],
4032 }],
4033 ],
[email protected]6303fed2011-08-11 01:12:104034 },
[email protected]8c40f322011-08-24 03:33:364035 'postbuild_name': 'Change Mach-O Flags',
4036 'action': [
4037 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134038 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364039 ],
[email protected]6303fed2011-08-11 01:12:104040 },
4041 ],
[email protected]5a5d97aa2011-09-02 15:34:004042 'conditions': [
4043 ['asan==1', {
4044 'variables': {
4045 'asan_saves_file': 'asan.saves',
4046 },
4047 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564048 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004049 },
4050 }],
4051 ],
[email protected]162407f2011-09-08 15:33:174052 'target_conditions': [
4053 ['mac_pie==1 and release_valgrind_build==0', {
4054 # Turn on position-independence (ASLR) for executables. When
4055 # PIE is on for the Chrome executables, the framework will
4056 # also be subject to ASLR.
4057 # Don't do this when building for Valgrind, because Valgrind
4058 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4059 # understand slide, and get rid of the Valgrind check.
4060 'xcode_settings': {
4061 'OTHER_LDFLAGS': [
4062 '-Wl,-pie', # Position-independent executable (MH_PIE)
4063 ],
4064 },
4065 }],
4066 ],
[email protected]6a0242bc2011-07-01 00:34:464067 }],
[email protected]9a5e72862010-09-02 16:16:584068 ['(_type=="executable" or _type=="shared_library" or \
4069 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204070 'target_conditions': [
4071 ['mac_real_dsym == 1', {
4072 # To get a real .dSYM bundle produced by dsymutil, set the
4073 # debug information format to dwarf-with-dsym. Since
4074 # strip_from_xcode will not be used, set Xcode to do the
4075 # stripping as well.
4076 'configurations': {
[email protected]5153767c2009-12-22 01:52:504077 'Release_Base': {
[email protected]24700642009-06-01 16:01:204078 'xcode_settings': {
4079 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4080 'DEPLOYMENT_POSTPROCESSING': 'YES',
4081 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074082 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254083 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074084 # The Xcode default is to strip debugging symbols
4085 # only (-S). Local symbols should be stripped as
4086 # well, which will be handled by -x. Xcode will
4087 # continue to insert -S when stripping even when
4088 # additional flags are added with STRIPFLAGS.
4089 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404090 }], # _type=="shared_library" or _type=="loadable_module"
4091 ['_type=="executable"', {
4092 'conditions': [
4093 ['asan==1', {
4094 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4095 }]
4096 ],
4097 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074098 ], # target_conditions
4099 }, # xcode_settings
4100 }, # configuration "Release"
4101 }, # configurations
[email protected]24700642009-06-01 16:01:204102 }, { # mac_real_dsym != 1
4103 # To get a fast fake .dSYM bundle, use a post-build step to
4104 # produce the .dSYM and strip the executable. strip_from_xcode
4105 # only operates in the Release configuration.
4106 'postbuilds': [
4107 {
4108 'variables': {
4109 # Define strip_from_xcode in a variable ending in _path
4110 # so that gyp understands it's a path and performs proper
4111 # relativization during dict merging.
4112 'strip_from_xcode_path': 'mac/strip_from_xcode',
4113 },
4114 'postbuild_name': 'Strip If Needed',
4115 'action': ['<(strip_from_xcode_path)'],
4116 },
[email protected]e14a9f92009-08-05 19:26:074117 ], # postbuilds
4118 }], # mac_real_dsym
4119 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584120 }], # (_type=="executable" or _type=="shared_library" or
4121 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074122 ], # target_conditions
4123 }, # target_defaults
4124 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204125 ['OS=="ios"', {
4126 'target_defaults': {
4127 'xcode_settings' : {
4128 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4129
4130 # This next block is mostly common with the 'mac' section above,
4131 # but keying off (or setting) 'clang' isn't valid for iOS as it
4132 # also seems to mean using the custom build of clang.
4133
[email protected]e31ef5b2013-05-21 11:08:494134 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4135 # section above).
4136 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]1e013672012-06-29 22:12:204137 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:534138 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:204139 # override keyword is used via the OVERRIDE macro from
4140 # base/compiler_specific.h.
4141 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:444142 # Warn if automatic synthesis is triggered with
4143 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534144 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204145 'WARNING_CFLAGS': [
4146 '-Wheader-hygiene',
4147 # Don't die on dtoa code that uses a char as an array index.
4148 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4149 '-Wno-char-subscripts',
4150 # Clang spots more unused functions.
4151 '-Wno-unused-function',
4152 # See comments on this flag higher up in this file.
4153 '-Wno-unnamed-type-template-args',
[email protected]e31ef5b2013-05-21 11:08:494154 # Match OS X clang C++11 warning settings.
4155 '-Wno-c++11-narrowing',
[email protected]1e013672012-06-29 22:12:204156 ],
4157 },
4158 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474159 ['_toolset=="host"', {
4160 'xcode_settings': {
4161 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4162 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4163 },
[email protected]187e0e32013-07-18 21:49:384164 'conditions': [
4165 ['"<(GENERATOR)"!="xcode"', {
4166 'xcode_settings': { 'ARCHS': [ 'x86_64' ] },
4167 }],
4168 ],
[email protected]296bc452013-05-13 21:29:474169 }],
4170 ['_toolset=="target"', {
4171 'xcode_settings': {
4172 # This section should be for overriding host settings. But,
4173 # since we can't negate the iphone deployment target above, we
4174 # instead set it here for target only.
4175 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4176 },
[email protected]187e0e32013-07-18 21:49:384177 'conditions': [
4178 ['target_arch=="armv7" and "<(GENERATOR)"!="xcode"', {
4179 'xcode_settings': { 'ARCHS': [ 'armv7' ]},
4180 }, {
4181 'xcode_settings': { 'ARCHS': [ 'i386' ] },
4182 }],
4183 ],
[email protected]296bc452013-05-13 21:29:474184 }],
[email protected]1e013672012-06-29 22:12:204185 ['_type=="executable"', {
4186 'configurations': {
4187 'Release_Base': {
4188 'xcode_settings': {
4189 'DEPLOYMENT_POSTPROCESSING': 'YES',
4190 'STRIP_INSTALLED_PRODUCT': 'YES',
4191 },
4192 },
[email protected]3c6aa862012-11-05 17:11:444193 'Debug_Base': {
4194 'xcode_settings': {
4195 # Remove dSYM to reduce build time.
4196 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4197 },
4198 },
[email protected]1e013672012-06-29 22:12:204199 },
[email protected]0286b6f2013-05-03 11:06:404200 'conditions': [
[email protected]8dec8fc52013-05-23 23:05:054201 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404202 'xcode_settings': {
[email protected]8dec8fc52013-05-23 23:05:054203 # TODO(justincohen): ninja builds don't support signing yet.
[email protected]0286b6f2013-05-03 11:06:404204 'conditions': [
4205 ['chromium_ios_signing', {
4206 # iOS SDK wants everything for device signed.
4207 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4208 }, {
4209 'CODE_SIGNING_REQUIRED': 'NO',
4210 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4211 }],
4212 ],
4213 },
4214 }],
[email protected]8dec8fc52013-05-23 23:05:054215 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4216 'xcode_settings': {
4217 # It is necessary to link with the -fobjc-arc flag to use
4218 # subscripting on iOS < 6.
4219 'OTHER_LDFLAGS': [
4220 '-fobjc-arc',
4221 ],
4222 },
4223 }],
4224 ['clang==1', {
4225 'target_conditions': [
4226 ['_toolset=="target"', {
4227 'variables': {
4228 'developer_dir': '<!(xcode-select -print-path)',
4229 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4230 },
4231 # It is necessary to force load libarclite from Xcode for
4232 # third_party/llvm-build because libarclite_* is only
4233 # distributed by Xcode.
4234 'conditions': [
4235 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4236 'xcode_settings': {
4237 'OTHER_LDFLAGS': [
4238 '-force_load',
4239 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4240 ],
4241 },
4242 }],
4243 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4244 'xcode_settings': {
4245 'OTHER_LDFLAGS': [
4246 '-force_load',
4247 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4248 ],
4249 },
4250 }],
4251 # Xcode sets target_arch at compile-time.
4252 ['"<(GENERATOR)"=="xcode"', {
4253 'xcode_settings': {
4254 'OTHER_LDFLAGS[arch=armv7]': [
[email protected]86671442013-06-11 13:25:124255 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054256 '-force_load',
4257 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4258 ],
4259 'OTHER_LDFLAGS[arch=i386]': [
[email protected]86671442013-06-11 13:25:124260 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054261 '-force_load',
4262 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4263 ],
4264 },
4265 }],
4266 ],
4267 }],
4268 ],
4269 }],
[email protected]0286b6f2013-05-03 11:06:404270 ],
[email protected]1e013672012-06-29 22:12:204271 }],
4272 ], # target_conditions
4273 }, # target_defaults
4274 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554275 ['OS=="win"', {
4276 'target_defaults': {
4277 'defines': [
[email protected]8e345da2012-07-01 22:10:304278 '_WIN32_WINNT=0x0602',
4279 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554280 'WIN32',
4281 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554282 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284283 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554284 '_CRT_RAND_S',
4285 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4286 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274287 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554288 ],
[email protected]8974e042010-06-21 18:06:524289 'conditions': [
[email protected]2212d272011-12-20 21:37:374290 ['buildtype=="Official"', {
4291 # In official builds, targets can self-select an optimization
4292 # level by defining a variable named 'optimize', and setting it
4293 # to one of
4294 # - "size", optimizes for minimal code size - the default.
4295 # - "speed", optimizes for speed over code size.
4296 # - "max", whole program optimization and link-time code
4297 # generation. This is very expensive and should be used
4298 # sparingly.
4299 'variables': {
4300 'optimize%': 'size',
4301 },
4302 'target_conditions': [
4303 ['optimize=="size"', {
4304 'msvs_settings': {
4305 'VCCLCompilerTool': {
4306 # 1, optimizeMinSpace, Minimize Size (/O1)
4307 'Optimization': '1',
4308 # 2, favorSize - Favor small code (/Os)
4309 'FavorSizeOrSpeed': '2',
4310 },
4311 },
4312 },
4313 ],
4314 ['optimize=="speed"', {
4315 'msvs_settings': {
4316 'VCCLCompilerTool': {
4317 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4318 'Optimization': '2',
4319 # 1, favorSpeed - Favor fast code (/Ot)
4320 'FavorSizeOrSpeed': '1',
4321 },
4322 },
4323 },
4324 ],
4325 ['optimize=="max"', {
4326 'msvs_settings': {
4327 'VCCLCompilerTool': {
4328 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4329 'Optimization': '2',
4330 # 1, favorSpeed - Favor fast code (/Ot)
4331 'FavorSizeOrSpeed': '1',
4332 # This implies link time code generation.
4333 'WholeProgramOptimization': 'true',
4334 },
4335 },
4336 },
4337 ],
4338 ],
4339 },
4340 ],
[email protected]8974e042010-06-21 18:06:524341 ['component=="static_library"', {
4342 'defines': [
4343 '_HAS_EXCEPTIONS=0',
4344 ],
4345 }],
[email protected]3e2648a2011-03-21 20:58:504346 ['secure_atl', {
4347 'defines': [
4348 '_SECURE_ATL',
4349 ],
4350 }],
[email protected]54184ce72012-10-18 07:11:264351 ['msvs_express', {
4352 'configurations': {
4353 'x86_Base': {
4354 'msvs_settings': {
4355 'VCLinkerTool': {
4356 'AdditionalLibraryDirectories':
4357 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4358 },
4359 'VCLibrarianTool': {
4360 'AdditionalLibraryDirectories':
4361 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4362 },
4363 },
4364 },
4365 'x64_Base': {
4366 'msvs_settings': {
4367 'VCLibrarianTool': {
4368 'AdditionalLibraryDirectories':
4369 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4370 },
4371 'VCLinkerTool': {
4372 'AdditionalLibraryDirectories':
4373 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4374 },
4375 },
4376 },
4377 },
4378 'msvs_settings': {
4379 'VCLinkerTool': {
4380 # Explicitly required when using the ATL with express
4381 'AdditionalDependencies': ['atlthunk.lib'],
4382
4383 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4384 # almost eight hundred LNK4254 and LNK4078 warnings:
4385 # - warning LNK4254: section 'ATL' (50000040) merged into
4386 # '.rdata' (40000040) with different attributes
4387 # - warning LNK4078: multiple 'ATL' sections found with
4388 # different attributes
4389 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4390 },
4391 },
4392 'msvs_system_include_dirs': [
4393 '<(windows_driver_kit_path)/inc/atl71',
4394 '<(windows_driver_kit_path)/inc/mfc42',
4395 ],
4396 }],
[email protected]8974e042010-06-21 18:06:524397 ],
[email protected]5b5ca7cb2009-07-20 23:00:204398 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054399 '<(windows_sdk_path)/Include/shared',
4400 '<(windows_sdk_path)/Include/um',
4401 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554402 '$(VSInstallDir)/VC/atlmfc/include',
4403 ],
[email protected]a8d99cef2009-08-26 20:47:494404 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004405 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114406 # TODO(maruel): These warnings are level 4. They will be slowly
4407 # removed as code is fixed.
4408 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004409 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4410 4706,
[email protected]942c3a60f2011-05-03 02:04:114411 ],
[email protected]2f80c312009-02-25 21:26:554412 'msvs_settings': {
4413 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444414 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554415 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554416 'BufferSecurityCheck': 'true',
4417 'EnableFunctionLevelLinking': 'true',
4418 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114419 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554420 'WarnAsError': 'true',
4421 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584422 'conditions': [
[email protected]8974e042010-06-21 18:06:524423 ['component=="shared_library"', {
4424 'ExceptionHandling': '1', # /EHsc
4425 }, {
4426 'ExceptionHandling': '0',
4427 }],
[email protected]3fef6e62009-07-31 19:58:584428 ],
[email protected]2f80c312009-02-25 21:26:554429 },
4430 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164431 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374432 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054433 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374434 ],
[email protected]2f80c312009-02-25 21:26:554435 },
4436 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554437 'AdditionalDependencies': [
4438 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504439 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554440 'version.lib',
4441 'msimg32.lib',
4442 'ws2_32.lib',
4443 'usp10.lib',
4444 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084445 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484446 'winmm.lib',
4447 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554448 ],
[email protected]a78da50e2010-06-09 21:31:374449 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054450 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374451 ],
[email protected]2f80c312009-02-25 21:26:554452 'GenerateDebugInformation': 'true',
4453 'MapFileName': '$(OutDir)\\$(TargetName).map',
4454 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554455 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484456 # SubSystem values:
4457 # 0 == not set
4458 # 1 == /SUBSYSTEM:CONSOLE
4459 # 2 == /SUBSYSTEM:WINDOWS
4460 # Most of the executables we'll ever create are tests
4461 # and utilities with console output.
4462 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554463 },
4464 'VCMIDLTool': {
4465 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094466 'TypeLibraryName': '$(InputName).tlb',
4467 'OutputDirectory': '$(IntDir)',
4468 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334469 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094470 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4471 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554472 },
4473 'VCResourceCompilerTool': {
4474 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384475 'AdditionalIncludeDirectories': [
4476 '<(DEPTH)',
4477 '<(SHARED_INTERMEDIATE_DIR)',
4478 ],
[email protected]2f80c312009-02-25 21:26:554479 },
[email protected]5d60b0b2013-07-30 20:24:304480 'target_conditions': [
4481 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4482 'VCManifestTool': {
4483 'AdditionalManifestFiles': [
4484 '>(win_exe_compatibility_manifest)',
4485 ],
4486 },
4487 }],
4488 ['_type=="executable" and >(win_use_external_manifest)==0', {
4489 'VCManifestTool': {
4490 'EmbedManifest': 'true',
4491 }
4492 }],
4493 ['_type=="executable" and >(win_use_external_manifest)==1', {
4494 'VCManifestTool': {
4495 'EmbedManifest': 'false',
4496 }
4497 }],
4498 ],
[email protected]2f80c312009-02-25 21:26:554499 },
4500 },
4501 }],
[email protected]79e2336c2011-05-12 18:18:344502 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314503 'target_defaults': {
4504 'defines': [
4505 'DISABLE_NACL',
4506 ],
4507 },
4508 }],
[email protected]cfbf9bc2009-12-07 22:07:564509 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194510 'target_defaults': {
4511 'msvs_settings': {
4512 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194513 'DelayLoadDLLs': [
4514 'dbghelp.dll',
4515 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014516 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194517 'uxtheme.dll',
4518 ],
4519 },
4520 },
[email protected]ef4fa4072009-12-04 22:46:504521 'configurations': {
[email protected]5153767c2009-12-22 01:52:504522 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504523 'msvs_settings': {
4524 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164525 'AdditionalOptions': [
4526 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334527 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164528 '/ignore:4199',
4529 '/ignore:4221',
4530 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434531 ],
4532 'conditions': [
4533 ['asan==0', {
4534 'AdditionalOptions': ['/largeaddressaware'],
4535 }],
[email protected]1f9471a2010-01-04 06:40:164536 ],
[email protected]ef4fa4072009-12-04 22:46:504537 },
4538 },
4539 },
[email protected]5153767c2009-12-22 01:52:504540 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504541 'msvs_settings': {
4542 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164543 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504544 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334545 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164546 '/ignore:4199',
4547 '/ignore:4221',
4548 '/nxcompat',
4549 ],
[email protected]ef4fa4072009-12-04 22:46:504550 },
4551 },
4552 },
4553 },
[email protected]48c7af72009-07-03 22:00:194554 },
4555 }],
[email protected]9821d0d2010-04-16 22:40:374556 ['enable_new_npdevice_api==1', {
4557 'target_defaults': {
4558 'defines': [
4559 'ENABLE_NEW_NPDEVICE_API',
4560 ],
4561 },
4562 }],
[email protected]5f683172013-04-27 01:53:194563 # Don't warn about the "typedef 'foo' locally defined but not used"
4564 # for gcc 4.8.
4565 # TODO: remove this flag once all builds work. See crbug.com/227506
4566 ['gcc_version>=48', {
4567 'target_defaults': {
4568 'cflags': [
4569 '-Wno-unused-local-typedefs',
4570 ],
4571 },
4572 }],
[email protected]220ea5932012-08-09 10:44:074573 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234574 'conditions': [
4575 ['OS=="android"', {
4576 # Android could use the goma with clang.
4577 'make_global_settings': [
4578 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4579 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4580 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4581 ['CC.host', '$(CC)'],
4582 ['CXX.host', '$(CXX)'],
4583 ['LINK.host', '$(LINK)'],
4584 ],
4585 }, {
4586 'make_global_settings': [
4587 ['CC', '<(make_clang_dir)/bin/clang'],
4588 ['CXX', '<(make_clang_dir)/bin/clang++'],
4589 ['LINK', '$(CXX)'],
4590 ['CC.host', '$(CC)'],
4591 ['CXX.host', '$(CXX)'],
4592 ['LINK.host', '$(LINK)'],
4593 ],
4594 }],
[email protected]34f40892011-09-06 21:53:304595 ],
4596 }],
[email protected]615fa6642012-08-14 19:17:074597 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274598 # Hardcode the compiler names in the Makefile so that
4599 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114600 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044601 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4602 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4603 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074604 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4605 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4606 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274607 ],
4608 }],
[email protected]23eea4a42013-04-27 04:10:264609 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464610 'make_global_settings': [
4611 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4612 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4613 ['LINK', '$(CXX)'],
4614 ['CC.host', '<!(which gcc)'],
4615 ['CXX.host', '<!(which g++)'],
4616 ['LINK.host', '<!(which g++)'],
4617 ],
4618 }],
[email protected]2f80c312009-02-25 21:26:554619 ],
4620 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504621 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4622 # This block adds *project-wide* configuration settings to each project
4623 # file. It's almost always wrong to put things here. Specify your
4624 # custom xcode_settings in target_defaults to add them to targets instead.
4625
[email protected]1e013672012-06-29 22:12:204626 'conditions': [
[email protected]fca3d812012-07-27 00:55:364627 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4628 # setting sets the SDK on a project-wide basis. In order to get the
4629 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4630 # here at the project level.
[email protected]2c261532012-10-06 00:46:294631 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364632 'conditions': [
[email protected]2c261532012-10-06 00:46:294633 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364634 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294635 }, {
4636 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364637 }],
4638 ],
[email protected]2c261532012-10-06 00:46:294639 }],
4640 ['OS=="ios"', {
4641 'conditions': [
4642 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404643 'conditions': [
4644 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]187e0e32013-07-18 21:49:384645 ['"<(GENERATOR)"=="xcode" or ("<(GENERATOR)"=="ninja" and target_arch=="armv7")', {
[email protected]0286b6f2013-05-03 11:06:404646 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:384647 }, {
4648 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:404649 }],
4650 ],
[email protected]2c261532012-10-06 00:46:294651 }, {
4652 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4653 }],
4654 ],
[email protected]1e013672012-06-29 22:12:204655 }],
4656 ['OS=="ios"', {
[email protected]3c6aa862012-11-05 17:11:444657 # Just build armv7, until armv7s is correctly tested.
4658 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204659 # Target both iPhone and iPad.
4660 'TARGETED_DEVICE_FAMILY': '1,2',
4661 }],
[email protected]f9335b42013-01-24 21:00:234662 ['target_arch=="x64"', {
4663 'ARCHS': [
4664 'x86_64'
4665 ],
4666 }],
[email protected]1e013672012-06-29 22:12:204667 ],
[email protected]0c8ab452009-11-06 21:57:504668
[email protected]2f80c312009-02-25 21:26:554669 # The Xcode generator will look for an xcode_settings section at the root
4670 # of each dict and use it to apply settings on a file-wide basis. Most
4671 # settings should not be here, they should be in target-specific
4672 # xcode_settings sections, or better yet, should use non-Xcode-specific
4673 # settings in target dicts. SYMROOT is a special case, because many other
4674 # Xcode variables depend on it, including variables such as
4675 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4676 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4677 # files to appear (when present) in the UI as actual files and not red
4678 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4679 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164680 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554681 },
[email protected]ee28c9f2009-09-04 01:53:014682}