blob: dc2213d4b66e63aa9ca3d951d129142e0c566672 [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
[email protected]8796d922012-08-07 01:23:1120 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
23
24 # Whether or not we are using the Aura windowing framework.
25 'use_aura%': 0,
26
27 # Whether or not we are building the Ash shell.
28 'use_ash%': 0,
[email protected]c335f4802013-04-06 04:51:2129
[email protected]2a76009b2013-08-07 21:02:3130 # Whether or not we are using CRAS, the ChromeOS Audio Server.
31 'use_cras%': 0,
32
[email protected]ff78e4e2013-05-03 19:19:1533 # Use a raw surface abstraction.
34 'use_ozone%': 0,
[email protected]8796d922012-08-07 01:23:1135 },
36 # Copy conditionally-set variables out one scope.
37 'chromeos%': '<(chromeos)',
38 'use_aura%': '<(use_aura)',
39 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:3140 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:1541 'use_ozone%': '<(use_ozone)',
[email protected]e72e55b2011-01-06 22:19:3042
[email protected]3fa441d2011-09-18 17:28:5043 # Whether we are using Views Toolkit
44 'toolkit_views%': 0,
45
[email protected]e0b85a52011-10-06 03:30:4246 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
47 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2748
[email protected]7ddea9802012-02-22 23:08:0549 # Disable viewport meta tag by default.
50 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2451
52 # Enable HiDPI support.
53 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4054
[email protected]6155e702012-05-02 17:56:0655 # Enable touch optimized art assets and metrics.
56 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1857
[email protected]f1f362b42012-05-15 17:46:5858 # Override buildtype to select the desired build flavor.
59 # Dev - everyday build for development/testing
60 # Official - release build (generally implies additional processing)
61 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
62 # conversion is done), some of the things which are now controlled by
63 # 'branding', such as symbol generation, will need to be refactored
64 # based on 'buildtype' (i.e. we don't care about saving symbols for
65 # non-Official # builds).
66 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1167
[email protected]e2aaaac2013-05-08 07:20:0968 # Override branding to select the desired branding flavor.
69 'branding%': 'Chromium',
70
[email protected]8796d922012-08-07 01:23:1171 'conditions': [
[email protected]978a2ae2013-09-13 04:28:0172 # ChromeOS implies ash.
[email protected]9d1f8e42013-09-08 09:01:2073 ['chromeos==1', {
[email protected]8796d922012-08-07 01:23:1174 'use_ash%': 1,
[email protected]978a2ae2013-09-13 04:28:0175 'use_aura%': 1,
[email protected]8796d922012-08-07 01:23:1176 }],
[email protected]020648aa2013-06-08 17:16:4777
[email protected]e9c4c1c2013-02-06 06:46:4878 # For now, Windows builds that |use_aura| should also imply using
79 # ash. This rule should be removed for the future when Windows is
80 # using the aura windows without the ash interface.
81 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1182 'use_ash%': 1,
83 }],
84 ['use_ash==1', {
85 'use_aura%': 1,
86 }],
[email protected]94cdbf42012-12-11 19:49:2287
88 # Compute the architecture that we're building on.
89 ['OS=="win" or OS=="mac" or OS=="ios"', {
90 'host_arch%': 'ia32',
91 }, {
92 # This handles the Unix platforms for which there is some support.
93 # Anything else gets passed through, which probably won't work
94 # very well; such hosts should pass an explicit target_arch to
95 # gyp.
96 'host_arch%':
97 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
98 }],
[email protected]8796d922012-08-07 01:23:1199 ],
[email protected]bb6aba32011-01-07 19:04:43100 },
101 # Copy conditionally-set variables out one scope.
102 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:58103 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16104 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31105 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15106 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42107 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05108 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24109 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06110 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58111 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09112 'branding%': '<(branding)',
[email protected]94cdbf42012-12-11 19:49:22113 'host_arch%': '<(host_arch)',
114
115 # Default architecture we're building for is the architecture we're
116 # building on.
117 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58118
[email protected]d999c3cb2013-03-12 10:22:36119 # This is set when building the Android WebView inside the Android
120 # build system, using the 'android' gyp backend. The WebView code is
121 # still built when this is unset, but builds using the normal chromium
122 # build system.
123 'android_webview_build%': 0,
[email protected]0115f042012-07-27 20:36:53124
[email protected]55d92492013-01-31 05:03:39125 # Sets whether chrome is built for google tv device.
126 'google_tv%': 0,
127
[email protected]7d6763422013-04-26 12:06:54128 # Set ARM architecture version.
129 'arm_version%': 7,
130
[email protected]e72e55b2011-01-06 22:19:30131 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50132 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35133 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43134 'toolkit_views%': 1,
135 }, {
136 'toolkit_views%': 0,
137 }],
[email protected]1efbaaa2012-04-24 02:43:24138
[email protected]8796d922012-08-07 01:23:11139 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]1201dd0f2013-05-03 23:39:54140 ['(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:11141 'toolkit_uses_gtk%': 1,
142 }, {
143 'toolkit_uses_gtk%': 0,
144 }],
145
[email protected]d628ab412013-09-07 03:26:37146 # Whether we're a traditional desktop unix.
147 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
148 'desktop_linux%': 1,
149 }, {
150 'desktop_linux%': 0,
151 }],
152
[email protected]3aa8a682012-08-11 00:04:29153 # Enable HiDPI on Mac OS and Chrome OS.
154 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24155 'enable_hidpi%': 1,
156 }],
[email protected]219c7312012-05-10 20:32:40157
[email protected]c71fe6402012-08-15 15:22:55158 # Enable touch UI on Metro.
159 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06160 'enable_touch_ui%': 1,
161 }],
[email protected]dc4e8b82012-11-15 03:58:16162
[email protected]b1a2b542013-01-10 07:33:09163 # Enable App Launcher only on ChromeOS, Windows and OSX.
164 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16165 'enable_app_list%': 1,
166 }, {
167 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09168 }],
169
[email protected]cb800562012-11-20 22:36:07170 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26171 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07172 }, {
173 'use_default_render_theme%': 0,
174 }],
[email protected]e72e55b2011-01-06 22:19:30175 ],
176 },
177
178 # Copy conditionally-set variables out one scope.
179 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30180 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22181 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43182 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11183 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]d628ab412013-09-07 03:26:37184 'desktop_linux%': '<(desktop_linux)',
[email protected]41423092011-08-25 15:39:58185 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16186 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31187 'use_cras%': '<(use_cras)',
[email protected]ff78e4e2013-05-03 19:19:15188 'use_ozone%': '<(use_ozone)',
[email protected]e0b85a52011-10-06 03:30:42189 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05190 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24191 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06192 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]d999c3cb2013-03-12 10:22:36193 'android_webview_build%': '<(android_webview_build)',
[email protected]55d92492013-01-31 05:03:39194 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16195 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07196 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22197 'buildtype%': '<(buildtype)',
[email protected]e2aaaac2013-05-08 07:20:09198 'branding%': '<(branding)',
[email protected]7d6763422013-04-26 12:06:54199 'arm_version%': '<(arm_version)',
[email protected]e14a9f92009-08-05 19:26:07200
[email protected]c86fd472013-04-02 19:42:30201 # Set to 1 to enable fast builds. Set to 2 for even faster builds
202 # (it disables debug info for fastest compilation - only for use
203 # on compile-only bots).
[email protected]e72e55b2011-01-06 22:19:30204 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49205
[email protected]20960e072011-09-20 20:59:01206 # Set to 1 to enable dcheck in release without having to use the flag.
207 'dcheck_always_on%': 0,
208
[email protected]65b0819e2013-06-21 15:24:00209 # Set to 1 to make a build that logs like an official build, but is not
210 # necessarily an official build, ie DCHECK and DLOG are disabled and
211 # removed completely in release builds, to minimize binary footprint.
212 # Note: this setting is ignored if buildtype=="Official".
213 'logging_like_official_build%': 0,
214
[email protected]a1e87422013-07-09 21:47:01215 # Set to 1 to make a build that disables unshipped tracing events.
216 # Note: this setting is ignored if buildtype=="Official".
217 'tracing_like_official_build%': 0,
218
[email protected]464750f2011-10-24 23:16:18219 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51220 'file_manager_extension%': 0,
221
[email protected]77a848262013-02-22 11:17:25222 # Disable image loader component extension by default.
223 'image_loader_extension%': 0,
224
[email protected]e72e55b2011-01-06 22:19:30225 # Python version.
[email protected]a43c5a02011-05-27 06:54:51226 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17227
[email protected]e72e55b2011-01-06 22:19:30228
[email protected]7d6763422013-04-26 12:06:54229 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30230 'arm_neon%': 1,
231
[email protected]7d6763422013-04-26 12:06:54232 # Detect NEON support at run-time.
233 'arm_neon_optional%': 0,
234
[email protected]e72e55b2011-01-06 22:19:30235 # The system root for cross-compiles. Default: none.
236 'sysroot%': '',
237
[email protected]945361a2011-09-30 04:38:43238 # The system libdir used for this ABI.
239 'system_libdir%': 'lib',
240
[email protected]e72e55b2011-01-06 22:19:30241 # On Linux, we build with sse2 for Chromium builds.
242 'disable_sse2%': 0,
243
244 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03245 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30246
[email protected]d9113542012-07-18 17:11:28247 # Use system libjpeg. Note that the system's libjepg will be used even if
248 # use_libjpeg_turbo is set.
249 'use_system_libjpeg%': 0,
250
[email protected]aa5e01fc2013-03-06 14:06:17251 # By default, component is set to static_library and it can be overriden
252 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53253 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30254
[email protected]bb6aba32011-01-07 19:04:43255 # Set to select the Title Case versions of strings in GRD files.
256 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21257
[email protected]98da0042011-02-02 00:10:27258 # Use translations provided by volunteers at launchpad.net. This
259 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19260 'use_third_party_translations%': 0,
261
[email protected]9a425422011-01-11 00:53:18262 # Remoting compilation is enabled by default. Set to 0 to disable.
263 'remoting%': 1,
264
[email protected]1ec68c42011-06-01 13:56:25265 # Configuration policy is enabled by default. Set to 0 to disable.
266 'configuration_policy%': 1,
267
[email protected]6c521fed2012-11-29 17:00:03268 # Variable safe_browsing is used to control the build time configuration
269 # for safe browsing feature. Safe browsing can be compiled in 3 different
270 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
271 # reporting features without enabling phishing and malware detection. This
272 # is useful to integrate a third party phishing/malware detection to
273 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56274 'safe_browsing%': 1,
275
[email protected]9eb100e2011-10-14 05:08:22276 # Speech input is compiled in by default. Set to 0 to disable.
277 'input_speech%': 1,
278
[email protected]7cce3232011-10-28 10:41:57279 # Notifications are compiled in by default. Set to 0 to disable.
280 'notifications%' : 1,
281
[email protected]970fd4e2012-12-19 11:09:37282 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
283 # regular builds and 1 for ASan builds.
284 'mac_want_real_dsym%': 'default',
285
[email protected]5d451ad2011-02-11 16:43:46286 # If this is set, the clang plugins used on the buildbot will be used.
287 # Run tools/clang/scripts/update.sh to make sure they are compiled.
288 # This causes 'clang_chrome_plugins_flags' to be set.
289 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08290 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46291
[email protected]2e82fa52012-11-27 23:41:44292 # Enable building with ASAN (Clang's -fsanitize=address option).
293 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06294 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
295 'asan%': 0,
296
[email protected]062522a2013-06-13 15:49:55297 # Enable building with LSan (Clang's -fsanitize=leak option).
298 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
299 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
300 'lsan%': 0,
301
[email protected]927a9d672012-11-09 11:28:20302 # Enable building with TSAN (Clang's -fsanitize=thread option).
303 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12304 # See http://clang.llvm.org/docs/ThreadSanitizer.html
305 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16306 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12307
[email protected]a10ddd2d2013-02-26 20:06:59308 # Enable building with MSAN (Clang's -fsanitize=memory option).
309 # MemorySanitizer only works with clang, but msan=1 implies clang=1
310 # See http://clang.llvm.org/docs/MemorySanitizer.html
311 'msan%': 0,
312
[email protected]7ce58b22012-09-26 05:17:25313 # Use a modified version of Clang to intercept allocated types and sizes
314 # for allocated objects. clang_type_profiler=1 implies clang=1.
315 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
316 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
317 'clang_type_profiler%': 0,
318
[email protected]8a6abd12012-05-16 10:04:44319 # Set to true to instrument the code with function call logger.
320 # See src/third_party/cygprofile/cyg-profile.cc for details.
321 'order_profiling%': 0,
322
[email protected]00b0a7f2012-01-25 15:30:46323 # Use the provided profiled order file to link Chrome image with it.
324 # This makes Chrome faster by better using CPU cache when executing code.
325 # This is known as PGO (profile guided optimization).
326 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
327 'order_text_section%' : "",
328
[email protected]1ad5a7b2011-06-24 03:15:13329 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
330 # libraries on linux x86-64 and arm, plus ASLR.
331 'linux_fpic%': 1,
332
[email protected]bd7b6fe2012-03-05 21:02:40333 # Whether one-click signin is enabled or not.
334 'enable_one_click_signin%': 0,
335
[email protected]6a3cd37e2012-04-17 17:13:34336 # Enable Chrome browser extensions
337 'enable_extensions%': 1,
338
[email protected]658677f2012-06-09 06:04:02339 # Enable browser automation.
340 'enable_automation%': 1,
341
[email protected]6ee43a72012-12-07 22:44:40342 # Enable Google Now.
343 'enable_google_now%': 1,
344
[email protected]1e54c1c2013-08-12 17:16:05345 # Enable printing support and UI. This variable is used to configure
346 # which parts of printing will be built. 0 disables printing completely,
347 # 1 enables it fully, and 2 enables only the codepath to generate a
348 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
349 # print, UI, etc.
[email protected]658677f2012-06-09 06:04:02350 'enable_printing%': 1,
351
[email protected]3b5e88d2013-09-06 11:03:06352 # Set the version of CLD.
353 # 0: Don't specify the version. This option is for the Finch testing.
354 # 1: Use only CLD1.
355 # 2: Use only CLD2.
356 'cld_version%': 0,
357
[email protected]c6ce08072013-07-31 07:48:53358 # Enable spell checker.
359 'enable_spellcheck%': 1,
360
[email protected]dda90ae2011-07-19 22:07:48361 # Webrtc compilation is enabled by default. Set to 0 to disable.
362 'enable_webrtc%': 1,
363
[email protected]cdb756ef2012-04-05 18:34:53364 # Enables use of the session service, which is enabled by default.
365 # Support for disabling depends on the platform.
366 'enable_session_service%': 1,
367
[email protected]6b40bb582012-03-15 20:50:38368 # Enables theme support, which is enabled by default. Support for
369 # disabling depends on the platform.
370 'enable_themes%': 1,
371
[email protected]57e67ac2013-02-22 03:37:22372 # Enables autofill dialog and associated features; disabled by default.
373 'enable_autofill_dialog%' : 0,
374
[email protected]0acdd772012-04-05 22:53:00375 # Enables support for background apps.
376 'enable_background%': 1,
377
[email protected]44879ed2012-04-06 01:11:02378 # Enable the task manager by default.
379 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45380
[email protected]9bfe0ab2012-08-30 13:18:11381 # Enable FTP support by default.
382 'disable_ftp_support%': 0,
383
[email protected]ef4cb642013-09-14 22:48:02384 # XInput2 multitouch support is enabled by default (use_xi2_mt=2).
385 # Setting to zero value disables XI2 MT. When XI2 MT is enabled,
[email protected]22d6dd72012-05-15 07:29:55386 # the input value also defines the required XI2 minor minimum version.
387 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
[email protected]ef4cb642013-09-14 22:48:02388 'use_xi2_mt%': 2,
[email protected]22d6dd72012-05-15 07:29:55389
[email protected]9061bee82012-01-16 11:45:17390 # Use of precompiled headers on Windows.
391 #
[email protected]9061bee82012-01-16 11:45:17392 # This variable may be explicitly set to 1 (enabled) or 0
393 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
394 # This setting will override the default.
395 #
[email protected]c3340fb32012-12-20 20:45:39396 # See
[email protected]9061bee82012-01-16 11:45:17397 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
398 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16399 'chromium_win_pch%': 0,
400
[email protected]3bb37e62012-04-19 03:40:08401 # Set this to true when building with Clang.
402 # See http://code.google.com/p/chromium/wiki/Clang for details.
403 'clang%': 0,
404
[email protected]18e0f39b2012-01-17 16:47:34405 # Enable plug-in installation by default.
406 'enable_plugin_installation%': 1,
407
[email protected]6d17f6392012-12-05 05:24:54408 # Enable PPAPI and NPAPI by default.
409 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
410 # as PPAPI; see crbug.com/162667.
411 'enable_plugins%': 1,
412
[email protected]62424a52012-03-18 03:09:50413 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42414 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35415 # Chrome UI.
416 # TODO(asvitkine): Enable this on all platforms and delete this flag.
417 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50418 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35419
[email protected]a9318c72012-03-01 01:29:47420 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
421 # with one of those tools.
422 'build_for_tool%': '',
423
[email protected]37138132013-01-17 23:08:52424 # If no directory is specified then a temporary directory will be used.
425 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47426 # True if isolate should fail if the isolate files refer to files
427 # that are missing.
428 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56429
[email protected]740ebed2012-06-27 19:14:06430 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12431 'wix_path%': '<(DEPTH)/third_party/wix',
432
[email protected]0850e842013-01-19 03:44:31433 # Managed users are enabled by default.
434 'enable_managed_users%': 1,
435
[email protected]1591c44d2013-07-15 13:28:43436 # Platform natively supports discardable memory.
437 'native_discardable_memory%': 0,
438
439 # Platform sends memory pressure signals natively.
440 'native_memory_pressure_signals%': 0,
441
[email protected]199def22013-02-21 17:52:29442 'spdy_proxy_auth_origin%' : '',
443 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25444 'spdy_proxy_auth_value%' : '',
[email protected]5e131c9f2013-07-10 19:21:05445 'enable_mdns%' : 0,
[email protected]199def22013-02-21 17:52:29446
[email protected]bb6aba32011-01-07 19:04:43447 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34448 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37449 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34450 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37451 }, {
452 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34453 }],
454
[email protected]df9167b2011-11-14 19:15:25455 # A flag for BSD platforms
456 ['OS=="freebsd" or OS=="openbsd"', {
457 'os_bsd%': 1,
458 }, {
459 'os_bsd%': 0,
460 }],
461
[email protected]7d6763422013-04-26 12:06:54462 # Set armv7 for backward compatibility.
463 ['arm_version==7', {
464 'armv7': 1,
465 }, {
466 'armv7': 0,
467 }],
468
[email protected]c329adf82011-10-05 14:34:57469 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42470 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57471 'use_nss%': 1,
472 }, {
473 'use_nss%': 0,
474 }],
[email protected]e0b85a52011-10-06 03:30:42475
[email protected]c335f4802013-04-06 04:51:21476 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54477 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34478 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37479 }, {
[email protected]c49ab0c2011-05-18 17:25:37480 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34481 }],
[email protected]9a8175892012-03-20 02:11:58482
[email protected]26bade892013-05-23 21:44:15483 # Flags to use pango and glib on non-Mac POSIX platforms.
[email protected]c335f4802013-04-06 04:51:21484 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
485 'use_glib%': 0,
[email protected]26bade892013-05-23 21:44:15486 'use_pango%': 0,
[email protected]c335f4802013-04-06 04:51:21487 }, {
488 'use_glib%': 1,
[email protected]26bade892013-05-23 21:44:15489 'use_pango%': 1,
[email protected]c335f4802013-04-06 04:51:21490 }],
491
[email protected]efadeacf2011-10-27 19:01:00492 # We always use skia text rendering in Aura on Windows, since GDI
493 # doesn't agree with our BackingStore.
494 # TODO(beng): remove once skia text rendering is on by default.
495 ['use_aura==1 and OS=="win"', {
496 'enable_skia_text%': 1,
497 }],
[email protected]9edeb712011-09-20 21:20:33498
[email protected]63692212010-09-16 00:22:21499 # A flag to enable or disable our compile-time dependency
500 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
501 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49502 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50503 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21504 'use_gnome_keyring%': 0,
505 }, {
506 'use_gnome_keyring%': 1,
507 }],
[email protected]0afe5212010-10-01 18:56:11508
[email protected]8796d922012-08-07 01:23:11509 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20510 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43511 'use_titlecase_in_grd_files%': 1,
512 }],
513
[email protected]77a848262013-02-22 11:17:25514 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06515 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50516 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25517 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50518 }, {
[email protected]3d38d8e2011-04-16 20:48:51519 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25520 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51521 }],
[email protected]7de46352011-09-12 15:39:19522
[email protected]c79d1972013-02-06 18:47:29523 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01524 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51525 }],
526
[email protected]3b5e88d2013-09-06 11:03:06527 ['OS=="win"', {
528 'cld_version%': 1,
529 }],
530
[email protected]da1c8d692011-09-20 20:35:01531 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49532 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46533 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40534 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06535 'cld_version%': 1,
[email protected]c6ce08072013-07-31 07:48:53536 'enable_spellcheck%': 0,
[email protected]55e02302012-08-21 00:50:46537 'enable_themes%': 0,
[email protected]48de0fc2012-08-02 11:03:58538 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54539 'arm_neon%': 0,
540 'arm_neon_optional%': 1,
[email protected]1591c44d2013-07-15 13:28:43541 'native_discardable_memory%': 1,
542 'native_memory_pressure_signals%': 1,
[email protected]da1c8d692011-09-20 20:35:01543 }],
[email protected]839d5172011-10-13 17:18:11544
[email protected]0d841b7d2013-08-20 20:22:22545 # Enable basic printing for Chrome for Android but disable printing
546 # completely for WebView.
[email protected]b25f0032013-08-19 22:26:25547 ['OS=="android" and android_webview_build==0', {
548 'enable_printing%': 2,
549 }],
550 ['OS=="android" and android_webview_build==1', {
551 'enable_printing%': 0,
552 }],
553
[email protected]0d841b7d2013-08-20 20:22:22554 # Android OS includes support for proprietary codecs regardless of
555 # building Chromium or Google Chrome. We also ship Google Chrome with
556 # proprietary codecs.
557 ['OS=="android" or branding=="Chrome"', {
558 'proprietary_codecs%': 1,
[email protected]d80a06192013-08-23 23:33:41559 }, {
560 'proprietary_codecs%': 0,
[email protected]0d841b7d2013-08-20 20:22:22561 }],
562
[email protected]8f5999e2013-08-10 18:27:05563 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
564 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22565 'enable_autofill_dialog%': 1
566 }],
567
[email protected]d999c3cb2013-03-12 10:22:36568 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43569 'enable_webrtc%': 1,
570 }],
571
572 # Disable WebRTC for building WebView as part of Android system.
573 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
574 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36575 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43576 'enable_webrtc%': 0,
577 }],
578
[email protected]0d16f292012-07-02 22:10:48579 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24580 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11581 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24582 'enable_automation%': 0,
583 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40584 'enable_google_now%': 0,
[email protected]3b5e88d2013-09-06 11:03:06585 'cld_version%': 1,
[email protected]c4ac4d12012-09-12 12:02:24586 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44587 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24588 'enable_themes%': 0,
589 'enable_webrtc%': 0,
590 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48591 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44592 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31593 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48594 }],
595
[email protected]839d5172011-10-13 17:18:11596 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27597 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01598 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33599 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11600 }, {
[email protected]1ee7c56c2011-10-19 14:51:33601 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11602 }],
[email protected]9061bee82012-01-16 11:45:17603
[email protected]c3340fb32012-12-20 20:45:39604 # Turn precompiled headers on by default.
605 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17606 'chromium_win_pch%': 1
607 }],
[email protected]18e0f39b2012-01-17 16:47:34608
[email protected]deb8b3cd2013-05-07 19:52:10609 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34610 'enable_plugin_installation%': 0,
611 }, {
612 'enable_plugin_installation%': 1,
613 }],
[email protected]b07806c12012-02-03 22:44:59614
[email protected]55d92492013-01-31 05:03:39615 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54616 'enable_plugins%': 0,
617 }, {
618 'enable_plugins%': 1,
619 }],
620
[email protected]8d726a42012-02-09 03:49:00621 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56622 # third_party/gold. Gold is not used for 32-bit linux builds
623 # as it runs out of address space.
624 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51625 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17626 }, {
[email protected]bd68ea52013-03-26 09:49:37627 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34628 }],
629
630 # linux_use_gold_flags: whether to use build flags that rely on gold.
631 # On by default for x64 Linux. Temporarily off for ChromeOS as
632 # it failed on a buildbot.
633 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
634 'linux_use_gold_flags%': 1,
635 }, {
[email protected]8d726a42012-02-09 03:49:00636 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59637 }],
[email protected]2e22e2f2012-03-15 21:53:10638
[email protected]9394a3a2012-12-19 19:22:39639 ['chromeos==1', {
640 'linux_use_libgps%': 1,
641 }, { # chromeos==0
642 # Do not use libgps on desktop Linux by default,
643 # see http://crbug.com/103751.
644 'linux_use_libgps%': 0,
645 }],
646
[email protected]a95d5302012-11-03 00:02:19647 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32648 'enable_captive_portal_detection%': 0,
649 }, {
650 'enable_captive_portal_detection%': 1,
651 }],
652
[email protected]3bd47e022012-03-22 04:19:12653 # Enable Skia UI text drawing incrementally on different platforms.
654 # http://crbug.com/105550
655 #
656 # On Aura, this allows per-tile painting to be used in the browser
657 # compositor.
[email protected]04b67b62013-09-14 01:32:17658 ['OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12659 'use_canvas_skia%': 1,
660 }],
[email protected]adb44342012-07-23 13:36:12661
[email protected]0753ea42012-08-30 20:15:44662 ['chromeos==1', {
663 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
664 'use_libjpeg_turbo%': 0,
665 }],
666
[email protected]adb44342012-07-23 13:36:12667 ['OS=="android"', {
668 # When building as part of the Android system, use system libraries
669 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36670 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12671 }],
[email protected]8a46f5f2012-12-05 00:47:12672
[email protected]5be161f2013-06-18 11:09:33673 # Do not enable the Settings App on ChromeOS.
674 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12675 'enable_settings_app%': 1,
676 }, {
677 'enable_settings_app%': 0,
678 }],
[email protected]94cdbf42012-12-11 19:49:22679
680 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
681 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22682 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43683 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22684 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43685 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22686 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46687
[email protected]42972b62013-08-28 05:46:42688
689 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
[email protected]e2aaaac2013-05-08 07:20:09690 'conditions': [
691 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43692 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09693 }],
694 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43695 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09696 }],
697 ],
[email protected]42972b62013-08-28 05:46:42698 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
[email protected]e2aaaac2013-05-08 07:20:09699
[email protected]59e85f472013-06-28 18:20:44700 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07701 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28702 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46703 }],
[email protected]5b38a522013-03-20 17:00:47704
705 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01706 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47707 # e.g. base_unittests_run runs the target base_unittests. The test
[email protected]718e3f32013-08-14 13:23:29708 # target always calls tools/swarm_client/isolate.py. See the script's
[email protected]5b38a522013-03-20 17:00:47709 # --help for more information and the valid --mode values. Meant to be
710 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01711 # TODO(maruel): Remove the conditions as more configurations are
712 # supported.
[email protected]349f3062013-04-10 20:44:51713 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
714 # again.
[email protected]93fe4002013-04-10 00:17:01715 # NOTE: The check for disable_nacl==0 and component=="static_library"
716 # can't be used here because these variables are not defined yet, but it
717 # is still not supported.
[email protected]0dc310a32013-05-08 23:52:44718 ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47719 'test_isolation_mode%': 'check',
720 }, {
721 'test_isolation_mode%': 'noop',
722 }],
[email protected]5cbeb502013-04-23 19:25:27723 # Whether Android ARM build uses OpenMAX DL FFT.
[email protected]fc3ab0c2013-04-17 15:26:34724 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]6558fd4f2013-04-17 18:51:38725 # Currently only supported on Android ARM, without webview.
726 # When enabled, this will also enable WebAudio on Android
[email protected]330f3a32013-04-23 05:47:58727 # ARM. Default is enabled.
728 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53729 }, {
730 'use_openmax_dl_fft%': 0,
731 }],
[email protected]5e131c9f2013-07-10 19:21:05732 ['OS=="win" or OS=="linux"', {
733 'enable_mdns%' : 1,
[email protected]2abbc1a2013-08-07 22:09:06734 }],
735
736 # Turns on compiler optimizations in V8 in Debug build, except
737 # on android_clang, where we're hitting a weird linker error.
738 # TODO(dpranke): http://crbug.com/266155 .
739 ['OS=="android"', {
740 'v8_optimized_debug': 1,
741 }, {
742 'v8_optimized_debug': 2,
743 }],
[email protected]b3f23ba2010-04-26 22:58:17744 ],
[email protected]2b113652012-09-17 17:01:39745
[email protected]a3a720f2013-04-25 19:35:42746 # Set this to 1 to enable use of concatenated impulse responses
747 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26748 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42749
[email protected]f2817cf2013-05-16 11:39:54750 # You can set the variable 'use_official_google_api_keys' to 1
751 # to use the Google-internal file containing official API keys
752 # for Google Chrome even in a developer build. Setting this
753 # variable explicitly to 1 will cause your build to fail if the
754 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39755 #
[email protected]f2817cf2013-05-16 11:39:54756 # The variable is documented here, but not handled in this file;
757 # see //google_apis/determine_use_official_keys.gypi for the
758 # implementation.
[email protected]2b113652012-09-17 17:01:39759 #
[email protected]f2817cf2013-05-16 11:39:54760 # Set the variable to 0 to not use the internal file, even when
761 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39762 #
[email protected]f2817cf2013-05-16 11:39:54763 # Leave it unset in your include.gypi to have the variable
764 # implicitly set to 1 if you have
765 # src/google_apis/internal/google_chrome_api_keys.h in your
766 # checkout, and implicitly set to 0 if not.
767 #
768 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39769 # was explicitly set to 1, i.e. they always use official keys,
770 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54771 #
772 # NOTE: You MUST NOT explicitly set the variable to 2 in your
773 # include.gypi or by other means. Due to subtleties of GYP, this
774 # is not the same as leaving the variable unset, even though its
775 # default value in
776 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39777
778 # Set these to bake the specified API keys and OAuth client
779 # IDs/secrets into your build.
780 #
781 # If you create a build without values baked in, you can instead
782 # set environment variables to provide the keys at runtime (see
783 # src/google_apis/google_api_keys.h for details). Features that
784 # require server-side APIs may fail to work if no keys are
785 # provided.
786 #
787 # Note that if you are building an official build or if
788 # use_official_google_api_keys has been set to 1 (explicitly or
789 # implicitly), these values will be ignored and the official
790 # keys will be used instead.
791 'google_api_key%': '',
792 'google_default_client_id%': '',
793 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07794 },
795
[email protected]e72e55b2011-01-06 22:19:30796 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07797 'branding%': '<(branding)',
798 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27799 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59800 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44801 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33802 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58803 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16804 'use_ash%': '<(use_ash)',
[email protected]2a76009b2013-08-07 21:02:31805 'use_cras%': '<(use_cras)',
[email protected]e0b85a52011-10-06 03:30:42806 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57807 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25808 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34809 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19810 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15811 'use_pango%': '<(use_pango)',
[email protected]ff78e4e2013-05-03 19:19:15812 'use_ozone%': '<(use_ozone)',
[email protected]79e2336c2011-05-12 18:18:34813 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]d628ab412013-09-07 03:26:37814 'desktop_linux%': '<(desktop_linux)',
[email protected]79e2336c2011-05-12 18:18:34815 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21816 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11817 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44818 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05819 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24820 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06821 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35822 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20823 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25824 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54825 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01826 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]65b0819e2013-06-21 15:24:00827 'logging_like_official_build%': '<(logging_like_official_build)',
[email protected]a1e87422013-07-09 21:47:01828 'tracing_like_official_build%': '<(tracing_like_official_build)',
[email protected]a76fe1a2010-03-01 23:39:36829 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54830 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43831 'armv7%': '<(armv7)',
832 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54833 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23834 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43835 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52836 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43837 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17838 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18839 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40840 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48841 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16842 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25843 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56844 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22845 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57846 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46847 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37848 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06849 'asan%': '<(asan)',
[email protected]062522a2013-06-13 15:49:55850 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59851 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12852 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16853 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25854 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44855 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46856 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34857 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34858 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54859 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53860 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38861 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22862 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]0acdd772012-04-05 22:53:00863 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59864 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00865 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39866 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50867 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33868 'test_isolation_mode%': '<(test_isolation_mode)',
869 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47870 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10871 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02872 'enable_printing%': '<(enable_printing)',
[email protected]c6ce08072013-07-31 07:48:53873 'enable_spellcheck%': '<(enable_spellcheck)',
[email protected]6ee43a72012-12-07 22:44:40874 'enable_google_now%': '<(enable_google_now)',
[email protected]3b5e88d2013-09-06 11:03:06875 'cld_version%': '<(cld_version)',
[email protected]e6026962012-06-14 21:28:32876 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11877 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02878 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06879 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12880 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44881 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12882 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36883 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46884 'gyp_managed_install%': 0,
[email protected]97d63ec2013-06-25 18:42:07885 'create_standalone_apk%': 1,
[email protected]55d92492013-01-31 05:03:39886 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16887 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07888 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16889 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39890 'google_api_key%': '<(google_api_key)',
891 'google_default_client_id%': '<(google_default_client_id)',
892 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31893 'enable_managed_users%': '<(enable_managed_users)',
[email protected]1591c44d2013-07-15 13:28:43894 'native_discardable_memory%': '<(native_discardable_memory)',
895 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
[email protected]199def22013-02-21 17:52:29896 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
897 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25898 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]5e131c9f2013-07-10 19:21:05899 'enable_mdns%' : '<(enable_mdns)',
[email protected]2abbc1a2013-08-07 22:09:06900 'v8_optimized_debug': '<(v8_optimized_debug)',
[email protected]d80a06192013-08-23 23:33:41901 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]01971642012-03-07 14:39:56902
[email protected]c486e4e2013-01-08 16:49:07903 # Use system nspr instead of the bundled one.
904 'use_system_nspr%': 0,
905
[email protected]2f325672012-10-31 23:29:37906 # Use system protobuf instead of bundled one.
907 'use_system_protobuf%': 0,
908
[email protected]371e1092011-10-12 20:37:36909 # Use system yasm instead of bundled one.
910 'use_system_yasm%': 0,
911
[email protected]ea02e962013-04-26 11:18:16912 # Use system ICU instead of bundled one.
913 'use_system_icu%' : 0,
914
[email protected]cd00bd862012-02-29 00:40:36915 # Default to enabled PIE; this is important for ASLR but we may need to be
916 # able to turn it off for various reasons.
917 'linux_disable_pie%': 0,
918
[email protected]caa95c82009-11-23 22:39:32919 # The release channel that this build targets. This is used to restrict
920 # channel-specific build options, like which installer packages to create.
921 # The default is 'all', which does no channel-specific filtering.
922 'channel%': 'all',
923
[email protected]b3fb8092009-03-12 19:09:24924 # Override chromium_mac_pch and set it to 0 to suppress the use of
925 # precompiled headers on the Mac. Prefix header injection may still be
926 # used, but prefix headers will not be precompiled. This is useful when
927 # using distcc to distribute a build to compile slaves that don't
928 # share the same compiler executable as the system driving the compilation,
929 # because precompiled headers rely on pointers into a specific compiler
930 # executable's image. Setting this to 0 is needed to use an experimental
931 # Linux-Mac cross compiler distcc farm.
932 'chromium_mac_pch%': 1,
933
[email protected]27b687ec42012-03-26 22:22:15934 # The default value for mac_strip in target_defaults. This cannot be
935 # set there, per the comment about variable% in a target_defaults.
936 'mac_strip_release%': 1,
937
[email protected]f5ecbba12009-04-03 04:35:18938 # Set to 1 to enable code coverage. In addition to build changes
939 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
940 # project file called "coverage".
941 # Currently ignored on Windows.
942 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49943
[email protected]c0a12772013-08-22 00:08:31944 # Set to 1 to enable java code coverage. Instruments classes during build
945 # to produce .ec files during runtime.
946 'emma_coverage%': 0,
947
[email protected]9619e65d2012-05-23 19:06:52948 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
949 # This is useful for parallel compilation tools which can't support /Zi.
950 # Only used on Windows.
951 'win_z7%' : 0,
952
[email protected]7477ea6f2009-12-22 23:28:15953 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47954 # environment variable, the libcmt shim it uses sometimes gets in
955 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
956 # 'win_use_allocator_shim': 0,
957 # 'win_release_RuntimeLibrary': 2
958 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52959 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11960
[email protected]e5b2eaa2009-04-14 01:39:12961 # TODO(bradnelson): eliminate this when possible.
962 # To allow local gyp files to prevent release.vsprops from being included.
963 # Yes(1) means include release.vsprops.
964 # Once all vsprops settings are migrated into gyp, this can go away.
965 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23966
[email protected]cbd5fd52009-08-26 00:14:27967 # TODO(bradnelson): eliminate this when possible.
968 # To allow local gyp files to override additional linker options for msvs.
969 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19970 'msvs_use_common_linker_extras%': 1,
971
[email protected]1ffb6502009-06-02 07:46:24972 # TODO(sgk): eliminate this if possible.
973 # It would be nicer to support this via a setting in 'target_defaults'
974 # in chrome/app/locales/locales.gypi overriding the setting in the
975 # 'Debug' configuration in the 'target_defaults' dict below,
976 # but that doesn't work as we'd like.
977 'msvs_debug_link_incremental%': '2',
978
[email protected]1f790ef2011-01-11 20:45:36979 # Needed for some of the largest modules.
980 'msvs_debug_link_nonincremental%': '1',
981
[email protected]6f390be2012-08-16 18:57:10982 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06983 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26984 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06985
[email protected]1ff64292013-07-18 20:37:15986 # Experimental setting to break chrome.dll into multiple pieces based on
987 # process type.
988 'chrome_multiple_dll%': '0',
[email protected]56c248b2013-05-08 17:51:02989
[email protected]c54b41cb2012-08-24 20:58:24990 # The default settings for third party code for treating
991 # warnings-as-errors. Ideally, this would not be required, however there
992 # is some third party code that takes a long time to fix/roll. So, this
993 # flag allows us to have warnings as errors in general to prevent
994 # regressions in most modules, while working on the bits that are
995 # remaining.
996 'win_third_party_warn_as_error%': 'true',
997
[email protected]3bb37e62012-04-19 03:40:08998 # Clang stuff.
999 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:241000 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:151001
[email protected]5e781232011-01-28 02:57:591002 # These two variables can be set in GYP_DEFINES while running
1003 # |gclient runhooks| to let clang run a plugin in every compilation.
1004 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1005 # Example:
[email protected]93120fe2011-02-03 20:46:421006 # 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:591007
1008 'clang_load%': '',
1009 'clang_add_plugin%': '',
1010
[email protected]da1c8d692011-09-20 20:35:011011 # The default type of gtest.
1012 'gtest_target_type%': 'executable',
1013
[email protected]7664ab32011-02-01 23:35:251014 # Enable sampling based profiler.
1015 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1016 'profiling%': '0',
[email protected]0358c4832013-06-23 14:17:581017 # Profile without optimizing out stack frames when profiling==1.
1018 'profiling_full_stack_frames%': '0',
[email protected]7664ab32011-02-01 23:35:251019
[email protected]ae5b17322013-08-02 23:29:481020 # Enable strict glibc debug mode.
1021 'glibcxx_debug%': 0,
[email protected]36532f332010-08-25 00:22:011022 # And if we want to dump symbols for Breakpad-enabled builds.
1023 'linux_dump_symbols%': 0,
1024 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:031025 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:491026 # Strip the test binaries needed for Linux reliability tests.
1027 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:031028
[email protected]46ce5b562010-06-16 18:39:531029 # Enable TCMalloc.
1030 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:031031 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:241032
[email protected]d8b60602010-03-26 09:41:221033 # Disable TCMalloc's heapchecker.
1034 'linux_use_heapchecker%': 0,
1035
[email protected]64e2d4a42010-08-27 10:13:211036 # Disable shadow stack keeping used by heapcheck to unwind the stacks
1037 # better.
1038 'linux_keep_shadow_stacks%': 0,
1039
[email protected]556c5d72010-06-10 05:45:011040 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1041 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:351042 # Set to 1 to link against gsettings APIs instead of using dlopen().
1043 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:011044
[email protected]23eea4a42013-04-27 04:10:261045 # Default arch variant for MIPS.
1046 'mips_arch_variant%': 'mips32r2',
1047
[email protected]a63e8d22013-03-23 16:17:081048 # Enable use of OpenMAX DL FFT routines.
1049 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:341050
[email protected]9821d0d2010-04-16 22:40:371051 # Enable new NPDevice API.
1052 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:501053
1054 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:141055 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:501056
[email protected]6f51b27e2010-06-22 20:43:531057 # Enable a variable used elsewhere throughout the GYP files to determine
1058 # whether to compile in the sources for the GPU plugin / process.
1059 'enable_gpu%': 1,
1060
[email protected]e72e55b2011-01-06 22:19:301061 # .gyp files or targets should set chromium_code to 1 if they build
1062 # Chromium-specific code, as opposed to external code. This variable is
1063 # used to control such things as the set of warnings to enable, and
1064 # whether warnings are treated as errors.
1065 'chromium_code%': 0,
1066
[email protected]8d726a42012-02-09 03:49:001067 'release_valgrind_build%': 0,
1068
[email protected]b1eb341c2011-11-09 18:46:071069 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1070 'enable_wexit_time_destructors%': 0,
1071
[email protected]e72e55b2011-01-06 22:19:301072 # Set to 1 to compile with the built in pdf viewer.
1073 'internal_pdf%': 0,
1074
[email protected]9e1149d72012-07-24 01:27:171075 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1076 'internal_gles2_conform_tests%': 0,
1077
[email protected]e72e55b2011-01-06 22:19:301078 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1079 # so Cocoa is happy (http://crbug.com/20441).
1080 'locales': [
1081 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1082 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1083 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411084 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301085 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1086 'vi', 'zh-CN', 'zh-TW',
1087 ],
1088
[email protected]cc0322d2011-07-24 09:29:191089 # Pseudo locales are special locales which are used for testing and
1090 # debugging. They don't get copied to the final app. For more info,
1091 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1092 'pseudo_locales': [
1093 'fake-bidi',
1094 ],
1095
[email protected]bb6aba32011-01-07 19:04:431096 'grit_defines': [],
1097
[email protected]bd3bd442011-03-28 07:58:511098 # If debug_devtools is set to 1, JavaScript files for DevTools are
1099 # stored as is and loaded from disk. Otherwise, a concatenated file
1100 # is stored in resources.pak. It is still possible to load JS files
1101 # from disk by passing --debug-devtools cmdline switch.
1102 'debug_devtools%': 0,
1103
[email protected]464750f2011-10-24 23:16:181104 # The Java Bridge is not compiled in by default.
1105 'java_bridge%': 0,
1106
[email protected]1e013672012-06-29 22:12:201107 # Code signing for iOS binaries. The bots need to be able to disable this.
1108 'chromium_ios_signing%': 1,
1109
[email protected]33e1c372011-12-14 16:32:071110 # This flag is only used when disable_nacl==0 and disables all those
1111 # subcomponents which would require the installation of a native_client
1112 # untrusted toolchain.
1113 'disable_nacl_untrusted%': 0,
1114
[email protected]407dfa632011-12-23 11:59:351115 # Disable Dart by default.
1116 'enable_dart%': 0,
1117
[email protected]ff10b132012-02-29 22:53:301118 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1119 'msbuild_toolset%': '',
1120
[email protected]836285f22012-04-03 16:19:261121 # Native Client is enabled by default.
1122 'disable_nacl%': 0,
1123
[email protected]1e40ba002013-03-07 22:07:331124 # Portable Native Client is enabled by default.
1125 'disable_pnacl%': 0,
1126
[email protected]fa9d4e262012-08-21 04:39:001127 # Whether to build full debug version for Debug configuration on Android.
1128 # Compared to full debug version, the default Debug configuration on Android
1129 # has no full v8 debug, has size optimization and linker gc section, so that
1130 # we can build a debug version with acceptable size and performance.
1131 'android_full_debug%': 0,
1132
[email protected]65885272012-10-05 23:55:501133 # Sets the default version name and code for Android app, by default we
1134 # do a developer build.
1135 'android_app_version_name%': 'Developer Build',
1136 'android_app_version_code%': 0,
1137
[email protected]014d1ff12013-07-02 01:52:331138 # Contains data about the attached devices for gyp_managed_install.
1139 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1140
[email protected]740ebed2012-06-27 19:14:061141 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121142 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1143
[email protected]1f8d9402012-07-06 22:47:561144 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1145 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051146
[email protected]fd6d8822012-12-08 06:56:111147 # Whether we are using the rlz library or not. Platforms like Android send
1148 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221149 'enable_rlz%': 0,
1150
[email protected]3b4038e2013-07-28 08:59:541151 # Turns on the i18n support in V8.
1152 'v8_enable_i18n_support': 1,
1153
[email protected]d98df122013-08-12 13:56:431154 # Use the chromium skia by default.
1155 'use_system_skia%': '0',
1156
[email protected]2c14260f2013-09-11 11:48:221157 # Use brlapi from brltty for braille display support.
1158 'use_brlapi%': 0,
1159
[email protected]c66b5aa2013-09-12 13:29:411160 # Relative path to icu.gyp from this file.
1161 'icu_gyp_path': '../third_party/icu/icu.gyp',
1162
[email protected]912c55c2009-07-31 23:33:551163 'conditions': [
[email protected]5f683172013-04-27 01:53:191164 # The version of GCC in use, set later in platforms that use GCC and have
1165 # not explicitly chosen to build with clang. Currently, this means all
1166 # platforms except Windows, Mac and iOS.
1167 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1168 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551169 ['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:191170 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1171 }, {
1172 'gcc_version%': 0,
1173 }],
[email protected]1f8d9402012-07-06 22:47:561174 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1175 'windows_sdk_path%': '<(windows_sdk_default_path)',
1176 }, {
1177 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1178 }],
1179 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1180 'directx_sdk_path%': '<(directx_sdk_default_path)',
1181 }, {
1182 'directx_sdk_path%': '$(DXSDK_DIR)',
1183 }],
[email protected]54184ce72012-10-18 07:11:261184 ['OS=="win"', {
1185 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071186 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1187 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1188 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261189 }],
[email protected]1e013672012-06-29 22:12:201190 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231191 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431192 '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:271193 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461194 ['target_arch=="mipsel"', {
1195 'werror%': '',
1196 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461197 'nacl_untrusted_build%': 0,
1198 'linux_use_tcmalloc%': 0,
[email protected]59e85f472013-06-28 18:20:441199 }],
1200 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:461201 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281202 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461203 }],
[email protected]4c9cc6c2009-10-01 18:54:571204 # All Chrome builds have breakpad symbols, but only process the
1205 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081206 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571207 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571208 }],
[email protected]cbd5fd52009-08-26 00:14:271209 ],
[email protected]1e013672012-06-29 22:12:201210 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481211 ['OS=="ios"', {
1212 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191213 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151214 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071215 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351216 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131217 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471218 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411219 'locales==': [
[email protected]47cf7a32013-09-03 22:16:391220 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
1221 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb',
1222 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk',
1223 'vi', 'zh-CN', 'zh-TW',
[email protected]b6fbd6742013-03-15 11:15:411224 ],
[email protected]57871bc2012-08-20 16:28:121225
1226 # The Mac SDK is set for iOS builds and passed through to Mac
1227 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1228 # overridden from the command line the same way it is for a Mac build.
1229 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291230
[email protected]523f128d2013-08-06 17:36:111231 # iOS SDK and deployment target support. The |ios_sdk| value is left
1232 # blank so that when it is set in the project files it will be the
1233 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1234 # causes Xcode to spit out a warning for every single project file for
1235 # not using the "current" SDK.
[email protected]2c261532012-10-06 00:46:291236 'ios_sdk%': '',
1237 'ios_sdk_path%': '',
[email protected]523f128d2013-08-06 17:36:111238 'ios_deployment_target%': '6.0',
[email protected]fcd634182012-10-09 10:50:321239
1240 'conditions': [
1241 # ios_product_name is set to the name of the .app bundle as it should
1242 # appear on disk.
1243 ['branding=="Chrome"', {
1244 'ios_product_name%': 'Chrome',
1245 }, { # else: branding!="Chrome"
1246 'ios_product_name%': 'Chromium',
1247 }],
1248 ['branding=="Chrome" and buildtype=="Official"', {
1249 'ios_breakpad%': 1,
1250 }, { # else: branding!="Chrome" or buildtype!="Official"
1251 'ios_breakpad%': 0,
1252 }],
1253 ],
1254 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011255 ['OS=="android"', {
1256 # Location of Android NDK.
1257 'variables': {
1258 'variables': {
[email protected]5061d152013-01-16 17:45:571259 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1260 # they're passed to ant which uses a different relative path from
1261 # gyp.
1262 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1263 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1264 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041265 # Android API-level of the SDK used for compilation.
[email protected]6bfda61f2013-08-09 06:48:181266 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})',
1267 # Android SDK build tools (e.g. dx, aapt, aidl)
1268 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})',
[email protected]da1c8d692011-09-20 20:35:011269 },
[email protected]5061d152013-01-16 17:45:571270 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011271 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571272 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041273 'android_sdk_version%': '<(android_sdk_version)',
[email protected]6bfda61f2013-08-09 06:48:181274 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]225ec632013-04-03 18:20:221275 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]5061d152013-01-16 17:45:571276
[email protected]e20a8ad2013-03-18 15:05:041277 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571278
[email protected]5cfec2b2013-03-05 20:54:331279 # Android API level 14 is ICS (Android 4.0) which is the minimum
1280 # platform requirement for Chrome on Android, we use it for native
1281 # code compilation.
[email protected]5061d152013-01-16 17:45:571282 'conditions': [
1283 ['target_arch == "ia32"', {
1284 'android_app_abi%': 'x86',
1285 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331286 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571287 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1288 }],
1289 ['target_arch=="arm"', {
1290 'conditions': [
[email protected]7d6763422013-04-26 12:06:541291 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571292 'android_app_abi%': 'armeabi',
1293 }, {
1294 'android_app_abi%': 'armeabi-v7a',
1295 }],
1296 ],
1297 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331298 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571299 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1300 }],
[email protected]23eea4a42013-04-27 04:10:261301 ['target_arch == "mipsel"', {
1302 'android_app_abi%': 'mips',
1303 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1304 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471305 '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:261306 }],
[email protected]5061d152013-01-16 17:45:571307 ],
[email protected]da1c8d692011-09-20 20:35:011308 },
[email protected]5061d152013-01-16 17:45:571309 # Copy conditionally-set variables out one scope.
1310 'android_app_abi%': '<(android_app_abi)',
1311 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011312 'android_ndk_root%': '<(android_ndk_root)',
1313 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571314 'android_sdk_root%': '<(android_sdk_root)',
1315 'android_sdk_version%': '<(android_sdk_version)',
1316 'android_toolchain%': '<(android_toolchain)',
1317
[email protected]da1c8d692011-09-20 20:35:011318 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1319 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]6bfda61f2013-08-09 06:48:181320 'android_sdk_tools%': '<(android_sdk_tools)',
[email protected]e20a8ad2013-03-18 15:05:041321 'android_sdk%': '<(android_sdk)',
1322 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011323
[email protected]225ec632013-04-03 18:20:221324 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221325 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221326 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]225ec632013-04-03 18:20:221327
[email protected]c0f76312012-08-16 13:52:041328 # Location of the "strip" binary, used by both gyp and scripts.
1329 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1330
[email protected]225ec632013-04-03 18:20:221331 # Location of the "readelf" binary.
1332 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1333
[email protected]ef7ed7a2012-05-29 23:19:131334 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1335 # to specify the output directory for Ant in the Android build.
1336 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1337
[email protected]d8621ce2013-02-22 00:37:331338 # Determines whether we should optimize JNI generation at the cost of
1339 # breaking assumptions in the build system that when inputs have changed
1340 # the outputs should always change as well. This is meant purely for
1341 # developer builds, to avoid spurious re-linking of native files.
1342 'optimize_jni_generation%': 0,
1343
[email protected]da1c8d692011-09-20 20:35:011344 # Always uses openssl.
1345 'use_openssl%': 1,
1346
1347 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021348 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071349 'safe_browsing%': 2,
[email protected]9eb100e2011-10-14 05:08:221350 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021351 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181352 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581353 'build_ffmpegsumo%': 0,
1354 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021355
[email protected]ad17e342012-07-17 20:45:481356 # Disable Native Client.
1357 'disable_nacl%': 1,
1358
[email protected]58242012012-04-12 16:14:311359 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001360 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111361
[email protected]cdb756ef2012-04-05 18:34:531362 # Sessions are store separately in the Java side.
1363 'enable_session_service%': 0,
1364
[email protected]5fd2e842012-03-01 00:29:111365 # Set to 1 once we have a notification system for Android.
1366 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571367 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011368
[email protected]ad17e342012-07-17 20:45:481369 'p2p_apis%' : 0,
1370
[email protected]48de0fc2012-08-02 11:03:581371 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011372
1373 # Uses system APIs for decoding audio and video.
1374 'use_libffmpeg%': '0',
1375
[email protected]adb44342012-07-23 13:36:121376 # When building as part of the Android system, use system libraries
1377 # where possible to reduce ROM size.
1378 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361379 'use_system_sqlite%': 0, # '<(android_webview_build)',
1380 'use_system_expat%': '<(android_webview_build)',
1381 'use_system_icu%': '<(android_webview_build)',
1382 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121383
[email protected]0850e842013-01-19 03:44:311384 'enable_managed_users%': 0,
1385
[email protected]da1c8d692011-09-20 20:35:011386 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361387 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011388 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121389 ['android_webview_build==1', {
1390 # When building the WebView in the Android tree, jarjar will remap all
1391 # the class names, so the JNI generator needs to know this.
1392 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1393 }],
[email protected]e14a9f92009-08-05 19:26:071394 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471395 # Enable clang on mac by default!
1396 'clang%': 1,
1397 }], # OS=="mac"
1398 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291399 'variables': {
1400 # Mac OS X SDK and deployment target support. The SDK identifies
1401 # the version of the system headers that will be used, and
1402 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1403 # macro. "Maximum allowed" refers to the operating system version
1404 # whose APIs are available in the headers. The deployment target
1405 # identifies the minimum system version that the built products are
1406 # expected to function on. It corresponds to the
1407 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1408 # macros are available, #include <AvailabilityMacros.h>. Additional
1409 # documentation on these macros is available at
1410 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1411 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1412 # deployment target to 10.6. Other projects, such as O3D, may
1413 # override these defaults.
1414
1415 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1416 # about that is at least the specified version. In official builds,
1417 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1418 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1419 # path to the SDK; when set to a non-empty string, SDK detection
1420 # based on mac_sdk_min will be bypassed entirely.
1421 'mac_sdk_min%': '10.6',
1422 'mac_sdk_path%': '',
1423
1424 'mac_deployment_target%': '10.6',
1425 },
1426
1427 'mac_sdk_min': '<(mac_sdk_min)',
1428 'mac_sdk_path': '<(mac_sdk_path)',
1429 'mac_deployment_target': '<(mac_deployment_target)',
1430
[email protected]794fb4782011-12-14 19:10:561431 # Compile in Breakpad support by default so that it can be
1432 # tested, even if it is not enabled by default at runtime.
1433 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071434 'conditions': [
1435 # mac_product_name is set to the name of the .app bundle as it should
1436 # appear on disk. This duplicates data from
1437 # chrome/app/theme/chromium/BRANDING and
1438 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1439 # these names into the build system.
1440 ['branding=="Chrome"', {
1441 'mac_product_name%': 'Google Chrome',
1442 }, { # else: branding!="Chrome"
1443 'mac_product_name%': 'Chromium',
1444 }],
1445
[email protected]e14a9f92009-08-05 19:26:071446 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291447 '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:561448 # Enable uploading crash dumps.
1449 'mac_breakpad_uploads%': 1,
1450 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071451 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561452 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071453 'mac_keystone%': 1,
1454 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291455 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561456 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071457 'mac_breakpad%': 0,
1458 'mac_keystone%': 0,
1459 }],
1460 ],
[email protected]296bc452013-05-13 21:29:471461 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551462 ['OS=="win"', {
1463 'conditions': [
[email protected]a7a15f32013-08-06 06:09:431464 # This is the architecture convention used in WinSDK paths.
1465 ['target_arch=="ia32"', {
1466 'winsdk_arch%': 'x86',
1467 },{
1468 'winsdk_arch%': '<(target_arch)',
1469 }],
[email protected]8974e042010-06-21 18:06:521470 ['component=="shared_library"', {
1471 'win_use_allocator_shim%': 0,
[email protected]45b7c522013-08-21 06:58:221472 },{
1473 # Turn on multiple dll by default on Windows when in static_library.
1474 'chrome_multiple_dll%': 1,
[email protected]8974e042010-06-21 18:06:521475 }],
[email protected]fa0f16e2012-08-20 22:30:041476 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101477 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041478 # Not enabled for component=static_library because some targets
1479 # are too large and the toolchain fails due to the size of the
1480 # .obj files.
[email protected]6f390be2012-08-16 18:57:101481 'incremental_chrome_dll%': 1,
1482 }],
[email protected]10bb8c92009-08-07 21:16:031483 # Don't do incremental linking for large modules on 32-bit.
1484 ['MSVS_OS_BITS==32', {
1485 'msvs_large_module_debug_link_mode%': '1', # No
1486 },{
1487 'msvs_large_module_debug_link_mode%': '2', # Yes
1488 }],
[email protected]78764182013-01-23 20:32:511489 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501490 'msvs_express%': 1,
1491 'secure_atl%': 0,
1492 },{
1493 'msvs_express%': 0,
1494 'secure_atl%': 1,
1495 }],
[email protected]912c55c2009-07-31 23:33:551496 ],
[email protected]ef4fa4072009-12-04 22:46:501497 'nacl_win64_defines': [
1498 # This flag is used to minimize dependencies when building
1499 # Native Client loader for 64-bit Windows.
1500 'NACL_WIN64',
1501 ],
[email protected]912c55c2009-07-31 23:33:551502 }],
[email protected]bb6aba32011-01-07 19:04:431503
[email protected]a35aa362012-10-30 13:55:071504 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441505 'use_cups%': 1,
1506 }, {
1507 'use_cups%': 0,
1508 }],
[email protected]bb6aba32011-01-07 19:04:431509
[email protected]280755c2013-05-23 10:44:351510 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
1511 'enable_pepper_cdms%': 1,
1512 }, {
1513 'enable_pepper_cdms%': 0,
1514 }],
1515
[email protected]eb5f1672013-01-31 07:56:461516 # Native Client glibc toolchain is enabled
1517 # by default except on arm and mips.
1518 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321519 'disable_glibc%': 1,
1520 }, {
1521 'disable_glibc%': 0,
1522 }],
1523
[email protected]712c3da2012-09-24 21:31:241524 # Disable SSE2 when building for ARM or MIPS.
1525 ['target_arch=="arm" or target_arch=="mipsel"', {
1526 'disable_sse2%': 1,
1527 }, {
1528 'disable_sse2%': '<(disable_sse2)',
1529 }],
1530
[email protected]19fe8f0b2010-12-07 07:27:271531 # Set the relative path from this file to the GYP file of the JPEG
1532 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281533 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1534 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271535 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281536 }, {
1537 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1538 }],
[email protected]bb6aba32011-01-07 19:04:431539
[email protected]abcc9ac2011-05-16 20:04:351540 # Options controlling the use of GConf (the classic GNOME configuration
1541 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311542 ['chromeos==1', {
1543 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351544 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311545 }, {
1546 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351547 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311548 }],
1549
[email protected]4de39f82011-03-28 12:01:291550 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291551 ['branding=="Chrome"', {
1552 # TODO(mmoss) The .grd files look for _google_chrome, but for
1553 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291554 'grit_defines': ['-D', '_google_chrome',
1555 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291556 }, {
[email protected]4de39f82011-03-28 12:01:291557 'grit_defines': ['-D', '_chromium',
1558 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291559 }],
[email protected]bb6aba32011-01-07 19:04:431560 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131561 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431562 }],
[email protected]d628ab412013-09-07 03:26:371563 ['desktop_linux==1', {
1564 'grit_defines': ['-D', 'desktop_linux'],
1565 }],
[email protected]bb6aba32011-01-07 19:04:431566 ['toolkit_views==1', {
1567 'grit_defines': ['-D', 'toolkit_views'],
1568 }],
[email protected]8dd791d2011-09-16 16:37:301569 ['use_aura==1', {
1570 'grit_defines': ['-D', 'use_aura'],
1571 }],
[email protected]ed329be2012-01-03 22:02:161572 ['use_ash==1', {
1573 'grit_defines': ['-D', 'use_ash'],
1574 }],
[email protected]c329adf82011-10-05 14:34:571575 ['use_nss==1', {
1576 'grit_defines': ['-D', 'use_nss'],
1577 }],
[email protected]ff78e4e2013-05-03 19:19:151578 ['use_ozone==1', {
1579 'grit_defines': ['-D', 'use_ozone'],
1580 }],
[email protected]e47c32032011-03-01 19:26:201581 ['file_manager_extension==1', {
1582 'grit_defines': ['-D', 'file_manager_extension'],
1583 }],
[email protected]77a848262013-02-22 11:17:251584 ['image_loader_extension==1', {
1585 'grit_defines': ['-D', 'image_loader_extension'],
1586 }],
[email protected]9a425422011-01-11 00:53:181587 ['remoting==1', {
1588 'grit_defines': ['-D', 'remoting'],
1589 }],
[email protected]bb6aba32011-01-07 19:04:431590 ['use_titlecase_in_grd_files==1', {
1591 'grit_defines': ['-D', 'use_titlecase'],
1592 }],
[email protected]00dc155832011-02-01 18:51:191593 ['use_third_party_translations==1', {
1594 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121595 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161596 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1597 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121598 ],
[email protected]00dc155832011-02-01 18:51:191599 }],
[email protected]da1c8d692011-09-20 20:35:011600 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171601 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571602 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]7a2ce042013-05-28 03:20:351603 'conditions': [
1604 ['google_tv==1', {
1605 'grit_defines': ['-D', 'google_tv'],
1606 }],
1607 ],
[email protected]da1c8d692011-09-20 20:35:011608 }],
[email protected]cc1f0572013-07-31 05:41:031609 ['OS=="mac" or OS=="ios"', {
[email protected]d39e3862012-06-26 22:38:231610 'grit_defines': ['-D', 'scale_factors=2x'],
1611 }],
[email protected]ad563d02012-10-03 10:37:031612 ['OS == "ios"', {
1613 'grit_defines': [
[email protected]033346902013-08-20 01:01:121614 '-t', 'ios',
[email protected]ad563d02012-10-03 10:37:031615 # iOS uses a whitelist to filter resources.
1616 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1617 ],
[email protected]b4530c82013-05-09 09:20:011618
1619 # Enable clang and host builds when generating with ninja-ios.
1620 'conditions': [
1621 ['"<(GENERATOR)"=="ninja"', {
1622 'clang%': 1,
1623 'host_os%': "mac",
1624 }]
1625 ],
[email protected]ad563d02012-10-03 10:37:031626 }],
[email protected]6a3cd37e2012-04-17 17:13:341627 ['enable_extensions==1', {
1628 'grit_defines': ['-D', 'enable_extensions'],
1629 }],
[email protected]1e54c1c2013-08-12 17:16:051630 ['enable_printing!=0', {
[email protected]658677f2012-06-09 06:04:021631 'grit_defines': ['-D', 'enable_printing'],
1632 }],
[email protected]c2aad542012-07-31 20:40:331633 ['enable_themes==1', {
1634 'grit_defines': ['-D', 'enable_themes'],
1635 }],
[email protected]ef1dd5062012-12-17 06:41:331636 ['enable_app_list==1', {
1637 'grit_defines': ['-D', 'enable_app_list'],
1638 }],
[email protected]dc4e8b82012-11-15 03:58:161639 ['enable_settings_app==1', {
1640 'grit_defines': ['-D', 'enable_settings_app'],
1641 }],
[email protected]5411d8202013-01-30 01:32:151642 ['enable_google_now==1', {
1643 'grit_defines': ['-D', 'enable_google_now'],
1644 }],
[email protected]a3a720f2013-04-25 19:35:421645 ['use_concatenated_impulse_responses==1', {
1646 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1647 }],
[email protected]f66ddbd2013-06-27 14:17:041648 ['enable_webrtc==1', {
1649 'grit_defines': ['-D', 'enable_webrtc'],
1650 }],
[email protected]2163eb92013-08-27 00:06:241651 ['enable_mdns==1', {
1652 'grit_defines': ['-D', 'enable_mdns'],
1653 }],
[email protected]3bb37e62012-04-19 03:40:081654 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071655 'clang_chrome_plugins_flags': [
1656 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311657 ],
[email protected]5d451ad2011-02-11 16:43:461658 }],
[email protected]cfa2e1102011-04-27 22:30:231659
[email protected]696de4e62012-11-21 21:18:541660 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061661 'clang%': 1,
1662 }],
[email protected]f5d8c222012-08-29 17:47:021663 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091664 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571665 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091666 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021667 }],
[email protected]062522a2013-06-13 15:49:551668 ['lsan==1', {
1669 'clang%': 1,
1670 }],
[email protected]c9a829272012-07-04 07:51:121671 ['tsan==1', {
1672 'clang%': 1,
1673 }],
[email protected]a10ddd2d2013-02-26 20:06:591674 ['msan==1', {
1675 'clang%': 1,
1676 }],
[email protected]c9a829272012-07-04 07:51:121677
[email protected]7ce58b22012-09-26 05:17:251678 ['OS=="linux" and clang_type_profiler==1', {
1679 'clang%': 1,
1680 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321681 'conditions': [
1682 ['host_arch=="x64"', {
1683 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1684 }],
1685 ['host_arch=="ia32"', {
1686 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1687 # Clang in this directory at your own risk if needed for some
1688 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1689 # usage). Any failure by this compiler should not close the tree.
1690 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1691 }],
1692 ],
[email protected]7ce58b22012-09-26 05:17:251693 }],
1694
[email protected]a9318c72012-03-01 01:29:471695 # On valgrind bots, override the optimizer settings so we don't inline too
1696 # much and make the stacks harder to figure out.
1697 #
1698 # TODO(rnk): Kill off variables that no one else uses and just implement
1699 # them under a build_for_tool== condition.
1700 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1701 # gcc flags
1702 'mac_debug_optimization': '1',
1703 'mac_release_optimization': '1',
1704 'release_optimize': '1',
1705 'no_gc_sections': 1,
1706 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1707 '-fno-builtin -fno-optimize-sibling-calls',
1708 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1709 '-fno-builtin -fno-optimize-sibling-calls',
1710
1711 # MSVS flags for TSan on Pin and Windows.
1712 'win_debug_RuntimeChecks': '0',
1713 'win_debug_disable_iterator_debugging': '1',
1714 'win_debug_Optimization': '1',
1715 'win_debug_InlineFunctionExpansion': '0',
1716 'win_release_InlineFunctionExpansion': '0',
1717 'win_release_OmitFramePointers': '0',
1718
1719 'linux_use_tcmalloc': 1,
1720 'release_valgrind_build': 1,
1721 'werror': '',
1722 'component': 'static_library',
1723 'use_system_zlib': 0,
1724 }],
1725
1726 # Build tweaks for DrMemory.
1727 # TODO(rnk): Combine with tsan config to share the builder.
1728 # http://crbug.com/108155
1729 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471730 # These runtime checks force initialization of stack vars which blocks
1731 # DrMemory's uninit detection.
1732 'win_debug_RuntimeChecks': '0',
1733 # Iterator debugging is slow.
1734 'win_debug_disable_iterator_debugging': '1',
1735 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161736 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1737 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1738 # compiler bug, so we use /Ob1 instead.
1739 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471740 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501741 # Ditto for debug, to support bumping win_debug_Optimization.
1742 'win_debug_InlineFunctionExpansion': 0,
1743 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471744 # Keep the code under #ifndef NVALGRIND.
1745 'release_valgrind_build': 1,
1746 }],
[email protected]b6a5ac92012-10-29 18:17:221747
[email protected]f40a6912012-12-10 21:52:411748 # Enable RLZ on Win, Mac and ChromeOS.
1749 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221750 'enable_rlz%': 1,
1751 }],
[email protected]7d6763422013-04-26 12:06:541752
1753 # Set default compiler flags depending on ARM version.
1754 ['arm_version==5 and android_webview_build==0', {
1755 # Flags suitable for Android emulator
1756 'arm_arch%': 'armv5te',
1757 'arm_tune%': 'xscale',
1758 'arm_fpu%': '',
1759 'arm_float_abi%': 'soft',
1760 'arm_thumb%': 0,
1761 }],
1762 ['arm_version==6 and android_webview_build==0', {
1763 'arm_arch%': 'armv6',
1764 'arm_tune%': '',
1765 'arm_fpu%': '',
1766 'arm_float_abi%': 'soft',
1767 'arm_thumb%': 0,
1768 }],
1769 ['arm_version==7 and android_webview_build==0', {
1770 'arm_arch%': 'armv7-a',
1771 'arm_tune%': 'cortex-a8',
1772 'conditions': [
1773 ['arm_neon==1', {
1774 'arm_fpu%': 'neon',
1775 }, {
1776 'arm_fpu%': 'vfpv3-d16',
1777 }],
1778 ],
1779 'arm_float_abi%': 'softfp',
1780 'arm_thumb%': 1,
1781 }],
1782
1783 ['android_webview_build==1', {
1784 # The WebView build gets its cpu-specific flags from the Android build system.
1785 'arm_arch%': '',
1786 'arm_tune%': '',
1787 'arm_fpu%': '',
1788 'arm_float_abi%': '',
1789 'arm_thumb%': 0,
1790 }],
[email protected]912c55c2009-07-31 23:33:551791 ],
[email protected]a9318c72012-03-01 01:29:471792
[email protected]c91dc722013-06-12 22:53:011793
1794 # The path to the ANGLE library. TODO(apatrick): This is to help
1795 # transition to a new version of ANGLE at a new location. After the
1796 # transition is complete, this can be removed.
[email protected]a4f18a802013-06-24 10:40:261797 'angle_path': '<(DEPTH)/third_party/angle_dx11',
[email protected]c91dc722013-06-12 22:53:011798
[email protected]35958422011-09-28 02:03:591799 # List of default apps to install in new profiles. The first list contains
1800 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061801 # contains the destination location for each of the files. When a crx
1802 # is added or removed from the list, the chrome/browser/resources/
1803 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591804 'default_apps_list': [
1805 'browser/resources/default_apps/external_extensions.json',
1806 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061807 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591808 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001809 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231810 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591811 ],
1812 'default_apps_list_linux_dest': [
1813 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1814 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061815 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591816 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001817 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231818 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591819 ],
[email protected]2f80c312009-02-25 21:26:551820 },
1821 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261822 'variables': {
[email protected]a6e22132010-02-10 20:43:181823 # The condition that operates on chromium_code is in a target_conditions
1824 # section, and will not have access to the default fallback value of
1825 # chromium_code at the top of this file, or to the chromium_code
1826 # variable placed at the root variables scope of .gyp files, because
1827 # those variables are not set at target scope. As a workaround,
1828 # if chromium_code is not set at target scope, define it in target scope
1829 # to contain whatever value it has during early variable expansion.
1830 # That's enough to make it available during target conditional
1831 # processing.
1832 'chromium_code%': '<(chromium_code)',
1833
[email protected]7e0d664a2009-12-03 21:07:471834 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1835 'win_release_Optimization%': '2', # 2 = /Os
1836 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331837
1838 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241839 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111840 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241841 # Tri-state: blank is default, 1 on, 0 off
1842 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331843
[email protected]6b0507b2010-05-07 07:41:211844 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1845 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331846
[email protected]6b0507b2010-05-07 07:41:211847 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151848 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1849 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331850
[email protected]fac10d12010-11-08 16:00:311851 # VS inserts quite a lot of extra checks to algorithms like
1852 # std::partial_sort in Debug build which make them O(N^2)
1853 # instead of O(N*logN). This is particularly slow under memory
1854 # tools like ThreadSanitizer so we want it to be disablable.
1855 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1856 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471857
[email protected]5d60b0b2013-07-30 20:24:301858 # An application manifest fragment to declare compatibility settings for
1859 # 'executable' targets. Ignored in other target type.
1860 'win_exe_compatibility_manifest%':
1861 '<(DEPTH)\\build\\win\\compatibility.manifest',
1862
1863 # Set to 1 to generate external manifest instead of embedding it for
1864 # 'executable' target. Does nothing for other target type. This flag is
1865 # used to make mini_installer compatible with the component build.
1866 # See http://crbug.com/127233
1867 'win_use_external_manifest%': 0,
1868
[email protected]ffd984b12009-09-11 19:37:001869 'release_extra_cflags%': '',
1870 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001871
1872 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521873
[email protected]ef5c5f1b2011-12-17 02:16:241874 # the non-qualified versions are widely assumed to be *nix-only
1875 'win_release_extra_cflags%': '',
1876 'win_debug_extra_cflags%': '',
1877
[email protected]b1eb341c2011-11-09 18:46:071878 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1879 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1880
[email protected]ef3326702011-10-06 18:06:441881 # Only used by Windows build for now. Can be used to build into a
1882 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1883 # output files in src/build/VS2010_{Debug,Release}.
1884 'build_dir_prefix%': '',
1885
[email protected]9ac2db692012-06-08 01:01:571886 # Targets are by default not nacl untrusted code.
1887 'nacl_untrusted_build%': 0,
1888
[email protected]9c55d9d2012-11-15 23:28:441889 'pnacl_compile_flags': [
1890 # pnacl uses the clang compiler so we need to supress all the
1891 # same warnings as we do for clang.
1892 # TODO(sbc): Remove these if/when they are removed from the clang
1893 # build.
1894 '-Wno-unused-function',
1895 '-Wno-char-subscripts',
1896 '-Wno-c++11-extensions',
1897 '-Wno-unnamed-type-template-args',
1898 ],
1899
[email protected]8974e042010-06-21 18:06:521900 'conditions': [
1901 ['OS=="win" and component=="shared_library"', {
1902 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161903 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1904 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521905 }, {
1906 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1907 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1908 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1909 }],
[email protected]1e013672012-06-29 22:12:201910 ['OS=="ios"', {
1911 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1912 'mac_release_optimization%': 's', # Use -Os unless overridden
1913 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1914 }, {
1915 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1916 'mac_release_optimization%': '3', # Use -O3 unless overridden
1917 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1918 }],
[email protected]8974e042010-06-21 18:06:521919 ],
[email protected]1c966092009-08-20 21:19:261920 },
[email protected]c91dc722013-06-12 22:53:011921 'defines': [
1922 # Set this to use the new DX11 version of ANGLE.
1923 # TODO(apatrick): Remove this when the transition is complete.
[email protected]a4f18a802013-06-24 10:40:261924 'ANGLE_DX11',
[email protected]62a18a62013-09-10 22:34:551925 'WTF_VECTOR_INITIAL_SIZE=16',
[email protected]c91dc722013-06-12 22:53:011926 ],
[email protected]32aa8cc2009-03-04 21:36:391927 'conditions': [
[email protected]d808e212013-03-12 14:06:161928 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311929 'dependencies': [
1930 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1931 ],
1932 }],
[email protected]7ce58b22012-09-26 05:17:251933 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1934 'cflags_cc!': ['-fno-rtti'],
1935 'cflags_cc+': [
1936 '-frtti',
1937 '-gline-tables-only',
1938 '-fintercept-allocation-functions',
1939 ],
1940 'defines': ['TYPE_PROFILING'],
1941 'dependencies': [
1942 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1943 ],
1944 }],
[email protected]b0c45722013-01-23 04:47:321945 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1946 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1947 # See http://crbug.com/162818.
1948 'cflags+': ['-Wno-sentinel'],
1949 }],
[email protected]ff10b132012-02-29 22:53:301950 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1951 'msbuild_toolset': '<(msbuild_toolset)',
1952 }],
[email protected]32aa8cc2009-03-04 21:36:391953 ['branding=="Chrome"', {
1954 'defines': ['GOOGLE_CHROME_BUILD'],
1955 }, { # else: branding!="Chrome"
1956 'defines': ['CHROMIUM_BUILD'],
1957 }],
[email protected]286d9a12012-05-30 16:20:381958 ['OS=="mac" and component=="shared_library"', {
1959 'xcode_settings': {
1960 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1961 'LD_RUNPATH_SEARCH_PATHS': [
1962 # For unbundled binaries.
1963 '@loader_path/.',
1964 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1965 '@loader_path/../../..',
1966 ],
1967 },
1968 }],
[email protected]b6a5ac92012-10-29 18:17:221969 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171970 'defines': ['ENABLE_RLZ'],
1971 }],
[email protected]63e39a282011-07-13 20:41:281972 ['component=="shared_library"', {
1973 'defines': ['COMPONENT_BUILD'],
1974 }],
[email protected]06c756182010-04-27 18:31:311975 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171976 'defines': ['TOOLKIT_VIEWS=1'],
1977 }],
[email protected]1ee7c56c2011-10-19 14:51:331978 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111979 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1980 }],
[email protected]41423092011-08-25 15:39:581981 ['use_aura==1', {
1982 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351983 }],
[email protected]ed329be2012-01-03 22:02:161984 ['use_ash==1', {
1985 'defines': ['USE_ASH=1'],
1986 }],
[email protected]2a76009b2013-08-07 21:02:311987 ['use_cras==1', {
1988 'defines': ['USE_CRAS=1'],
1989 }],
[email protected]ff78e4e2013-05-03 19:19:151990 ['use_ozone==1', {
1991 'defines': ['USE_OZONE=1'],
1992 }],
[email protected]cb800562012-11-20 22:36:071993 ['use_default_render_theme==1', {
1994 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1995 }],
[email protected]e190d272012-08-30 17:36:441996 ['use_libjpeg_turbo==1', {
1997 'defines': ['USE_LIBJPEG_TURBO=1'],
1998 }],
[email protected]c329adf82011-10-05 14:34:571999 ['use_nss==1', {
2000 'defines': ['USE_NSS=1'],
2001 }],
[email protected]2fa2f2d82013-04-29 18:13:122002 ['use_x11==1', {
2003 'defines': ['USE_X11=1'],
2004 }],
[email protected]bd7b6fe2012-03-05 21:02:402005 ['enable_one_click_signin==1', {
2006 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2007 }],
[email protected]a47aa892011-11-22 03:12:312008 ['toolkit_uses_gtk==1 and toolkit_views==0', {
2009 # TODO(erg): We are progressively sealing up use of deprecated features
2010 # in gtk in preparation for an eventual porting to gtk3.
2011 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
2012 }],
[email protected]fdc5bed2010-01-09 01:16:572013 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:292014 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:502015 }],
[email protected]55d92492013-01-31 05:03:392016 ['google_tv==1', {
2017 'defines': ['GOOGLE_TV=1'],
2018 }],
[email protected]f56797b2011-09-25 00:04:352019 ['use_xi2_mt!=0', {
2020 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
2021 }],
[email protected]e47c32032011-03-01 19:26:202022 ['file_manager_extension==1', {
2023 'defines': ['FILE_MANAGER_EXTENSION=1'],
2024 }],
[email protected]77a848262013-02-22 11:17:252025 ['image_loader_extension==1', {
2026 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2027 }],
[email protected]7664ab32011-02-01 23:35:252028 ['profiling==1', {
2029 'defines': ['ENABLE_PROFILING=1'],
2030 }],
[email protected]ae5b17322013-08-02 23:29:482031 ['OS=="linux" and glibcxx_debug==1', {
2032 'defines': ['_GLIBCXX_DEBUG=1',],
2033 'cflags_cc+': ['-g'],
2034 }],
[email protected]542bf24a2010-06-11 23:08:172035 ['remoting==1', {
2036 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:002037 }],
[email protected]5b87e782012-02-09 18:19:322038 ['enable_webrtc==1', {
2039 'defines': ['ENABLE_WEBRTC=1'],
2040 }],
[email protected]d01120e62010-05-10 17:04:482041 ['proprietary_codecs==1', {
2042 'defines': ['USE_PROPRIETARY_CODECS'],
2043 }],
[email protected]7ddea9802012-02-22 23:08:052044 ['enable_viewport==1', {
2045 'defines': ['ENABLE_VIEWPORT'],
2046 }],
[email protected]280755c2013-05-23 10:44:352047 ['enable_pepper_cdms==1', {
2048 'defines': ['ENABLE_PEPPER_CDMS'],
2049 }],
[email protected]f31e2e52011-07-14 16:01:192050 ['configuration_policy==1', {
2051 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2052 }],
[email protected]9eb100e2011-10-14 05:08:222053 ['input_speech==1', {
2054 'defines': ['ENABLE_INPUT_SPEECH'],
2055 }],
[email protected]7cce3232011-10-28 10:41:572056 ['notifications==1', {
2057 'defines': ['ENABLE_NOTIFICATIONS'],
2058 }],
[email protected]1efbaaa2012-04-24 02:43:242059 ['enable_hidpi==1', {
2060 'defines': ['ENABLE_HIDPI=1'],
2061 }],
[email protected]9c1949e2009-10-02 19:59:542062 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:312063 'xcode_settings': {
2064 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2065 },
[email protected]9c1949e2009-10-02 19:59:542066 'conditions': [
[email protected]7df38122012-11-05 23:54:432067 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:302068 # Clang creates chubby debug information, which makes linking very
2069 # slow. For now, don't create debug information with clang. See
2070 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:432071 'conditions': [
2072 ['OS=="linux"', {
2073 'variables': {
2074 'debug_extra_cflags': '-g0',
2075 },
2076 }],
2077 # Android builds symbols on release by default, disable them.
2078 ['OS=="android"', {
2079 'variables': {
2080 'debug_extra_cflags': '-g0',
2081 'release_extra_cflags': '-g0',
2082 },
2083 }],
2084 ],
2085 }, { # else clang!=1
2086 'conditions': [
[email protected]c86fd472013-04-02 19:42:302087 ['OS=="win" and fastbuild==2', {
2088 # Completely disable debug information.
2089 'msvs_settings': {
2090 'VCLinkerTool': {
2091 'GenerateDebugInformation': 'false',
2092 },
2093 'VCCLCompilerTool': {
2094 'DebugInformationFormat': '0',
2095 },
2096 },
2097 }],
2098 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432099 'msvs_settings': {
2100 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312101 # This tells the linker to generate .pdbs, so that
2102 # we can get meaningful stack traces.
2103 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432104 },
2105 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312106 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432107 'DebugInformationFormat': '0',
2108 },
2109 },
2110 }],
[email protected]c86fd472013-04-02 19:42:302111 ['OS=="linux" and fastbuild==2', {
2112 'variables': {
2113 'debug_extra_cflags': '-g0',
2114 },
2115 }],
2116 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432117 'variables': {
2118 'debug_extra_cflags': '-g1',
2119 },
2120 }],
[email protected]c86fd472013-04-02 19:42:302121 ['OS=="android" and fastbuild==2', {
2122 'variables': {
2123 'debug_extra_cflags': '-g0',
2124 'release_extra_cflags': '-g0',
2125 },
2126 }],
2127 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432128 'variables': {
2129 'debug_extra_cflags': '-g1',
2130 'release_extra_cflags': '-g1',
2131 },
2132 }],
2133 ],
2134 }], # clang!=1
2135 ],
[email protected]9c1949e2009-10-02 19:59:542136 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012137 ['dcheck_always_on!=0', {
2138 'defines': ['DCHECK_ALWAYS_ON=1'],
2139 }], # dcheck_always_on!=0
[email protected]65b0819e2013-06-21 15:24:002140 ['logging_like_official_build!=0', {
2141 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2142 }], # logging_like_official_build!=0
[email protected]a1e87422013-07-09 21:47:012143 ['tracing_like_official_build!=0', {
2144 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2145 }], # tracing_like_official_build!=0
[email protected]7e0d664a2009-12-03 21:07:472146 ['win_use_allocator_shim==0', {
2147 'conditions': [
2148 ['OS=="win"', {
2149 'defines': ['NO_TCMALLOC'],
2150 }],
2151 ],
2152 }],
[email protected]43f28f832010-02-03 02:28:482153 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:152154 'defines': [
2155 'ENABLE_GPU=1',
2156 ],
2157 }],
[email protected]b1c2a5542010-10-08 12:44:402158 ['use_openssl==1', {
2159 'defines': [
2160 'USE_OPENSSL=1',
2161 ],
2162 }],
[email protected]ed154592010-04-29 00:18:502163 ['enable_eglimage==1', {
2164 'defines': [
2165 'ENABLE_EGLIMAGE=1',
2166 ],
2167 }],
[email protected]696de4e62012-11-21 21:18:542168 ['asan==1 and OS=="win"', {
2169 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2170 # produce appropriate pdbs.
2171 'msvs_settings': {
2172 'VCLinkerTool': {
2173 'Profile': 'true',
2174 },
2175 },
[email protected]2f047202013-06-14 06:36:392176 'defines': [
[email protected]bba0fea32013-06-14 12:29:352177 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:392178 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2179 ],
[email protected]696de4e62012-11-21 21:18:542180 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182181 ['coverage!=0', {
2182 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032183 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182184 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042185 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2186 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472187 },
[email protected]fc642ec2012-10-12 19:07:032188 }],
2189 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432190 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102191 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432192 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182193 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432194 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182195 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472196 }],
2197 ],
2198 }],
[email protected]da1c8d692011-09-20 20:35:012199 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182200 'cflags': [ '-ftest-coverage',
2201 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002202 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182203 }],
[email protected]e8f6ff42009-07-07 18:20:532204 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072205 'variables': {
2206 # Disable incremental linking for all modules.
2207 # 0: inherit, 1: disabled, 2: enabled.
2208 'msvs_debug_link_incremental': '1',
2209 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292210 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2211 # binaries for now.
2212 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072213 },
2214 'defines': [
2215 # Disable iterator debugging (huge speed boost without any
2216 # change in coverage results).
2217 '_HAS_ITERATOR_DEBUGGING=0',
2218 ],
[email protected]e8f6ff42009-07-07 18:20:532219 'msvs_settings': {
2220 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072221 # Enable profile information (necessary for coverage
2222 # instrumentation). This is incompatible with incremental
2223 # linking.
[email protected]e8f6ff42009-07-07 18:20:532224 'Profile': 'true',
2225 },
[email protected]e8f6ff42009-07-07 18:20:532226 }
2227 }], # OS==win
2228 ], # conditions for coverage
2229 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382230 ['OS=="win"', {
2231 'defines': [
2232 '__STD_C',
2233 '_CRT_SECURE_NO_DEPRECATE',
2234 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102235 # This define is required to pull in the new Win8 interfaces from
2236 # system headers like ShObjIdl.h.
2237 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382238 ],
2239 'include_dirs': [
2240 '<(DEPTH)/third_party/wtl/include',
2241 ],
[email protected]9619e65d2012-05-23 19:06:522242 'conditions': [
2243 ['win_z7!=0', {
2244 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092245 # Generates debug info when win_z7=1
2246 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2247 'VCLinkerTool': {
2248 'GenerateDebugInformation': 'true',
2249 },
[email protected]9619e65d2012-05-23 19:06:522250 'VCCLCompilerTool': {
2251 'DebugInformationFormat': '1',
2252 }
2253 }
2254 }],
[email protected]45a77072012-11-17 00:28:422255 ['"<(GENERATOR)"=="msvs"', {
2256 'msvs_settings': {
2257 'VCLinkerTool': {
2258 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2259 # have foo.pdb. The ninja generator already defaults to this and
2260 # can't handle the $(TargetPath) macro.
2261 'ProgramDatabaseFile': '$(TargetPath).pdb',
2262 }
2263 },
2264 }],
[email protected]9619e65d2012-05-23 19:06:522265 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382266 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022267 ['enable_task_manager==1', {
2268 'defines': [
2269 'ENABLE_TASK_MANAGER=1',
2270 ],
2271 }],
[email protected]6a3cd37e2012-04-17 17:13:342272 ['enable_extensions==1', {
2273 'defines': [
2274 'ENABLE_EXTENSIONS=1',
2275 ],
2276 }],
[email protected]13eb97d2012-01-05 01:07:122277 ['OS=="win" and branding=="Chrome"', {
2278 'defines': ['ENABLE_SWIFTSHADER'],
2279 }],
[email protected]407dfa632011-12-23 11:59:352280 ['enable_dart==1', {
2281 'defines': ['WEBKIT_USING_DART=1'],
2282 }],
[email protected]18e0f39b2012-01-17 16:47:342283 ['enable_plugin_installation==1', {
2284 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2285 }],
[email protected]6d17f6392012-12-05 05:24:542286 ['enable_plugins==1', {
2287 'defines': ['ENABLE_PLUGINS=1'],
2288 }],
[email protected]cdb756ef2012-04-05 18:34:532289 ['enable_session_service==1', {
2290 'defines': ['ENABLE_SESSION_SERVICE=1'],
2291 }],
[email protected]6b40bb582012-03-15 20:50:382292 ['enable_themes==1', {
2293 'defines': ['ENABLE_THEMES=1'],
2294 }],
[email protected]57e67ac2013-02-22 03:37:222295 ['enable_autofill_dialog==1', {
2296 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2297 }],
[email protected]0acdd772012-04-05 22:53:002298 ['enable_background==1', {
2299 'defines': ['ENABLE_BACKGROUND=1'],
2300 }],
[email protected]2e22e2f2012-03-15 21:53:102301 ['enable_automation==1', {
2302 'defines': ['ENABLE_AUTOMATION=1'],
2303 }],
[email protected]6ee43a72012-12-07 22:44:402304 ['enable_google_now==1', {
2305 'defines': ['ENABLE_GOOGLE_NOW=1'],
2306 }],
[email protected]3b5e88d2013-09-06 11:03:062307 ['cld_version!=0', {
2308 'defines': ['CLD_VERSION=<(cld_version)'],
2309 }],
[email protected]658677f2012-06-09 06:04:022310 ['enable_printing==1', {
[email protected]1e54c1c2013-08-12 17:16:052311 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2312 }],
2313 ['enable_printing==2', {
[email protected]658677f2012-06-09 06:04:022314 'defines': ['ENABLE_PRINTING=1'],
2315 }],
[email protected]c6ce08072013-07-31 07:48:532316 ['enable_spellcheck==1', {
2317 'defines': ['ENABLE_SPELLCHECK=1'],
2318 }],
[email protected]e6026962012-06-14 21:28:322319 ['enable_captive_portal_detection==1', {
2320 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2321 }],
[email protected]dc4e8b82012-11-15 03:58:162322 ['enable_app_list==1', {
2323 'defines': ['ENABLE_APP_LIST=1'],
2324 }],
2325 ['enable_settings_app==1', {
2326 'defines': ['ENABLE_SETTINGS_APP=1'],
2327 }],
[email protected]9bfe0ab2012-08-30 13:18:112328 ['disable_ftp_support==1', {
2329 'defines': ['DISABLE_FTP_SUPPORT=1'],
2330 }],
[email protected]0850e842013-01-19 03:44:312331 ['enable_managed_users==1', {
2332 'defines': ['ENABLE_MANAGED_USERS=1'],
2333 }],
[email protected]199def22013-02-21 17:52:292334 ['spdy_proxy_auth_origin != ""', {
2335 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2336 }],
2337 ['spdy_proxy_auth_property != ""', {
2338 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2339 }],
[email protected]f37e9412013-05-27 23:18:252340 ['spdy_proxy_auth_value != ""', {
2341 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2342 }],
[email protected]5cbeb502013-04-23 19:25:272343 ['enable_mdns==1', {
2344 'defines': ['ENABLE_MDNS=1'],
2345 }]
[email protected]a6e22132010-02-10 20:43:182346 ], # conditions for 'target_defaults'
2347 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072348 ['enable_wexit_time_destructors==1', {
2349 'conditions': [
2350 [ 'clang==1', {
2351 'cflags': [
2352 '-Wexit-time-destructors',
2353 ],
2354 'xcode_settings': {
2355 'WARNING_CFLAGS': [
2356 '-Wexit-time-destructors',
2357 ],
2358 },
2359 }],
2360 ],
2361 }],
[email protected]c14d8e772010-02-09 22:06:152362 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282363 'conditions': [
[email protected]1e013672012-06-29 22:12:202364 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332365 # We don't want to get warnings from third-party code,
2366 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282367 'cflags!': [
2368 '-Wall',
2369 '-Wextra',
[email protected]d8543312010-02-10 17:43:282370 ],
[email protected]167ec822011-10-24 22:05:272371 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002372 # Don't warn about hash_map in third-party code.
2373 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272374 ],
2375 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332376 # Don't warn about printf format problems.
2377 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222378 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002379 ],
[email protected]d16bd642011-07-25 23:59:182380 'cflags_cc!': [
2381 # TODO(fischman): remove this.
2382 # http://code.google.com/p/chromium/issues/detail?id=90453
2383 '-Wsign-compare',
2384 ]
[email protected]d8543312010-02-10 17:43:282385 }],
[email protected]82dd5eb32012-08-18 04:24:322386 # TODO: Fix all warnings on chromeos too.
2387 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2388 'cflags!': [
2389 '-Werror',
2390 ],
2391 }],
[email protected]bc073c062012-01-13 06:28:032392 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112393 'cflags': [
2394 # Don't warn about ignoring the return value from e.g. close().
2395 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032396 # BSD systems do not support this option, since they are usually
2397 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112398 '-Wno-unused-result',
2399 ],
2400 }],
[email protected]d8543312010-02-10 17:43:282401 [ 'OS=="win"', {
2402 'defines': [
2403 '_CRT_SECURE_NO_DEPRECATE',
2404 '_CRT_NONSTDC_NO_WARNINGS',
2405 '_CRT_NONSTDC_NO_DEPRECATE',
2406 '_SCL_SECURE_NO_DEPRECATE',
2407 ],
2408 'msvs_disabled_warnings': [4800],
2409 'msvs_settings': {
2410 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112411 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242412 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282413 'Detect64BitPortabilityProblems': 'false',
2414 },
2415 },
[email protected]c54b41cb2012-08-24 20:58:242416 'conditions': [
2417 ['buildtype=="Official"', {
2418 'msvs_settings': {
2419 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2420 }
2421 }],
2422 ],
[email protected]d8543312010-02-10 17:43:282423 }],
[email protected]0915c3b2012-11-22 17:24:072424 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422425 [ 'OS=="win" and component=="shared_library"', {
2426 'msvs_disabled_warnings': [
2427 4251, # class 'std::xx' needs to have dll-interface.
2428 ],
2429 }],
[email protected]1e013672012-06-29 22:12:202430 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282431 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062432 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282433 },
[email protected]3a352c362012-05-08 19:45:492434 'conditions': [
2435 ['buildtype=="Official"', {
2436 'xcode_settings': {
2437 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2438 },
2439 }],
2440 ],
[email protected]d8543312010-02-10 17:43:282441 }],
[email protected]1e013672012-06-29 22:12:202442 [ 'OS=="ios"', {
2443 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222444 # TODO(ios): Fix remaining warnings in third-party code, then
2445 # remove this; the Mac cleanup didn't get everything that's
2446 # flagged in an iOS build.
2447 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202448 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2449 },
2450 }],
[email protected]c14d8e772010-02-09 22:06:152451 ],
2452 }, {
[email protected]a5c598152012-01-27 04:55:132453 'includes': [
2454 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2455 'filename_rules.gypi',
2456 ],
[email protected]41af4f82012-11-08 00:09:312457 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152458 # C99 macros on Mac and Linux.
2459 'defines': [
[email protected]41af4f82012-11-08 00:09:312460 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152461 '__STDC_FORMAT_MACROS',
2462 ],
2463 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152464 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072465 # turn on warnings for signed/unsigned mismatch on chromium code.
2466 'msvs_settings': {
2467 'VCCLCompilerTool': {
2468 'AdditionalOptions': ['/we4389'],
2469 },
2470 },
[email protected]c14d8e772010-02-09 22:06:152471 }],
[email protected]63e39a282011-07-13 20:41:282472 ['OS=="win" and component=="shared_library"', {
2473 'msvs_disabled_warnings': [
2474 4251, # class 'std::xx' needs to have dll-interface.
2475 ],
2476 }],
[email protected]c14d8e772010-02-09 22:06:152477 ],
2478 }],
[email protected]a6e22132010-02-10 20:43:182479 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552480 'default_configuration': 'Debug',
2481 'configurations': {
[email protected]5153767c2009-12-22 01:52:502482 # VCLinkerTool LinkIncremental values below:
2483 # 0 == default
2484 # 1 == /INCREMENTAL:NO
2485 # 2 == /INCREMENTAL
2486 # Debug links incremental, Release does not.
2487 #
[email protected]7b99801e2010-11-03 17:26:232488 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502489 #
2490 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562491 'abstract': 1,
2492 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512493 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562494 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2495 'CharacterSet': '1',
2496 },
[email protected]f59e1302013-02-15 13:48:402497 # Add the default import libs.
2498 'msvs_settings':{
2499 'VCLinkerTool': {
2500 'AdditionalDependencies': [
2501 'kernel32.lib',
2502 'gdi32.lib',
2503 'winspool.lib',
2504 'comdlg32.lib',
2505 'advapi32.lib',
2506 'shell32.lib',
2507 'ole32.lib',
2508 'oleaut32.lib',
2509 'user32.lib',
2510 'uuid.lib',
2511 'odbc32.lib',
2512 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392513 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402514 ],
2515 },
2516 },
[email protected]5153767c2009-12-22 01:52:502517 },
2518 'x86_Base': {
2519 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502520 'msvs_settings': {
2521 'VCLinkerTool': {
2522 'TargetMachine': '1',
2523 },
2524 },
[email protected]2fa40782009-11-01 21:17:342525 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562526 },
[email protected]5153767c2009-12-22 01:52:502527 'x64_Base': {
2528 'abstract': 1,
2529 'msvs_configuration_platform': 'x64',
2530 'msvs_settings': {
2531 'VCLinkerTool': {
2532 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502533 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052534 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502535 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052536 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362537 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2538 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502539 },
[email protected]d26b4418ab2010-03-24 22:06:352540 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502541 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052542 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502543 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052544 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502545 },
2546 },
[email protected]5153767c2009-12-22 01:52:502547 },
2548 'Debug_Base': {
2549 'abstract': 1,
[email protected]14339762011-04-05 07:36:582550 'defines': [
2551 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2552 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2553 ],
[email protected]1c966092009-08-20 21:19:262554 'xcode_settings': {
[email protected]d5d593a2009-08-28 23:23:292555 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492556 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492557 '<@(debug_extra_cflags)',
2558 ],
[email protected]1c966092009-08-20 21:19:262559 },
[email protected]bb05e452009-10-29 21:24:562560 'msvs_settings': {
2561 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472562 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562563 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212564 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472565 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152566 'conditions': [
2567 # According to MSVS, InlineFunctionExpansion=0 means
2568 # "default inlining", not "/Ob0".
2569 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2570 ['win_debug_InlineFunctionExpansion==0', {
2571 'AdditionalOptions': ['/Ob0'],
2572 }],
2573 ['win_debug_InlineFunctionExpansion!=""', {
2574 'InlineFunctionExpansion':
2575 '<(win_debug_InlineFunctionExpansion)',
2576 }],
[email protected]fac10d12010-11-08 16:00:312577 ['win_debug_disable_iterator_debugging==1', {
2578 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2579 }],
[email protected]ef5c5f1b2011-12-17 02:16:242580
2581 # if win_debug_OmitFramePointers is blank, leave as default
2582 ['win_debug_OmitFramePointers==1', {
2583 'OmitFramePointers': 'true',
2584 }],
2585 ['win_debug_OmitFramePointers==0', {
2586 'OmitFramePointers': 'false',
2587 # The above is not sufficient (http://crbug.com/106711): it
2588 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2589 # perform FPO regardless, so we must explicitly disable.
2590 # We still want the false setting above to avoid having
2591 # "/Oy /Oy-" and warnings about overriding.
2592 'AdditionalOptions': ['/Oy-'],
2593 }],
[email protected]2ae6e022010-05-07 13:19:152594 ],
[email protected]ef5c5f1b2011-12-17 02:16:242595 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562596 },
2597 'VCLinkerTool': {
2598 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332599 # ASLR makes debugging with windbg difficult because Chrome.exe and
2600 # Chrome.dll share the same base name. As result, windbg will
2601 # name the Chrome.dll module like chrome_<base address>, where
2602 # <base address> typically changes with each launch. This in turn
2603 # means that breakpoints in Chrome.dll don't stick from one launch
2604 # to the next. For this reason, we turn ASLR off in debug builds.
2605 # Note that this is a three-way bool, where 0 means to pick up
2606 # the default setting, 1 is off and 2 is on.
2607 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562608 },
2609 'VCResourceCompilerTool': {
2610 'PreprocessorDefinitions': ['_DEBUG'],
2611 },
2612 },
[email protected]2f80c312009-02-25 21:26:552613 'conditions': [
[email protected]78204c92012-09-14 04:42:552614 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542615 'target_conditions': [
2616 ['_toolset=="target"', {
2617 'cflags': [
2618 '<@(debug_extra_cflags)',
2619 ],
2620 }],
[email protected]bb05e452009-10-29 21:24:562621 ],
[email protected]2f80c312009-02-25 21:26:552622 }],
[email protected]1e013672012-06-29 22:12:202623 # Disabled on iOS because it was causing a crash on startup.
2624 # TODO(michelea): investigate, create a reduced test and possibly
2625 # submit a radar.
2626 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352627 'xcode_settings': {
2628 'OTHER_CFLAGS': [
2629 '-fstack-protector-all', # Implies -fstack-protector
2630 ],
2631 },
2632 }],
[email protected]2f80c312009-02-25 21:26:552633 ],
2634 },
[email protected]5153767c2009-12-22 01:52:502635 'Release_Base': {
2636 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552637 'defines': [
2638 'NDEBUG',
2639 ],
[email protected]1c966092009-08-20 21:19:262640 'xcode_settings': {
2641 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2642 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002643 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262644 },
[email protected]bb05e452009-10-29 21:24:562645 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472646 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472647 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152648 'conditions': [
[email protected]2212d272011-12-20 21:37:372649 # In official builds, each target will self-select
2650 # an optimization level.
2651 ['buildtype!="Official"', {
2652 'Optimization': '<(win_release_Optimization)',
2653 },
2654 ],
[email protected]2ae6e022010-05-07 13:19:152655 # According to MSVS, InlineFunctionExpansion=0 means
2656 # "default inlining", not "/Ob0".
2657 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2658 ['win_release_InlineFunctionExpansion==0', {
2659 'AdditionalOptions': ['/Ob0'],
2660 }],
2661 ['win_release_InlineFunctionExpansion!=""', {
2662 'InlineFunctionExpansion':
2663 '<(win_release_InlineFunctionExpansion)',
2664 }],
[email protected]626d2d22011-10-11 15:47:332665
[email protected]ef5c5f1b2011-12-17 02:16:242666 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332667 ['win_release_OmitFramePointers==1', {
2668 'OmitFramePointers': 'true',
2669 }],
2670 ['win_release_OmitFramePointers==0', {
2671 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242672 # The above is not sufficient (http://crbug.com/106711): it
2673 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2674 # perform FPO regardless, so we must explicitly disable.
2675 # We still want the false setting above to avoid having
2676 # "/Oy /Oy-" and warnings about overriding.
2677 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332678 }],
[email protected]2ae6e022010-05-07 13:19:152679 ],
[email protected]ef5c5f1b2011-12-17 02:16:242680 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472681 },
[email protected]bb05e452009-10-29 21:24:562682 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342683 # LinkIncremental is a tri-state boolean, where 0 means default
2684 # (i.e., inherit from parent solution), 1 means false, and
2685 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562686 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342687 # This corresponds to the /PROFILE flag which ensures the PDB
2688 # file contains FIXUP information (growing the PDB file by about
2689 # 5%) but does not otherwise alter the output binary. This
2690 # information is used by the Syzygy optimization tool when
2691 # decomposing the release image.
2692 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562693 },
2694 },
[email protected]2f80c312009-02-25 21:26:552695 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162696 ['msvs_use_common_release', {
2697 'includes': ['release.gypi'],
2698 }],
[email protected]7bdd7d7c2012-11-01 10:36:162699 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582700 'defines': [
2701 'NVALGRIND',
2702 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2703 ],
[email protected]ee857512010-05-14 08:24:422704 }, {
[email protected]14339762011-04-05 07:36:582705 'defines': [
[email protected]2f047202013-06-14 06:36:392706 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582707 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2708 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2709 ],
[email protected]92822e82009-09-18 14:26:562710 }],
[email protected]7e0d664a2009-12-03 21:07:472711 ['win_use_allocator_shim==0', {
2712 'defines': ['NO_TCMALLOC'],
2713 }],
[email protected]37305ae2012-12-11 01:54:582714 ['os_posix==1 and chromium_code==1', {
2715 # Non-chromium code is not guaranteed to compile cleanly
2716 # with _FORTIFY_SOURCE. Also, fortified build may fail
2717 # when optimizations are disabled, so only do that for Release
2718 # build.
2719 'defines': [
2720 '_FORTIFY_SOURCE=2',
2721 ],
2722 }],
[email protected]7df38122012-11-05 23:54:432723 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542724 'target_conditions': [
2725 ['_toolset=="target"', {
2726 'cflags': [
2727 '<@(release_extra_cflags)',
2728 ],
2729 }],
[email protected]bb05e452009-10-29 21:24:562730 ],
2731 }],
[email protected]b64ec822013-05-23 12:57:412732 ['OS=="ios"', {
2733 'defines': [
2734 'NS_BLOCK_ASSERTIONS=1',
2735 ],
2736 }],
[email protected]2f80c312009-02-25 21:26:552737 ],
2738 },
[email protected]5153767c2009-12-22 01:52:502739 #
2740 # Concrete configurations
2741 #
2742 'Debug': {
2743 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2744 },
2745 'Release': {
2746 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502747 },
[email protected]f926fa0a2009-08-04 22:50:132748 'conditions': [
2749 [ 'OS=="win"', {
2750 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502751 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502752 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302753 },
2754 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502755 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302756 },
[email protected]f926fa0a2009-08-04 22:50:132757 }],
2758 ],
[email protected]2f80c312009-02-25 21:26:552759 },
2760 },
2761 'conditions': [
[email protected]43539ec2012-11-20 22:35:252762 ['os_posix==1', {
2763 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252764 'ldflags': [
2765 '-Wl,-z,now',
2766 '-Wl,-z,relro',
2767 ],
[email protected]43539ec2012-11-20 22:35:252768 },
2769 }],
[email protected]d2ca75c2013-02-01 05:47:172770 ['os_posix==1 and chromeos==0', {
2771 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2772 # and we want to avoid overriding this, so stack-protector is only
2773 # enabled when not building on Chrome OS.
2774 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2775 # supports it.
2776 'target_defaults': {
2777 'cflags': [
2778 '-fstack-protector',
2779 '--param=ssp-buffer-size=4',
2780 ],
2781 },
2782 }],
[email protected]1e013672012-06-29 22:12:202783 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262784 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272785 # Enable -Werror by default, but put it in a variable so it can
2786 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2787 'variables': {
[email protected]cbbb3472012-01-25 18:32:312788 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202789 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272790 },
[email protected]6863896f2012-01-25 17:51:362791 'defines': [
2792 '_FILE_OFFSET_BITS=64',
2793 ],
[email protected]9d384032009-03-20 23:13:262794 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162795 '<(werror)', # See note above about the werror variable.
2796 '-pthread',
2797 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292798 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162799 '-Wall',
[email protected]0fa17082010-03-26 00:48:052800 # TODO(evan): turn this back on once all the builds work.
2801 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202802 # Don't warn about unused function params. We use those everywhere.
2803 '-Wno-unused-parameter',
2804 # Don't warn about the "struct foo f = {0};" initialization pattern.
2805 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122806 # Don't export any symbols (for example, to plugins we dlopen()).
2807 # Note: this is *required* to make some plugins work.
2808 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352809 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242810 ],
2811 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222812 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242813 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362814 # Make inline functions have hidden visiblity by default.
2815 # Surprisingly, not covered by -fvisibility=hidden.
2816 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172817 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2818 # so we specify it explicitly.
2819 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182820 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172821 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262822 ],
[email protected]a6cf87e2009-04-03 04:07:382823 'ldflags': [
[email protected]138241f2010-03-30 23:53:102824 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262825 ],
[email protected]1e013672012-06-29 22:12:202826 'libraries' : [
2827 '<(libraries_for_target)',
2828 ],
[email protected]3aacaf952009-04-02 15:34:092829 'configurations': {
[email protected]5153767c2009-12-22 01:52:502830 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312831 'variables': {
2832 'debug_optimize%': '0',
2833 },
[email protected]3aacaf952009-04-02 15:34:092834 'defines': [
2835 '_DEBUG',
2836 ],
2837 'cflags': [
[email protected]95ad2032012-08-24 00:49:252838 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092839 '-g',
2840 ],
[email protected]da1c8d692011-09-20 20:35:012841 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342842 ['OS=="android"', {
[email protected]3f05e912013-04-11 20:38:342843 'ldflags': [
[email protected]933d0722013-07-03 04:32:492844 '-Wl,--fatal-warnings',
2845 # Only link with needed input sections. This is to avoid
2846 # getting undefined reference to __cxa_bad_typeid in the CDU
2847 # library.
[email protected]3f05e912013-04-11 20:38:342848 '-Wl,--gc-sections',
[email protected]933d0722013-07-03 04:32:492849 # Warn in case of text relocations.
2850 '-Wl,--warn-shared-textrel',
[email protected]3f05e912013-04-11 20:38:342851 ],
2852 }],
[email protected]fa9d4e262012-08-21 04:39:002853 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552854 # Some configurations are copied from Release_Base to reduce
2855 # the binary size.
2856 'variables': {
2857 'debug_optimize%': 's',
2858 },
[email protected]da1c8d692011-09-20 20:35:012859 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552860 '-fomit-frame-pointer',
2861 '-fdata-sections',
2862 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012863 ],
[email protected]8a37e4502012-08-14 22:42:552864 'ldflags': [
2865 '-Wl,-O1',
2866 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552867 ],
[email protected]da1c8d692011-09-20 20:35:012868 }],
[email protected]d4c0ec5b2013-03-10 03:07:452869 ['OS=="linux" and target_arch=="ia32"', {
2870 'ldflags': [
2871 '-Wl,--no-as-needed',
2872 ],
2873 }],
[email protected]da1c8d692011-09-20 20:35:012874 ],
[email protected]5315f2842009-04-28 00:43:272875 },
[email protected]5153767c2009-12-22 01:52:502876 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012877 'variables': {
2878 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512879 # Binaries become big and gold is unable to perform GC
2880 # and remove unused sections for some of test targets
2881 # on 32 bit platform.
2882 # (This is currently observed only in chromeos valgrind bots)
2883 # The following flag is to disable --gc-sections linker
2884 # option for these bots.
2885 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122886
2887 # TODO(bradnelson): reexamine how this is done if we change the
2888 # expansion of configurations
2889 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012890 },
[email protected]3aacaf952009-04-02 15:34:092891 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182892 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532893 # Don't emit the GCC version ident directives, they just end up
2894 # in the .comment section taking up binary size.
2895 '-fno-ident',
2896 # Put data and code in their own sections, so that unused symbols
2897 # can be removed at link time with --gc-sections.
2898 '-fdata-sections',
2899 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092900 ],
[email protected]c902f2c2010-08-06 20:04:182901 'ldflags': [
2902 # Specifically tell the linker to perform optimizations.
2903 # See http://lwn.net/Articles/192624/ .
2904 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222905 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182906 ],
[email protected]1dd529642010-05-15 01:02:512907 'conditions' : [
2908 ['no_gc_sections==0', {
2909 'ldflags': [
2910 '-Wl,--gc-sections',
2911 ],
2912 }],
[email protected]da1c8d692011-09-20 20:35:012913 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582914 'variables': {
2915 'release_optimize%': 's',
2916 },
[email protected]da1c8d692011-09-20 20:35:012917 'cflags': [
2918 '-fomit-frame-pointer',
2919 ],
[email protected]933d0722013-07-03 04:32:492920 'ldflags': [
2921 '-Wl,--fatal-warnings',
2922 # Warn in case of text relocations.
2923 '-Wl,--warn-shared-textrel',
2924 ],
[email protected]da1c8d692011-09-20 20:35:012925 }],
[email protected]ecf7b6482010-10-13 09:15:202926 ['clang==1', {
2927 'cflags!': [
2928 '-fno-ident',
2929 ],
2930 }],
[email protected]7664ab32011-02-01 23:35:252931 ['profiling==1', {
2932 'cflags': [
2933 '-fno-omit-frame-pointer',
2934 '-g',
2935 ],
[email protected]0358c4832013-06-23 14:17:582936 'conditions' : [
2937 ['profiling_full_stack_frames==1', {
2938 'cflags': [
2939 '-fno-inline',
2940 '-fno-optimize-sibling-calls',
2941 ],
2942 }],
2943 ],
[email protected]7664ab32011-02-01 23:35:252944 }],
[email protected]bdbe3d22013-02-22 04:10:352945 # Can be omitted to reduce output size. Does not seem to affect
2946 # crash reporting.
2947 ['target_arch=="ia32"', {
2948 'cflags': [
2949 '-fno-unwind-tables',
2950 '-fno-asynchronous-unwind-tables',
2951 ],
2952 }],
[email protected]8d726a42012-02-09 03:49:002953 ],
[email protected]3aacaf952009-04-02 15:34:092954 },
2955 },
[email protected]601b540222009-04-03 21:32:042956 'variants': {
2957 'coverage': {
2958 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2959 'ldflags': ['-fprofile-arcs'],
2960 },
2961 'profile': {
2962 'cflags': ['-pg', '-g'],
2963 'ldflags': ['-pg'],
2964 },
2965 'symbols': {
2966 'cflags': ['-g'],
2967 },
2968 },
[email protected]606116d22009-05-06 22:38:232969 'conditions': [
[email protected]04b482602011-09-14 02:36:212970 ['target_arch=="ia32"', {
2971 'target_conditions': [
2972 ['_toolset=="target"', {
2973 'asflags': [
2974 # Needed so that libs with .s files (e.g. libicudata.a)
2975 # are compatible with the general 32-bit-ness.
2976 '-32',
2977 ],
2978 # All floating-point computations on x87 happens in 80-bit
2979 # precision. Because the C and C++ language standards allow
2980 # the compiler to keep the floating-point values in higher
2981 # precision than what's specified in the source and doing so
2982 # is more efficient than constantly rounding up to 64-bit or
2983 # 32-bit precision as specified in the source, the compiler,
2984 # especially in the optimized mode, tries very hard to keep
2985 # values in x87 floating-point stack (in 80-bit precision)
2986 # as long as possible. This has important side effects, that
2987 # the real value used in computation may change depending on
2988 # how the compiler did the optimization - that is, the value
2989 # kept in 80-bit is different than the value rounded down to
2990 # 64-bit or 32-bit. There are possible compiler options to
2991 # make this behavior consistent (e.g. -ffloat-store would keep
2992 # all floating-values in the memory, thus force them to be
2993 # rounded to its original precision) but they have significant
2994 # runtime performance penalty.
2995 #
2996 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2997 # which keep floating-point values in SSE registers in its
2998 # native precision (32-bit for single precision, and 64-bit
2999 # for double precision values). This means the floating-point
3000 # value used during computation does not change depending on
3001 # how the compiler optimized the code, since the value is
3002 # always kept in its specified precision.
3003 'conditions': [
3004 ['branding=="Chromium" and disable_sse2==0', {
3005 'cflags': [
3006 '-march=pentium4',
3007 '-msse2',
3008 '-mfpmath=sse',
3009 ],
3010 }],
3011 # ChromeOS targets Pinetrail, which is sse3, but most of the
3012 # benefit comes from sse2 so this setting allows ChromeOS
3013 # to build on other CPUs. In the future -march=atom would
3014 # help but requires a newer compiler.
3015 ['chromeos==1 and disable_sse2==0', {
3016 'cflags': [
3017 '-msse2',
[email protected]1d07e92b2013-08-16 19:54:513018 '-mfpmath=sse',
[email protected]04b482602011-09-14 02:36:213019 ],
3020 }],
[email protected]0a0063c52013-03-29 06:36:213021 # Use gold linker for Android ia32 target.
3022 ['OS=="android"', {
3023 'cflags': [
3024 '-fuse-ld=gold',
3025 ],
3026 'ldflags': [
3027 '-fuse-ld=gold',
3028 ],
3029 }],
[email protected]04b482602011-09-14 02:36:213030 # Install packages have started cropping up with
3031 # different headers between the 32-bit and 64-bit
3032 # versions, so we have to shadow those differences off
3033 # and make sure a 32-bit-on-64-bit build picks up the
3034 # right files.
[email protected]32594022012-05-10 03:22:283035 # For android build, use NDK headers instead of host headers
3036 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:213037 'include_dirs+': [
3038 '/usr/include32',
3039 ],
3040 }],
3041 ],
3042 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
3043 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:063044 'cflags': [
[email protected]04b482602011-09-14 02:36:213045 '-m32',
3046 '-mmmx',
3047 ],
3048 'ldflags': [
3049 '-m32',
[email protected]ffde7932009-05-29 00:39:063050 ],
3051 }],
[email protected]606116d22009-05-06 22:38:233052 ],
3053 }],
[email protected]3dda8a962009-08-10 18:58:073054 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:293055 'target_conditions': [
3056 ['_toolset=="target"', {
3057 'cflags_cc': [
3058 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3059 # has changed whenever it encounters a varargs function. This
3060 # silences those warnings, as they are not helpful and
3061 # clutter legitimate warnings.
3062 '-Wno-abi',
3063 ],
3064 'conditions': [
[email protected]7d6763422013-04-26 12:06:543065 ['arm_arch!=""', {
3066 'cflags': [
3067 '-march=<(arm_arch)',
3068 ],
3069 }],
3070 ['arm_tune!=""', {
3071 'cflags': [
3072 '-mtune=<(arm_tune)',
3073 ],
3074 }],
3075 ['arm_fpu!=""', {
3076 'cflags': [
3077 '-mfpu=<(arm_fpu)',
3078 ],
3079 }],
3080 ['arm_float_abi!=""', {
3081 'cflags': [
3082 '-mfloat-abi=<(arm_float_abi)',
3083 ],
3084 }],
3085 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:293086 'cflags': [
3087 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:293088 ]
3089 }],
[email protected]da1c8d692011-09-20 20:35:013090 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:533091 # Most of the following flags are derived from what Android
3092 # uses by default when building for arm, reference for which
3093 # can be found in the following file in the Android NDK:
3094 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3095 'cflags': [
3096 # The tree-sra optimization (scalar replacement for
3097 # aggregates enabling subsequent optimizations) leads to
3098 # invalid code generation when using the Android NDK's
3099 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:433100 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:533101 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483102 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:533103 '-Wno-psabi',
3104 ],
[email protected]ad17e342012-07-17 20:45:483105 # Android now supports .relro sections properly.
3106 # NOTE: While these flags enable the generation of .relro
3107 # sections, the generated libraries can still be loaded on
3108 # older Android platform versions.
3109 'ldflags': [
3110 '-Wl,-z,relro',
3111 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:483112 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:483113 ],
[email protected]da1c8d692011-09-20 20:35:013114 'conditions': [
[email protected]7d6763422013-04-26 12:06:543115 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:223116 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:013117 }],
[email protected]4c48ef102012-11-29 22:00:383118 ['profiling==1', {
3119 'cflags': [
3120 '-marm', # Probably reduntant, but recommend by "perf" docs.
3121 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3122 ],
3123 }],
[email protected]220ea5932012-08-09 10:44:073124 ['clang==1', {
3125 'cflags!': [
3126 # Clang does not support the following options.
3127 '-mthumb-interwork',
3128 '-finline-limit=64',
3129 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483130 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073131 '-Wno-psabi',
3132 ],
3133 }],
[email protected]da1c8d692011-09-20 20:35:013134 ],
3135 }],
[email protected]3dda8a962009-08-10 18:58:073136 ],
3137 }],
3138 ],
3139 }],
[email protected]23eea4a42013-04-27 04:10:263140 ['target_arch=="mipsel"', {
3141 'target_conditions': [
3142 ['_toolset=="target"', {
3143 'conditions': [
[email protected]3a626e02013-06-27 12:58:343144 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263145 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
[email protected]3a626e02013-06-27 12:58:343146 }],
3147 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
[email protected]23eea4a42013-04-27 04:10:263148 'cflags': ['-mips32', '-Wa,-mips32'],
3149 }],
3150 ],
3151 'cflags': [
3152 '-EL',
3153 '-mhard-float',
3154 ],
3155 'ldflags': [
3156 '-EL',
3157 '-Wl,--no-keep-memory'
3158 ],
3159 'cflags_cc': [
3160 '-Wno-uninitialized',
3161 ],
3162 }],
3163 ],
3164 }],
[email protected]2fb843b2010-08-12 02:11:083165 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583166 'cflags': [
3167 '-fPIC',
3168 ],
[email protected]d3f692b32011-12-14 19:04:353169 'ldflags': [
3170 '-fPIC',
3171 ],
[email protected]c76723a2010-01-25 23:10:583172 }],
[email protected]ee28c9f2009-09-04 01:53:013173 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573174 'target_conditions': [
3175 ['_toolset=="target"', {
3176 'cflags': [
3177 '--sysroot=<(sysroot)',
3178 ],
3179 'ldflags': [
3180 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153181 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573182 ],
3183 }]]
[email protected]ee28c9f2009-09-04 01:53:013184 }],
[email protected]58680ce2010-09-18 00:09:153185 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123186 'cflags': [
3187 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073188
[email protected]7ddcb1d2013-04-19 04:52:533189 # Don't die on dtoa code that uses a char as an array index.
3190 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073191
3192 # Clang spots more unused functions.
3193 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103194
3195 # Warns on switches on enums that cover all enum values but
3196 # also contain a default: branch. Chrome is full of that.
3197 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513198
3199 # Warns when a const char[] is converted to bool.
3200 '-Wstring-conversion',
[email protected]ce889c22013-07-16 22:37:183201
3202 # C++11-related flags:
3203
[email protected]8dec02e2013-04-30 21:40:073204 # This warns on using ints as initializers for floats in
3205 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3206 # which happens in several places in chrome code. Not sure if
3207 # this is worth fixing.
3208 '-Wno-c++11-narrowing',
3209
[email protected]00c83cc2013-07-25 00:55:503210 # TODO(thakis): Remove, http://crbug.com/263960
[email protected]8dec02e2013-04-30 21:40:073211 '-Wno-reserved-user-defined-literal',
[email protected]361b47c2013-07-02 15:13:243212
3213 # Clang considers the `register` keyword as deprecated, but e.g.
3214 # code generated by flex (used in angle) contains that keyword.
3215 # http://crbug.com/255186
3216 '-Wno-deprecated-register',
[email protected]8dec02e2013-04-30 21:40:073217 ],
[email protected]ce889c22013-07-16 22:37:183218 'cflags!': [
3219 # Clang doesn't seem to know know this flag.
3220 '-mfpmath=sse',
3221 ],
[email protected]8dec02e2013-04-30 21:40:073222 'cflags_cc': [
3223 # See the comment in the Mac section for what it takes to move
3224 # this to -std=c++11.
3225 '-std=gnu++11',
3226 ],
3227 }],
[email protected]bca3e082013-05-30 21:13:443228 ['clang==1 and OS=="android"', {
[email protected]ce889c22013-07-16 22:37:183229 # Android uses stlport, whose include/new defines
3230 # `void operator delete[](void* ptr) throw();`, which
3231 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3232 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3233 # via -isystem instead.
3234 'cflags_cc': [
3235 '-Wno-implicit-exception-spec-mismatch',
[email protected]8dec02e2013-04-30 21:40:073236 ],
3237 }],
[email protected]5d451ad2011-02-11 16:43:463238 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263239 'cflags': [
[email protected]c872dc52012-05-19 06:36:313240 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263241 ],
[email protected]5d451ad2011-02-11 16:43:463242 }],
[email protected]4a9ac22e2011-12-02 03:41:533243 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263244 'cflags': [
3245 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533246 ],
3247 }],
3248 ['clang==1 and clang_add_plugin!=""', {
3249 'cflags': [
[email protected]d23720682011-08-11 00:16:263250 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3251 ],
[email protected]5e781232011-01-28 02:57:593252 }],
[email protected]49110f02013-04-22 22:51:343253 ['clang==1 and target_arch=="ia32"', {
3254 'cflags': [
3255 # Else building libyuv gives clang's register allocator issues,
3256 # see llvm.org/PR15798 / crbug.com/233709
3257 '-momit-leaf-frame-pointer',
3258 ],
3259 }],
[email protected]2616d45d2012-01-19 03:15:483260 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3261 'cflags': [
3262 # See http://crbug.com/110262
3263 '-fcolor-diagnostics',
3264 ],
3265 }],
[email protected]062522a2013-06-13 15:49:553266 # Common options for AddressSanitizer, LeakSanitizer,
3267 # ThreadSanitizer and MemorySanitizer.
3268 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543269 'target_conditions': [
3270 ['_toolset=="target"', {
3271 'cflags': [
3272 '-fno-omit-frame-pointer',
3273 '-gline-tables-only',
3274 ],
[email protected]49110f02013-04-22 22:51:343275 'ldflags!': [
3276 # Functions interposed by the sanitizers can make ld think
3277 # that some libraries aren't needed when they actually are,
3278 # http://crbug.com/234010. As workaround, disable --as-needed.
3279 '-Wl,--as-needed',
3280 ],
[email protected]2f047202013-06-14 06:36:393281 'defines': [
3282 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3283 ],
[email protected]cf351c22013-04-19 13:00:543284 }],
[email protected]a26740dd2013-05-28 11:50:493285 ['_toolset=="target" and OS=="linux"', {
3286 'ldflags': [
3287 # http://crbug.com/234010.
3288 '-lrt',
3289 ],
3290 }],
[email protected]cf351c22013-04-19 13:00:543291 ],
3292 }],
[email protected]92799b632011-08-15 14:33:063293 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423294 'target_conditions': [
3295 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453296 'cflags': [
[email protected]48688df02012-11-27 21:04:563297 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563298 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453299 ],
3300 'ldflags': [
[email protected]48688df02012-11-27 21:04:563301 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453302 ],
3303 'defines': [
3304 'ADDRESS_SANITIZER',
3305 ],
[email protected]1ffc3b3962012-05-16 14:08:423306 }],
[email protected]921c7b52011-11-25 10:34:353307 ],
[email protected]92799b632011-08-15 14:33:063308 }],
[email protected]062522a2013-06-13 15:49:553309 ['lsan==1', {
3310 'target_conditions': [
3311 ['_toolset=="target"', {
3312 'cflags': [
3313 '-fsanitize=leak',
3314 ],
3315 'ldflags': [
3316 '-fsanitize=leak',
3317 ],
3318 'defines': [
3319 'LEAK_SANITIZER',
[email protected]f6f65a02013-09-06 05:40:523320 'WTF_USE_LEAK_SANITIZER=1',
[email protected]062522a2013-06-13 15:49:553321 ],
3322 }],
3323 ],
3324 }],
[email protected]c9a829272012-07-04 07:51:123325 ['tsan==1', {
3326 'target_conditions': [
3327 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453328 'cflags': [
[email protected]927a9d672012-11-09 11:28:203329 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293330 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203331 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453332 ],
3333 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203334 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453335 ],
3336 'defines': [
3337 'THREAD_SANITIZER',
3338 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163339 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453340 ],
3341 'target_conditions': [
3342 ['_type=="executable"', {
3343 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123344 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453345 ],
3346 }],
3347 ],
[email protected]c9a829272012-07-04 07:51:123348 }],
3349 ],
3350 }],
[email protected]a10ddd2d2013-02-26 20:06:593351 ['msan==1', {
3352 'target_conditions': [
3353 ['_toolset=="target"', {
3354 'cflags': [
3355 '-fsanitize=memory',
3356 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593357 '-fPIC',
3358 ],
3359 'ldflags': [
3360 '-fsanitize=memory',
3361 ],
3362 'defines': [
3363 'MEMORY_SANITIZER',
3364 ],
3365 'target_conditions': [
3366 ['_type=="executable"', {
3367 'ldflags': [
3368 '-pie',
3369 ],
3370 }],
3371 ],
3372 }],
3373 ],
3374 }],
[email protected]8a48f3f2012-12-04 20:14:043375 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443376 'target_conditions' : [
3377 ['_toolset=="target"', {
3378 'cflags': [
3379 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453380 # Allow mmx intrinsics to inline, so that the
[email protected]82e9b002013-07-16 21:04:243381 #0 compiler can expand the intrinsics.
[email protected]c2a8d2e2012-10-05 09:31:453382 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443383 ],
3384 }],
[email protected]82e9b002013-07-16 21:04:243385 ['_toolset=="target" and OS=="android"', {
3386 'cflags': [
3387 # Avoids errors with current NDK:
3388 # "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"
3389 '-finstrument-functions-exclude-file-list=arm_neon.h',
3390 ],
3391 }],
[email protected]8a6abd12012-05-16 10:04:443392 ],
3393 }],
[email protected]ce4367d2013-01-15 16:13:103394 ['linux_dump_symbols==1', {
3395 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253396 'conditions': [
[email protected]791262fe2013-02-21 17:20:153397 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253398 'target_conditions': [
3399 ['_toolset=="target"', {
3400 'ldflags': [
[email protected]567370a32013-03-01 00:11:233401 # Workaround for linker OOM.
3402 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253403 ],
3404 }],
3405 ],
3406 }],
3407 ],
[email protected]cbd5fd52009-08-26 00:14:273408 }],
[email protected]d8b60602010-03-26 09:41:223409 ['linux_use_heapchecker==1', {
3410 'variables': {'linux_use_tcmalloc%': 1},
[email protected]2f047202013-06-14 06:36:393411 'defines': [
[email protected]bba0fea32013-06-14 12:29:353412 'USE_HEAPCHECKER',
[email protected]2f047202013-06-14 06:36:393413 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3414 ],
[email protected]272ef0b2013-05-14 12:32:453415 'conditions': [
3416 ['component=="shared_library"', {
3417 # See crbug.com/112389
3418 # TODO(glider): replace with --dynamic-list or something
3419 'ldflags': ['-rdynamic'],
3420 }],
3421 ],
[email protected]d8b60602010-03-26 09:41:223422 }],
[email protected]3c8fe5482013-05-22 15:17:033423 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083424 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243425 }],
[email protected]64e2d4a42010-08-27 10:13:213426 ['linux_keep_shadow_stacks==1', {
3427 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513428 'cflags': [
3429 '-finstrument-functions',
3430 # Allow mmx intrinsics to inline, so that the compiler can expand
3431 # the intrinsics.
3432 '-finstrument-functions-exclude-file-list=mmintrin.h',
3433 ],
[email protected]64e2d4a42010-08-27 10:13:213434 }],
[email protected]8d726a42012-02-09 03:49:003435 ['linux_use_gold_flags==1', {
[email protected]c5a6fe42013-07-21 14:03:333436 'target_conditions': [
3437 ['_toolset=="target"', {
3438 'ldflags': [
3439 # Experimentation found that using four linking threads
3440 # saved ~20% of link time.
3441 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3442 # Only apply this to the target linker, since the host
3443 # linker might not be gold, but isn't used much anyway.
3444 '-Wl,--threads',
3445 '-Wl,--thread-count=4',
3446 ],
3447 }],
[email protected]68d01e82012-12-08 03:36:323448 ],
[email protected]8d726a42012-02-09 03:49:003449 'conditions': [
3450 ['release_valgrind_build==0', {
3451 'target_conditions': [
3452 ['_toolset=="target"', {
3453 'ldflags': [
3454 # There seems to be a conflict of --icf and -pie
3455 # in gold which can generate crashy binaries. As
3456 # a security measure, -pie takes precendence for
3457 # now.
3458 #'-Wl,--icf=safe',
3459 '-Wl,--icf=none',
3460 ],
3461 }],
3462 ],
3463 }],
3464 ],
3465 }],
[email protected]b07806c12012-02-03 22:44:593466 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593467 'ldflags': [
3468 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443469 # We pass the path to gold to the compiler. gyp leaves
3470 # unspecified what the cwd is when running the compiler,
3471 # so the normal gyp path-munging fails us. This hack
3472 # gets the right path.
3473 '-B<(PRODUCT_DIR)/../../third_party/gold',
[email protected]b07806c12012-02-03 22:44:593474 ],
3475 }],
[email protected]1591c44d2013-07-15 13:28:433476 ['native_discardable_memory', {
3477 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
3478 }],
3479 ['native_memory_pressure_signals', {
3480 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
3481 }],
[email protected]606116d22009-05-06 22:38:233482 ],
[email protected]9d384032009-03-20 23:13:263483 },
3484 }],
[email protected]c51e8d52009-12-11 20:04:063485 # FreeBSD-specific options; note that most FreeBSD options are set above,
3486 # with Linux.
3487 ['OS=="freebsd"', {
3488 'target_defaults': {
3489 'ldflags': [
3490 '-Wl,--no-keep-memory',
3491 ],
3492 },
3493 }],
[email protected]da1c8d692011-09-20 20:35:013494 # Android-specific options; note that most are set above with Linux.
3495 ['OS=="android"', {
3496 'variables': {
[email protected]25036722012-12-11 10:36:173497 # This is a unique identifier for a given build. It's used for
3498 # identifying various build artifacts corresponding to a particular
3499 # build of chrome (e.g. where to find archived symbols).
3500 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013501 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013502 # Use shared stlport library when system one used.
3503 # Figure this out early since it needs symbols from libgcc.a, so it
3504 # has to be before that in the set of libraries.
3505 ['use_system_stlport==1', {
3506 'android_stlport_library': 'stlport',
3507 }, {
[email protected]806b5232012-11-19 21:19:043508 'conditions': [
3509 ['component=="shared_library"', {
3510 'android_stlport_library': 'stlport_shared',
3511 }, {
3512 'android_stlport_library': 'stlport_static',
3513 }],
3514 ],
[email protected]da1c8d692011-09-20 20:35:013515 }],
3516 ],
3517
3518 # Placing this variable here prevents from forking libvpx, used
3519 # by remoting. Remoting is off, so it needn't built,
3520 # so forking it's deps seems like overkill.
3521 # But this variable need defined to properly run gyp.
3522 # A proper solution is to have an OS==android conditional
3523 # in third_party/libvpx/libvpx.gyp to define it.
3524 'libvpx_path': 'lib/linux/arm',
3525 },
3526 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013527 'variables': {
3528 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593529 'conditions': [
3530 # If we're using the components build, append "cr" to all shared
3531 # libraries to avoid naming collisions with android system library
3532 # versions with the same name (e.g. skia, icu).
3533 ['component=="shared_library"', {
3534 'android_product_extension': 'cr.so',
3535 }, {
3536 'android_product_extension': 'so',
3537 } ],
3538 ],
[email protected]8a37e4502012-08-14 22:42:553539 },
[email protected]da1c8d692011-09-20 20:35:013540 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593541 ['_type=="shared_library"', {
3542 'product_extension': '<(android_product_extension)',
3543 }],
3544
[email protected]da1c8d692011-09-20 20:35:013545 # Settings for building device targets using Android's toolchain.
3546 # These are based on the setup.mk file from the Android NDK.
3547 #
3548 # The NDK Android executable link step looks as follows:
3549 # $LDFLAGS
3550 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3551 # $(PRIVATE_OBJECTS) <-- The .o that we built
3552 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3553 # $(TARGET_LIBGCC) <-- libgcc.a
3554 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3555 # $(PRIVATE_LDLIBS) <-- System .so
3556 # $(TARGET_CRTEND_O) <-- crtend.o
3557 #
3558 # For now the above are approximated for executables by adding
3559 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3560 # of 'libraries'.
3561 #
3562 # The NDK Android shared library link step looks as follows:
3563 # $LDFLAGS
3564 # $(PRIVATE_OBJECTS) <-- The .o that we built
3565 # -l,--whole-archive
3566 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3567 # -l,--no-whole-archive
3568 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3569 # $(TARGET_LIBGCC) <-- libgcc.a
3570 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3571 # $(PRIVATE_LDLIBS) <-- System .so
3572 #
[email protected]ad17e342012-07-17 20:45:483573 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013574 #
3575 # For both executables and shared libraries, add the proper
3576 # libgcc.a to the start of libraries which puts it in the
3577 # proper spot after .o and .a files get linked in.
3578 #
3579 # TODO: The proper thing to do longer-tem would be proper gyp
3580 # support for a custom link command line.
3581 ['_toolset=="target"', {
3582 'cflags!': [
3583 '-pthread', # Not supported by Android toolchain.
3584 ],
3585 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013586 '-ffunction-sections',
3587 '-funwind-tables',
3588 '-g',
3589 '-fstack-protector',
3590 '-fno-short-enums',
3591 '-finline-limit=64',
3592 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013593 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013594 ],
3595 'defines': [
3596 'ANDROID',
3597 '__GNU_SOURCE=1', # Necessary for clone()
3598 'USE_STLPORT=1',
3599 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173600 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013601 ],
3602 'ldflags!': [
3603 '-pthread', # Not supported by Android toolchain.
3604 ],
3605 'ldflags': [
3606 '-nostdlib',
3607 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013608 # Don't export symbols from statically linked libraries.
3609 '-Wl,--exclude-libs=ALL',
3610 ],
[email protected]a0e48b02011-11-22 07:53:013611 'libraries': [
3612 '-l<(android_stlport_library)',
3613 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043614 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013615 '-lc',
3616 '-ldl',
[email protected]a0e48b02011-11-22 07:53:013617 '-lm',
[email protected]da1c8d692011-09-20 20:35:013618 ],
3619 'conditions': [
[email protected]806b5232012-11-19 21:19:043620 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473621 'ldflags!': [
3622 '-Wl,--exclude-libs=ALL',
3623 ],
[email protected]806b5232012-11-19 21:19:043624 }],
[email protected]220ea5932012-08-09 10:44:073625 ['clang==1', {
3626 'cflags': [
3627 # Work around incompatibilities between bionic and clang
3628 # headers.
3629 '-D__compiler_offsetof=__builtin_offsetof',
3630 '-Dnan=__builtin_nan',
3631 ],
3632 'conditions': [
3633 ['target_arch=="arm"', {
3634 'cflags': [
3635 '-target arm-linux-androideabi',
3636 '-mllvm -arm-enable-ehabi',
3637 ],
3638 'ldflags': [
3639 '-target arm-linux-androideabi',
3640 ],
3641 }],
3642 ['target_arch=="ia32"', {
3643 'cflags': [
3644 '-target x86-linux-androideabi',
3645 ],
3646 'ldflags': [
3647 '-target x86-linux-androideabi',
3648 ],
3649 }],
3650 ],
3651 }],
[email protected]ed70ed1862012-11-07 12:11:253652 ['asan==1', {
3653 'cflags': [
3654 # Android build relies on -Wl,--gc-sections removing
3655 # unreachable code. ASan instrumentation for globals inhibits
3656 # this and results in a library with unresolvable relocations.
3657 # TODO(eugenis): find a way to reenable this.
3658 '-mllvm -asan-globals=0',
3659 ],
3660 }],
[email protected]d999c3cb2013-03-12 10:22:363661 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463662 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573663 # The NDK has these things, but doesn't define the constants
3664 # to say that it does. Define them here instead.
3665 'HAVE_SYS_UIO_H',
3666 ],
3667 'cflags': [
3668 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463669 ],
[email protected]da1c8d692011-09-20 20:35:013670 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523671 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013672 ],
3673 }],
[email protected]d999c3cb2013-03-12 10:22:363674 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083675 'include_dirs': [
3676 # OpenAL headers from the Android tree.
3677 '<(android_src)/frameworks/wilhelm/include',
3678 ],
3679 'cflags': [
[email protected]04882132012-11-21 12:40:453680 # Android predefines this as 1; undefine it here so Chromium
3681 # can redefine it later to be 2 for chromium code and unset
3682 # for third party code. This works because cflags are added
3683 # before defines.
3684 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553685 # Disable any additional warnings enabled by the Android build system but which
3686 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083687 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553688 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3689 '-Wno-ignored-qualifiers',
3690 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083691 ],
3692 'cflags_cc': [
3693 # Disabling c++0x-compat should be handled in WebKit, but
3694 # this currently doesn't work because gcc_version is not set
3695 # correctly when building with the Android build system.
3696 # TODO(torne): Fix this in WebKit.
3697 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163698 # Other things unrelated to -Wextra:
3699 '-Wno-non-virtual-dtor',
3700 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083701 ],
3702 }],
[email protected]d999c3cb2013-03-12 10:22:363703 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083704 'cflags': [
3705 # There is a class of warning which:
3706 # 1) Android always enables and also treats as errors
3707 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163708 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553709 '-Wno-address',
3710 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553711 '-Wno-return-type',
3712 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083713 ],
[email protected]2f34a202013-03-11 13:59:163714 'cflags_cc': [
3715 '-Wno-non-virtual-dtor',
3716 ]
[email protected]0d7291e2012-10-04 19:16:083717 }],
[email protected]febd3572012-05-03 09:17:453718 ['target_arch == "arm"', {
3719 'ldflags': [
3720 # Enable identical code folding to reduce size.
3721 '-Wl,--icf=safe',
3722 ],
3723 }],
[email protected]da1c8d692011-09-20 20:35:013724 # NOTE: The stlport header include paths below are specified in
3725 # cflags rather than include_dirs because they need to come
3726 # after include_dirs. Think of them like system headers, but
3727 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3728 # toolchain (circa Gingerbread) will exhibit strange errors.
3729 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513730 ['use_system_stlport==1', {
3731 'cflags': [
3732 # For libstdc++/include, which is used by stlport.
3733 '-I<(android_src)/bionic',
3734 '-I<(android_src)/external/stlport/stlport',
3735 ],
3736 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013737 'cflags': [
[email protected]225ec632013-04-03 18:20:223738 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013739 ],
[email protected]225ec632013-04-03 18:20:223740 'ldflags': [
3741 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013742 ],
3743 }],
3744 ['target_arch=="ia32"', {
3745 # The x86 toolchain currently has problems with stack-protector.
3746 'cflags!': [
3747 '-fstack-protector',
3748 ],
3749 'cflags': [
3750 '-fno-stack-protector',
3751 ],
3752 }],
3753 ],
3754 'target_conditions': [
3755 ['_type=="executable"', {
3756 'ldflags': [
3757 '-Bdynamic',
3758 '-Wl,-dynamic-linker,/system/bin/linker',
3759 '-Wl,--gc-sections',
3760 '-Wl,-z,nocopyreloc',
3761 # crtbegin_dynamic.o should be the last item in ldflags.
3762 '<(android_ndk_lib)/crtbegin_dynamic.o',
3763 ],
3764 'libraries': [
3765 # crtend_android.o needs to be the last item in libraries.
3766 # Do not add any libraries after this!
3767 '<(android_ndk_lib)/crtend_android.o',
3768 ],
[email protected]63a131fd2012-11-06 16:01:213769 'conditions': [
3770 ['asan==1', {
3771 'cflags': [
3772 '-fPIE',
3773 ],
3774 'ldflags': [
3775 '-pie',
3776 ],
3777 }],
3778 ],
[email protected]da1c8d692011-09-20 20:35:013779 }],
[email protected]f5c7758a2012-07-25 16:17:573780 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013781 'ldflags': [
3782 '-Wl,-shared,-Bsymbolic',
3783 ],
[email protected]d093fe8b2013-04-30 18:00:233784 'conditions': [
3785 ['android_webview_build==0', {
3786 'ldflags': [
3787 # crtbegin_so.o should be the last item in ldflags.
3788 '<(android_ndk_lib)/crtbegin_so.o',
3789 ],
3790 'libraries': [
3791 # crtend_so.o needs to be the last item in libraries.
3792 # Do not add any libraries after this!
3793 '<(android_ndk_lib)/crtend_so.o',
3794 ],
3795 }],
[email protected]a08029b42012-04-25 03:18:463796 ],
[email protected]da1c8d692011-09-20 20:35:013797 }],
[email protected]7b1eac42013-05-09 20:55:133798 # ndk-build copies .a's around the filesystem, breaking
3799 # relative paths in thin archives. Disable using thin
3800 # archives to avoid problems until one of these is fixed:
3801 # http://code.google.com/p/android/issues/detail?id=40302
3802 # http://code.google.com/p/android/issues/detail?id=40303
3803 ['_type=="static_library"', {
3804 'standalone_static_library': 1,
3805 }],
[email protected]da1c8d692011-09-20 20:35:013806 ],
3807 }],
3808 # Settings for building host targets using the system toolchain.
3809 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123810 'cflags!': [
3811 # Due to issues in Clang build system, using ASan on 32-bit
3812 # binaries on x86_64 host is problematic.
3813 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563814 '-fsanitize=address',
3815 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123816 ],
[email protected]da1c8d692011-09-20 20:35:013817 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443818 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013819 '-Wl,-z,noexecstack',
3820 '-Wl,--gc-sections',
3821 '-Wl,-O1',
3822 '-Wl,--as-needed',
[email protected]df240712013-09-02 23:17:223823 '-Wl,--warn-shared-textrel',
3824 '-Wl,--fatal-warnings',
[email protected]da1c8d692011-09-20 20:35:013825 ],
3826 }],
[email protected]0ccf578f2013-03-13 11:13:393827 # Settings for building host targets on mac.
3828 ['_toolset=="host" and host_os=="mac"', {
3829 'ldflags!': [
3830 '-Wl,-z,now',
3831 '-Wl,-z,relro',
3832 ],
3833 }],
[email protected]da1c8d692011-09-20 20:35:013834 ],
3835 },
3836 }],
[email protected]93f21e42010-04-01 00:35:153837 ['OS=="solaris"', {
3838 'cflags!': ['-fvisibility=hidden'],
3839 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3840 }],
[email protected]1e013672012-06-29 22:12:203841 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553842 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423843 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553844 'xcode_settings': {
3845 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243846 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3847 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]47c3e852013-09-13 02:22:313848 'COPY_PHASE_STRIP': 'NO',
[email protected]ab2956372009-08-13 18:11:043849 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3850 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043851 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3852 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3853 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253854 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3855 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043856 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3857 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3858 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3859 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553860 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043861 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553862 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043863 'WARNING_CFLAGS': [
3864 '-Wall',
3865 '-Wendif-labels',
3866 '-Wextra',
3867 # Don't warn about unused function parameters.
3868 '-Wno-unused-parameter',
3869 # Don't warn about the "struct foo f = {0};" initialization
3870 # pattern.
3871 '-Wno-missing-field-initializers',
3872 ],
[email protected]b3fb8092009-03-12 19:09:243873 'conditions': [
3874 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593875 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3876 ],
[email protected]2936b8c2012-10-29 10:57:313877 # Note that the prebuilt Clang binaries should not be used for iOS
3878 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283879 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303880 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3881 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383882
[email protected]9e0756c2013-09-01 01:37:023883 # gnu++11 instead of c++11 is needed because some code uses
3884 # typeof() (a GNU extension).
3885 # TODO(thakis): Eventually switch this to c++11 instead of
3886 # gnu++11 (once typeof can be removed, which is blocked on c++11
3887 # being available everywhere).
3888 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
[email protected]3e893e0c2012-11-16 16:58:443889 # Warn if automatic synthesis is triggered with
3890 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533891 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303892 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283893 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073894 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523895
3896 # This warns on using ints as initializers for floats in
3897 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3898 # which happens in several places in chrome code. Not sure if
3899 # this is worth fixing.
3900 '-Wno-c++11-narrowing',
3901
[email protected]66733172010-09-22 00:09:283902 # Don't die on dtoa code that uses a char as an array index.
3903 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3904 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073905
[email protected]25d3bb722010-11-22 14:31:453906 # Clang spots more unused functions.
3907 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103908
3909 # Warns on switches on enums that cover all enum values but
3910 # also contain a default: branch. Chrome is full of that.
3911 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513912
3913 # Warns when a const char[] is converted to bool.
3914 '-Wstring-conversion',
[email protected]361b47c2013-07-02 15:13:243915
3916 # Clang considers the `register` keyword as deprecated, but e.g.
3917 # code generated by flex (used in angle) contains that keyword.
3918 # http://crbug.com/255186
3919 '-Wno-deprecated-register',
[email protected]66733172010-09-22 00:09:283920 ],
3921 }],
[email protected]2fccd422013-05-21 21:27:573922 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:463923 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313924 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463925 ],
3926 }],
[email protected]4a9ac22e2011-12-02 03:41:533927 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593928 'OTHER_CFLAGS': [
3929 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533930 ],
3931 }],
3932 ['clang==1 and clang_add_plugin!=""', {
3933 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593934 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3935 ],
3936 }],
[email protected]2616d45d2012-01-19 03:15:483937 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3938 'OTHER_CFLAGS': [
3939 # See http://crbug.com/110262
3940 '-fcolor-diagnostics',
3941 ],
3942 }],
[email protected]b3fb8092009-03-12 19:09:243943 ],
[email protected]2f80c312009-02-25 21:26:553944 },
[email protected]34f40892011-09-06 21:53:303945 'conditions': [
3946 ['clang==1', {
3947 'variables': {
3948 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3949 },
3950 }],
[email protected]921c7b52011-11-25 10:34:353951 ['asan==1', {
3952 'xcode_settings': {
3953 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563954 '-fsanitize=address',
3955 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353956 ],
[email protected]921c7b52011-11-25 10:34:353957 },
3958 'defines': [
3959 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:393960 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:353961 ],
3962 }],
[email protected]34f40892011-09-06 21:53:303963 ],
[email protected]2f80c312009-02-25 21:26:553964 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553965 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463966 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083967 'conditions': [
3968 ['asan==1', {
3969 'xcode_settings': {
3970 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443971 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083972 ],
3973 },
3974 }],
3975 ],
[email protected]5d7dc972009-04-16 15:30:463976 }],
3977 ['_mac_bundle', {
3978 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313979 'target_conditions': [
3980 ['_type=="executable"', {
3981 'conditions': [
3982 ['asan==1', {
3983 'postbuilds': [
3984 {
3985 'variables': {
3986 # Define copy_asan_dylib_path in a variable ending in
3987 # _path so that gyp understands it's a path and
3988 # performs proper relativization during dict merging.
3989 'copy_asan_dylib_path':
3990 'mac/copy_asan_runtime_dylib.sh',
3991 },
3992 'postbuild_name': 'Copy ASan runtime dylib',
3993 'action': [
3994 '<(copy_asan_dylib_path)',
3995 ],
3996 },
3997 ],
3998 }],
3999 ],
4000 }],
4001 ],
[email protected]87fde4a2009-02-28 00:50:084002 }],
[email protected]2936b8c2012-10-29 10:57:314003 ], # target_conditions
4004 }, # target_defaults
4005 }], # OS=="mac" or OS=="ios"
4006 ['OS=="mac"', {
4007 'target_defaults': {
4008 'variables': {
4009 # These should end with %, but there seems to be a bug with % in
4010 # variables that are intended to be set to different values in
4011 # different targets, like these.
4012 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:314013 # Strip debugging symbols from the target.
4014 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:374015 'conditions': [
4016 ['asan==1', {
4017 'conditions': [
4018 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:354019 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:374020 }, {
4021 'mac_real_dsym': '<(mac_want_real_dsym)'
4022 }],
4023 ],
4024 }, {
4025 'conditions': [
4026 ['mac_want_real_dsym=="default"', {
4027 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4028 }, {
4029 'mac_real_dsym': '<(mac_want_real_dsym)'
4030 }],
4031 ],
4032 }],
4033 ],
[email protected]2936b8c2012-10-29 10:57:314034 },
4035 'xcode_settings': {
4036 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4037 # (Equivalent to -fPIC)
4038 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4039 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4040 # Keep pch files below xcodebuild/.
4041 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]6211f622013-07-29 23:35:394042 'OTHER_CFLAGS': [
4043 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4044 # xcode_setting, but not until all downstream projects' mac bots are
4045 # using xcode >= 4.6, because that's when the default value of the
4046 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4047 # setting is a no-op as far as xcode is concerned, but the compiler
4048 # behaves differently based on whether -fno-strict-aliasing is
4049 # specified or not.
4050 '-fno-strict-aliasing', # See http://crbug.com/32204.
4051 ],
[email protected]2936b8c2012-10-29 10:57:314052 },
4053 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:104054 ['_type=="executable"', {
4055 'postbuilds': [
4056 {
4057 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:364058 # code execution when running on Mac OS X 10.7 ("Lion"), and
4059 # ensures that the position-independent executable (PIE) bit
4060 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:104061 'variables': {
[email protected]8c40f322011-08-24 03:33:364062 # Define change_mach_o_flags in a variable ending in _path
4063 # so that GYP understands it's a path and performs proper
4064 # relativization during dict merging.
4065 'change_mach_o_flags_path':
4066 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:174067 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:134068 ],
4069 'target_conditions': [
[email protected]162407f2011-09-08 15:33:174070 ['mac_pie==0 or release_valgrind_build==1', {
4071 # Don't enable PIE if it's unwanted. It's unwanted if
4072 # the target specifies mac_pie=0 or if building for
4073 # Valgrind, because Valgrind doesn't understand slide.
4074 # See the similar mac_pie/release_valgrind_build check
4075 # below.
[email protected]081c0342011-08-24 14:59:134076 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:134077 '--no-pie',
4078 ],
4079 }],
4080 ],
[email protected]6303fed2011-08-11 01:12:104081 },
[email protected]8c40f322011-08-24 03:33:364082 'postbuild_name': 'Change Mach-O Flags',
4083 'action': [
4084 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:134085 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:364086 ],
[email protected]6303fed2011-08-11 01:12:104087 },
4088 ],
[email protected]5a5d97aa2011-09-02 15:34:004089 'conditions': [
4090 ['asan==1', {
4091 'variables': {
4092 'asan_saves_file': 'asan.saves',
4093 },
4094 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:564095 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:004096 },
4097 }],
4098 ],
[email protected]162407f2011-09-08 15:33:174099 'target_conditions': [
4100 ['mac_pie==1 and release_valgrind_build==0', {
4101 # Turn on position-independence (ASLR) for executables. When
4102 # PIE is on for the Chrome executables, the framework will
4103 # also be subject to ASLR.
4104 # Don't do this when building for Valgrind, because Valgrind
4105 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4106 # understand slide, and get rid of the Valgrind check.
4107 'xcode_settings': {
4108 'OTHER_LDFLAGS': [
4109 '-Wl,-pie', # Position-independent executable (MH_PIE)
4110 ],
4111 },
4112 }],
4113 ],
[email protected]6a0242bc2011-07-01 00:34:464114 }],
[email protected]9a5e72862010-09-02 16:16:584115 ['(_type=="executable" or _type=="shared_library" or \
4116 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:204117 'target_conditions': [
4118 ['mac_real_dsym == 1', {
4119 # To get a real .dSYM bundle produced by dsymutil, set the
4120 # debug information format to dwarf-with-dsym. Since
4121 # strip_from_xcode will not be used, set Xcode to do the
4122 # stripping as well.
4123 'configurations': {
[email protected]5153767c2009-12-22 01:52:504124 'Release_Base': {
[email protected]24700642009-06-01 16:01:204125 'xcode_settings': {
4126 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4127 'DEPLOYMENT_POSTPROCESSING': 'YES',
4128 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074129 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254130 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074131 # The Xcode default is to strip debugging symbols
4132 # only (-S). Local symbols should be stripped as
4133 # well, which will be handled by -x. Xcode will
4134 # continue to insert -S when stripping even when
4135 # additional flags are added with STRIPFLAGS.
4136 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404137 }], # _type=="shared_library" or _type=="loadable_module"
4138 ['_type=="executable"', {
4139 'conditions': [
4140 ['asan==1', {
4141 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4142 }]
4143 ],
4144 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074145 ], # target_conditions
4146 }, # xcode_settings
4147 }, # configuration "Release"
4148 }, # configurations
[email protected]24700642009-06-01 16:01:204149 }, { # mac_real_dsym != 1
4150 # To get a fast fake .dSYM bundle, use a post-build step to
4151 # produce the .dSYM and strip the executable. strip_from_xcode
4152 # only operates in the Release configuration.
4153 'postbuilds': [
4154 {
4155 'variables': {
4156 # Define strip_from_xcode in a variable ending in _path
4157 # so that gyp understands it's a path and performs proper
4158 # relativization during dict merging.
4159 'strip_from_xcode_path': 'mac/strip_from_xcode',
4160 },
4161 'postbuild_name': 'Strip If Needed',
4162 'action': ['<(strip_from_xcode_path)'],
4163 },
[email protected]e14a9f92009-08-05 19:26:074164 ], # postbuilds
4165 }], # mac_real_dsym
4166 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584167 }], # (_type=="executable" or _type=="shared_library" or
4168 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074169 ], # target_conditions
4170 }, # target_defaults
4171 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204172 ['OS=="ios"', {
4173 'target_defaults': {
4174 'xcode_settings' : {
4175 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4176
4177 # This next block is mostly common with the 'mac' section above,
4178 # but keying off (or setting) 'clang' isn't valid for iOS as it
[email protected]7503ad1f2013-09-09 15:59:054179 # also means using Chromium's build of clang.
[email protected]1e013672012-06-29 22:12:204180
[email protected]e31ef5b2013-05-21 11:08:494181 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4182 # section above).
4183 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]3e893e0c2012-11-16 16:58:444184 # Warn if automatic synthesis is triggered with
4185 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534186 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204187 'WARNING_CFLAGS': [
4188 '-Wheader-hygiene',
4189 # Don't die on dtoa code that uses a char as an array index.
4190 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4191 '-Wno-char-subscripts',
4192 # Clang spots more unused functions.
4193 '-Wno-unused-function',
4194 # See comments on this flag higher up in this file.
4195 '-Wno-unnamed-type-template-args',
[email protected]e31ef5b2013-05-21 11:08:494196 # Match OS X clang C++11 warning settings.
4197 '-Wno-c++11-narrowing',
[email protected]1e013672012-06-29 22:12:204198 ],
4199 },
4200 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474201 ['_toolset=="host"', {
4202 'xcode_settings': {
4203 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4204 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4205 },
[email protected]187e0e32013-07-18 21:49:384206 'conditions': [
4207 ['"<(GENERATOR)"!="xcode"', {
4208 'xcode_settings': { 'ARCHS': [ 'x86_64' ] },
4209 }],
4210 ],
[email protected]296bc452013-05-13 21:29:474211 }],
4212 ['_toolset=="target"', {
4213 'xcode_settings': {
4214 # This section should be for overriding host settings. But,
4215 # since we can't negate the iphone deployment target above, we
4216 # instead set it here for target only.
4217 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4218 },
[email protected]187e0e32013-07-18 21:49:384219 'conditions': [
4220 ['target_arch=="armv7" and "<(GENERATOR)"!="xcode"', {
4221 'xcode_settings': { 'ARCHS': [ 'armv7' ]},
4222 }, {
4223 'xcode_settings': { 'ARCHS': [ 'i386' ] },
4224 }],
4225 ],
[email protected]296bc452013-05-13 21:29:474226 }],
[email protected]1e013672012-06-29 22:12:204227 ['_type=="executable"', {
4228 'configurations': {
4229 'Release_Base': {
4230 'xcode_settings': {
4231 'DEPLOYMENT_POSTPROCESSING': 'YES',
4232 'STRIP_INSTALLED_PRODUCT': 'YES',
4233 },
4234 },
[email protected]3c6aa862012-11-05 17:11:444235 'Debug_Base': {
4236 'xcode_settings': {
4237 # Remove dSYM to reduce build time.
4238 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4239 },
4240 },
[email protected]1e013672012-06-29 22:12:204241 },
[email protected]0286b6f2013-05-03 11:06:404242 'conditions': [
[email protected]8dec8fc52013-05-23 23:05:054243 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404244 'xcode_settings': {
[email protected]8dec8fc52013-05-23 23:05:054245 # TODO(justincohen): ninja builds don't support signing yet.
[email protected]0286b6f2013-05-03 11:06:404246 'conditions': [
4247 ['chromium_ios_signing', {
4248 # iOS SDK wants everything for device signed.
4249 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4250 }, {
4251 'CODE_SIGNING_REQUIRED': 'NO',
4252 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4253 }],
4254 ],
4255 },
4256 }],
[email protected]8dec8fc52013-05-23 23:05:054257 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4258 'xcode_settings': {
4259 # It is necessary to link with the -fobjc-arc flag to use
4260 # subscripting on iOS < 6.
4261 'OTHER_LDFLAGS': [
4262 '-fobjc-arc',
4263 ],
4264 },
4265 }],
4266 ['clang==1', {
4267 'target_conditions': [
4268 ['_toolset=="target"', {
4269 'variables': {
4270 'developer_dir': '<!(xcode-select -print-path)',
4271 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4272 },
4273 # It is necessary to force load libarclite from Xcode for
4274 # third_party/llvm-build because libarclite_* is only
4275 # distributed by Xcode.
4276 'conditions': [
4277 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4278 'xcode_settings': {
4279 'OTHER_LDFLAGS': [
4280 '-force_load',
4281 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4282 ],
4283 },
4284 }],
4285 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4286 'xcode_settings': {
4287 'OTHER_LDFLAGS': [
4288 '-force_load',
4289 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4290 ],
4291 },
4292 }],
4293 # Xcode sets target_arch at compile-time.
4294 ['"<(GENERATOR)"=="xcode"', {
4295 'xcode_settings': {
4296 'OTHER_LDFLAGS[arch=armv7]': [
[email protected]86671442013-06-11 13:25:124297 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054298 '-force_load',
4299 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4300 ],
4301 'OTHER_LDFLAGS[arch=i386]': [
[email protected]86671442013-06-11 13:25:124302 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054303 '-force_load',
4304 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4305 ],
4306 },
4307 }],
4308 ],
4309 }],
4310 ],
4311 }],
[email protected]0286b6f2013-05-03 11:06:404312 ],
[email protected]1e013672012-06-29 22:12:204313 }],
4314 ], # target_conditions
4315 }, # target_defaults
4316 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554317 ['OS=="win"', {
4318 'target_defaults': {
4319 'defines': [
[email protected]8e345da2012-07-01 22:10:304320 '_WIN32_WINNT=0x0602',
4321 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554322 'WIN32',
4323 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554324 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284325 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554326 '_CRT_RAND_S',
4327 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4328 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274329 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554330 ],
[email protected]8974e042010-06-21 18:06:524331 'conditions': [
[email protected]2212d272011-12-20 21:37:374332 ['buildtype=="Official"', {
4333 # In official builds, targets can self-select an optimization
4334 # level by defining a variable named 'optimize', and setting it
4335 # to one of
4336 # - "size", optimizes for minimal code size - the default.
4337 # - "speed", optimizes for speed over code size.
4338 # - "max", whole program optimization and link-time code
4339 # generation. This is very expensive and should be used
4340 # sparingly.
4341 'variables': {
4342 'optimize%': 'size',
4343 },
4344 'target_conditions': [
4345 ['optimize=="size"', {
4346 'msvs_settings': {
4347 'VCCLCompilerTool': {
4348 # 1, optimizeMinSpace, Minimize Size (/O1)
4349 'Optimization': '1',
4350 # 2, favorSize - Favor small code (/Os)
4351 'FavorSizeOrSpeed': '2',
4352 },
4353 },
4354 },
4355 ],
4356 ['optimize=="speed"', {
4357 'msvs_settings': {
4358 'VCCLCompilerTool': {
4359 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4360 'Optimization': '2',
4361 # 1, favorSpeed - Favor fast code (/Ot)
4362 'FavorSizeOrSpeed': '1',
4363 },
4364 },
4365 },
4366 ],
4367 ['optimize=="max"', {
4368 'msvs_settings': {
4369 'VCCLCompilerTool': {
4370 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4371 'Optimization': '2',
4372 # 1, favorSpeed - Favor fast code (/Ot)
4373 'FavorSizeOrSpeed': '1',
4374 # This implies link time code generation.
4375 'WholeProgramOptimization': 'true',
4376 },
4377 },
4378 },
4379 ],
4380 ],
4381 },
4382 ],
[email protected]8974e042010-06-21 18:06:524383 ['component=="static_library"', {
4384 'defines': [
4385 '_HAS_EXCEPTIONS=0',
4386 ],
4387 }],
[email protected]3e2648a2011-03-21 20:58:504388 ['secure_atl', {
4389 'defines': [
4390 '_SECURE_ATL',
4391 ],
4392 }],
[email protected]54184ce72012-10-18 07:11:264393 ['msvs_express', {
4394 'configurations': {
4395 'x86_Base': {
4396 'msvs_settings': {
4397 'VCLinkerTool': {
4398 'AdditionalLibraryDirectories':
4399 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4400 },
4401 'VCLibrarianTool': {
4402 'AdditionalLibraryDirectories':
4403 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4404 },
4405 },
4406 },
4407 'x64_Base': {
4408 'msvs_settings': {
4409 'VCLibrarianTool': {
4410 'AdditionalLibraryDirectories':
4411 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4412 },
4413 'VCLinkerTool': {
4414 'AdditionalLibraryDirectories':
4415 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4416 },
4417 },
4418 },
4419 },
4420 'msvs_settings': {
4421 'VCLinkerTool': {
4422 # Explicitly required when using the ATL with express
4423 'AdditionalDependencies': ['atlthunk.lib'],
4424
4425 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4426 # almost eight hundred LNK4254 and LNK4078 warnings:
4427 # - warning LNK4254: section 'ATL' (50000040) merged into
4428 # '.rdata' (40000040) with different attributes
4429 # - warning LNK4078: multiple 'ATL' sections found with
4430 # different attributes
4431 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4432 },
4433 },
4434 'msvs_system_include_dirs': [
4435 '<(windows_driver_kit_path)/inc/atl71',
4436 '<(windows_driver_kit_path)/inc/mfc42',
4437 ],
4438 }],
[email protected]8974e042010-06-21 18:06:524439 ],
[email protected]5b5ca7cb2009-07-20 23:00:204440 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054441 '<(windows_sdk_path)/Include/shared',
4442 '<(windows_sdk_path)/Include/um',
4443 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554444 '$(VSInstallDir)/VC/atlmfc/include',
4445 ],
[email protected]a8d99cef2009-08-26 20:47:494446 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004447 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114448 # TODO(maruel): These warnings are level 4. They will be slowly
4449 # removed as code is fixed.
4450 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004451 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4452 4706,
[email protected]942c3a60f2011-05-03 02:04:114453 ],
[email protected]2f80c312009-02-25 21:26:554454 'msvs_settings': {
4455 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444456 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554457 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554458 'BufferSecurityCheck': 'true',
4459 'EnableFunctionLevelLinking': 'true',
4460 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114461 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554462 'WarnAsError': 'true',
4463 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584464 'conditions': [
[email protected]8974e042010-06-21 18:06:524465 ['component=="shared_library"', {
4466 'ExceptionHandling': '1', # /EHsc
4467 }, {
4468 'ExceptionHandling': '0',
4469 }],
[email protected]3fef6e62009-07-31 19:58:584470 ],
[email protected]2f80c312009-02-25 21:26:554471 },
4472 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164473 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374474 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054475 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374476 ],
[email protected]2f80c312009-02-25 21:26:554477 },
4478 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554479 'AdditionalDependencies': [
4480 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504481 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554482 'version.lib',
4483 'msimg32.lib',
4484 'ws2_32.lib',
4485 'usp10.lib',
4486 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084487 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484488 'winmm.lib',
4489 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554490 ],
[email protected]a78da50e2010-06-09 21:31:374491 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054492 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374493 ],
[email protected]2f80c312009-02-25 21:26:554494 'GenerateDebugInformation': 'true',
4495 'MapFileName': '$(OutDir)\\$(TargetName).map',
4496 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554497 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484498 # SubSystem values:
4499 # 0 == not set
4500 # 1 == /SUBSYSTEM:CONSOLE
4501 # 2 == /SUBSYSTEM:WINDOWS
4502 # Most of the executables we'll ever create are tests
4503 # and utilities with console output.
4504 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554505 },
4506 'VCMIDLTool': {
4507 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094508 'TypeLibraryName': '$(InputName).tlb',
4509 'OutputDirectory': '$(IntDir)',
4510 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334511 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094512 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4513 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554514 },
4515 'VCResourceCompilerTool': {
4516 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384517 'AdditionalIncludeDirectories': [
4518 '<(DEPTH)',
4519 '<(SHARED_INTERMEDIATE_DIR)',
4520 ],
[email protected]2f80c312009-02-25 21:26:554521 },
[email protected]5d60b0b2013-07-30 20:24:304522 'target_conditions': [
4523 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4524 'VCManifestTool': {
4525 'AdditionalManifestFiles': [
4526 '>(win_exe_compatibility_manifest)',
4527 ],
4528 },
4529 }],
4530 ['_type=="executable" and >(win_use_external_manifest)==0', {
4531 'VCManifestTool': {
4532 'EmbedManifest': 'true',
4533 }
4534 }],
4535 ['_type=="executable" and >(win_use_external_manifest)==1', {
4536 'VCManifestTool': {
4537 'EmbedManifest': 'false',
4538 }
4539 }],
4540 ],
[email protected]2f80c312009-02-25 21:26:554541 },
4542 },
4543 }],
[email protected]79e2336c2011-05-12 18:18:344544 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314545 'target_defaults': {
4546 'defines': [
4547 'DISABLE_NACL',
4548 ],
4549 },
4550 }],
[email protected]cfbf9bc2009-12-07 22:07:564551 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194552 'target_defaults': {
4553 'msvs_settings': {
4554 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194555 'DelayLoadDLLs': [
4556 'dbghelp.dll',
4557 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014558 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194559 'uxtheme.dll',
4560 ],
4561 },
4562 },
[email protected]ef4fa4072009-12-04 22:46:504563 'configurations': {
[email protected]5153767c2009-12-22 01:52:504564 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504565 'msvs_settings': {
4566 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164567 'AdditionalOptions': [
4568 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334569 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164570 '/ignore:4199',
4571 '/ignore:4221',
4572 '/nxcompat',
[email protected]c3fcbd122013-06-20 10:47:434573 ],
4574 'conditions': [
4575 ['asan==0', {
4576 'AdditionalOptions': ['/largeaddressaware'],
4577 }],
[email protected]950845b2013-08-06 00:49:494578 ['clang==1', {
4579 'AdditionalOptions!': ['/safeseh'],
4580 }],
[email protected]1f9471a2010-01-04 06:40:164581 ],
[email protected]ef4fa4072009-12-04 22:46:504582 },
4583 },
4584 },
[email protected]5153767c2009-12-22 01:52:504585 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504586 'msvs_settings': {
4587 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164588 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504589 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334590 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164591 '/ignore:4199',
4592 '/ignore:4221',
4593 '/nxcompat',
4594 ],
[email protected]ef4fa4072009-12-04 22:46:504595 },
4596 },
4597 },
4598 },
[email protected]48c7af72009-07-03 22:00:194599 },
4600 }],
[email protected]9821d0d2010-04-16 22:40:374601 ['enable_new_npdevice_api==1', {
4602 'target_defaults': {
4603 'defines': [
4604 'ENABLE_NEW_NPDEVICE_API',
4605 ],
4606 },
4607 }],
[email protected]5f683172013-04-27 01:53:194608 # Don't warn about the "typedef 'foo' locally defined but not used"
4609 # for gcc 4.8.
4610 # TODO: remove this flag once all builds work. See crbug.com/227506
4611 ['gcc_version>=48', {
4612 'target_defaults': {
4613 'cflags': [
4614 '-Wno-unused-local-typedefs',
4615 ],
4616 },
4617 }],
[email protected]220ea5932012-08-09 10:44:074618 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234619 'conditions': [
4620 ['OS=="android"', {
4621 # Android could use the goma with clang.
4622 'make_global_settings': [
4623 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4624 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4625 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4626 ['CC.host', '$(CC)'],
4627 ['CXX.host', '$(CXX)'],
4628 ['LINK.host', '$(LINK)'],
4629 ],
4630 }, {
4631 'make_global_settings': [
4632 ['CC', '<(make_clang_dir)/bin/clang'],
4633 ['CXX', '<(make_clang_dir)/bin/clang++'],
4634 ['LINK', '$(CXX)'],
4635 ['CC.host', '$(CC)'],
4636 ['CXX.host', '$(CXX)'],
4637 ['LINK.host', '$(LINK)'],
4638 ],
4639 }],
[email protected]34f40892011-09-06 21:53:304640 ],
4641 }],
[email protected]615fa6642012-08-14 19:17:074642 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274643 # Hardcode the compiler names in the Makefile so that
4644 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114645 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044646 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4647 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4648 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074649 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4650 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4651 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274652 ],
4653 }],
[email protected]23eea4a42013-04-27 04:10:264654 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464655 'make_global_settings': [
4656 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4657 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4658 ['LINK', '$(CXX)'],
4659 ['CC.host', '<!(which gcc)'],
4660 ['CXX.host', '<!(which g++)'],
4661 ['LINK.host', '<!(which g++)'],
4662 ],
4663 }],
[email protected]2f80c312009-02-25 21:26:554664 ],
[email protected]e326f1e32013-09-03 17:03:134665 'configurations': {
4666 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4667 # This block adds *project-wide* configuration settings to each project
4668 # file. It's almost always wrong to put things here. Specify your
4669 # custom |configurations| in target_defaults to add them to targets instead.
[email protected]39c62b02013-09-11 20:49:224670 'conditions': [
4671 ['OS=="ios"', {
4672 'Debug': {
4673 'xcode_settings': {
4674 # Enable 'Build Active Architecture Only' for Debug. This
4675 # avoids a project-level warning in Xcode.
4676 # Note that this configuration uses the default VALID_ARCHS value
4677 # because if there is a device connected Xcode sets the active arch
4678 # to the arch of the device. In cases where the device's arch is not
4679 # in VALID_ARCHS (e.g. iPhone5 is armv7s) Xcode complains because it
4680 # can't determine what arch to compile for.
4681 'ONLY_ACTIVE_ARCH': 'YES',
4682 },
4683 },
4684 'Release': {
4685 'xcode_settings': {
4686 # Override VALID_ARCHS and omit armv7s. Otherwise Xcode compiles for
4687 # both armv7 and armv7s, doubling the binary size.
4688 'VALID_ARCHS': 'armv7 i386',
4689 },
4690 },
4691 }],
4692 ],
[email protected]e326f1e32013-09-03 17:03:134693 },
[email protected]2f80c312009-02-25 21:26:554694 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504695 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4696 # This block adds *project-wide* configuration settings to each project
4697 # file. It's almost always wrong to put things here. Specify your
4698 # custom xcode_settings in target_defaults to add them to targets instead.
4699
[email protected]1e013672012-06-29 22:12:204700 'conditions': [
[email protected]fca3d812012-07-27 00:55:364701 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4702 # setting sets the SDK on a project-wide basis. In order to get the
4703 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4704 # here at the project level.
[email protected]2c261532012-10-06 00:46:294705 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364706 'conditions': [
[email protected]2c261532012-10-06 00:46:294707 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364708 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294709 }, {
4710 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364711 }],
4712 ],
[email protected]2c261532012-10-06 00:46:294713 }],
4714 ['OS=="ios"', {
4715 'conditions': [
4716 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404717 'conditions': [
4718 # TODO(justincohen): Ninja only supports simulator for now.
[email protected]187e0e32013-07-18 21:49:384719 ['"<(GENERATOR)"=="xcode" or ("<(GENERATOR)"=="ninja" and target_arch=="armv7")', {
[email protected]0286b6f2013-05-03 11:06:404720 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
[email protected]187e0e32013-07-18 21:49:384721 }, {
4722 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
[email protected]0286b6f2013-05-03 11:06:404723 }],
4724 ],
[email protected]2c261532012-10-06 00:46:294725 }, {
4726 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4727 }],
4728 ],
[email protected]1e013672012-06-29 22:12:204729 }],
4730 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204731 # Target both iPhone and iPad.
4732 'TARGETED_DEVICE_FAMILY': '1,2',
4733 }],
[email protected]f9335b42013-01-24 21:00:234734 ['target_arch=="x64"', {
4735 'ARCHS': [
4736 'x86_64'
4737 ],
4738 }],
[email protected]1e013672012-06-29 22:12:204739 ],
[email protected]0c8ab452009-11-06 21:57:504740
[email protected]2f80c312009-02-25 21:26:554741 # The Xcode generator will look for an xcode_settings section at the root
4742 # of each dict and use it to apply settings on a file-wide basis. Most
4743 # settings should not be here, they should be in target-specific
4744 # xcode_settings sections, or better yet, should use non-Xcode-specific
4745 # settings in target dicts. SYMROOT is a special case, because many other
4746 # Xcode variables depend on it, including variables such as
4747 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4748 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4749 # files to appear (when present) in the UI as actual files and not red
4750 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4751 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164752 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554753 },
[email protected]ee28c9f2009-09-04 01:53:014754}