[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
[email protected] | 21642ab | 2009-09-15 23:52:14 | [diff] [blame] | 5 | # 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] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 8 | { |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 9 | # Variables expected to be overriden on the GYP command line (-D) or by |
| 10 | # ~/.gyp/include.gypi. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 11 | 'variables': { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 12 | # Putting a variables dict inside another variables dict looks kind of |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 13 | # weird. This is done so that 'host_arch', 'chromeos', etc are defined as |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 14 | # variables within the outer variables dict here. This is necessary |
| 15 | # to get these variables defined for the conditions within this variables |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 16 | # dict that operate on these variables. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 17 | 'variables': { |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 18 | 'variables': { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 19 | 'variables': { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 20 | '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] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 29 | |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 30 | # Use a raw surface abstraction. |
| 31 | 'use_ozone%': 0, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 32 | }, |
| 33 | # Copy conditionally-set variables out one scope. |
| 34 | 'chromeos%': '<(chromeos)', |
| 35 | 'use_aura%': '<(use_aura)', |
| 36 | 'use_ash%': '<(use_ash)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 37 | 'use_ozone%': '<(use_ozone)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 38 | |
[email protected] | 3fa441d | 2011-09-18 17:28:50 | [diff] [blame] | 39 | # Whether we are using Views Toolkit |
| 40 | 'toolkit_views%': 0, |
| 41 | |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 42 | # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 |
| 43 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 44 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 45 | # Disable viewport meta tag by default. |
| 46 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 47 | |
| 48 | # Enable HiDPI support. |
| 49 | 'enable_hidpi%': 0, |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 50 | |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 51 | # Enable touch optimized art assets and metrics. |
| 52 | 'enable_touch_ui%': 0, |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 53 | |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 54 | # Override buildtype to select the desired build flavor. |
| 55 | # Dev - everyday build for development/testing |
| 56 | # Official - release build (generally implies additional processing) |
| 57 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 58 | # conversion is done), some of the things which are now controlled by |
| 59 | # 'branding', such as symbol generation, will need to be refactored |
| 60 | # based on 'buildtype' (i.e. we don't care about saving symbols for |
| 61 | # non-Official # builds). |
| 62 | 'buildtype%': 'Dev', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 63 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 64 | # Override branding to select the desired branding flavor. |
| 65 | 'branding%': 'Chromium', |
| 66 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 67 | 'conditions': [ |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 68 | # ChromeOS implies ash. |
| 69 | ['chromeos==1', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 70 | 'use_ash%': 1, |
| 71 | 'use_aura%': 1, |
| 72 | }], |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 73 | |
[email protected] | e9c4c1c | 2013-02-06 06:46:48 | [diff] [blame] | 74 | # For now, Windows builds that |use_aura| should also imply using |
| 75 | # ash. This rule should be removed for the future when Windows is |
| 76 | # using the aura windows without the ash interface. |
| 77 | ['use_aura==1 and OS=="win"', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 78 | 'use_ash%': 1, |
| 79 | }], |
| 80 | ['use_ash==1', { |
| 81 | 'use_aura%': 1, |
| 82 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 83 | |
| 84 | # Compute the architecture that we're building on. |
| 85 | ['OS=="win" or OS=="mac" or OS=="ios"', { |
| 86 | 'host_arch%': 'ia32', |
| 87 | }, { |
| 88 | # This handles the Unix platforms for which there is some support. |
| 89 | # Anything else gets passed through, which probably won't work |
| 90 | # very well; such hosts should pass an explicit target_arch to |
| 91 | # gyp. |
| 92 | 'host_arch%': |
| 93 | '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', |
| 94 | }], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 95 | ], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 96 | }, |
| 97 | # Copy conditionally-set variables out one scope. |
| 98 | 'chromeos%': '<(chromeos)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 99 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 100 | 'use_ash%': '<(use_ash)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 101 | 'use_ozone%': '<(use_ozone)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 102 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 103 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 104 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 105 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 106 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 107 | 'branding%': '<(branding)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 108 | 'host_arch%': '<(host_arch)', |
| 109 | |
| 110 | # Default architecture we're building for is the architecture we're |
| 111 | # building on. |
| 112 | 'target_arch%': '<(host_arch)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 113 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 114 | # This is set when building the Android WebView inside the Android |
| 115 | # build system, using the 'android' gyp backend. The WebView code is |
| 116 | # still built when this is unset, but builds using the normal chromium |
| 117 | # build system. |
| 118 | 'android_webview_build%': 0, |
[email protected] | 0115f04 | 2012-07-27 20:36:53 | [diff] [blame] | 119 | |
[email protected] | 55d9249 | 2013-01-31 05:03:39 | [diff] [blame] | 120 | # Sets whether chrome is built for google tv device. |
| 121 | 'google_tv%': 0, |
| 122 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 123 | # Set ARM architecture version. |
| 124 | 'arm_version%': 7, |
| 125 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 126 | 'conditions': [ |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 127 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 128 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 129 | 'toolkit_views%': 1, |
| 130 | }, { |
| 131 | 'toolkit_views%': 0, |
| 132 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 133 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 134 | # Set toolkit_uses_gtk for the Chromium browser on Linux. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 135 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_ozone==0', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 136 | 'toolkit_uses_gtk%': 1, |
| 137 | }, { |
| 138 | 'toolkit_uses_gtk%': 0, |
| 139 | }], |
| 140 | |
[email protected] | 3aa8a68 | 2012-08-11 00:04:29 | [diff] [blame] | 141 | # Enable HiDPI on Mac OS and Chrome OS. |
| 142 | ['OS=="mac" or chromeos==1', { |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 143 | 'enable_hidpi%': 1, |
| 144 | }], |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 145 | |
[email protected] | c71fe640 | 2012-08-15 15:22:55 | [diff] [blame] | 146 | # Enable touch UI on Metro. |
| 147 | ['OS=="win"', { |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 148 | 'enable_touch_ui%': 1, |
| 149 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 150 | |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 151 | # Enable App Launcher only on ChromeOS, Windows and OSX. |
| 152 | ['use_ash==1 or OS=="win" or OS=="mac"', { |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 153 | 'enable_app_list%': 1, |
| 154 | }, { |
| 155 | 'enable_app_list%': 0, |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 156 | }], |
| 157 | |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 158 | ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', { |
[email protected] | a6f1bdf | 2012-11-28 15:52:26 | [diff] [blame] | 159 | 'use_default_render_theme%': 1, |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 160 | }, { |
| 161 | 'use_default_render_theme%': 0, |
| 162 | }], |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 163 | |
| 164 | # TODO(thestig) Remove the linux_lsb_release check after all the |
| 165 | # official Ubuntu Lucid builder are gone. |
| 166 | ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { |
| 167 | 'linux_lsb_release%': '<!(lsb_release -r -s)', |
| 168 | }, { |
| 169 | 'linux_lsb_release%': '', |
| 170 | }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 171 | ], |
| 172 | }, |
| 173 | |
| 174 | # Copy conditionally-set variables out one scope. |
| 175 | 'chromeos%': '<(chromeos)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 176 | 'host_arch%': '<(host_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 177 | 'target_arch%': '<(target_arch)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 178 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 179 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 180 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 181 | 'use_ash%': '<(use_ash)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 182 | 'use_ozone%': '<(use_ozone)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 183 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 184 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 185 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 186 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 187 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 55d9249 | 2013-01-31 05:03:39 | [diff] [blame] | 188 | 'google_tv%': '<(google_tv)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 189 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 190 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 191 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 192 | 'branding%': '<(branding)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 193 | 'arm_version%': '<(arm_version)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 194 | 'linux_lsb_release%': '<(linux_lsb_release)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 195 | |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 196 | # Set to 1 to enable fast builds. Set to 2 for even faster builds |
| 197 | # (it disables debug info for fastest compilation - only for use |
| 198 | # on compile-only bots). |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 199 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 200 | |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 201 | # Set to 1 to enable dcheck in release without having to use the flag. |
| 202 | 'dcheck_always_on%': 0, |
| 203 | |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 204 | # Set to 1 to make a build that logs like an official build, but is not |
| 205 | # necessarily an official build, ie DCHECK and DLOG are disabled and |
| 206 | # removed completely in release builds, to minimize binary footprint. |
| 207 | # Note: this setting is ignored if buildtype=="Official". |
| 208 | 'logging_like_official_build%': 0, |
| 209 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 210 | # Disable file manager component extension by default. |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 211 | 'file_manager_extension%': 0, |
| 212 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 213 | # Disable image loader component extension by default. |
| 214 | 'image_loader_extension%': 0, |
| 215 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 216 | # Python version. |
[email protected] | a43c5a0 | 2011-05-27 06:54:51 | [diff] [blame] | 217 | 'python_ver%': '2.6', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 218 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 219 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 220 | # Set NEON compilation flags. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 221 | 'arm_neon%': 1, |
| 222 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 223 | # Detect NEON support at run-time. |
| 224 | 'arm_neon_optional%': 0, |
| 225 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 226 | # The system root for cross-compiles. Default: none. |
| 227 | 'sysroot%': '', |
| 228 | |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 229 | # The system libdir used for this ABI. |
| 230 | 'system_libdir%': 'lib', |
| 231 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 232 | # On Linux, we build with sse2 for Chromium builds. |
| 233 | 'disable_sse2%': 0, |
| 234 | |
| 235 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 236 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 237 | |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 238 | # Use system libjpeg. Note that the system's libjepg will be used even if |
| 239 | # use_libjpeg_turbo is set. |
| 240 | 'use_system_libjpeg%': 0, |
| 241 | |
[email protected] | aa5e01fc | 2013-03-06 14:06:17 | [diff] [blame] | 242 | # By default, component is set to static_library and it can be overriden |
| 243 | # by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 244 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 245 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 246 | # Set to select the Title Case versions of strings in GRD files. |
| 247 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 248 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 249 | # Use translations provided by volunteers at launchpad.net. This |
| 250 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 251 | 'use_third_party_translations%': 0, |
| 252 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 253 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 254 | 'remoting%': 1, |
| 255 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 256 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 257 | 'configuration_policy%': 1, |
| 258 | |
[email protected] | 6c521fed | 2012-11-29 17:00:03 | [diff] [blame] | 259 | # Variable safe_browsing is used to control the build time configuration |
| 260 | # for safe browsing feature. Safe browsing can be compiled in 3 different |
| 261 | # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and |
| 262 | # reporting features without enabling phishing and malware detection. This |
| 263 | # is useful to integrate a third party phishing/malware detection to |
| 264 | # existing safe browsing logic. |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 265 | 'safe_browsing%': 1, |
| 266 | |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 267 | # Speech input is compiled in by default. Set to 0 to disable. |
| 268 | 'input_speech%': 1, |
| 269 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 270 | # Notifications are compiled in by default. Set to 0 to disable. |
| 271 | 'notifications%' : 1, |
| 272 | |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 273 | # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for |
| 274 | # regular builds and 1 for ASan builds. |
| 275 | 'mac_want_real_dsym%': 'default', |
| 276 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 277 | # If this is set, the clang plugins used on the buildbot will be used. |
| 278 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 279 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 280 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 281 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 282 | |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 283 | # Enable building with ASAN (Clang's -fsanitize=address option). |
| 284 | # -fsanitize=address only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 285 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 286 | 'asan%': 0, |
| 287 | |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 288 | # Enable building with LSan (Clang's -fsanitize=leak option). |
| 289 | # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
| 290 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer |
| 291 | 'lsan%': 0, |
| 292 | |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 293 | # Enable building with TSAN (Clang's -fsanitize=thread option). |
| 294 | # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 295 | # See http://clang.llvm.org/docs/ThreadSanitizer.html |
| 296 | 'tsan%': 0, |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 297 | 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 298 | |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 299 | # Enable building with MSAN (Clang's -fsanitize=memory option). |
| 300 | # MemorySanitizer only works with clang, but msan=1 implies clang=1 |
| 301 | # See http://clang.llvm.org/docs/MemorySanitizer.html |
| 302 | 'msan%': 0, |
| 303 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 304 | # Use a modified version of Clang to intercept allocated types and sizes |
| 305 | # for allocated objects. clang_type_profiler=1 implies clang=1. |
| 306 | # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
| 307 | # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
| 308 | 'clang_type_profiler%': 0, |
| 309 | |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 310 | # Set to true to instrument the code with function call logger. |
| 311 | # See src/third_party/cygprofile/cyg-profile.cc for details. |
| 312 | 'order_profiling%': 0, |
| 313 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 314 | # Use the provided profiled order file to link Chrome image with it. |
| 315 | # This makes Chrome faster by better using CPU cache when executing code. |
| 316 | # This is known as PGO (profile guided optimization). |
| 317 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 318 | 'order_text_section%' : "", |
| 319 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 320 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 321 | # libraries on linux x86-64 and arm, plus ASLR. |
| 322 | 'linux_fpic%': 1, |
| 323 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 324 | # Whether one-click signin is enabled or not. |
| 325 | 'enable_one_click_signin%': 0, |
| 326 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 327 | # Enable Chrome browser extensions |
| 328 | 'enable_extensions%': 1, |
| 329 | |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 330 | # Enable browser automation. |
| 331 | 'enable_automation%': 1, |
| 332 | |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 333 | # Enable Google Now. |
| 334 | 'enable_google_now%': 1, |
| 335 | |
[email protected] | 703369a | 2012-11-05 20:40:31 | [diff] [blame] | 336 | # Enable language detection. |
| 337 | 'enable_language_detection%': 1, |
| 338 | |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 339 | # Enable printing support and UI. |
| 340 | 'enable_printing%': 1, |
| 341 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 342 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 343 | 'enable_webrtc%': 1, |
| 344 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 345 | # Enables use of the session service, which is enabled by default. |
| 346 | # Support for disabling depends on the platform. |
| 347 | 'enable_session_service%': 1, |
| 348 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 349 | # Enables theme support, which is enabled by default. Support for |
| 350 | # disabling depends on the platform. |
| 351 | 'enable_themes%': 1, |
| 352 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 353 | # Enables autofill dialog and associated features; disabled by default. |
| 354 | 'enable_autofill_dialog%' : 0, |
| 355 | |
[email protected] | 066ab988 | 2013-06-07 00:55:20 | [diff] [blame] | 356 | # Uses spring wallpaper resources on Spring. |
| 357 | 'use_spring_wallpaper%': 0, |
| 358 | |
[email protected] | 4ffe78a | 2012-10-04 20:55:15 | [diff] [blame] | 359 | # Uses OEM-specific wallpaper resources on Chrome OS. |
| 360 | 'use_oem_wallpaper%': 0, |
| 361 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 362 | # Enables support for background apps. |
| 363 | 'enable_background%': 1, |
| 364 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 365 | # Enable the task manager by default. |
| 366 | 'enable_task_manager%': 1, |
[email protected] | e1de87f | 2012-05-02 17:20:45 | [diff] [blame] | 367 | |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 368 | # Enable FTP support by default. |
| 369 | 'disable_ftp_support%': 0, |
| 370 | |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 371 | # XInput2 multitouch support is disabled by default (use_xi2_mt=0). |
| 372 | # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled, |
| 373 | # the input value also defines the required XI2 minor minimum version. |
| 374 | # For example, use_xi2_mt=2 means XI2.2 or above version is required. |
| 375 | 'use_xi2_mt%': 0, |
| 376 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 377 | # Use of precompiled headers on Windows. |
| 378 | # |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 379 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 380 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 381 | # This setting will override the default. |
| 382 | # |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 383 | # See |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 384 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 385 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 386 | 'chromium_win_pch%': 0, |
| 387 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 388 | # Set this to true when building with Clang. |
| 389 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
| 390 | 'clang%': 0, |
| 391 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 392 | # Enable plug-in installation by default. |
| 393 | 'enable_plugin_installation%': 1, |
| 394 | |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 395 | # Enable PPAPI and NPAPI by default. |
| 396 | # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well |
| 397 | # as PPAPI; see crbug.com/162667. |
| 398 | 'enable_plugins%': 1, |
| 399 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 400 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 401 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 402 | # Chrome UI. |
| 403 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 404 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 405 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 406 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 407 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 408 | # with one of those tools. |
| 409 | 'build_for_tool%': '', |
| 410 | |
[email protected] | 3713813 | 2013-01-17 23:08:52 | [diff] [blame] | 411 | # If no directory is specified then a temporary directory will be used. |
| 412 | 'test_isolation_outdir%': '', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 413 | # True if isolate should fail if the isolate files refer to files |
| 414 | # that are missing. |
| 415 | 'test_isolation_fail_on_missing': 0, |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 416 | |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 417 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 418 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 419 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 420 | # Managed users are enabled by default. |
| 421 | 'enable_managed_users%': 1, |
| 422 | |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 423 | 'spdy_proxy_auth_origin%' : '', |
| 424 | 'spdy_proxy_auth_property%' : '', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 425 | 'spdy_proxy_auth_value%' : '', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 426 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 427 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 428 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 429 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 430 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 431 | }, { |
| 432 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 433 | }], |
| 434 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 435 | # A flag for BSD platforms |
| 436 | ['OS=="freebsd" or OS=="openbsd"', { |
| 437 | 'os_bsd%': 1, |
| 438 | }, { |
| 439 | 'os_bsd%': 0, |
| 440 | }], |
| 441 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 442 | # Set armv7 for backward compatibility. |
| 443 | ['arm_version==7', { |
| 444 | 'armv7': 1, |
| 445 | }, { |
| 446 | 'armv7': 0, |
| 447 | }], |
| 448 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 449 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 450 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', { |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 451 | 'use_nss%': 1, |
| 452 | }, { |
| 453 | 'use_nss%': 0, |
| 454 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 455 | |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 456 | # Flags to use X11 on non-Mac POSIX platforms. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 457 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 458 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 459 | }, { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 460 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 461 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 462 | |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 463 | # Flags to use pango and glib on non-Mac POSIX platforms. |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 464 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { |
| 465 | 'use_glib%': 0, |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 466 | 'use_pango%': 0, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 467 | }, { |
| 468 | 'use_glib%': 1, |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 469 | 'use_pango%': 1, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 470 | }], |
| 471 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 472 | # We always use skia text rendering in Aura on Windows, since GDI |
| 473 | # doesn't agree with our BackingStore. |
| 474 | # TODO(beng): remove once skia text rendering is on by default. |
| 475 | ['use_aura==1 and OS=="win"', { |
| 476 | 'enable_skia_text%': 1, |
| 477 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 478 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 479 | # A flag to enable or disable our compile-time dependency |
| 480 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 481 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 482 | # for Linux distributions and for Aura. |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 483 | ['chromeos==1 or use_aura==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 484 | 'use_gnome_keyring%': 0, |
| 485 | }, { |
| 486 | 'use_gnome_keyring%': 1, |
| 487 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 488 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 489 | ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 490 | # GTK+, Mac and iOS want Title Case strings |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 491 | 'use_titlecase_in_grd_files%': 1, |
| 492 | }], |
| 493 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 494 | # Enable file manager and image loader extensions on Chrome OS. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 495 | ['chromeos==1', { |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 496 | 'file_manager_extension%': 1, |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 497 | 'image_loader_extension%': 1, |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 498 | }, { |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 499 | 'file_manager_extension%': 0, |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 500 | 'image_loader_extension%': 0, |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 501 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 502 | |
[email protected] | c79d197 | 2013-02-06 18:47:29 | [diff] [blame] | 503 | ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { |
[email protected] | f032fe9 | 2012-06-12 19:20:01 | [diff] [blame] | 504 | 'enable_one_click_signin%': 1, |
[email protected] | e4b66bf | 2012-05-29 20:39:51 | [diff] [blame] | 505 | }], |
| 506 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 507 | ['OS=="android"', { |
[email protected] | 098dff8a | 2013-01-23 20:54:49 | [diff] [blame] | 508 | 'enable_automation%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 509 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 510 | 'enable_google_now%': 0, |
[email protected] | 7831e9a | 2013-02-20 13:54:12 | [diff] [blame] | 511 | 'enable_language_detection%': 1, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 512 | 'enable_printing%': 0, |
| 513 | 'enable_themes%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 514 | 'proprietary_codecs%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 515 | 'remoting%': 0, |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 516 | 'arm_neon%': 0, |
| 517 | 'arm_neon_optional%': 1, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 518 | }], |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 519 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 520 | # Enable autofill dialog for Android and Views-enabled platforms for now. |
[email protected] | c2ecbcf | 2013-06-07 21:38:38 | [diff] [blame] | 521 | ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 522 | 'enable_autofill_dialog%': 1 |
| 523 | }], |
| 524 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 525 | ['OS=="android" and android_webview_build==0', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 526 | 'enable_webrtc%': 1, |
| 527 | }], |
| 528 | |
| 529 | # Disable WebRTC for building WebView as part of Android system. |
| 530 | # TODO(boliu): Decide if we want WebRTC, and if so, also merge |
| 531 | # the necessary third_party repositories. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 532 | ['OS=="android" and android_webview_build==1', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 533 | 'enable_webrtc%': 0, |
| 534 | }], |
| 535 | |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 536 | ['OS=="ios"', { |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 537 | 'configuration_policy%': 0, |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 538 | 'disable_ftp_support%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 539 | 'enable_automation%': 0, |
| 540 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 541 | 'enable_google_now%': 0, |
[email protected] | 703369a | 2012-11-05 20:40:31 | [diff] [blame] | 542 | 'enable_language_detection%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 543 | 'enable_printing%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 544 | 'enable_session_service%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 545 | 'enable_themes%': 0, |
| 546 | 'enable_webrtc%': 0, |
| 547 | 'notifications%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 548 | 'remoting%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 549 | 'safe_browsing%': 0, |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 550 | 'enable_managed_users%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 551 | }], |
| 552 | |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 553 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 554 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 555 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 556 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 557 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 558 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 559 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 560 | |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 561 | # Turn precompiled headers on by default. |
| 562 | ['OS=="win" and buildtype!="Official"', { |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 563 | 'chromium_win_pch%': 1 |
| 564 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 565 | |
[email protected] | deb8b3cd | 2013-05-07 19:52:10 | [diff] [blame] | 566 | ['chromeos==1 or OS=="android" or OS=="ios"', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 567 | 'enable_plugin_installation%': 0, |
| 568 | }, { |
| 569 | 'enable_plugin_installation%': 1, |
| 570 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 571 | |
[email protected] | 55d9249 | 2013-01-31 05:03:39 | [diff] [blame] | 572 | ['(OS=="android" and google_tv!=1) or OS=="ios"', { |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 573 | 'enable_plugins%': 0, |
| 574 | }, { |
| 575 | 'enable_plugins%': 1, |
| 576 | }], |
| 577 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 578 | # linux_use_gold_binary: whether to use the binary checked into |
[email protected] | 1e8e7b9 | 2013-03-15 07:27:56 | [diff] [blame] | 579 | # third_party/gold. Gold is not used for 32-bit linux builds |
| 580 | # as it runs out of address space. |
| 581 | ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { |
[email protected] | 1e03348 | 2012-02-09 19:33:51 | [diff] [blame] | 582 | 'linux_use_gold_binary%': 1, |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 583 | }, { |
[email protected] | bd68ea5 | 2013-03-26 09:49:37 | [diff] [blame] | 584 | 'linux_use_gold_binary%': 0, |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 585 | }], |
| 586 | |
| 587 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
| 588 | # On by default for x64 Linux. Temporarily off for ChromeOS as |
| 589 | # it failed on a buildbot. |
| 590 | ['OS=="linux" and target_arch=="x64" and chromeos==0', { |
| 591 | 'linux_use_gold_flags%': 1, |
| 592 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 593 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 594 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 595 | |
[email protected] | 9394a3a | 2012-12-19 19:22:39 | [diff] [blame] | 596 | ['chromeos==1', { |
| 597 | 'linux_use_libgps%': 1, |
| 598 | }, { # chromeos==0 |
| 599 | # Do not use libgps on desktop Linux by default, |
| 600 | # see http://crbug.com/103751. |
| 601 | 'linux_use_libgps%': 0, |
| 602 | }], |
| 603 | |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 604 | ['OS=="android" or OS=="ios"', { |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 605 | 'enable_captive_portal_detection%': 0, |
| 606 | }, { |
| 607 | 'enable_captive_portal_detection%': 1, |
| 608 | }], |
| 609 | |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 610 | # Enable Skia UI text drawing incrementally on different platforms. |
| 611 | # http://crbug.com/105550 |
| 612 | # |
| 613 | # On Aura, this allows per-tile painting to be used in the browser |
| 614 | # compositor. |
[email protected] | 9197a928 | 2012-05-30 14:12:32 | [diff] [blame] | 615 | ['OS!="mac" and OS!="android"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 616 | 'use_canvas_skia%': 1, |
| 617 | }], |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 618 | |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 619 | ['chromeos==1', { |
| 620 | # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
| 621 | 'use_libjpeg_turbo%': 0, |
| 622 | }], |
| 623 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 624 | ['OS=="android"', { |
| 625 | # When building as part of the Android system, use system libraries |
| 626 | # where possible to reduce ROM size. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 627 | 'use_system_libjpeg%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 628 | }], |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 629 | |
[email protected] | 5be161f | 2013-06-18 11:09:33 | [diff] [blame] | 630 | # Do not enable the Settings App on ChromeOS. |
| 631 | ['enable_app_list==1 and chromeos==0', { |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 632 | 'enable_settings_app%': 1, |
| 633 | }, { |
| 634 | 'enable_settings_app%': 0, |
| 635 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 636 | |
| 637 | ['OS=="linux" and target_arch=="arm" and chromeos==0', { |
| 638 | # Set some defaults for arm/linux chrome builds |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 639 | 'linux_breakpad%': 0, |
| 640 | 'linux_use_tcmalloc%': 0, |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 641 | # sysroot needs to be an absolute path otherwise it generates |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 642 | # incorrect results when passed to pkg-config |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 643 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 644 | }], # OS=="linux" and target_arch=="arm" and chromeos==0 |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 645 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 646 | ['linux_lsb_release=="12.04"', { |
| 647 | 'conditions': [ |
| 648 | ['target_arch=="x64"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 649 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 650 | }], |
| 651 | ['target_arch=="ia32"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 652 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 653 | }], |
| 654 | ], |
| 655 | }], # linux_lsb_release=="12.04" |
| 656 | |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 657 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | f147893 | 2013-03-05 20:50:07 | [diff] [blame] | 658 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 659 | 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 660 | }], |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 661 | |
| 662 | # Whether tests targets should be run, archived or just have the |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 663 | # dependencies verified. All the tests targets have the '_run' suffix, |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 664 | # e.g. base_unittests_run runs the target base_unittests. The test |
| 665 | # target always calls tools/swarm_client/isolate.py. See the script's |
| 666 | # --help for more information and the valid --mode values. Meant to be |
| 667 | # overriden with GYP_DEFINES. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 668 | # TODO(maruel): Remove the conditions as more configurations are |
| 669 | # supported. |
[email protected] | 349f306 | 2013-04-10 20:44:51 | [diff] [blame] | 670 | # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code |
| 671 | # again. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 672 | # NOTE: The check for disable_nacl==0 and component=="static_library" |
| 673 | # can't be used here because these variables are not defined yet, but it |
| 674 | # is still not supported. |
[email protected] | 0dc310a3 | 2013-05-08 23:52:44 | [diff] [blame] | 675 | ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', { |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 676 | 'test_isolation_mode%': 'check', |
| 677 | }, { |
| 678 | 'test_isolation_mode%': 'noop', |
| 679 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 680 | # Whether Android ARM build uses OpenMAX DL FFT. |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 681 | ['OS=="android" and target_arch=="arm" and android_webview_build==0', { |
[email protected] | 6558fd4f | 2013-04-17 18:51:38 | [diff] [blame] | 682 | # Currently only supported on Android ARM, without webview. |
| 683 | # When enabled, this will also enable WebAudio on Android |
[email protected] | 330f3a3 | 2013-04-23 05:47:58 | [diff] [blame] | 684 | # ARM. Default is enabled. |
| 685 | 'use_openmax_dl_fft%': 1, |
[email protected] | d29d61b | 2013-04-17 04:00:53 | [diff] [blame] | 686 | }, { |
| 687 | 'use_openmax_dl_fft%': 0, |
| 688 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 689 | ], |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 690 | |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 691 | # Set this to 1 to enable use of concatenated impulse responses |
| 692 | # for the HRTF panner in WebAudio. |
[email protected] | 508afb7 | 2013-05-02 22:37:26 | [diff] [blame] | 693 | 'use_concatenated_impulse_responses': 1, |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 694 | |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 695 | # You can set the variable 'use_official_google_api_keys' to 1 |
| 696 | # to use the Google-internal file containing official API keys |
| 697 | # for Google Chrome even in a developer build. Setting this |
| 698 | # variable explicitly to 1 will cause your build to fail if the |
| 699 | # internal file is missing. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 700 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 701 | # The variable is documented here, but not handled in this file; |
| 702 | # see //google_apis/determine_use_official_keys.gypi for the |
| 703 | # implementation. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 704 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 705 | # Set the variable to 0 to not use the internal file, even when |
| 706 | # it exists in your checkout. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 707 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 708 | # Leave it unset in your include.gypi to have the variable |
| 709 | # implicitly set to 1 if you have |
| 710 | # src/google_apis/internal/google_chrome_api_keys.h in your |
| 711 | # checkout, and implicitly set to 0 if not. |
| 712 | # |
| 713 | # Note that official builds always behave as if the variable |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 714 | # was explicitly set to 1, i.e. they always use official keys, |
| 715 | # and will fail to build if the internal file is missing. |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 716 | # |
| 717 | # NOTE: You MUST NOT explicitly set the variable to 2 in your |
| 718 | # include.gypi or by other means. Due to subtleties of GYP, this |
| 719 | # is not the same as leaving the variable unset, even though its |
| 720 | # default value in |
| 721 | # //google_apis/determine_use_official_keys.gypi is 2. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 722 | |
| 723 | # Set these to bake the specified API keys and OAuth client |
| 724 | # IDs/secrets into your build. |
| 725 | # |
| 726 | # If you create a build without values baked in, you can instead |
| 727 | # set environment variables to provide the keys at runtime (see |
| 728 | # src/google_apis/google_api_keys.h for details). Features that |
| 729 | # require server-side APIs may fail to work if no keys are |
| 730 | # provided. |
| 731 | # |
| 732 | # Note that if you are building an official build or if |
| 733 | # use_official_google_api_keys has been set to 1 (explicitly or |
| 734 | # implicitly), these values will be ignored and the official |
| 735 | # keys will be used instead. |
| 736 | 'google_api_key%': '', |
| 737 | 'google_default_client_id%': '', |
| 738 | 'google_default_client_secret%': '', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 739 | }, |
| 740 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 741 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 742 | 'branding%': '<(branding)', |
| 743 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 744 | 'target_arch%': '<(target_arch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 745 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 746 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 747 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 748 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 749 | 'use_ash%': '<(use_ash)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 750 | 'use_openssl%': '<(use_openssl)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 751 | 'use_nss%': '<(use_nss)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 752 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 753 | 'os_posix%': '<(os_posix)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 754 | 'use_glib%': '<(use_glib)', |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 755 | 'use_pango%': '<(use_pango)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 756 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 757 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
| 758 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 759 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 760 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 761 | 'chromeos%': '<(chromeos)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 762 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 763 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 764 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 765 | 'use_xi2_mt%':'<(use_xi2_mt)', |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 766 | 'file_manager_extension%': '<(file_manager_extension)', |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 767 | 'image_loader_extension%': '<(image_loader_extension)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 768 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 769 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 770 | 'logging_like_official_build%': '<(logging_like_official_build)', |
[email protected] | a76fe1a | 2010-03-01 23:39:36 | [diff] [blame] | 771 | 'python_ver%': '<(python_ver)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 772 | 'arm_version%': '<(arm_version)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 773 | 'armv7%': '<(armv7)', |
| 774 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 775 | 'arm_neon_optional%': '<(arm_neon_optional)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 776 | 'sysroot%': '<(sysroot)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 777 | 'system_libdir%': '<(system_libdir)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 778 | 'component%': '<(component)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 779 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 780 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 781 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 782 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 783 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 784 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 785 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 786 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 787 | 'input_speech%': '<(input_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 788 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 789 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 790 | 'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 791 | 'asan%': '<(asan)', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 792 | 'lsan%': '<(lsan)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 793 | 'msan%': '<(msan)', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 794 | 'tsan%': '<(tsan)', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 795 | 'tsan_blacklist%': '<(tsan_blacklist)', |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 796 | 'clang_type_profiler%': '<(clang_type_profiler)', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 797 | 'order_profiling%': '<(order_profiling)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 798 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 799 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 800 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 801 | 'enable_plugins%': '<(enable_plugins)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 802 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 803 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 804 | 'enable_autofill_dialog%': '<(enable_autofill_dialog)', |
[email protected] | 066ab988 | 2013-06-07 00:55:20 | [diff] [blame] | 805 | 'use_spring_wallpaper%': '<(use_spring_wallpaper)', |
[email protected] | 4ffe78a | 2012-10-04 20:55:15 | [diff] [blame] | 806 | 'use_oem_wallpaper%': '<(use_oem_wallpaper)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 807 | 'enable_background%': '<(enable_background)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 808 | 'linux_use_gold_binary%': '<(linux_use_gold_binary)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 809 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 9394a3a | 2012-12-19 19:22:39 | [diff] [blame] | 810 | 'linux_use_libgps%': '<(linux_use_libgps)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 811 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0ef3a52 | 2012-05-15 14:56:33 | [diff] [blame] | 812 | 'test_isolation_mode%': '<(test_isolation_mode)', |
| 813 | 'test_isolation_outdir%': '<(test_isolation_outdir)', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 814 | 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 815 | 'enable_automation%': '<(enable_automation)', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 816 | 'enable_printing%': '<(enable_printing)', |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 817 | 'enable_google_now%': '<(enable_google_now)', |
[email protected] | 703369a | 2012-11-05 20:40:31 | [diff] [blame] | 818 | 'enable_language_detection%': '<(enable_language_detection)', |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 819 | 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 820 | 'disable_ftp_support%': '<(disable_ftp_support)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 821 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 822 | 'sas_dll_path%': '<(sas_dll_path)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 823 | 'wix_path%': '<(wix_path)', |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 824 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 825 | 'use_system_libjpeg%': '<(use_system_libjpeg)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 826 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 5660f19 | 2013-04-02 16:55:46 | [diff] [blame] | 827 | 'gyp_managed_install%': 0, |
[email protected] | 97d63ec | 2013-06-25 18:42:07 | [diff] [blame] | 828 | 'create_standalone_apk%': 1, |
[email protected] | 55d9249 | 2013-01-31 05:03:39 | [diff] [blame] | 829 | 'google_tv%': '<(google_tv)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 830 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 831 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 832 | 'enable_settings_app%': '<(enable_settings_app)', |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 833 | 'google_api_key%': '<(google_api_key)', |
| 834 | 'google_default_client_id%': '<(google_default_client_id)', |
| 835 | 'google_default_client_secret%': '<(google_default_client_secret)', |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 836 | 'enable_managed_users%': '<(enable_managed_users)', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 837 | 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', |
| 838 | 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 839 | 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 840 | |
[email protected] | 46aa05cc4 | 2013-01-15 17:34:31 | [diff] [blame] | 841 | # Use system mesa instead of bundled one. |
| 842 | 'use_system_mesa%': 0, |
| 843 | |
[email protected] | c486e4e | 2013-01-08 16:49:07 | [diff] [blame] | 844 | # Use system nspr instead of the bundled one. |
| 845 | 'use_system_nspr%': 0, |
| 846 | |
[email protected] | 2f32567 | 2012-10-31 23:29:37 | [diff] [blame] | 847 | # Use system protobuf instead of bundled one. |
| 848 | 'use_system_protobuf%': 0, |
| 849 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 850 | # Use system yasm instead of bundled one. |
| 851 | 'use_system_yasm%': 0, |
| 852 | |
[email protected] | ea02e96 | 2013-04-26 11:18:16 | [diff] [blame] | 853 | # Use system ICU instead of bundled one. |
| 854 | 'use_system_icu%' : 0, |
| 855 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 856 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 857 | # able to turn it off for various reasons. |
| 858 | 'linux_disable_pie%': 0, |
| 859 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 860 | # The release channel that this build targets. This is used to restrict |
| 861 | # channel-specific build options, like which installer packages to create. |
| 862 | # The default is 'all', which does no channel-specific filtering. |
| 863 | 'channel%': 'all', |
| 864 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 865 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 866 | # precompiled headers on the Mac. Prefix header injection may still be |
| 867 | # used, but prefix headers will not be precompiled. This is useful when |
| 868 | # using distcc to distribute a build to compile slaves that don't |
| 869 | # share the same compiler executable as the system driving the compilation, |
| 870 | # because precompiled headers rely on pointers into a specific compiler |
| 871 | # executable's image. Setting this to 0 is needed to use an experimental |
| 872 | # Linux-Mac cross compiler distcc farm. |
| 873 | 'chromium_mac_pch%': 1, |
| 874 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 875 | # The default value for mac_strip in target_defaults. This cannot be |
| 876 | # set there, per the comment about variable% in a target_defaults. |
| 877 | 'mac_strip_release%': 1, |
| 878 | |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 879 | # Set to 1 to enable code coverage. In addition to build changes |
| 880 | # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 881 | # project file called "coverage". |
| 882 | # Currently ignored on Windows. |
| 883 | 'coverage%': 0, |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 884 | |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 885 | # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
| 886 | # This is useful for parallel compilation tools which can't support /Zi. |
| 887 | # Only used on Windows. |
| 888 | 'win_z7%' : 0, |
| 889 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 890 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 891 | # environment variable, the libcmt shim it uses sometimes gets in |
| 892 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 893 | # 'win_use_allocator_shim': 0, |
| 894 | # 'win_release_RuntimeLibrary': 2 |
| 895 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 896 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 897 | |
[email protected] | 95ff808 | 2009-11-13 22:21:01 | [diff] [blame] | 898 | # Whether usage of OpenMAX is enabled. |
| 899 | 'enable_openmax%': 0, |
| 900 | |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 901 | # Whether proprietary audio/video codecs are assumed to be included with |
| 902 | # this build (only meaningful if branding!=Chrome). |
| 903 | 'proprietary_codecs%': 0, |
| 904 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 905 | # TODO(bradnelson): eliminate this when possible. |
| 906 | # To allow local gyp files to prevent release.vsprops from being included. |
| 907 | # Yes(1) means include release.vsprops. |
| 908 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 909 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 910 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 911 | # TODO(bradnelson): eliminate this when possible. |
| 912 | # To allow local gyp files to override additional linker options for msvs. |
| 913 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 914 | 'msvs_use_common_linker_extras%': 1, |
| 915 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 916 | # TODO(sgk): eliminate this if possible. |
| 917 | # It would be nicer to support this via a setting in 'target_defaults' |
| 918 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 919 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 920 | # but that doesn't work as we'd like. |
| 921 | 'msvs_debug_link_incremental%': '2', |
| 922 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 923 | # Needed for some of the largest modules. |
| 924 | 'msvs_debug_link_nonincremental%': '1', |
| 925 | |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 926 | # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 927 | # to get incremental linking to be faster in debug builds. |
[email protected] | 8f1da83d | 2012-08-06 21:49:26 | [diff] [blame] | 928 | 'incremental_chrome_dll%': '0', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 929 | |
[email protected] | ac4d0ff | 2013-05-14 20:04:15 | [diff] [blame] | 930 | # Experimental setting to break chrome.dll in to multiple parts (currently |
| 931 | # two, split primarily along browser/render lines). |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 932 | 'chrome_split_dll%': '0', |
| 933 | |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 934 | # The default settings for third party code for treating |
| 935 | # warnings-as-errors. Ideally, this would not be required, however there |
| 936 | # is some third party code that takes a long time to fix/roll. So, this |
| 937 | # flag allows us to have warnings as errors in general to prevent |
| 938 | # regressions in most modules, while working on the bits that are |
| 939 | # remaining. |
| 940 | 'win_third_party_warn_as_error%': 'true', |
| 941 | |
[email protected] | 57313614 | 2009-07-15 22:48:37 | [diff] [blame] | 942 | # This is the location of the sandbox binary. Chrome looks for this before |
| 943 | # running the zygote process. If found, and SUID, it will be used to |
| 944 | # sandbox the zygote process and, thus, all renderer processes. |
| 945 | 'linux_sandbox_path%': '', |
| 946 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 947 | # Clang stuff. |
| 948 | 'clang%': '<(clang)', |
[email protected] | e4ddf33 | 2011-10-20 21:52:24 | [diff] [blame] | 949 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 950 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 951 | # These two variables can be set in GYP_DEFINES while running |
| 952 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 953 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 954 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 955 | # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 956 | |
| 957 | 'clang_load%': '', |
| 958 | 'clang_add_plugin%': '', |
| 959 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 960 | # The default type of gtest. |
| 961 | 'gtest_target_type%': 'executable', |
| 962 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 963 | # Enable sampling based profiler. |
| 964 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 965 | 'profiling%': '0', |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 966 | # Profile without optimizing out stack frames when profiling==1. |
| 967 | 'profiling_full_stack_frames%': '0', |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 968 | |
[email protected] | 93b37350 | 2011-08-16 19:06:22 | [diff] [blame] | 969 | # Enable strict glibc debug mode. |
| 970 | 'glibcxx_debug%': 0, |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 971 | # Compile in Breakpad support by default so that it can be tested, |
| 972 | # even if it not enabled by default at runtime. |
| 973 | 'linux_breakpad%': 1, |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 974 | # And if we want to dump symbols for Breakpad-enabled builds. |
| 975 | 'linux_dump_symbols%': 0, |
| 976 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 977 | 'linux_strip_binary%': 0, |
[email protected] | 1d87c28 | 2010-09-15 22:24:49 | [diff] [blame] | 978 | # Strip the test binaries needed for Linux reliability tests. |
| 979 | 'linux_strip_reliability_tests%': 0, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 980 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 981 | # Enable TCMalloc. |
| 982 | 'linux_use_tcmalloc%': 1, |
[email protected] | 3c8fe548 | 2013-05-22 15:17:03 | [diff] [blame] | 983 | 'android_use_tcmalloc%': 0, |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 984 | |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 985 | # Disable TCMalloc's heapchecker. |
| 986 | 'linux_use_heapchecker%': 0, |
| 987 | |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 988 | # Disable shadow stack keeping used by heapcheck to unwind the stacks |
| 989 | # better. |
| 990 | 'linux_keep_shadow_stacks%': 0, |
| 991 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 992 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 993 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 994 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 995 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 996 | |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 997 | # Default arch variant for MIPS. |
| 998 | 'mips_arch_variant%': 'mips32r2', |
| 999 | |
[email protected] | a63e8d2 | 2013-03-23 16:17:08 | [diff] [blame] | 1000 | # Enable use of OpenMAX DL FFT routines. |
| 1001 | 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 1002 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1003 | # Enable new NPDevice API. |
| 1004 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1005 | |
| 1006 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 1007 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1008 | |
[email protected] | 6f51b27e | 2010-06-22 20:43:53 | [diff] [blame] | 1009 | # Enable a variable used elsewhere throughout the GYP files to determine |
| 1010 | # whether to compile in the sources for the GPU plugin / process. |
| 1011 | 'enable_gpu%': 1, |
| 1012 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1013 | # .gyp files or targets should set chromium_code to 1 if they build |
| 1014 | # Chromium-specific code, as opposed to external code. This variable is |
| 1015 | # used to control such things as the set of warnings to enable, and |
| 1016 | # whether warnings are treated as errors. |
| 1017 | 'chromium_code%': 0, |
| 1018 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1019 | 'release_valgrind_build%': 0, |
| 1020 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1021 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1022 | 'enable_wexit_time_destructors%': 0, |
| 1023 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1024 | # Set to 1 to compile with the built in pdf viewer. |
| 1025 | 'internal_pdf%': 0, |
| 1026 | |
[email protected] | 9e1149d7 | 2012-07-24 01:27:17 | [diff] [blame] | 1027 | # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
| 1028 | 'internal_gles2_conform_tests%': 0, |
| 1029 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1030 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 1031 | # so Cocoa is happy (http://crbug.com/20441). |
| 1032 | 'locales': [ |
| 1033 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 1034 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 1035 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1036 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1037 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 1038 | 'vi', 'zh-CN', 'zh-TW', |
| 1039 | ], |
| 1040 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 1041 | # Pseudo locales are special locales which are used for testing and |
| 1042 | # debugging. They don't get copied to the final app. For more info, |
| 1043 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 1044 | 'pseudo_locales': [ |
| 1045 | 'fake-bidi', |
| 1046 | ], |
| 1047 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1048 | 'grit_defines': [], |
| 1049 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 1050 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 1051 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 1052 | # is stored in resources.pak. It is still possible to load JS files |
| 1053 | # from disk by passing --debug-devtools cmdline switch. |
| 1054 | 'debug_devtools%': 0, |
| 1055 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1056 | # The Java Bridge is not compiled in by default. |
| 1057 | 'java_bridge%': 0, |
| 1058 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1059 | # Code signing for iOS binaries. The bots need to be able to disable this. |
| 1060 | 'chromium_ios_signing%': 1, |
| 1061 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 1062 | # This flag is only used when disable_nacl==0 and disables all those |
| 1063 | # subcomponents which would require the installation of a native_client |
| 1064 | # untrusted toolchain. |
| 1065 | 'disable_nacl_untrusted%': 0, |
| 1066 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1067 | # Disable Dart by default. |
| 1068 | 'enable_dart%': 0, |
| 1069 | |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 1070 | # The desired version of Windows SDK can be set in ~/.gyp/include.gypi. |
| 1071 | 'msbuild_toolset%': '', |
| 1072 | |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 1073 | # Native Client is enabled by default. |
| 1074 | 'disable_nacl%': 0, |
| 1075 | |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 1076 | # Portable Native Client is enabled by default. |
| 1077 | 'disable_pnacl%': 0, |
| 1078 | |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 1079 | # Whether to build full debug version for Debug configuration on Android. |
| 1080 | # Compared to full debug version, the default Debug configuration on Android |
| 1081 | # has no full v8 debug, has size optimization and linker gc section, so that |
| 1082 | # we can build a debug version with acceptable size and performance. |
| 1083 | 'android_full_debug%': 0, |
| 1084 | |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1085 | # Sets the default version name and code for Android app, by default we |
| 1086 | # do a developer build. |
| 1087 | 'android_app_version_name%': 'Developer Build', |
| 1088 | 'android_app_version_code%': 0, |
| 1089 | |
[email protected] | 014d1ff1 | 2013-07-02 01:52:33 | [diff] [blame] | 1090 | |
| 1091 | # Contains data about the attached devices for gyp_managed_install. |
| 1092 | 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', |
| 1093 | |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 1094 | 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1095 | 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))', |
| 1096 | |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1097 | 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
| 1098 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 1099 | |
[email protected] | fd6d882 | 2012-12-08 06:56:11 | [diff] [blame] | 1100 | # Whether we are using the rlz library or not. Platforms like Android send |
| 1101 | # rlz codes for searches but do not use the library. |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1102 | 'enable_rlz%': 0, |
| 1103 | |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 1104 | # MDNS is disabled by default. |
| 1105 | 'enable_mdns%' : 0, |
| 1106 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1107 | 'conditions': [ |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1108 | # The version of GCC in use, set later in platforms that use GCC and have |
| 1109 | # not explicitly chosen to build with clang. Currently, this means all |
| 1110 | # platforms except Windows, Mac and iOS. |
| 1111 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| 1112 | # it takes effect here. |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1113 | ['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] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1114 | 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
| 1115 | }, { |
| 1116 | 'gcc_version%': 0, |
| 1117 | }], |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1118 | ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { |
| 1119 | 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| 1120 | }, { |
| 1121 | 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
| 1122 | }], |
| 1123 | ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', { |
| 1124 | 'directx_sdk_path%': '<(directx_sdk_default_path)', |
| 1125 | }, { |
| 1126 | 'directx_sdk_path%': '$(DXSDK_DIR)', |
| 1127 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1128 | ['OS=="win"', { |
| 1129 | 'windows_driver_kit_path%': '$(WDK_DIR)', |
[email protected] | b8116481 | 2013-02-22 21:02:07 | [diff] [blame] | 1130 | # Set the python arch to prevent conflicts with pyauto on Win64 build. |
| 1131 | # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build. |
| 1132 | 'python_arch%': 'ia32', |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1133 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1134 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 1135 | # Figure out the python architecture to decide if we build pyauto. |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 1136 | 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1137 | 'conditions': [ |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1138 | ['target_arch=="mipsel"', { |
| 1139 | 'werror%': '', |
| 1140 | 'disable_nacl%': 1, |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1141 | 'nacl_untrusted_build%': 0, |
| 1142 | 'linux_use_tcmalloc%': 0, |
| 1143 | 'linux_breakpad%': 0, |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 1144 | }], |
| 1145 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1146 | 'sysroot%': '<(sysroot)', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 1147 | 'CXX%': '<(CXX)', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1148 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1149 | # All Chrome builds have breakpad symbols, but only process the |
| 1150 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 1151 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1152 | 'linux_dump_symbols%': 1, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1153 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1154 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1155 | }], # os_posix==1 and OS!="mac" and OS!="ios" |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 1156 | ['OS=="ios"', { |
| 1157 | 'disable_nacl%': 1, |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 1158 | 'enable_background%': 0, |
[email protected] | aeaaaf0 | 2012-09-10 17:46:15 | [diff] [blame] | 1159 | 'enable_gpu%': 0, |
[email protected] | a35aa36 | 2012-10-30 13:55:07 | [diff] [blame] | 1160 | 'enable_task_manager%': 0, |
[email protected] | abde673 | 2012-08-16 16:10:35 | [diff] [blame] | 1161 | 'icu_use_data_file_flag%': 1, |
[email protected] | 4e3996f9 | 2012-07-17 10:41:13 | [diff] [blame] | 1162 | 'use_system_libxml%': 1, |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 1163 | 'use_system_sqlite%': 1, |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1164 | 'locales==': [ |
| 1165 | 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi', |
[email protected] | 6e9c15f | 2013-06-13 16:03:44 | [diff] [blame] | 1166 | 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', 'nl', |
| 1167 | 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1168 | 'zh-CN', 'zh-TW', |
| 1169 | ], |
[email protected] | 57871bc | 2012-08-20 16:28:12 | [diff] [blame] | 1170 | |
| 1171 | # The Mac SDK is set for iOS builds and passed through to Mac |
| 1172 | # sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
| 1173 | # overridden from the command line the same way it is for a Mac build. |
| 1174 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1175 | |
| 1176 | # iOS SDK and deployment target support. The iOS 5.0 SDK is actually |
| 1177 | # what is required, but the value is left blank so when it is set in |
| 1178 | # the project files it will be the "current" iOS SDK. Forcing 5.0 |
| 1179 | # even though it is "current" causes Xcode to spit out a warning for |
| 1180 | # every single project file for not using the "current" SDK. |
| 1181 | 'ios_sdk%': '', |
| 1182 | 'ios_sdk_path%': '', |
[email protected] | 4e4a4265 | 2012-12-20 16:56:18 | [diff] [blame] | 1183 | 'ios_deployment_target%': '5.0', |
[email protected] | fcd63418 | 2012-10-09 10:50:32 | [diff] [blame] | 1184 | |
| 1185 | 'conditions': [ |
| 1186 | # ios_product_name is set to the name of the .app bundle as it should |
| 1187 | # appear on disk. |
| 1188 | ['branding=="Chrome"', { |
| 1189 | 'ios_product_name%': 'Chrome', |
| 1190 | }, { # else: branding!="Chrome" |
| 1191 | 'ios_product_name%': 'Chromium', |
| 1192 | }], |
| 1193 | ['branding=="Chrome" and buildtype=="Official"', { |
| 1194 | 'ios_breakpad%': 1, |
| 1195 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 1196 | 'ios_breakpad%': 0, |
| 1197 | }], |
| 1198 | ], |
| 1199 | }], # OS=="ios" |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1200 | ['OS=="android"', { |
| 1201 | # Location of Android NDK. |
| 1202 | 'variables': { |
| 1203 | 'variables': { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1204 | # Unfortuantely we have to use absolute paths to the SDK/NDK beause |
| 1205 | # they're passed to ant which uses a different relative path from |
| 1206 | # gyp. |
| 1207 | 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', |
| 1208 | 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', |
| 1209 | 'android_host_arch%': '<!(uname -m)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1210 | # Android API-level of the SDK used for compilation. |
| 1211 | 'android_sdk_version%': '17', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1212 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1213 | # Copy conditionally-set variables out one scope. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1214 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1215 | 'android_sdk_root%': '<(android_sdk_root)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1216 | 'android_sdk_version%': '<(android_sdk_version)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1217 | 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1218 | |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1219 | 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1220 | |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1221 | # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1222 | # platform requirement for Chrome on Android, we use it for native |
| 1223 | # code compilation. |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1224 | 'conditions': [ |
| 1225 | ['target_arch == "ia32"', { |
| 1226 | 'android_app_abi%': 'x86', |
| 1227 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1228 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1229 | 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1230 | }], |
| 1231 | ['target_arch=="arm"', { |
| 1232 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1233 | ['arm_version<7', { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1234 | 'android_app_abi%': 'armeabi', |
| 1235 | }, { |
| 1236 | 'android_app_abi%': 'armeabi-v7a', |
| 1237 | }], |
| 1238 | ], |
| 1239 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1240 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1241 | 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1242 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1243 | ['target_arch == "mipsel"', { |
| 1244 | 'android_app_abi%': 'mips', |
| 1245 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', |
| 1246 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', |
[email protected] | 7a956a6 | 2013-05-10 16:40:47 | [diff] [blame] | 1247 | 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1248 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1249 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1250 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1251 | # Copy conditionally-set variables out one scope. |
| 1252 | 'android_app_abi%': '<(android_app_abi)', |
| 1253 | 'android_gdbserver%': '<(android_gdbserver)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1254 | 'android_ndk_root%': '<(android_ndk_root)', |
| 1255 | 'android_ndk_sysroot': '<(android_ndk_sysroot)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1256 | 'android_sdk_root%': '<(android_sdk_root)', |
| 1257 | 'android_sdk_version%': '<(android_sdk_version)', |
| 1258 | 'android_toolchain%': '<(android_toolchain)', |
| 1259 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1260 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
| 1261 | 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1262 | 'android_sdk_tools%': '<(android_sdk_root)/platform-tools', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1263 | 'android_sdk%': '<(android_sdk)', |
| 1264 | 'android_sdk_jar%': '<(android_sdk)/android.jar', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1265 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1266 | 'android_stlport_root': '<(android_stlport_root)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1267 | 'android_stlport_include': '<(android_stlport_root)/stlport', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1268 | 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1269 | |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 1270 | # Location of the "strip" binary, used by both gyp and scripts. |
| 1271 | 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1272 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1273 | # Location of the "readelf" binary. |
| 1274 | 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| 1275 | |
[email protected] | ef7ed7a | 2012-05-29 23:19:13 | [diff] [blame] | 1276 | # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used |
| 1277 | # to specify the output directory for Ant in the Android build. |
| 1278 | 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`', |
| 1279 | |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1280 | # Determines whether we should optimize JNI generation at the cost of |
| 1281 | # breaking assumptions in the build system that when inputs have changed |
| 1282 | # the outputs should always change as well. This is meant purely for |
| 1283 | # developer builds, to avoid spurious re-linking of native files. |
| 1284 | 'optimize_jni_generation%': 0, |
| 1285 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1286 | # Always uses openssl. |
| 1287 | 'use_openssl%': 1, |
| 1288 | |
| 1289 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1290 | 'enable_task_manager%': 0, |
[email protected] | 23a30e6 | 2012-12-01 03:39:07 | [diff] [blame] | 1291 | 'safe_browsing%': 2, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1292 | 'configuration_policy%': 0, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1293 | 'input_speech%': 0, |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1294 | 'enable_automation%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1295 | 'java_bridge%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1296 | 'build_ffmpegsumo%': 0, |
| 1297 | 'linux_use_tcmalloc%': 0, |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1298 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1299 | # Disable Native Client. |
| 1300 | 'disable_nacl%': 1, |
| 1301 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1302 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1303 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1304 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1305 | # Sessions are store separately in the Java side. |
| 1306 | 'enable_session_service%': 0, |
| 1307 | |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1308 | # Set to 1 once we have a notification system for Android. |
| 1309 | # http://crbug.com/115320 |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1310 | 'notifications%': 0, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1311 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1312 | 'p2p_apis%' : 0, |
| 1313 | |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1314 | 'gtest_target_type%': 'shared_library', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1315 | |
| 1316 | # Uses system APIs for decoding audio and video. |
| 1317 | 'use_libffmpeg%': '0', |
| 1318 | |
[email protected] | f1dc1e5 | 2012-12-12 21:39:00 | [diff] [blame] | 1319 | # Always use the chromium skia. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1320 | 'use_system_skia%': '0', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1321 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1322 | # When building as part of the Android system, use system libraries |
| 1323 | # where possible to reduce ROM size. |
| 1324 | # TODO(steveblock): Investigate using the system version of sqlite. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1325 | 'use_system_sqlite%': 0, # '<(android_webview_build)', |
| 1326 | 'use_system_expat%': '<(android_webview_build)', |
| 1327 | 'use_system_icu%': '<(android_webview_build)', |
| 1328 | 'use_system_stlport%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1329 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 1330 | 'enable_managed_users%': 0, |
| 1331 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1332 | # Copy it out one scope. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1333 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1334 | }], # OS=="android" |
[email protected] | b313955 | 2013-05-30 14:16:12 | [diff] [blame] | 1335 | ['android_webview_build==1', { |
| 1336 | # When building the WebView in the Android tree, jarjar will remap all |
| 1337 | # the class names, so the JNI generator needs to know this. |
| 1338 | 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
| 1339 | }], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1340 | ['OS=="mac"', { |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1341 | # Enable clang on mac by default! |
| 1342 | 'clang%': 1, |
| 1343 | }], # OS=="mac" |
| 1344 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1345 | 'variables': { |
| 1346 | # Mac OS X SDK and deployment target support. The SDK identifies |
| 1347 | # the version of the system headers that will be used, and |
| 1348 | # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
| 1349 | # macro. "Maximum allowed" refers to the operating system version |
| 1350 | # whose APIs are available in the headers. The deployment target |
| 1351 | # identifies the minimum system version that the built products are |
| 1352 | # expected to function on. It corresponds to the |
| 1353 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
| 1354 | # macros are available, #include <AvailabilityMacros.h>. Additional |
| 1355 | # documentation on these macros is available at |
| 1356 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 1357 | # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
| 1358 | # deployment target to 10.6. Other projects, such as O3D, may |
| 1359 | # override these defaults. |
| 1360 | |
| 1361 | # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
| 1362 | # about that is at least the specified version. In official builds, |
| 1363 | # the SDK must match mac_sdk_min exactly. If the SDK is installed |
| 1364 | # someplace that Xcode doesn't know about, set mac_sdk_path to the |
| 1365 | # path to the SDK; when set to a non-empty string, SDK detection |
| 1366 | # based on mac_sdk_min will be bypassed entirely. |
| 1367 | 'mac_sdk_min%': '10.6', |
| 1368 | 'mac_sdk_path%': '', |
| 1369 | |
| 1370 | 'mac_deployment_target%': '10.6', |
| 1371 | }, |
| 1372 | |
| 1373 | 'mac_sdk_min': '<(mac_sdk_min)', |
| 1374 | 'mac_sdk_path': '<(mac_sdk_path)', |
| 1375 | 'mac_deployment_target': '<(mac_deployment_target)', |
| 1376 | |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1377 | # Compile in Breakpad support by default so that it can be |
| 1378 | # tested, even if it is not enabled by default at runtime. |
| 1379 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1380 | 'conditions': [ |
| 1381 | # mac_product_name is set to the name of the .app bundle as it should |
| 1382 | # appear on disk. This duplicates data from |
| 1383 | # chrome/app/theme/chromium/BRANDING and |
| 1384 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 1385 | # these names into the build system. |
| 1386 | ['branding=="Chrome"', { |
| 1387 | 'mac_product_name%': 'Google Chrome', |
| 1388 | }, { # else: branding!="Chrome" |
| 1389 | 'mac_product_name%': 'Chromium', |
| 1390 | }], |
| 1391 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1392 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1393 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1394 | # Enable uploading crash dumps. |
| 1395 | 'mac_breakpad_uploads%': 1, |
| 1396 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1397 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1398 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1399 | 'mac_keystone%': 1, |
| 1400 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1401 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1402 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1403 | 'mac_breakpad%': 0, |
| 1404 | 'mac_keystone%': 0, |
| 1405 | }], |
| 1406 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1407 | }], # OS=="mac" or OS=="ios" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1408 | ['OS=="win"', { |
| 1409 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1410 | ['component=="shared_library"', { |
| 1411 | 'win_use_allocator_shim%': 0, |
| 1412 | }], |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1413 | ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1414 | # Only enabled by default for ninja because it's buggy in VS. |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1415 | # Not enabled for component=static_library because some targets |
| 1416 | # are too large and the toolchain fails due to the size of the |
| 1417 | # .obj files. |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1418 | 'incremental_chrome_dll%': 1, |
| 1419 | }], |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1420 | # Don't do incremental linking for large modules on 32-bit. |
| 1421 | ['MSVS_OS_BITS==32', { |
| 1422 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 1423 | },{ |
| 1424 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 1425 | }], |
[email protected] | 7876418 | 2013-01-23 20:32:51 | [diff] [blame] | 1426 | ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', { |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1427 | 'msvs_express%': 1, |
| 1428 | 'secure_atl%': 0, |
| 1429 | },{ |
| 1430 | 'msvs_express%': 0, |
| 1431 | 'secure_atl%': 1, |
| 1432 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1433 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1434 | 'nacl_win64_defines': [ |
| 1435 | # This flag is used to minimize dependencies when building |
| 1436 | # Native Client loader for 64-bit Windows. |
| 1437 | 'NACL_WIN64', |
| 1438 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1439 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1440 | |
[email protected] | a35aa36 | 2012-10-30 13:55:07 | [diff] [blame] | 1441 | ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', { |
[email protected] | 8e553f4 | 2010-10-25 20:05:44 | [diff] [blame] | 1442 | 'use_cups%': 1, |
| 1443 | }, { |
| 1444 | 'use_cups%': 0, |
| 1445 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1446 | |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1447 | ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', { |
| 1448 | 'enable_pepper_cdms%': 1, |
| 1449 | }, { |
| 1450 | 'enable_pepper_cdms%': 0, |
| 1451 | }], |
| 1452 | |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1453 | # Native Client glibc toolchain is enabled |
| 1454 | # by default except on arm and mips. |
| 1455 | ['target_arch=="arm" or target_arch=="mipsel"', { |
[email protected] | 2f7da67 | 2012-06-21 08:38:32 | [diff] [blame] | 1456 | 'disable_glibc%': 1, |
| 1457 | }, { |
| 1458 | 'disable_glibc%': 0, |
| 1459 | }], |
| 1460 | |
[email protected] | 712c3da | 2012-09-24 21:31:24 | [diff] [blame] | 1461 | # Disable SSE2 when building for ARM or MIPS. |
| 1462 | ['target_arch=="arm" or target_arch=="mipsel"', { |
| 1463 | 'disable_sse2%': 1, |
| 1464 | }, { |
| 1465 | 'disable_sse2%': '<(disable_sse2)', |
| 1466 | }], |
| 1467 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1468 | # Set the relative path from this file to the GYP file of the JPEG |
| 1469 | # library used by Chromium. |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1470 | ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
| 1471 | # Configuration for using the system libjeg is here. |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1472 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1473 | }, { |
| 1474 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 1475 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1476 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1477 | # Options controlling the use of GConf (the classic GNOME configuration |
| 1478 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1479 | ['chromeos==1', { |
| 1480 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1481 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1482 | }, { |
| 1483 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1484 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1485 | }], |
| 1486 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1487 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1488 | ['branding=="Chrome"', { |
| 1489 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 1490 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1491 | 'grit_defines': ['-D', '_google_chrome', |
| 1492 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1493 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1494 | 'grit_defines': ['-D', '_chromium', |
| 1495 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1496 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1497 | ['chromeos==1', { |
[email protected] | d4d81e9 | 2012-06-04 20:10:13 | [diff] [blame] | 1498 | 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1499 | }], |
| 1500 | ['toolkit_views==1', { |
| 1501 | 'grit_defines': ['-D', 'toolkit_views'], |
| 1502 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 1503 | ['use_aura==1', { |
| 1504 | 'grit_defines': ['-D', 'use_aura'], |
| 1505 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1506 | ['use_ash==1', { |
| 1507 | 'grit_defines': ['-D', 'use_ash'], |
| 1508 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1509 | ['use_nss==1', { |
| 1510 | 'grit_defines': ['-D', 'use_nss'], |
| 1511 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1512 | ['use_ozone==1', { |
| 1513 | 'grit_defines': ['-D', 'use_ozone'], |
| 1514 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 1515 | ['file_manager_extension==1', { |
| 1516 | 'grit_defines': ['-D', 'file_manager_extension'], |
| 1517 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1518 | ['image_loader_extension==1', { |
| 1519 | 'grit_defines': ['-D', 'image_loader_extension'], |
| 1520 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1521 | ['remoting==1', { |
| 1522 | 'grit_defines': ['-D', 'remoting'], |
| 1523 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1524 | ['use_titlecase_in_grd_files==1', { |
| 1525 | 'grit_defines': ['-D', 'use_titlecase'], |
| 1526 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1527 | ['use_third_party_translations==1', { |
| 1528 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1529 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 1530 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 1531 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1532 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1533 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1534 | ['OS=="android"', { |
[email protected] | 77e59c5 | 2013-05-21 15:29:17 | [diff] [blame] | 1535 | 'grit_defines': ['-t', 'android', |
[email protected] | 7dc7681 | 2013-03-26 07:31:57 | [diff] [blame] | 1536 | '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], |
[email protected] | 7a2ce04 | 2013-05-28 03:20:35 | [diff] [blame] | 1537 | 'conditions': [ |
| 1538 | ['google_tv==1', { |
| 1539 | 'grit_defines': ['-D', 'google_tv'], |
| 1540 | }], |
| 1541 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1542 | }], |
[email protected] | d39e386 | 2012-06-26 22:38:23 | [diff] [blame] | 1543 | ['OS=="mac"', { |
| 1544 | 'grit_defines': ['-D', 'scale_factors=2x'], |
| 1545 | }], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1546 | ['OS == "ios"', { |
| 1547 | 'grit_defines': [ |
| 1548 | # define for iOS specific resources. |
| 1549 | '-D', 'ios', |
| 1550 | # iOS uses a whitelist to filter resources. |
| 1551 | '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
| 1552 | ], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1553 | |
| 1554 | # Enable clang and host builds when generating with ninja-ios. |
| 1555 | 'conditions': [ |
| 1556 | ['"<(GENERATOR)"=="ninja"', { |
| 1557 | 'clang%': 1, |
| 1558 | 'host_os%': "mac", |
| 1559 | }] |
| 1560 | ], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1561 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1562 | ['enable_extensions==1', { |
| 1563 | 'grit_defines': ['-D', 'enable_extensions'], |
| 1564 | }], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1565 | ['enable_printing==1', { |
| 1566 | 'grit_defines': ['-D', 'enable_printing'], |
| 1567 | }], |
[email protected] | c2aad54 | 2012-07-31 20:40:33 | [diff] [blame] | 1568 | ['enable_themes==1', { |
| 1569 | 'grit_defines': ['-D', 'enable_themes'], |
| 1570 | }], |
[email protected] | 066ab988 | 2013-06-07 00:55:20 | [diff] [blame] | 1571 | ['use_spring_wallpaper==1', { |
| 1572 | 'grit_defines': ['-D', 'use_spring_wallpaper'], |
| 1573 | }], |
[email protected] | 4ffe78a | 2012-10-04 20:55:15 | [diff] [blame] | 1574 | ['use_oem_wallpaper==1', { |
| 1575 | 'grit_defines': ['-D', 'use_oem_wallpaper'], |
| 1576 | }], |
[email protected] | ef1dd506 | 2012-12-17 06:41:33 | [diff] [blame] | 1577 | ['enable_app_list==1', { |
| 1578 | 'grit_defines': ['-D', 'enable_app_list'], |
| 1579 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1580 | ['enable_settings_app==1', { |
| 1581 | 'grit_defines': ['-D', 'enable_settings_app'], |
| 1582 | }], |
[email protected] | 5411d820 | 2013-01-30 01:32:15 | [diff] [blame] | 1583 | ['enable_google_now==1', { |
| 1584 | 'grit_defines': ['-D', 'enable_google_now'], |
| 1585 | }], |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 1586 | ['use_concatenated_impulse_responses==1', { |
| 1587 | 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], |
| 1588 | }], |
[email protected] | f66ddbd | 2013-06-27 14:17:04 | [diff] [blame] | 1589 | ['enable_webrtc==1', { |
| 1590 | 'grit_defines': ['-D', 'enable_webrtc'], |
| 1591 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1592 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 7d389e2 | 2013-05-15 00:45:07 | [diff] [blame] | 1593 | 'clang_chrome_plugins_flags': [ |
| 1594 | '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 1595 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1596 | }], |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 1597 | |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 1598 | ['asan==1 and OS!="win"', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1599 | 'clang%': 1, |
| 1600 | }], |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 1601 | ['asan==1 and OS=="mac"', { |
[email protected] | 93064ee | 2013-02-11 19:25:09 | [diff] [blame] | 1602 | # TODO(glider): we do not strip ASan binaries until the dynamic ASan |
[email protected] | 2fccd42 | 2013-05-21 21:27:57 | [diff] [blame] | 1603 | # runtime is fully adopted. See http://crbug.com/242503. |
[email protected] | 93064ee | 2013-02-11 19:25:09 | [diff] [blame] | 1604 | 'mac_strip_release': 0, |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 1605 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1606 | ['lsan==1', { |
| 1607 | 'clang%': 1, |
| 1608 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1609 | ['tsan==1', { |
| 1610 | 'clang%': 1, |
| 1611 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 1612 | ['msan==1', { |
| 1613 | 'clang%': 1, |
| 1614 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1615 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1616 | ['OS=="linux" and clang_type_profiler==1', { |
| 1617 | 'clang%': 1, |
| 1618 | 'clang_use_chrome_plugins%': 0, |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 1619 | 'conditions': [ |
| 1620 | ['host_arch=="x64"', { |
| 1621 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 1622 | }], |
| 1623 | ['host_arch=="ia32"', { |
| 1624 | # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 1625 | # Clang in this directory at your own risk if needed for some |
| 1626 | # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 1627 | # usage). Any failure by this compiler should not close the tree. |
| 1628 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 1629 | }], |
| 1630 | ], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1631 | }], |
| 1632 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1633 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 1634 | # much and make the stacks harder to figure out. |
| 1635 | # |
| 1636 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 1637 | # them under a build_for_tool== condition. |
| 1638 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 1639 | # gcc flags |
| 1640 | 'mac_debug_optimization': '1', |
| 1641 | 'mac_release_optimization': '1', |
| 1642 | 'release_optimize': '1', |
| 1643 | 'no_gc_sections': 1, |
| 1644 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1645 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1646 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1647 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1648 | |
| 1649 | # MSVS flags for TSan on Pin and Windows. |
| 1650 | 'win_debug_RuntimeChecks': '0', |
| 1651 | 'win_debug_disable_iterator_debugging': '1', |
| 1652 | 'win_debug_Optimization': '1', |
| 1653 | 'win_debug_InlineFunctionExpansion': '0', |
| 1654 | 'win_release_InlineFunctionExpansion': '0', |
| 1655 | 'win_release_OmitFramePointers': '0', |
| 1656 | |
| 1657 | 'linux_use_tcmalloc': 1, |
| 1658 | 'release_valgrind_build': 1, |
| 1659 | 'werror': '', |
| 1660 | 'component': 'static_library', |
| 1661 | 'use_system_zlib': 0, |
| 1662 | }], |
| 1663 | |
| 1664 | # Build tweaks for DrMemory. |
| 1665 | # TODO(rnk): Combine with tsan config to share the builder. |
| 1666 | # http://crbug.com/108155 |
| 1667 | ['build_for_tool=="drmemory"', { |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1668 | # These runtime checks force initialization of stack vars which blocks |
| 1669 | # DrMemory's uninit detection. |
| 1670 | 'win_debug_RuntimeChecks': '0', |
| 1671 | # Iterator debugging is slow. |
| 1672 | 'win_debug_disable_iterator_debugging': '1', |
| 1673 | # Try to disable optimizations that mess up stacks in a release build. |
[email protected] | c13d0030 | 2012-10-18 15:45:16 | [diff] [blame] | 1674 | # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) |
| 1675 | # /O2 and /Ob0 (disable inline) cannot be used together because of a |
| 1676 | # compiler bug, so we use /Ob1 instead. |
| 1677 | 'win_release_InlineFunctionExpansion': '1', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1678 | 'win_release_OmitFramePointers': '0', |
[email protected] | 6bf3373d | 2012-08-15 22:27:50 | [diff] [blame] | 1679 | # Ditto for debug, to support bumping win_debug_Optimization. |
| 1680 | 'win_debug_InlineFunctionExpansion': 0, |
| 1681 | 'win_debug_OmitFramePointers': 0, |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1682 | # Keep the code under #ifndef NVALGRIND. |
| 1683 | 'release_valgrind_build': 1, |
| 1684 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1685 | |
[email protected] | f40a691 | 2012-12-10 21:52:41 | [diff] [blame] | 1686 | # Enable RLZ on Win, Mac and ChromeOS. |
| 1687 | ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', { |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1688 | 'enable_rlz%': 1, |
| 1689 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1690 | |
| 1691 | # Set default compiler flags depending on ARM version. |
| 1692 | ['arm_version==5 and android_webview_build==0', { |
| 1693 | # Flags suitable for Android emulator |
| 1694 | 'arm_arch%': 'armv5te', |
| 1695 | 'arm_tune%': 'xscale', |
| 1696 | 'arm_fpu%': '', |
| 1697 | 'arm_float_abi%': 'soft', |
| 1698 | 'arm_thumb%': 0, |
| 1699 | }], |
| 1700 | ['arm_version==6 and android_webview_build==0', { |
| 1701 | 'arm_arch%': 'armv6', |
| 1702 | 'arm_tune%': '', |
| 1703 | 'arm_fpu%': '', |
| 1704 | 'arm_float_abi%': 'soft', |
| 1705 | 'arm_thumb%': 0, |
| 1706 | }], |
| 1707 | ['arm_version==7 and android_webview_build==0', { |
| 1708 | 'arm_arch%': 'armv7-a', |
| 1709 | 'arm_tune%': 'cortex-a8', |
| 1710 | 'conditions': [ |
| 1711 | ['arm_neon==1', { |
| 1712 | 'arm_fpu%': 'neon', |
| 1713 | }, { |
| 1714 | 'arm_fpu%': 'vfpv3-d16', |
| 1715 | }], |
| 1716 | ], |
| 1717 | 'arm_float_abi%': 'softfp', |
| 1718 | 'arm_thumb%': 1, |
| 1719 | }], |
| 1720 | |
| 1721 | ['android_webview_build==1', { |
| 1722 | # The WebView build gets its cpu-specific flags from the Android build system. |
| 1723 | 'arm_arch%': '', |
| 1724 | 'arm_tune%': '', |
| 1725 | 'arm_fpu%': '', |
| 1726 | 'arm_float_abi%': '', |
| 1727 | 'arm_thumb%': 0, |
| 1728 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1729 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1730 | |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 1731 | |
| 1732 | # The path to the ANGLE library. TODO(apatrick): This is to help |
| 1733 | # transition to a new version of ANGLE at a new location. After the |
| 1734 | # transition is complete, this can be removed. |
[email protected] | a4f18a80 | 2013-06-24 10:40:26 | [diff] [blame] | 1735 | 'angle_path': '<(DEPTH)/third_party/angle_dx11', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 1736 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1737 | # List of default apps to install in new profiles. The first list contains |
| 1738 | # the source files as found in svn. The second list, used only for linux, |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1739 | # contains the destination location for each of the files. When a crx |
| 1740 | # is added or removed from the list, the chrome/browser/resources/ |
| 1741 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1742 | 'default_apps_list': [ |
| 1743 | 'browser/resources/default_apps/external_extensions.json', |
| 1744 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1745 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1746 | 'browser/resources/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 1747 | 'browser/resources/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 1748 | 'browser/resources/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1749 | ], |
| 1750 | 'default_apps_list_linux_dest': [ |
| 1751 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 1752 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1753 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1754 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 1755 | '<(PRODUCT_DIR)/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 1756 | '<(PRODUCT_DIR)/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1757 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1758 | }, |
| 1759 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1760 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1761 | # The condition that operates on chromium_code is in a target_conditions |
| 1762 | # section, and will not have access to the default fallback value of |
| 1763 | # chromium_code at the top of this file, or to the chromium_code |
| 1764 | # variable placed at the root variables scope of .gyp files, because |
| 1765 | # those variables are not set at target scope. As a workaround, |
| 1766 | # if chromium_code is not set at target scope, define it in target scope |
| 1767 | # to contain whatever value it has during early variable expansion. |
| 1768 | # That's enough to make it available during target conditional |
| 1769 | # processing. |
| 1770 | 'chromium_code%': '<(chromium_code)', |
| 1771 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1772 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 1773 | 'win_release_Optimization%': '2', # 2 = /Os |
| 1774 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1775 | |
| 1776 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1777 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 65d61e6 | 2012-06-01 21:52:11 | [diff] [blame] | 1778 | 'win_release_OmitFramePointers%': '0', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1779 | # Tri-state: blank is default, 1 on, 0 off |
| 1780 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1781 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1782 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 1783 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1784 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1785 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1786 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 1787 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1788 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 1789 | # VS inserts quite a lot of extra checks to algorithms like |
| 1790 | # std::partial_sort in Debug build which make them O(N^2) |
| 1791 | # instead of O(N*logN). This is particularly slow under memory |
| 1792 | # tools like ThreadSanitizer so we want it to be disablable. |
| 1793 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
| 1794 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1795 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1796 | 'release_extra_cflags%': '', |
| 1797 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1798 | |
| 1799 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1800 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1801 | # the non-qualified versions are widely assumed to be *nix-only |
| 1802 | 'win_release_extra_cflags%': '', |
| 1803 | 'win_debug_extra_cflags%': '', |
| 1804 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1805 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1806 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 1807 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 1808 | # Only used by Windows build for now. Can be used to build into a |
| 1809 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 1810 | # output files in src/build/VS2010_{Debug,Release}. |
| 1811 | 'build_dir_prefix%': '', |
| 1812 | |
[email protected] | 9ac2db69 | 2012-06-08 01:01:57 | [diff] [blame] | 1813 | # Targets are by default not nacl untrusted code. |
| 1814 | 'nacl_untrusted_build%': 0, |
| 1815 | |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 1816 | 'pnacl_compile_flags': [ |
| 1817 | # pnacl uses the clang compiler so we need to supress all the |
| 1818 | # same warnings as we do for clang. |
| 1819 | # TODO(sbc): Remove these if/when they are removed from the clang |
| 1820 | # build. |
| 1821 | '-Wno-unused-function', |
| 1822 | '-Wno-char-subscripts', |
| 1823 | '-Wno-c++11-extensions', |
| 1824 | '-Wno-unnamed-type-template-args', |
| 1825 | ], |
| 1826 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1827 | 'conditions': [ |
| 1828 | ['OS=="win" and component=="shared_library"', { |
| 1829 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 1830 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 1831 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1832 | }, { |
| 1833 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 1834 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 1835 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 1836 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1837 | ['OS=="ios"', { |
| 1838 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 1839 | 'mac_release_optimization%': 's', # Use -Os unless overridden |
| 1840 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 1841 | }, { |
| 1842 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 1843 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
| 1844 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 1845 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1846 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1847 | }, |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 1848 | 'defines': [ |
| 1849 | # Set this to use the new DX11 version of ANGLE. |
| 1850 | # TODO(apatrick): Remove this when the transition is complete. |
[email protected] | a4f18a80 | 2013-06-24 10:40:26 | [diff] [blame] | 1851 | 'ANGLE_DX11', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 1852 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 1853 | 'conditions': [ |
[email protected] | d808e21 | 2013-03-12 14:06:16 | [diff] [blame] | 1854 | ['(OS=="mac" or OS=="ios") and asan==1', { |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 1855 | 'dependencies': [ |
| 1856 | '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 1857 | ], |
| 1858 | }], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1859 | ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', { |
| 1860 | 'cflags_cc!': ['-fno-rtti'], |
| 1861 | 'cflags_cc+': [ |
| 1862 | '-frtti', |
| 1863 | '-gline-tables-only', |
| 1864 | '-fintercept-allocation-functions', |
| 1865 | ], |
| 1866 | 'defines': ['TYPE_PROFILING'], |
| 1867 | 'dependencies': [ |
| 1868 | '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
| 1869 | ], |
| 1870 | }], |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1871 | ['chrome_split_dll', { |
[email protected] | ac4d0ff | 2013-05-14 20:04:15 | [diff] [blame] | 1872 | 'variables': { |
| 1873 | 'chrome_split_dll': '<!(python <(DEPTH)/tools/win/split_link/check_installed.py)', |
| 1874 | }, |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1875 | 'defines': ['CHROME_SPLIT_DLL'], |
| 1876 | }], |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 1877 | ['OS=="linux" and clang==1 and host_arch=="ia32"', { |
| 1878 | # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed. |
| 1879 | # See http://crbug.com/162818. |
| 1880 | 'cflags+': ['-Wno-sentinel'], |
| 1881 | }], |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 1882 | ['OS=="win" and "<(msbuild_toolset)"!=""', { |
| 1883 | 'msbuild_toolset': '<(msbuild_toolset)', |
| 1884 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 1885 | ['branding=="Chrome"', { |
| 1886 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 1887 | }, { # else: branding!="Chrome" |
| 1888 | 'defines': ['CHROMIUM_BUILD'], |
| 1889 | }], |
[email protected] | 286d9a1 | 2012-05-30 16:20:38 | [diff] [blame] | 1890 | ['OS=="mac" and component=="shared_library"', { |
| 1891 | 'xcode_settings': { |
| 1892 | 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 1893 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 1894 | # For unbundled binaries. |
| 1895 | '@loader_path/.', |
| 1896 | # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
| 1897 | '@loader_path/../../..', |
| 1898 | ], |
| 1899 | }, |
| 1900 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1901 | ['enable_rlz==1', { |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 1902 | 'defines': ['ENABLE_RLZ'], |
| 1903 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 1904 | ['component=="shared_library"', { |
| 1905 | 'defines': ['COMPONENT_BUILD'], |
| 1906 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 1907 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 1908 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 1909 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 1910 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 1911 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 1912 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 1913 | ['use_aura==1', { |
| 1914 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 1915 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1916 | ['use_ash==1', { |
| 1917 | 'defines': ['USE_ASH=1'], |
| 1918 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1919 | ['use_ozone==1', { |
| 1920 | 'defines': ['USE_OZONE=1'], |
| 1921 | }], |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 1922 | ['use_default_render_theme==1', { |
| 1923 | 'defines': ['USE_DEFAULT_RENDER_THEME=1'], |
| 1924 | }], |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 1925 | ['use_libjpeg_turbo==1', { |
| 1926 | 'defines': ['USE_LIBJPEG_TURBO=1'], |
| 1927 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1928 | ['use_nss==1', { |
| 1929 | 'defines': ['USE_NSS=1'], |
| 1930 | }], |
[email protected] | 2fa2f2d8 | 2013-04-29 18:13:12 | [diff] [blame] | 1931 | ['use_x11==1', { |
| 1932 | 'defines': ['USE_X11=1'], |
| 1933 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 1934 | ['enable_one_click_signin==1', { |
| 1935 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 1936 | }], |
[email protected] | a47aa89 | 2011-11-22 03:12:31 | [diff] [blame] | 1937 | ['toolkit_uses_gtk==1 and toolkit_views==0', { |
| 1938 | # TODO(erg): We are progressively sealing up use of deprecated features |
| 1939 | # in gtk in preparation for an eventual porting to gtk3. |
| 1940 | 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], |
| 1941 | }], |
[email protected] | fdc5bed | 2010-01-09 01:16:57 | [diff] [blame] | 1942 | ['chromeos==1', { |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 1943 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 1944 | }], |
[email protected] | 55d9249 | 2013-01-31 05:03:39 | [diff] [blame] | 1945 | ['google_tv==1', { |
| 1946 | 'defines': ['GOOGLE_TV=1'], |
| 1947 | }], |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 1948 | ['use_xi2_mt!=0', { |
| 1949 | 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
| 1950 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 1951 | ['file_manager_extension==1', { |
| 1952 | 'defines': ['FILE_MANAGER_EXTENSION=1'], |
| 1953 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1954 | ['image_loader_extension==1', { |
| 1955 | 'defines': ['IMAGE_LOADER_EXTENSION=1'], |
| 1956 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1957 | ['profiling==1', { |
| 1958 | 'defines': ['ENABLE_PROFILING=1'], |
| 1959 | }], |
[email protected] | 93b37350 | 2011-08-16 19:06:22 | [diff] [blame] | 1960 | ['OS=="linux" and glibcxx_debug==1', { |
| 1961 | 'defines': ['_GLIBCXX_DEBUG=1',], |
[email protected] | f6a45d9 | 2012-10-24 19:26:59 | [diff] [blame] | 1962 | 'cflags_cc+': ['-g'], |
[email protected] | 93b37350 | 2011-08-16 19:06:22 | [diff] [blame] | 1963 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 1964 | ['remoting==1', { |
| 1965 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 1966 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 1967 | ['enable_webrtc==1', { |
| 1968 | 'defines': ['ENABLE_WEBRTC=1'], |
| 1969 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 1970 | ['proprietary_codecs==1', { |
| 1971 | 'defines': ['USE_PROPRIETARY_CODECS'], |
| 1972 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 1973 | ['enable_viewport==1', { |
| 1974 | 'defines': ['ENABLE_VIEWPORT'], |
| 1975 | }], |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1976 | ['enable_pepper_cdms==1', { |
| 1977 | 'defines': ['ENABLE_PEPPER_CDMS'], |
| 1978 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 1979 | ['configuration_policy==1', { |
| 1980 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 1981 | }], |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1982 | ['input_speech==1', { |
| 1983 | 'defines': ['ENABLE_INPUT_SPEECH'], |
| 1984 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1985 | ['notifications==1', { |
| 1986 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 1987 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 1988 | ['enable_hidpi==1', { |
| 1989 | 'defines': ['ENABLE_HIDPI=1'], |
| 1990 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1991 | ['fastbuild!=0', { |
[email protected] | 3b0bc5e | 2013-04-24 11:42:31 | [diff] [blame] | 1992 | 'xcode_settings': { |
| 1993 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 1994 | }, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1995 | 'conditions': [ |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 1996 | ['clang==1', { |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 1997 | # Clang creates chubby debug information, which makes linking very |
| 1998 | # slow. For now, don't create debug information with clang. See |
| 1999 | # http://crbug.com/70000 |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2000 | 'conditions': [ |
| 2001 | ['OS=="linux"', { |
| 2002 | 'variables': { |
| 2003 | 'debug_extra_cflags': '-g0', |
| 2004 | }, |
| 2005 | }], |
| 2006 | # Android builds symbols on release by default, disable them. |
| 2007 | ['OS=="android"', { |
| 2008 | 'variables': { |
| 2009 | 'debug_extra_cflags': '-g0', |
| 2010 | 'release_extra_cflags': '-g0', |
| 2011 | }, |
| 2012 | }], |
| 2013 | ], |
| 2014 | }, { # else clang!=1 |
| 2015 | 'conditions': [ |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2016 | ['OS=="win" and fastbuild==2', { |
| 2017 | # Completely disable debug information. |
| 2018 | 'msvs_settings': { |
| 2019 | 'VCLinkerTool': { |
| 2020 | 'GenerateDebugInformation': 'false', |
| 2021 | }, |
| 2022 | 'VCCLCompilerTool': { |
| 2023 | 'DebugInformationFormat': '0', |
| 2024 | }, |
| 2025 | }, |
| 2026 | }], |
| 2027 | ['OS=="win" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2028 | 'msvs_settings': { |
| 2029 | 'VCLinkerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2030 | # This tells the linker to generate .pdbs, so that |
| 2031 | # we can get meaningful stack traces. |
| 2032 | 'GenerateDebugInformation': 'true', |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2033 | }, |
| 2034 | 'VCCLCompilerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2035 | # No debug info to be generated by compiler. |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2036 | 'DebugInformationFormat': '0', |
| 2037 | }, |
| 2038 | }, |
| 2039 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2040 | ['OS=="linux" and fastbuild==2', { |
| 2041 | 'variables': { |
| 2042 | 'debug_extra_cflags': '-g0', |
| 2043 | }, |
| 2044 | }], |
| 2045 | ['OS=="linux" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2046 | 'variables': { |
| 2047 | 'debug_extra_cflags': '-g1', |
| 2048 | }, |
| 2049 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2050 | ['OS=="android" and fastbuild==2', { |
| 2051 | 'variables': { |
| 2052 | 'debug_extra_cflags': '-g0', |
| 2053 | 'release_extra_cflags': '-g0', |
| 2054 | }, |
| 2055 | }], |
| 2056 | ['OS=="android" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2057 | 'variables': { |
| 2058 | 'debug_extra_cflags': '-g1', |
| 2059 | 'release_extra_cflags': '-g1', |
| 2060 | }, |
| 2061 | }], |
| 2062 | ], |
| 2063 | }], # clang!=1 |
| 2064 | ], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2065 | }], # fastbuild!=0 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 2066 | ['dcheck_always_on!=0', { |
| 2067 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 2068 | }], # dcheck_always_on!=0 |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 2069 | ['logging_like_official_build!=0', { |
| 2070 | 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'], |
| 2071 | }], # logging_like_official_build!=0 |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2072 | ['win_use_allocator_shim==0', { |
| 2073 | 'conditions': [ |
| 2074 | ['OS=="win"', { |
| 2075 | 'defines': ['NO_TCMALLOC'], |
| 2076 | }], |
| 2077 | ], |
| 2078 | }], |
[email protected] | 43f28f83 | 2010-02-03 02:28:48 | [diff] [blame] | 2079 | ['enable_gpu==1', { |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 2080 | 'defines': [ |
| 2081 | 'ENABLE_GPU=1', |
| 2082 | ], |
| 2083 | }], |
[email protected] | b1c2a554 | 2010-10-08 12:44:40 | [diff] [blame] | 2084 | ['use_openssl==1', { |
| 2085 | 'defines': [ |
| 2086 | 'USE_OPENSSL=1', |
| 2087 | ], |
| 2088 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 2089 | ['enable_eglimage==1', { |
| 2090 | 'defines': [ |
| 2091 | 'ENABLE_EGLIMAGE=1', |
| 2092 | ], |
| 2093 | }], |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2094 | ['asan==1 and OS=="win"', { |
| 2095 | # Since asan on windows uses Syzygy, we need /PROFILE turned on to |
| 2096 | # produce appropriate pdbs. |
| 2097 | 'msvs_settings': { |
| 2098 | 'VCLinkerTool': { |
| 2099 | 'Profile': 'true', |
| 2100 | }, |
| 2101 | }, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2102 | 'defines': [ |
[email protected] | bba0fea3 | 2013-06-14 12:29:35 | [diff] [blame] | 2103 | 'ADDRESS_SANITIZER', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2104 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 2105 | ], |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2106 | }], # asan==1 and OS=="win" |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2107 | ['coverage!=0', { |
| 2108 | 'conditions': [ |
[email protected] | fc642ec | 2012-10-12 19:07:03 | [diff] [blame] | 2109 | ['OS=="mac" or OS=="ios"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2110 | 'xcode_settings': { |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 2111 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs |
| 2112 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 2113 | }, |
[email protected] | fc642ec | 2012-10-12 19:07:03 | [diff] [blame] | 2114 | }], |
| 2115 | ['OS=="mac"', { |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 2116 | # Add -lgcov for types executable, shared_library, and |
[email protected] | dc259ce5 | 2010-04-13 04:03:10 | [diff] [blame] | 2117 | # loadable_module; not for static_library. |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 2118 | # This is a delayed conditional. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2119 | 'target_conditions': [ |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 2120 | ['_type!="static_library"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2121 | 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 2122 | }], |
| 2123 | ], |
| 2124 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2125 | ['OS=="linux" or OS=="android"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2126 | 'cflags': [ '-ftest-coverage', |
| 2127 | '-fprofile-arcs' ], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 2128 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 2129 | }], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 2130 | ['OS=="win"', { |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2131 | 'variables': { |
| 2132 | # Disable incremental linking for all modules. |
| 2133 | # 0: inherit, 1: disabled, 2: enabled. |
| 2134 | 'msvs_debug_link_incremental': '1', |
| 2135 | 'msvs_large_module_debug_link_mode': '1', |
[email protected] | 8ade58a6 | 2013-02-12 21:02:29 | [diff] [blame] | 2136 | # Disable RTC. Syzygy explicitly doesn't support RTC instrumented |
| 2137 | # binaries for now. |
| 2138 | 'win_debug_RuntimeChecks': '0', |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2139 | }, |
| 2140 | 'defines': [ |
| 2141 | # Disable iterator debugging (huge speed boost without any |
| 2142 | # change in coverage results). |
| 2143 | '_HAS_ITERATOR_DEBUGGING=0', |
| 2144 | ], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 2145 | 'msvs_settings': { |
| 2146 | 'VCLinkerTool': { |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2147 | # Enable profile information (necessary for coverage |
| 2148 | # instrumentation). This is incompatible with incremental |
| 2149 | # linking. |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 2150 | 'Profile': 'true', |
| 2151 | }, |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 2152 | } |
| 2153 | }], # OS==win |
| 2154 | ], # conditions for coverage |
| 2155 | }], # coverage!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2156 | ['OS=="win"', { |
| 2157 | 'defines': [ |
| 2158 | '__STD_C', |
| 2159 | '_CRT_SECURE_NO_DEPRECATE', |
| 2160 | '_SCL_SECURE_NO_DEPRECATE', |
[email protected] | 2d0aa324 | 2012-10-22 16:23:10 | [diff] [blame] | 2161 | # This define is required to pull in the new Win8 interfaces from |
| 2162 | # system headers like ShObjIdl.h. |
| 2163 | 'NTDDI_VERSION=0x06020000', |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2164 | ], |
| 2165 | 'include_dirs': [ |
| 2166 | '<(DEPTH)/third_party/wtl/include', |
| 2167 | ], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2168 | 'conditions': [ |
| 2169 | ['win_z7!=0', { |
| 2170 | 'msvs_settings': { |
[email protected] | 5146e0b | 2012-08-23 05:49:09 | [diff] [blame] | 2171 | # Generates debug info when win_z7=1 |
| 2172 | # even if fastbuild=1 (that makes GenerateDebugInformation false). |
| 2173 | 'VCLinkerTool': { |
| 2174 | 'GenerateDebugInformation': 'true', |
| 2175 | }, |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2176 | 'VCCLCompilerTool': { |
| 2177 | 'DebugInformationFormat': '1', |
| 2178 | } |
| 2179 | } |
| 2180 | }], |
[email protected] | 45a7707 | 2012-11-17 00:28:42 | [diff] [blame] | 2181 | ['"<(GENERATOR)"=="msvs"', { |
| 2182 | 'msvs_settings': { |
| 2183 | 'VCLinkerTool': { |
| 2184 | # Make the pdb name sane. Otherwise foo.exe and foo.dll both |
| 2185 | # have foo.pdb. The ninja generator already defaults to this and |
| 2186 | # can't handle the $(TargetPath) macro. |
| 2187 | 'ProgramDatabaseFile': '$(TargetPath).pdb', |
| 2188 | } |
| 2189 | }, |
| 2190 | }], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2191 | ], # win_z7!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2192 | }], # OS==win |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 2193 | ['enable_task_manager==1', { |
| 2194 | 'defines': [ |
| 2195 | 'ENABLE_TASK_MANAGER=1', |
| 2196 | ], |
| 2197 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2198 | ['enable_extensions==1', { |
| 2199 | 'defines': [ |
| 2200 | 'ENABLE_EXTENSIONS=1', |
| 2201 | ], |
| 2202 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 2203 | ['OS=="win" and branding=="Chrome"', { |
| 2204 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 2205 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 2206 | ['enable_dart==1', { |
| 2207 | 'defines': ['WEBKIT_USING_DART=1'], |
| 2208 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 2209 | ['enable_plugin_installation==1', { |
| 2210 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 2211 | }], |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 2212 | ['enable_plugins==1', { |
| 2213 | 'defines': ['ENABLE_PLUGINS=1'], |
| 2214 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 2215 | ['enable_session_service==1', { |
| 2216 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 2217 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 2218 | ['enable_themes==1', { |
| 2219 | 'defines': ['ENABLE_THEMES=1'], |
| 2220 | }], |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 2221 | ['enable_autofill_dialog==1', { |
| 2222 | 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], |
| 2223 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 2224 | ['enable_background==1', { |
| 2225 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 2226 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 2227 | ['enable_automation==1', { |
| 2228 | 'defines': ['ENABLE_AUTOMATION=1'], |
| 2229 | }], |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 2230 | ['enable_google_now==1', { |
| 2231 | 'defines': ['ENABLE_GOOGLE_NOW=1'], |
| 2232 | }], |
[email protected] | 703369a | 2012-11-05 20:40:31 | [diff] [blame] | 2233 | ['enable_language_detection==1', { |
| 2234 | 'defines': ['ENABLE_LANGUAGE_DETECTION=1'], |
| 2235 | }], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2236 | ['enable_printing==1', { |
| 2237 | 'defines': ['ENABLE_PRINTING=1'], |
| 2238 | }], |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 2239 | ['enable_captive_portal_detection==1', { |
| 2240 | 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
| 2241 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2242 | ['enable_app_list==1', { |
| 2243 | 'defines': ['ENABLE_APP_LIST=1'], |
| 2244 | }], |
| 2245 | ['enable_settings_app==1', { |
| 2246 | 'defines': ['ENABLE_SETTINGS_APP=1'], |
| 2247 | }], |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 2248 | ['disable_ftp_support==1', { |
| 2249 | 'defines': ['DISABLE_FTP_SUPPORT=1'], |
| 2250 | }], |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 2251 | ['enable_managed_users==1', { |
| 2252 | 'defines': ['ENABLE_MANAGED_USERS=1'], |
| 2253 | }], |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 2254 | ['spdy_proxy_auth_origin != ""', { |
| 2255 | 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'], |
| 2256 | }], |
| 2257 | ['spdy_proxy_auth_property != ""', { |
| 2258 | 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], |
| 2259 | }], |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 2260 | ['spdy_proxy_auth_value != ""', { |
| 2261 | 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], |
| 2262 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 2263 | ['enable_mdns==1', { |
| 2264 | 'defines': ['ENABLE_MDNS=1'], |
| 2265 | }] |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2266 | ], # conditions for 'target_defaults' |
| 2267 | 'target_conditions': [ |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2268 | ['enable_wexit_time_destructors==1', { |
| 2269 | 'conditions': [ |
| 2270 | [ 'clang==1', { |
| 2271 | 'cflags': [ |
| 2272 | '-Wexit-time-destructors', |
| 2273 | ], |
| 2274 | 'xcode_settings': { |
| 2275 | 'WARNING_CFLAGS': [ |
| 2276 | '-Wexit-time-destructors', |
| 2277 | ], |
| 2278 | }, |
| 2279 | }], |
| 2280 | ], |
| 2281 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2282 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2283 | 'conditions': [ |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2284 | [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2285 | # We don't want to get warnings from third-party code, |
| 2286 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2287 | 'cflags!': [ |
| 2288 | '-Wall', |
| 2289 | '-Wextra', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2290 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2291 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2292 | # Don't warn about hash_map in third-party code. |
| 2293 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2294 | ], |
| 2295 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2296 | # Don't warn about printf format problems. |
| 2297 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 2298 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2299 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2300 | 'cflags_cc!': [ |
| 2301 | # TODO(fischman): remove this. |
| 2302 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
| 2303 | '-Wsign-compare', |
| 2304 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2305 | }], |
[email protected] | 82dd5eb3 | 2012-08-18 04:24:32 | [diff] [blame] | 2306 | # TODO: Fix all warnings on chromeos too. |
| 2307 | [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
| 2308 | 'cflags!': [ |
| 2309 | '-Werror', |
| 2310 | ], |
| 2311 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2312 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2313 | 'cflags': [ |
| 2314 | # Don't warn about ignoring the return value from e.g. close(). |
| 2315 | # This is off by default in some gccs but on by default in others. |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2316 | # BSD systems do not support this option, since they are usually |
| 2317 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2318 | '-Wno-unused-result', |
| 2319 | ], |
| 2320 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2321 | [ 'OS=="win"', { |
| 2322 | 'defines': [ |
| 2323 | '_CRT_SECURE_NO_DEPRECATE', |
| 2324 | '_CRT_NONSTDC_NO_WARNINGS', |
| 2325 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 2326 | '_SCL_SECURE_NO_DEPRECATE', |
| 2327 | ], |
| 2328 | 'msvs_disabled_warnings': [4800], |
| 2329 | 'msvs_settings': { |
| 2330 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 2331 | 'WarningLevel': '3', |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2332 | 'WarnAsError': '<(win_third_party_warn_as_error)', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2333 | 'Detect64BitPortabilityProblems': 'false', |
| 2334 | }, |
| 2335 | }, |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2336 | 'conditions': [ |
| 2337 | ['buildtype=="Official"', { |
| 2338 | 'msvs_settings': { |
| 2339 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 2340 | } |
| 2341 | }], |
| 2342 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2343 | }], |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2344 | # TODO(darin): Unfortunately, some third_party code depends on base. |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 2345 | [ 'OS=="win" and component=="shared_library"', { |
| 2346 | 'msvs_disabled_warnings': [ |
| 2347 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2348 | ], |
| 2349 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2350 | [ 'OS=="mac" or OS=="ios"', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2351 | 'xcode_settings': { |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 2352 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2353 | }, |
[email protected] | 3a352c36 | 2012-05-08 19:45:49 | [diff] [blame] | 2354 | 'conditions': [ |
| 2355 | ['buildtype=="Official"', { |
| 2356 | 'xcode_settings': { |
| 2357 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 2358 | }, |
| 2359 | }], |
| 2360 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2361 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2362 | [ 'OS=="ios"', { |
| 2363 | 'xcode_settings': { |
[email protected] | 7afca86 | 2012-07-11 15:11:22 | [diff] [blame] | 2364 | # TODO(ios): Fix remaining warnings in third-party code, then |
| 2365 | # remove this; the Mac cleanup didn't get everything that's |
| 2366 | # flagged in an iOS build. |
| 2367 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2368 | 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
| 2369 | }, |
| 2370 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2371 | ], |
| 2372 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 2373 | 'includes': [ |
| 2374 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 2375 | 'filename_rules.gypi', |
| 2376 | ], |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2377 | # In Chromium code, we define __STDC_foo_MACROS in order to get the |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2378 | # C99 macros on Mac and Linux. |
| 2379 | 'defines': [ |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2380 | '__STDC_CONSTANT_MACROS', |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2381 | '__STDC_FORMAT_MACROS', |
| 2382 | ], |
| 2383 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2384 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 2385 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 2386 | 'msvs_settings': { |
| 2387 | 'VCCLCompilerTool': { |
| 2388 | 'AdditionalOptions': ['/we4389'], |
| 2389 | }, |
| 2390 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2391 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2392 | ['OS=="win" and component=="shared_library"', { |
| 2393 | 'msvs_disabled_warnings': [ |
| 2394 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2395 | ], |
| 2396 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2397 | ], |
| 2398 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2399 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2400 | 'default_configuration': 'Debug', |
| 2401 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2402 | # VCLinkerTool LinkIncremental values below: |
| 2403 | # 0 == default |
| 2404 | # 1 == /INCREMENTAL:NO |
| 2405 | # 2 == /INCREMENTAL |
| 2406 | # Debug links incremental, Release does not. |
| 2407 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 2408 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2409 | # |
| 2410 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2411 | 'abstract': 1, |
| 2412 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 2413 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2414 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 2415 | 'CharacterSet': '1', |
| 2416 | }, |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 2417 | # Add the default import libs. |
| 2418 | 'msvs_settings':{ |
| 2419 | 'VCLinkerTool': { |
| 2420 | 'AdditionalDependencies': [ |
| 2421 | 'kernel32.lib', |
| 2422 | 'gdi32.lib', |
| 2423 | 'winspool.lib', |
| 2424 | 'comdlg32.lib', |
| 2425 | 'advapi32.lib', |
| 2426 | 'shell32.lib', |
| 2427 | 'ole32.lib', |
| 2428 | 'oleaut32.lib', |
| 2429 | 'user32.lib', |
| 2430 | 'uuid.lib', |
| 2431 | 'odbc32.lib', |
| 2432 | 'odbccp32.lib', |
[email protected] | 36bb739c | 2013-02-25 22:10:39 | [diff] [blame] | 2433 | 'delayimp.lib', |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 2434 | ], |
| 2435 | }, |
| 2436 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2437 | }, |
| 2438 | 'x86_Base': { |
| 2439 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2440 | 'msvs_settings': { |
| 2441 | 'VCLinkerTool': { |
| 2442 | 'TargetMachine': '1', |
| 2443 | }, |
| 2444 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 2445 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2446 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2447 | 'x64_Base': { |
| 2448 | 'abstract': 1, |
| 2449 | 'msvs_configuration_platform': 'x64', |
| 2450 | 'msvs_settings': { |
| 2451 | 'VCLinkerTool': { |
| 2452 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2453 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2454 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2455 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2456 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 50f9966 | 2013-03-04 20:58:36 | [diff] [blame] | 2457 | # Doesn't exist x64 SDK. Should use oleaut32 in any case. |
| 2458 | 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2459 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 2460 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2461 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2462 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2463 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2464 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2465 | }, |
| 2466 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2467 | }, |
| 2468 | 'Debug_Base': { |
| 2469 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2470 | 'defines': [ |
| 2471 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 2472 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 2473 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2474 | 'xcode_settings': { |
| 2475 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 2476 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 2477 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 2478 | '<@(debug_extra_cflags)', |
| 2479 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2480 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2481 | 'msvs_settings': { |
| 2482 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2483 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2484 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2485 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2486 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2487 | 'conditions': [ |
| 2488 | # According to MSVS, InlineFunctionExpansion=0 means |
| 2489 | # "default inlining", not "/Ob0". |
| 2490 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 2491 | ['win_debug_InlineFunctionExpansion==0', { |
| 2492 | 'AdditionalOptions': ['/Ob0'], |
| 2493 | }], |
| 2494 | ['win_debug_InlineFunctionExpansion!=""', { |
| 2495 | 'InlineFunctionExpansion': |
| 2496 | '<(win_debug_InlineFunctionExpansion)', |
| 2497 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2498 | ['win_debug_disable_iterator_debugging==1', { |
| 2499 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 2500 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2501 | |
| 2502 | # if win_debug_OmitFramePointers is blank, leave as default |
| 2503 | ['win_debug_OmitFramePointers==1', { |
| 2504 | 'OmitFramePointers': 'true', |
| 2505 | }], |
| 2506 | ['win_debug_OmitFramePointers==0', { |
| 2507 | 'OmitFramePointers': 'false', |
| 2508 | # The above is not sufficient (http://crbug.com/106711): it |
| 2509 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 2510 | # perform FPO regardless, so we must explicitly disable. |
| 2511 | # We still want the false setting above to avoid having |
| 2512 | # "/Oy /Oy-" and warnings about overriding. |
| 2513 | 'AdditionalOptions': ['/Oy-'], |
| 2514 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2515 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2516 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2517 | }, |
| 2518 | 'VCLinkerTool': { |
| 2519 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 2520 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 2521 | # Chrome.dll share the same base name. As result, windbg will |
| 2522 | # name the Chrome.dll module like chrome_<base address>, where |
| 2523 | # <base address> typically changes with each launch. This in turn |
| 2524 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 2525 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 2526 | # Note that this is a three-way bool, where 0 means to pick up |
| 2527 | # the default setting, 1 is off and 2 is on. |
| 2528 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2529 | }, |
| 2530 | 'VCResourceCompilerTool': { |
| 2531 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 2532 | }, |
| 2533 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2534 | 'conditions': [ |
[email protected] | 78204c9 | 2012-09-14 04:42:55 | [diff] [blame] | 2535 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 2536 | 'target_conditions': [ |
| 2537 | ['_toolset=="target"', { |
| 2538 | 'cflags': [ |
| 2539 | '<@(debug_extra_cflags)', |
| 2540 | ], |
| 2541 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2542 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2543 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2544 | # Disabled on iOS because it was causing a crash on startup. |
| 2545 | # TODO(michelea): investigate, create a reduced test and possibly |
| 2546 | # submit a radar. |
| 2547 | ['release_valgrind_build==0 and OS!="ios"', { |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 2548 | 'xcode_settings': { |
| 2549 | 'OTHER_CFLAGS': [ |
| 2550 | '-fstack-protector-all', # Implies -fstack-protector |
| 2551 | ], |
| 2552 | }, |
| 2553 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2554 | ], |
| 2555 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2556 | 'Release_Base': { |
| 2557 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2558 | 'defines': [ |
| 2559 | 'NDEBUG', |
| 2560 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2561 | 'xcode_settings': { |
| 2562 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 2563 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2564 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2565 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2566 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2567 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2568 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2569 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 2570 | # In official builds, each target will self-select |
| 2571 | # an optimization level. |
| 2572 | ['buildtype!="Official"', { |
| 2573 | 'Optimization': '<(win_release_Optimization)', |
| 2574 | }, |
| 2575 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2576 | # According to MSVS, InlineFunctionExpansion=0 means |
| 2577 | # "default inlining", not "/Ob0". |
| 2578 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 2579 | ['win_release_InlineFunctionExpansion==0', { |
| 2580 | 'AdditionalOptions': ['/Ob0'], |
| 2581 | }], |
| 2582 | ['win_release_InlineFunctionExpansion!=""', { |
| 2583 | 'InlineFunctionExpansion': |
| 2584 | '<(win_release_InlineFunctionExpansion)', |
| 2585 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2586 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2587 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2588 | ['win_release_OmitFramePointers==1', { |
| 2589 | 'OmitFramePointers': 'true', |
| 2590 | }], |
| 2591 | ['win_release_OmitFramePointers==0', { |
| 2592 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2593 | # The above is not sufficient (http://crbug.com/106711): it |
| 2594 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 2595 | # perform FPO regardless, so we must explicitly disable. |
| 2596 | # We still want the false setting above to avoid having |
| 2597 | # "/Oy /Oy-" and warnings about overriding. |
| 2598 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2599 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2600 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2601 | 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2602 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2603 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 2604 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 2605 | # (i.e., inherit from parent solution), 1 means false, and |
| 2606 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2607 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 2608 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 2609 | # file contains FIXUP information (growing the PDB file by about |
| 2610 | # 5%) but does not otherwise alter the output binary. This |
| 2611 | # information is used by the Syzygy optimization tool when |
| 2612 | # decomposing the release image. |
| 2613 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2614 | }, |
| 2615 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2616 | 'conditions': [ |
[email protected] | fd3fb3bf | 2012-05-23 22:15:16 | [diff] [blame] | 2617 | ['msvs_use_common_release', { |
| 2618 | 'includes': ['release.gypi'], |
| 2619 | }], |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 2620 | ['release_valgrind_build==0 and tsan==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2621 | 'defines': [ |
| 2622 | 'NVALGRIND', |
| 2623 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 2624 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 2625 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2626 | 'defines': [ |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2627 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2628 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 2629 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 2630 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 2631 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2632 | ['win_use_allocator_shim==0', { |
| 2633 | 'defines': ['NO_TCMALLOC'], |
| 2634 | }], |
[email protected] | 37305ae | 2012-12-11 01:54:58 | [diff] [blame] | 2635 | ['os_posix==1 and chromium_code==1', { |
| 2636 | # Non-chromium code is not guaranteed to compile cleanly |
| 2637 | # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 2638 | # when optimizations are disabled, so only do that for Release |
| 2639 | # build. |
| 2640 | 'defines': [ |
| 2641 | '_FORTIFY_SOURCE=2', |
| 2642 | ], |
| 2643 | }], |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2644 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 2645 | 'target_conditions': [ |
| 2646 | ['_toolset=="target"', { |
| 2647 | 'cflags': [ |
| 2648 | '<@(release_extra_cflags)', |
| 2649 | ], |
| 2650 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2651 | ], |
| 2652 | }], |
[email protected] | b64ec82 | 2013-05-23 12:57:41 | [diff] [blame] | 2653 | ['OS=="ios"', { |
| 2654 | 'defines': [ |
| 2655 | 'NS_BLOCK_ASSERTIONS=1', |
| 2656 | ], |
| 2657 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2658 | ], |
| 2659 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2660 | # |
| 2661 | # Concrete configurations |
| 2662 | # |
| 2663 | 'Debug': { |
| 2664 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 2665 | }, |
| 2666 | 'Release': { |
| 2667 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2668 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 2669 | 'conditions': [ |
| 2670 | [ 'OS=="win"', { |
| 2671 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2672 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2673 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 2674 | }, |
| 2675 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2676 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 2677 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 2678 | }], |
| 2679 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2680 | }, |
| 2681 | }, |
| 2682 | 'conditions': [ |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2683 | ['os_posix==1', { |
| 2684 | 'target_defaults': { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2685 | 'ldflags': [ |
| 2686 | '-Wl,-z,now', |
| 2687 | '-Wl,-z,relro', |
| 2688 | ], |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2689 | }, |
| 2690 | }], |
[email protected] | d2ca75c | 2013-02-01 05:47:17 | [diff] [blame] | 2691 | ['os_posix==1 and chromeos==0', { |
| 2692 | # Chrome OS enables -fstack-protector-strong via its build wrapper, |
| 2693 | # and we want to avoid overriding this, so stack-protector is only |
| 2694 | # enabled when not building on Chrome OS. |
| 2695 | # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc |
| 2696 | # supports it. |
| 2697 | 'target_defaults': { |
| 2698 | 'cflags': [ |
| 2699 | '-fstack-protector', |
| 2700 | '--param=ssp-buffer-size=4', |
| 2701 | ], |
| 2702 | }, |
| 2703 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2704 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2705 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 2706 | # Enable -Werror by default, but put it in a variable so it can |
| 2707 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 2708 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 2709 | 'werror%': '-Werror', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2710 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 2711 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 2712 | 'defines': [ |
| 2713 | '_FILE_OFFSET_BITS=64', |
| 2714 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2715 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 2716 | '<(werror)', # See note above about the werror variable. |
| 2717 | '-pthread', |
| 2718 | '-fno-exceptions', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 2719 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 2720 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 2721 | # TODO(evan): turn this back on once all the builds work. |
| 2722 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 2723 | # Don't warn about unused function params. We use those everywhere. |
| 2724 | '-Wno-unused-parameter', |
| 2725 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 2726 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 2727 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 2728 | # Note: this is *required* to make some plugins work. |
| 2729 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 2730 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 2731 | ], |
| 2732 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 2733 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 2734 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 2735 | # Make inline functions have hidden visiblity by default. |
| 2736 | # Surprisingly, not covered by -fvisibility=hidden. |
| 2737 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 2738 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
| 2739 | # so we specify it explicitly. |
| 2740 | # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2741 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 2742 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2743 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 2744 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 2745 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2746 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2747 | 'libraries' : [ |
| 2748 | '<(libraries_for_target)', |
| 2749 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2750 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2751 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 2752 | 'variables': { |
| 2753 | 'debug_optimize%': '0', |
| 2754 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2755 | 'defines': [ |
| 2756 | '_DEBUG', |
| 2757 | ], |
| 2758 | 'cflags': [ |
[email protected] | 95ad203 | 2012-08-24 00:49:25 | [diff] [blame] | 2759 | '-O>(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2760 | '-g', |
| 2761 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2762 | 'conditions' : [ |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2763 | ['OS=="android"', { |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2764 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame^] | 2765 | '-Wl,--fatal-warnings', |
| 2766 | # Only link with needed input sections. This is to avoid |
| 2767 | # getting undefined reference to __cxa_bad_typeid in the CDU |
| 2768 | # library. |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2769 | '-Wl,--gc-sections', |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame^] | 2770 | # Warn in case of text relocations. |
| 2771 | '-Wl,--warn-shared-textrel', |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2772 | ], |
| 2773 | }], |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 2774 | ['OS=="android" and android_full_debug==0', { |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 2775 | # Some configurations are copied from Release_Base to reduce |
| 2776 | # the binary size. |
| 2777 | 'variables': { |
| 2778 | 'debug_optimize%': 's', |
| 2779 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2780 | 'cflags': [ |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 2781 | '-fomit-frame-pointer', |
| 2782 | '-fdata-sections', |
| 2783 | '-ffunction-sections', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2784 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 2785 | 'ldflags': [ |
| 2786 | '-Wl,-O1', |
| 2787 | '-Wl,--as-needed', |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 2788 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2789 | }], |
[email protected] | d4c0ec5b | 2013-03-10 03:07:45 | [diff] [blame] | 2790 | ['OS=="linux" and target_arch=="ia32"', { |
| 2791 | 'ldflags': [ |
| 2792 | '-Wl,--no-as-needed', |
| 2793 | ], |
| 2794 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2795 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 2796 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2797 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 2798 | 'variables': { |
| 2799 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 2800 | # Binaries become big and gold is unable to perform GC |
| 2801 | # and remove unused sections for some of test targets |
| 2802 | # on 32 bit platform. |
| 2803 | # (This is currently observed only in chromeos valgrind bots) |
| 2804 | # The following flag is to disable --gc-sections linker |
| 2805 | # option for these bots. |
| 2806 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 2807 | |
| 2808 | # TODO(bradnelson): reexamine how this is done if we change the |
| 2809 | # expansion of configurations |
| 2810 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 2811 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2812 | 'cflags': [ |
[email protected] | 296ce7ce | 2012-08-02 19:41:18 | [diff] [blame] | 2813 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 2814 | # Don't emit the GCC version ident directives, they just end up |
| 2815 | # in the .comment section taking up binary size. |
| 2816 | '-fno-ident', |
| 2817 | # Put data and code in their own sections, so that unused symbols |
| 2818 | # can be removed at link time with --gc-sections. |
| 2819 | '-fdata-sections', |
| 2820 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2821 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 2822 | 'ldflags': [ |
| 2823 | # Specifically tell the linker to perform optimizations. |
| 2824 | # See http://lwn.net/Articles/192624/ . |
| 2825 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 2826 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 2827 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 2828 | 'conditions' : [ |
| 2829 | ['no_gc_sections==0', { |
| 2830 | 'ldflags': [ |
| 2831 | '-Wl,--gc-sections', |
| 2832 | ], |
| 2833 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2834 | ['OS=="android"', { |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 2835 | 'variables': { |
| 2836 | 'release_optimize%': 's', |
| 2837 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2838 | 'cflags': [ |
| 2839 | '-fomit-frame-pointer', |
| 2840 | ], |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame^] | 2841 | 'ldflags': [ |
| 2842 | '-Wl,--fatal-warnings', |
| 2843 | # Warn in case of text relocations. |
| 2844 | '-Wl,--warn-shared-textrel', |
| 2845 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2846 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 2847 | ['clang==1', { |
| 2848 | 'cflags!': [ |
| 2849 | '-fno-ident', |
| 2850 | ], |
| 2851 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2852 | ['profiling==1', { |
| 2853 | 'cflags': [ |
| 2854 | '-fno-omit-frame-pointer', |
| 2855 | '-g', |
| 2856 | ], |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 2857 | 'conditions' : [ |
| 2858 | ['profiling_full_stack_frames==1', { |
| 2859 | 'cflags': [ |
| 2860 | '-fno-inline', |
| 2861 | '-fno-optimize-sibling-calls', |
| 2862 | ], |
| 2863 | }], |
| 2864 | ], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2865 | }], |
[email protected] | bdbe3d2 | 2013-02-22 04:10:35 | [diff] [blame] | 2866 | # Can be omitted to reduce output size. Does not seem to affect |
| 2867 | # crash reporting. |
| 2868 | ['target_arch=="ia32"', { |
| 2869 | 'cflags': [ |
| 2870 | '-fno-unwind-tables', |
| 2871 | '-fno-asynchronous-unwind-tables', |
| 2872 | ], |
| 2873 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2874 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2875 | }, |
| 2876 | }, |
[email protected] | 601b54022 | 2009-04-03 21:32:04 | [diff] [blame] | 2877 | 'variants': { |
| 2878 | 'coverage': { |
| 2879 | 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
| 2880 | 'ldflags': ['-fprofile-arcs'], |
| 2881 | }, |
| 2882 | 'profile': { |
| 2883 | 'cflags': ['-pg', '-g'], |
| 2884 | 'ldflags': ['-pg'], |
| 2885 | }, |
| 2886 | 'symbols': { |
| 2887 | 'cflags': ['-g'], |
| 2888 | }, |
| 2889 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 2890 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 2891 | ['target_arch=="ia32"', { |
| 2892 | 'target_conditions': [ |
| 2893 | ['_toolset=="target"', { |
| 2894 | 'asflags': [ |
| 2895 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 2896 | # are compatible with the general 32-bit-ness. |
| 2897 | '-32', |
| 2898 | ], |
| 2899 | # All floating-point computations on x87 happens in 80-bit |
| 2900 | # precision. Because the C and C++ language standards allow |
| 2901 | # the compiler to keep the floating-point values in higher |
| 2902 | # precision than what's specified in the source and doing so |
| 2903 | # is more efficient than constantly rounding up to 64-bit or |
| 2904 | # 32-bit precision as specified in the source, the compiler, |
| 2905 | # especially in the optimized mode, tries very hard to keep |
| 2906 | # values in x87 floating-point stack (in 80-bit precision) |
| 2907 | # as long as possible. This has important side effects, that |
| 2908 | # the real value used in computation may change depending on |
| 2909 | # how the compiler did the optimization - that is, the value |
| 2910 | # kept in 80-bit is different than the value rounded down to |
| 2911 | # 64-bit or 32-bit. There are possible compiler options to |
| 2912 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 2913 | # all floating-values in the memory, thus force them to be |
| 2914 | # rounded to its original precision) but they have significant |
| 2915 | # runtime performance penalty. |
| 2916 | # |
| 2917 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 2918 | # which keep floating-point values in SSE registers in its |
| 2919 | # native precision (32-bit for single precision, and 64-bit |
| 2920 | # for double precision values). This means the floating-point |
| 2921 | # value used during computation does not change depending on |
| 2922 | # how the compiler optimized the code, since the value is |
| 2923 | # always kept in its specified precision. |
| 2924 | 'conditions': [ |
| 2925 | ['branding=="Chromium" and disable_sse2==0', { |
| 2926 | 'cflags': [ |
| 2927 | '-march=pentium4', |
| 2928 | '-msse2', |
| 2929 | '-mfpmath=sse', |
| 2930 | ], |
| 2931 | }], |
| 2932 | # ChromeOS targets Pinetrail, which is sse3, but most of the |
| 2933 | # benefit comes from sse2 so this setting allows ChromeOS |
| 2934 | # to build on other CPUs. In the future -march=atom would |
| 2935 | # help but requires a newer compiler. |
| 2936 | ['chromeos==1 and disable_sse2==0', { |
| 2937 | 'cflags': [ |
| 2938 | '-msse2', |
| 2939 | ], |
| 2940 | }], |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 2941 | # Use gold linker for Android ia32 target. |
| 2942 | ['OS=="android"', { |
| 2943 | 'cflags': [ |
| 2944 | '-fuse-ld=gold', |
| 2945 | ], |
| 2946 | 'ldflags': [ |
| 2947 | '-fuse-ld=gold', |
| 2948 | ], |
| 2949 | }], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 2950 | # Install packages have started cropping up with |
| 2951 | # different headers between the 32-bit and 64-bit |
| 2952 | # versions, so we have to shadow those differences off |
| 2953 | # and make sure a 32-bit-on-64-bit build picks up the |
| 2954 | # right files. |
[email protected] | 3259402 | 2012-05-10 03:22:28 | [diff] [blame] | 2955 | # For android build, use NDK headers instead of host headers |
| 2956 | ['host_arch!="ia32" and OS!="android"', { |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 2957 | 'include_dirs+': [ |
| 2958 | '/usr/include32', |
| 2959 | ], |
| 2960 | }], |
| 2961 | ], |
| 2962 | # -mmmx allows mmintrin.h to be used for mmx intrinsics. |
| 2963 | # video playback is mmx and sse2 optimized. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 2964 | 'cflags': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 2965 | '-m32', |
| 2966 | '-mmmx', |
| 2967 | ], |
| 2968 | 'ldflags': [ |
| 2969 | '-m32', |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 2970 | ], |
| 2971 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 2972 | ], |
| 2973 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 2974 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 2975 | 'target_conditions': [ |
| 2976 | ['_toolset=="target"', { |
| 2977 | 'cflags_cc': [ |
| 2978 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 2979 | # has changed whenever it encounters a varargs function. This |
| 2980 | # silences those warnings, as they are not helpful and |
| 2981 | # clutter legitimate warnings. |
| 2982 | '-Wno-abi', |
| 2983 | ], |
| 2984 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2985 | ['arm_arch!=""', { |
| 2986 | 'cflags': [ |
| 2987 | '-march=<(arm_arch)', |
| 2988 | ], |
| 2989 | }], |
| 2990 | ['arm_tune!=""', { |
| 2991 | 'cflags': [ |
| 2992 | '-mtune=<(arm_tune)', |
| 2993 | ], |
| 2994 | }], |
| 2995 | ['arm_fpu!=""', { |
| 2996 | 'cflags': [ |
| 2997 | '-mfpu=<(arm_fpu)', |
| 2998 | ], |
| 2999 | }], |
| 3000 | ['arm_float_abi!=""', { |
| 3001 | 'cflags': [ |
| 3002 | '-mfloat-abi=<(arm_float_abi)', |
| 3003 | ], |
| 3004 | }], |
| 3005 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3006 | 'cflags': [ |
| 3007 | '-mthumb', |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3008 | ] |
| 3009 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3010 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3011 | # Most of the following flags are derived from what Android |
| 3012 | # uses by default when building for arm, reference for which |
| 3013 | # can be found in the following file in the Android NDK: |
| 3014 | # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
| 3015 | 'cflags': [ |
| 3016 | # The tree-sra optimization (scalar replacement for |
| 3017 | # aggregates enabling subsequent optimizations) leads to |
| 3018 | # invalid code generation when using the Android NDK's |
| 3019 | # compiler (r5-r7). This can be verified using |
[email protected] | b78f8f6 | 2013-04-24 01:35:43 | [diff] [blame] | 3020 | # webkit_unit_tests' WTF.Checked_int8_t test. |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3021 | '-fno-tree-sra', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3022 | '-fuse-ld=gold', |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3023 | '-Wno-psabi', |
| 3024 | ], |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3025 | # Android now supports .relro sections properly. |
| 3026 | # NOTE: While these flags enable the generation of .relro |
| 3027 | # sections, the generated libraries can still be loaded on |
| 3028 | # older Android platform versions. |
| 3029 | 'ldflags': [ |
| 3030 | '-Wl,-z,relro', |
| 3031 | '-Wl,-z,now', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3032 | '-fuse-ld=gold', |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3033 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3034 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3035 | ['arm_thumb==1', { |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 3036 | 'cflags': [ '-mthumb-interwork' ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3037 | }], |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3038 | ['profiling==1', { |
| 3039 | 'cflags': [ |
| 3040 | '-marm', # Probably reduntant, but recommend by "perf" docs. |
| 3041 | '-mapcs-frame', # Seems required by -fno-omit-frame-pointer. |
| 3042 | ], |
| 3043 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3044 | ['clang==1', { |
| 3045 | 'cflags!': [ |
| 3046 | # Clang does not support the following options. |
| 3047 | '-mthumb-interwork', |
| 3048 | '-finline-limit=64', |
| 3049 | '-fno-tree-sra', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3050 | '-fuse-ld=gold', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3051 | '-Wno-psabi', |
| 3052 | ], |
| 3053 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3054 | ], |
| 3055 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3056 | ], |
| 3057 | }], |
| 3058 | ], |
| 3059 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3060 | ['target_arch=="mipsel"', { |
| 3061 | 'target_conditions': [ |
| 3062 | ['_toolset=="target"', { |
| 3063 | 'conditions': [ |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3064 | ['android_webview_build==0 and mips_arch_variant=="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3065 | 'cflags': ['-mips32r2', '-Wa,-mips32r2'], |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3066 | }], |
| 3067 | ['android_webview_build==0 and mips_arch_variant!="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3068 | 'cflags': ['-mips32', '-Wa,-mips32'], |
| 3069 | }], |
| 3070 | ], |
| 3071 | 'cflags': [ |
| 3072 | '-EL', |
| 3073 | '-mhard-float', |
| 3074 | ], |
| 3075 | 'ldflags': [ |
| 3076 | '-EL', |
| 3077 | '-Wl,--no-keep-memory' |
| 3078 | ], |
| 3079 | 'cflags_cc': [ |
| 3080 | '-Wno-uninitialized', |
| 3081 | ], |
| 3082 | }], |
| 3083 | ], |
| 3084 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 3085 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3086 | 'cflags': [ |
| 3087 | '-fPIC', |
| 3088 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 3089 | 'ldflags': [ |
| 3090 | '-fPIC', |
| 3091 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3092 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3093 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3094 | 'target_conditions': [ |
| 3095 | ['_toolset=="target"', { |
| 3096 | 'cflags': [ |
| 3097 | '--sysroot=<(sysroot)', |
| 3098 | ], |
| 3099 | 'ldflags': [ |
| 3100 | '--sysroot=<(sysroot)', |
[email protected] | a7e10b9a | 2013-03-22 05:26:15 | [diff] [blame] | 3101 | '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3102 | ], |
| 3103 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3104 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 3105 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 3106 | 'cflags': [ |
| 3107 | '-Wheader-hygiene', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3108 | |
[email protected] | 7ddcb1d | 2013-04-19 04:52:53 | [diff] [blame] | 3109 | # Don't die on dtoa code that uses a char as an array index. |
| 3110 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3111 | |
| 3112 | # Clang spots more unused functions. |
| 3113 | '-Wno-unused-function', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 3114 | |
| 3115 | # Warns on switches on enums that cover all enum values but |
| 3116 | # also contain a default: branch. Chrome is full of that. |
| 3117 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 3118 | |
| 3119 | # Warns when a const char[] is converted to bool. |
| 3120 | '-Wstring-conversion', |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 3121 | ], |
| 3122 | 'cflags!': [ |
| 3123 | # Clang doesn't seem to know know this flag. |
| 3124 | '-mfpmath=sse', |
| 3125 | ], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 3126 | }], |
[email protected] | bca3e08 | 2013-05-30 21:13:44 | [diff] [blame] | 3127 | ['clang==1 and OS!="android"', { |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3128 | # Turn on C++11. |
| 3129 | 'cflags': [ |
| 3130 | # This warns on using ints as initializers for floats in |
| 3131 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 3132 | # which happens in several places in chrome code. Not sure if |
| 3133 | # this is worth fixing. |
| 3134 | '-Wno-c++11-narrowing', |
| 3135 | |
| 3136 | # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 |
| 3137 | # user-defined literals, this is now a string literal with a UD |
| 3138 | # suffix. However, this is used heavily in NaCl code, so disable |
| 3139 | # the warning for now. |
| 3140 | '-Wno-reserved-user-defined-literal', |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 3141 | |
| 3142 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 3143 | # code generated by flex (used in angle) contains that keyword. |
| 3144 | # http://crbug.com/255186 |
| 3145 | '-Wno-deprecated-register', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3146 | ], |
| 3147 | 'cflags_cc': [ |
| 3148 | # See the comment in the Mac section for what it takes to move |
| 3149 | # this to -std=c++11. |
| 3150 | '-std=gnu++11', |
| 3151 | ], |
| 3152 | }], |
[email protected] | bca3e08 | 2013-05-30 21:13:44 | [diff] [blame] | 3153 | ['clang==1 and OS=="android"', { |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3154 | # Android uses gcc4.4, and clang isn't compatible with gcc4.4's |
| 3155 | # libstdc++ in C++11 mode. So no C++11 mode for Android yet. |
| 3156 | # Doesn't work with asan for some reason either: crbug.com/233464 |
| 3157 | 'cflags': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 3158 | # Especially needed for gtest macros using enum values from Mac |
| 3159 | # system headers. |
| 3160 | # TODO(pkasting): In C++11 this is legal, so this should be |
| 3161 | # removed when we change to that. (This is also why we don't |
| 3162 | # bother fixing all these cases today.) |
| 3163 | '-Wno-unnamed-type-template-args', |
| 3164 | # This (rightfully) complains about 'override', which we use |
| 3165 | # heavily. |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3166 | '-Wno-c++11-extensions', |
| 3167 | ], |
| 3168 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3169 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3170 | 'cflags': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 3171 | '<@(clang_chrome_plugins_flags)', |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3172 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3173 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3174 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3175 | 'cflags': [ |
| 3176 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3177 | ], |
| 3178 | }], |
| 3179 | ['clang==1 and clang_add_plugin!=""', { |
| 3180 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3181 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 3182 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 3183 | }], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3184 | ['clang==1 and target_arch=="ia32"', { |
| 3185 | 'cflags': [ |
| 3186 | # Else building libyuv gives clang's register allocator issues, |
| 3187 | # see llvm.org/PR15798 / crbug.com/233709 |
| 3188 | '-momit-leaf-frame-pointer', |
| 3189 | ], |
| 3190 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 3191 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 3192 | 'cflags': [ |
| 3193 | # See http://crbug.com/110262 |
| 3194 | '-fcolor-diagnostics', |
| 3195 | ], |
| 3196 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3197 | # Common options for AddressSanitizer, LeakSanitizer, |
| 3198 | # ThreadSanitizer and MemorySanitizer. |
| 3199 | ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3200 | 'target_conditions': [ |
| 3201 | ['_toolset=="target"', { |
| 3202 | 'cflags': [ |
| 3203 | '-fno-omit-frame-pointer', |
| 3204 | '-gline-tables-only', |
| 3205 | ], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3206 | 'ldflags!': [ |
| 3207 | # Functions interposed by the sanitizers can make ld think |
| 3208 | # that some libraries aren't needed when they actually are, |
| 3209 | # http://crbug.com/234010. As workaround, disable --as-needed. |
| 3210 | '-Wl,--as-needed', |
| 3211 | ], |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3212 | 'defines': [ |
| 3213 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 3214 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3215 | }], |
[email protected] | a26740dd | 2013-05-28 11:50:49 | [diff] [blame] | 3216 | ['_toolset=="target" and OS=="linux"', { |
| 3217 | 'ldflags': [ |
| 3218 | # http://crbug.com/234010. |
| 3219 | '-lrt', |
| 3220 | ], |
| 3221 | }], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3222 | ], |
| 3223 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3224 | ['asan==1', { |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3225 | 'target_conditions': [ |
| 3226 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3227 | 'cflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3228 | '-fsanitize=address', |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3229 | '-w', # http://crbug.com/162783 |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3230 | ], |
| 3231 | 'ldflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3232 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3233 | ], |
| 3234 | 'defines': [ |
| 3235 | 'ADDRESS_SANITIZER', |
| 3236 | ], |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3237 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3238 | ], |
[email protected] | 1d3bc32 | 2013-04-12 14:26:37 | [diff] [blame] | 3239 | 'conditions': [ |
| 3240 | ['OS=="mac"', { |
| 3241 | 'cflags': [ |
| 3242 | '-mllvm -asan-globals=0', # http://crbug.com/196561 |
| 3243 | ], |
| 3244 | }], |
| 3245 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3246 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3247 | ['lsan==1', { |
| 3248 | 'target_conditions': [ |
| 3249 | ['_toolset=="target"', { |
| 3250 | 'cflags': [ |
| 3251 | '-fsanitize=leak', |
| 3252 | ], |
| 3253 | 'ldflags': [ |
| 3254 | '-fsanitize=leak', |
| 3255 | ], |
| 3256 | 'defines': [ |
| 3257 | 'LEAK_SANITIZER', |
| 3258 | ], |
| 3259 | }], |
| 3260 | ], |
| 3261 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3262 | ['tsan==1', { |
| 3263 | 'target_conditions': [ |
| 3264 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3265 | 'cflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3266 | '-fsanitize=thread', |
[email protected] | 9d46a57 | 2013-01-23 10:38:29 | [diff] [blame] | 3267 | '-fPIC', |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3268 | '-mllvm', '-tsan-blacklist=<(tsan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3269 | ], |
| 3270 | 'ldflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3271 | '-fsanitize=thread', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3272 | ], |
| 3273 | 'defines': [ |
| 3274 | 'THREAD_SANITIZER', |
| 3275 | 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3276 | 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3277 | ], |
| 3278 | 'target_conditions': [ |
| 3279 | ['_type=="executable"', { |
| 3280 | 'ldflags': [ |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3281 | '-pie', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3282 | ], |
| 3283 | }], |
| 3284 | ], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3285 | }], |
| 3286 | ], |
| 3287 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 3288 | ['msan==1', { |
| 3289 | 'target_conditions': [ |
| 3290 | ['_toolset=="target"', { |
| 3291 | 'cflags': [ |
| 3292 | '-fsanitize=memory', |
| 3293 | '-fsanitize-memory-track-origins', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 3294 | '-fPIC', |
| 3295 | ], |
| 3296 | 'ldflags': [ |
| 3297 | '-fsanitize=memory', |
| 3298 | ], |
| 3299 | 'defines': [ |
| 3300 | 'MEMORY_SANITIZER', |
| 3301 | ], |
| 3302 | 'target_conditions': [ |
| 3303 | ['_type=="executable"', { |
| 3304 | 'ldflags': [ |
| 3305 | '-pie', |
| 3306 | ], |
| 3307 | }], |
| 3308 | ], |
| 3309 | }], |
| 3310 | ], |
| 3311 | }], |
[email protected] | 8a48f3f | 2012-12-04 20:14:04 | [diff] [blame] | 3312 | ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 3313 | 'target_conditions' : [ |
| 3314 | ['_toolset=="target"', { |
| 3315 | 'cflags': [ |
| 3316 | '-finstrument-functions', |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 3317 | # Allow mmx intrinsics to inline, so that the |
| 3318 | # compiler can expand the intrinsics. |
| 3319 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 3320 | ], |
| 3321 | }], |
| 3322 | ], |
| 3323 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 3324 | ['linux_breakpad==1', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 3325 | 'defines': ['USE_LINUX_BREAKPAD'], |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 3326 | }], |
| 3327 | ['linux_dump_symbols==1', { |
| 3328 | 'cflags': [ '-g' ], |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3329 | 'conditions': [ |
[email protected] | 791262fe | 2013-02-21 17:20:15 | [diff] [blame] | 3330 | ['target_arch=="ia32" and OS!="android"', { |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3331 | 'target_conditions': [ |
| 3332 | ['_toolset=="target"', { |
| 3333 | 'ldflags': [ |
[email protected] | 567370a3 | 2013-03-01 00:11:23 | [diff] [blame] | 3334 | # Workaround for linker OOM. |
| 3335 | '-Wl,--no-keep-memory', |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3336 | ], |
| 3337 | }], |
| 3338 | ], |
| 3339 | }], |
| 3340 | ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 3341 | }], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 3342 | ['linux_use_heapchecker==1', { |
| 3343 | 'variables': {'linux_use_tcmalloc%': 1}, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3344 | 'defines': [ |
[email protected] | bba0fea3 | 2013-06-14 12:29:35 | [diff] [blame] | 3345 | 'USE_HEAPCHECKER', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3346 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 3347 | ], |
[email protected] | 272ef0b | 2013-05-14 12:32:45 | [diff] [blame] | 3348 | 'conditions': [ |
| 3349 | ['component=="shared_library"', { |
| 3350 | # See crbug.com/112389 |
| 3351 | # TODO(glider): replace with --dynamic-list or something |
| 3352 | 'ldflags': ['-rdynamic'], |
| 3353 | }], |
| 3354 | ], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 3355 | }], |
[email protected] | 3c8fe548 | 2013-05-22 15:17:03 | [diff] [blame] | 3356 | ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', { |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 3357 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 3358 | }], |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 3359 | ['linux_keep_shadow_stacks==1', { |
| 3360 | 'defines': ['KEEP_SHADOW_STACKS'], |
[email protected] | 987a742 | 2012-02-23 19:10:51 | [diff] [blame] | 3361 | 'cflags': [ |
| 3362 | '-finstrument-functions', |
| 3363 | # Allow mmx intrinsics to inline, so that the compiler can expand |
| 3364 | # the intrinsics. |
| 3365 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
| 3366 | ], |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 3367 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3368 | ['linux_use_gold_flags==1', { |
[email protected] | 68d01e8 | 2012-12-08 03:36:32 | [diff] [blame] | 3369 | 'ldflags': [ |
| 3370 | # Experimentation found that using four linking threads |
| 3371 | # saved ~20% of link time. |
| 3372 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 3373 | '-Wl,--threads', |
| 3374 | '-Wl,--thread-count=4', |
| 3375 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3376 | 'conditions': [ |
| 3377 | ['release_valgrind_build==0', { |
| 3378 | 'target_conditions': [ |
| 3379 | ['_toolset=="target"', { |
| 3380 | 'ldflags': [ |
| 3381 | # There seems to be a conflict of --icf and -pie |
| 3382 | # in gold which can generate crashy binaries. As |
| 3383 | # a security measure, -pie takes precendence for |
| 3384 | # now. |
| 3385 | #'-Wl,--icf=safe', |
| 3386 | '-Wl,--icf=none', |
| 3387 | ], |
| 3388 | }], |
| 3389 | ], |
| 3390 | }], |
| 3391 | ], |
| 3392 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3393 | ['linux_use_gold_binary==1', { |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3394 | 'ldflags': [ |
| 3395 | # Put our gold binary in the search path for the linker. |
[email protected] | 0dc310a3 | 2013-05-08 23:52:44 | [diff] [blame] | 3396 | # We pass the path to gold to the compiler. gyp leaves |
| 3397 | # unspecified what the cwd is when running the compiler, |
| 3398 | # so the normal gyp path-munging fails us. This hack |
| 3399 | # gets the right path. |
| 3400 | '-B<(PRODUCT_DIR)/../../third_party/gold', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3401 | ], |
| 3402 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3403 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3404 | }, |
| 3405 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 3406 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 3407 | # with Linux. |
| 3408 | ['OS=="freebsd"', { |
| 3409 | 'target_defaults': { |
| 3410 | 'ldflags': [ |
| 3411 | '-Wl,--no-keep-memory', |
| 3412 | ], |
| 3413 | }, |
| 3414 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3415 | # Android-specific options; note that most are set above with Linux. |
| 3416 | ['OS=="android"', { |
| 3417 | 'variables': { |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 3418 | # This is a unique identifier for a given build. It's used for |
| 3419 | # identifying various build artifacts corresponding to a particular |
| 3420 | # build of chrome (e.g. where to find archived symbols). |
| 3421 | 'chrome_build_id%': '', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3422 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3423 | # Use shared stlport library when system one used. |
| 3424 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 3425 | # has to be before that in the set of libraries. |
| 3426 | ['use_system_stlport==1', { |
| 3427 | 'android_stlport_library': 'stlport', |
| 3428 | }, { |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3429 | 'conditions': [ |
| 3430 | ['component=="shared_library"', { |
| 3431 | 'android_stlport_library': 'stlport_shared', |
| 3432 | }, { |
| 3433 | 'android_stlport_library': 'stlport_static', |
| 3434 | }], |
| 3435 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3436 | }], |
| 3437 | ], |
| 3438 | |
| 3439 | # Placing this variable here prevents from forking libvpx, used |
| 3440 | # by remoting. Remoting is off, so it needn't built, |
| 3441 | # so forking it's deps seems like overkill. |
| 3442 | # But this variable need defined to properly run gyp. |
| 3443 | # A proper solution is to have an OS==android conditional |
| 3444 | # in third_party/libvpx/libvpx.gyp to define it. |
| 3445 | 'libvpx_path': 'lib/linux/arm', |
| 3446 | }, |
| 3447 | 'target_defaults': { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3448 | 'variables': { |
| 3449 | 'release_extra_cflags%': '', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 3450 | 'conditions': [ |
| 3451 | # If we're using the components build, append "cr" to all shared |
| 3452 | # libraries to avoid naming collisions with android system library |
| 3453 | # versions with the same name (e.g. skia, icu). |
| 3454 | ['component=="shared_library"', { |
| 3455 | 'android_product_extension': 'cr.so', |
| 3456 | }, { |
| 3457 | 'android_product_extension': 'so', |
| 3458 | } ], |
| 3459 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3460 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3461 | 'target_conditions': [ |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 3462 | ['_type=="shared_library"', { |
| 3463 | 'product_extension': '<(android_product_extension)', |
| 3464 | }], |
| 3465 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3466 | # Settings for building device targets using Android's toolchain. |
| 3467 | # These are based on the setup.mk file from the Android NDK. |
| 3468 | # |
| 3469 | # The NDK Android executable link step looks as follows: |
| 3470 | # $LDFLAGS |
| 3471 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 3472 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 3473 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 3474 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 3475 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 3476 | # $(PRIVATE_LDLIBS) <-- System .so |
| 3477 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 3478 | # |
| 3479 | # For now the above are approximated for executables by adding |
| 3480 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 3481 | # of 'libraries'. |
| 3482 | # |
| 3483 | # The NDK Android shared library link step looks as follows: |
| 3484 | # $LDFLAGS |
| 3485 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 3486 | # -l,--whole-archive |
| 3487 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 3488 | # -l,--no-whole-archive |
| 3489 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 3490 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 3491 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 3492 | # $(PRIVATE_LDLIBS) <-- System .so |
| 3493 | # |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3494 | # For now, assume that whole static libraries are not needed. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3495 | # |
| 3496 | # For both executables and shared libraries, add the proper |
| 3497 | # libgcc.a to the start of libraries which puts it in the |
| 3498 | # proper spot after .o and .a files get linked in. |
| 3499 | # |
| 3500 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 3501 | # support for a custom link command line. |
| 3502 | ['_toolset=="target"', { |
| 3503 | 'cflags!': [ |
| 3504 | '-pthread', # Not supported by Android toolchain. |
| 3505 | ], |
| 3506 | 'cflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3507 | '-ffunction-sections', |
| 3508 | '-funwind-tables', |
| 3509 | '-g', |
| 3510 | '-fstack-protector', |
| 3511 | '-fno-short-enums', |
| 3512 | '-finline-limit=64', |
| 3513 | '-Wa,--noexecstack', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3514 | '<@(release_extra_cflags)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3515 | ], |
| 3516 | 'defines': [ |
| 3517 | 'ANDROID', |
| 3518 | '__GNU_SOURCE=1', # Necessary for clone() |
| 3519 | 'USE_STLPORT=1', |
| 3520 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 3521 | 'CHROME_BUILD_ID="<(chrome_build_id)"', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3522 | ], |
| 3523 | 'ldflags!': [ |
| 3524 | '-pthread', # Not supported by Android toolchain. |
| 3525 | ], |
| 3526 | 'ldflags': [ |
| 3527 | '-nostdlib', |
| 3528 | '-Wl,--no-undefined', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3529 | # Don't export symbols from statically linked libraries. |
| 3530 | '-Wl,--exclude-libs=ALL', |
| 3531 | ], |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 3532 | 'libraries': [ |
| 3533 | '-l<(android_stlport_library)', |
| 3534 | # Manually link the libgcc.a that the cross compiler uses. |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 3535 | '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 3536 | '-lc', |
| 3537 | '-ldl', |
| 3538 | '-lstdc++', |
| 3539 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3540 | ], |
| 3541 | 'conditions': [ |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3542 | ['component=="shared_library"', { |
[email protected] | 4d6f9d7db | 2012-11-21 16:27:47 | [diff] [blame] | 3543 | 'ldflags!': [ |
| 3544 | '-Wl,--exclude-libs=ALL', |
| 3545 | ], |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3546 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3547 | ['clang==1', { |
| 3548 | 'cflags': [ |
| 3549 | # Work around incompatibilities between bionic and clang |
| 3550 | # headers. |
| 3551 | '-D__compiler_offsetof=__builtin_offsetof', |
| 3552 | '-Dnan=__builtin_nan', |
| 3553 | ], |
| 3554 | 'conditions': [ |
| 3555 | ['target_arch=="arm"', { |
| 3556 | 'cflags': [ |
| 3557 | '-target arm-linux-androideabi', |
| 3558 | '-mllvm -arm-enable-ehabi', |
| 3559 | ], |
| 3560 | 'ldflags': [ |
| 3561 | '-target arm-linux-androideabi', |
| 3562 | ], |
| 3563 | }], |
| 3564 | ['target_arch=="ia32"', { |
| 3565 | 'cflags': [ |
| 3566 | '-target x86-linux-androideabi', |
| 3567 | ], |
| 3568 | 'ldflags': [ |
| 3569 | '-target x86-linux-androideabi', |
| 3570 | ], |
| 3571 | }], |
| 3572 | ], |
| 3573 | }], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 3574 | ['asan==1', { |
| 3575 | 'cflags': [ |
| 3576 | # Android build relies on -Wl,--gc-sections removing |
| 3577 | # unreachable code. ASan instrumentation for globals inhibits |
| 3578 | # this and results in a library with unresolvable relocations. |
| 3579 | # TODO(eugenis): find a way to reenable this. |
| 3580 | '-mllvm -asan-globals=0', |
| 3581 | ], |
| 3582 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 3583 | ['android_webview_build==0', { |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 3584 | 'defines': [ |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 3585 | # The NDK has these things, but doesn't define the constants |
| 3586 | # to say that it does. Define them here instead. |
| 3587 | 'HAVE_SYS_UIO_H', |
| 3588 | ], |
| 3589 | 'cflags': [ |
| 3590 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 3591 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3592 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 3593 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3594 | ], |
| 3595 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 3596 | ['android_webview_build==1', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3597 | 'include_dirs': [ |
| 3598 | # OpenAL headers from the Android tree. |
| 3599 | '<(android_src)/frameworks/wilhelm/include', |
| 3600 | ], |
| 3601 | 'cflags': [ |
[email protected] | 0488213 | 2012-11-21 12:40:45 | [diff] [blame] | 3602 | # Android predefines this as 1; undefine it here so Chromium |
| 3603 | # can redefine it later to be 2 for chromium code and unset |
| 3604 | # for third party code. This works because cflags are added |
| 3605 | # before defines. |
| 3606 | '-U_FORTIFY_SOURCE', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3607 | # Disable any additional warnings enabled by the Android build system but which |
| 3608 | # chromium does not build cleanly with (when treating warning as errors). |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3609 | # Things that are part of -Wextra: |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3610 | '-Wno-extra', # Enabled by -Wextra, but no specific flag |
| 3611 | '-Wno-ignored-qualifiers', |
| 3612 | '-Wno-type-limits', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3613 | ], |
| 3614 | 'cflags_cc': [ |
| 3615 | # Disabling c++0x-compat should be handled in WebKit, but |
| 3616 | # this currently doesn't work because gcc_version is not set |
| 3617 | # correctly when building with the Android build system. |
| 3618 | # TODO(torne): Fix this in WebKit. |
| 3619 | '-Wno-error=c++0x-compat', |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 3620 | # Other things unrelated to -Wextra: |
| 3621 | '-Wno-non-virtual-dtor', |
| 3622 | '-Wno-sign-promo', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3623 | ], |
| 3624 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 3625 | ['android_webview_build==1 and chromium_code==0', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3626 | 'cflags': [ |
| 3627 | # There is a class of warning which: |
| 3628 | # 1) Android always enables and also treats as errors |
| 3629 | # 2) Chromium ignores in third party code |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 3630 | # So we re-enable those warnings when building Android. |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3631 | '-Wno-address', |
| 3632 | '-Wno-format-security', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3633 | '-Wno-return-type', |
| 3634 | '-Wno-sequence-point', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3635 | ], |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 3636 | 'cflags_cc': [ |
| 3637 | '-Wno-non-virtual-dtor', |
| 3638 | ] |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3639 | }], |
[email protected] | febd357 | 2012-05-03 09:17:45 | [diff] [blame] | 3640 | ['target_arch == "arm"', { |
| 3641 | 'ldflags': [ |
| 3642 | # Enable identical code folding to reduce size. |
| 3643 | '-Wl,--icf=safe', |
| 3644 | ], |
| 3645 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3646 | # NOTE: The stlport header include paths below are specified in |
| 3647 | # cflags rather than include_dirs because they need to come |
| 3648 | # after include_dirs. Think of them like system headers, but |
| 3649 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 3650 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 3651 | # The include ordering here is important; change with caution. |
[email protected] | f91ba81 | 2012-07-11 00:00:51 | [diff] [blame] | 3652 | ['use_system_stlport==1', { |
| 3653 | 'cflags': [ |
| 3654 | # For libstdc++/include, which is used by stlport. |
| 3655 | '-I<(android_src)/bionic', |
| 3656 | '-I<(android_src)/external/stlport/stlport', |
| 3657 | ], |
| 3658 | }, { # else: use_system_stlport!=1 |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3659 | 'cflags': [ |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 3660 | '-I<(android_stlport_include)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3661 | ], |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 3662 | 'ldflags': [ |
| 3663 | '-L<(android_stlport_libs_dir)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3664 | ], |
| 3665 | }], |
| 3666 | ['target_arch=="ia32"', { |
| 3667 | # The x86 toolchain currently has problems with stack-protector. |
| 3668 | 'cflags!': [ |
| 3669 | '-fstack-protector', |
| 3670 | ], |
| 3671 | 'cflags': [ |
| 3672 | '-fno-stack-protector', |
| 3673 | ], |
| 3674 | }], |
| 3675 | ], |
| 3676 | 'target_conditions': [ |
| 3677 | ['_type=="executable"', { |
| 3678 | 'ldflags': [ |
| 3679 | '-Bdynamic', |
| 3680 | '-Wl,-dynamic-linker,/system/bin/linker', |
| 3681 | '-Wl,--gc-sections', |
| 3682 | '-Wl,-z,nocopyreloc', |
| 3683 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 3684 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 3685 | ], |
| 3686 | 'libraries': [ |
| 3687 | # crtend_android.o needs to be the last item in libraries. |
| 3688 | # Do not add any libraries after this! |
| 3689 | '<(android_ndk_lib)/crtend_android.o', |
| 3690 | ], |
[email protected] | 63a131fd | 2012-11-06 16:01:21 | [diff] [blame] | 3691 | 'conditions': [ |
| 3692 | ['asan==1', { |
| 3693 | 'cflags': [ |
| 3694 | '-fPIE', |
| 3695 | ], |
| 3696 | 'ldflags': [ |
| 3697 | '-pie', |
| 3698 | ], |
| 3699 | }], |
| 3700 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3701 | }], |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 3702 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3703 | 'ldflags': [ |
| 3704 | '-Wl,-shared,-Bsymbolic', |
| 3705 | ], |
[email protected] | d093fe8b | 2013-04-30 18:00:23 | [diff] [blame] | 3706 | 'conditions': [ |
| 3707 | ['android_webview_build==0', { |
| 3708 | 'ldflags': [ |
| 3709 | # crtbegin_so.o should be the last item in ldflags. |
| 3710 | '<(android_ndk_lib)/crtbegin_so.o', |
| 3711 | ], |
| 3712 | 'libraries': [ |
| 3713 | # crtend_so.o needs to be the last item in libraries. |
| 3714 | # Do not add any libraries after this! |
| 3715 | '<(android_ndk_lib)/crtend_so.o', |
| 3716 | ], |
| 3717 | }], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 3718 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3719 | }], |
[email protected] | 7b1eac4 | 2013-05-09 20:55:13 | [diff] [blame] | 3720 | # ndk-build copies .a's around the filesystem, breaking |
| 3721 | # relative paths in thin archives. Disable using thin |
| 3722 | # archives to avoid problems until one of these is fixed: |
| 3723 | # http://code.google.com/p/android/issues/detail?id=40302 |
| 3724 | # http://code.google.com/p/android/issues/detail?id=40303 |
| 3725 | ['_type=="static_library"', { |
| 3726 | 'standalone_static_library': 1, |
| 3727 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3728 | ], |
| 3729 | }], |
| 3730 | # Settings for building host targets using the system toolchain. |
| 3731 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 3732 | 'cflags!': [ |
| 3733 | # Due to issues in Clang build system, using ASan on 32-bit |
| 3734 | # binaries on x86_64 host is problematic. |
| 3735 | # TODO(eugenis): re-enable. |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3736 | '-fsanitize=address', |
| 3737 | '-w', # http://crbug.com/162783 |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 3738 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3739 | 'ldflags!': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 3740 | '-fsanitize=address', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3741 | '-Wl,-z,noexecstack', |
| 3742 | '-Wl,--gc-sections', |
| 3743 | '-Wl,-O1', |
| 3744 | '-Wl,--as-needed', |
| 3745 | ], |
[email protected] | 965b6b2 | 2011-09-29 16:07:28 | [diff] [blame] | 3746 | 'sources/': [ |
| 3747 | ['exclude', '_android(_unittest)?\\.cc$'], |
| 3748 | ['exclude', '(^|/)android/'] |
| 3749 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3750 | }], |
[email protected] | 0ccf578f | 2013-03-13 11:13:39 | [diff] [blame] | 3751 | # Settings for building host targets on mac. |
| 3752 | ['_toolset=="host" and host_os=="mac"', { |
| 3753 | 'ldflags!': [ |
| 3754 | '-Wl,-z,now', |
| 3755 | '-Wl,-z,relro', |
| 3756 | ], |
| 3757 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3758 | ], |
| 3759 | }, |
| 3760 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 3761 | ['OS=="solaris"', { |
| 3762 | 'cflags!': ['-fvisibility=hidden'], |
| 3763 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 3764 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3765 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3766 | 'target_defaults': { |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 3767 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3768 | 'xcode_settings': { |
| 3769 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | 2429bb73 | 2012-10-19 00:24:24 | [diff] [blame] | 3770 | # Don't link in libarclite_macosx.a, see http://crbug.com/156530. |
| 3771 | 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 3772 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 3773 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 3774 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 3775 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 3776 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 3777 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 3778 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 3779 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 3780 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 3781 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 3782 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3783 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 3784 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3785 | 'USE_HEADERMAP': 'NO', |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 3786 | 'WARNING_CFLAGS': [ |
| 3787 | '-Wall', |
| 3788 | '-Wendif-labels', |
| 3789 | '-Wextra', |
| 3790 | # Don't warn about unused function parameters. |
| 3791 | '-Wno-unused-parameter', |
| 3792 | # Don't warn about the "struct foo f = {0};" initialization |
| 3793 | # pattern. |
| 3794 | '-Wno-missing-field-initializers', |
| 3795 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 3796 | 'conditions': [ |
| 3797 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 3798 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 3799 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 3800 | # Note that the prebuilt Clang binaries should not be used for iOS |
| 3801 | # development except for ASan builds. |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 3802 | ['clang==1', { |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 3803 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 3804 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | a79fd88 | 2011-10-03 18:22:38 | [diff] [blame] | 3805 | |
[email protected] | 6c648f1 | 2011-12-24 07:50:43 | [diff] [blame] | 3806 | # Don't use -Wc++0x-extensions, which Xcode 4 enables by default |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 3807 | # when building with clang. This warning is triggered when the |
[email protected] | 6c648f1 | 2011-12-24 07:50:43 | [diff] [blame] | 3808 | # override keyword is used via the OVERRIDE macro from |
| 3809 | # base/compiler_specific.h. |
| 3810 | 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 3811 | # Warn if automatic synthesis is triggered with |
| 3812 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 3813 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 3814 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 3815 | 'WARNING_CFLAGS': [ |
[email protected] | 7f8d486f | 2011-04-05 19:49:07 | [diff] [blame] | 3816 | '-Wheader-hygiene', |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 3817 | |
| 3818 | # This warns on using ints as initializers for floats in |
| 3819 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 3820 | # which happens in several places in chrome code. Not sure if |
| 3821 | # this is worth fixing. |
| 3822 | '-Wno-c++11-narrowing', |
| 3823 | |
| 3824 | # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 |
| 3825 | # user-defined literals, this is now a string literal with a UD |
| 3826 | # suffix. However, this is used heavily in NaCl code, so disable |
| 3827 | # the warning for now. |
| 3828 | '-Wno-reserved-user-defined-literal', |
| 3829 | |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 3830 | # Don't die on dtoa code that uses a char as an array index. |
| 3831 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 3832 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3833 | |
[email protected] | 25d3bb72 | 2010-11-22 14:31:45 | [diff] [blame] | 3834 | # Clang spots more unused functions. |
| 3835 | '-Wno-unused-function', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 3836 | |
| 3837 | # Warns on switches on enums that cover all enum values but |
| 3838 | # also contain a default: branch. Chrome is full of that. |
| 3839 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 3840 | |
| 3841 | # Warns when a const char[] is converted to bool. |
| 3842 | '-Wstring-conversion', |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 3843 | |
| 3844 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 3845 | # code generated by flex (used in angle) contains that keyword. |
| 3846 | # http://crbug.com/255186 |
| 3847 | '-Wno-deprecated-register', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 3848 | ], |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 3849 | 'OTHER_CPLUSPLUSFLAGS': [ |
[email protected] | a7cd1a5 | 2013-05-09 00:27:44 | [diff] [blame] | 3850 | # gnu++11 instead of c++11 is needed because some code uses |
| 3851 | # typeof() (a GNU extension). |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 3852 | # TODO(thakis): Eventually switch this to c++11 instead of |
| 3853 | # gnu++11 (once typeof can be removed, which is blocked on c++11 |
| 3854 | # being available everywhere). |
[email protected] | a7cd1a5 | 2013-05-09 00:27:44 | [diff] [blame] | 3855 | # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all |
| 3856 | # bots use xcode 4 -- http://crbug.com/147515). |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 3857 | '$(inherited)', '-std=gnu++11', |
| 3858 | ], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 3859 | }], |
[email protected] | 2fccd42 | 2013-05-21 21:27:57 | [diff] [blame] | 3860 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3861 | 'OTHER_CFLAGS': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 3862 | '<@(clang_chrome_plugins_flags)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3863 | ], |
| 3864 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3865 | ['clang==1 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 3866 | 'OTHER_CFLAGS': [ |
| 3867 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3868 | ], |
| 3869 | }], |
| 3870 | ['clang==1 and clang_add_plugin!=""', { |
| 3871 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 3872 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 3873 | ], |
| 3874 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 3875 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 3876 | 'OTHER_CFLAGS': [ |
| 3877 | # See http://crbug.com/110262 |
| 3878 | '-fcolor-diagnostics', |
| 3879 | ], |
| 3880 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 3881 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3882 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 3883 | 'conditions': [ |
| 3884 | ['clang==1', { |
| 3885 | 'variables': { |
| 3886 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 3887 | }, |
| 3888 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3889 | ['asan==1', { |
| 3890 | 'xcode_settings': { |
| 3891 | 'OTHER_CFLAGS': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3892 | '-fsanitize=address', |
[email protected] | 1d3bc32 | 2013-04-12 14:26:37 | [diff] [blame] | 3893 | '-mllvm -asan-globals=0', # http://crbug.com/196561 |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3894 | '-w', # http://crbug.com/162783 |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3895 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3896 | }, |
| 3897 | 'defines': [ |
| 3898 | 'ADDRESS_SANITIZER', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3899 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3900 | ], |
| 3901 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 3902 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3903 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3904 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 3905 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 3906 | 'conditions': [ |
| 3907 | ['asan==1', { |
| 3908 | 'xcode_settings': { |
| 3909 | 'OTHER_LDFLAGS': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 3910 | '-fsanitize=address', |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 3911 | ], |
| 3912 | }, |
| 3913 | }], |
| 3914 | ], |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 3915 | }], |
| 3916 | ['_mac_bundle', { |
| 3917 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 3918 | 'target_conditions': [ |
| 3919 | ['_type=="executable"', { |
| 3920 | 'conditions': [ |
| 3921 | ['asan==1', { |
| 3922 | 'postbuilds': [ |
| 3923 | { |
| 3924 | 'variables': { |
| 3925 | # Define copy_asan_dylib_path in a variable ending in |
| 3926 | # _path so that gyp understands it's a path and |
| 3927 | # performs proper relativization during dict merging. |
| 3928 | 'copy_asan_dylib_path': |
| 3929 | 'mac/copy_asan_runtime_dylib.sh', |
| 3930 | }, |
| 3931 | 'postbuild_name': 'Copy ASan runtime dylib', |
| 3932 | 'action': [ |
| 3933 | '<(copy_asan_dylib_path)', |
| 3934 | ], |
| 3935 | }, |
| 3936 | ], |
| 3937 | }], |
| 3938 | ], |
| 3939 | }], |
| 3940 | ], |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 3941 | }], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 3942 | ], # target_conditions |
| 3943 | }, # target_defaults |
| 3944 | }], # OS=="mac" or OS=="ios" |
| 3945 | ['OS=="mac"', { |
| 3946 | 'target_defaults': { |
| 3947 | 'variables': { |
| 3948 | # These should end with %, but there seems to be a bug with % in |
| 3949 | # variables that are intended to be set to different values in |
| 3950 | # different targets, like these. |
| 3951 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 3952 | # Strip debugging symbols from the target. |
| 3953 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 3954 | 'conditions': [ |
| 3955 | ['asan==1', { |
| 3956 | 'conditions': [ |
| 3957 | ['mac_want_real_dsym=="default"', { |
[email protected] | 97ab1fa | 2012-12-24 10:50:35 | [diff] [blame] | 3958 | 'mac_real_dsym': 1, |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 3959 | }, { |
| 3960 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 3961 | }], |
| 3962 | ], |
| 3963 | }, { |
| 3964 | 'conditions': [ |
| 3965 | ['mac_want_real_dsym=="default"', { |
| 3966 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 3967 | }, { |
| 3968 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 3969 | }], |
| 3970 | ], |
| 3971 | }], |
| 3972 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 3973 | }, |
| 3974 | 'xcode_settings': { |
| 3975 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 3976 | # (Equivalent to -fPIC) |
| 3977 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 3978 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 3979 | # Keep pch files below xcodebuild/. |
| 3980 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
| 3981 | 'OTHER_CFLAGS': [ |
| 3982 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
| 3983 | ], |
| 3984 | }, |
| 3985 | 'target_conditions': [ |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 3986 | ['_type=="executable"', { |
| 3987 | 'postbuilds': [ |
| 3988 | { |
| 3989 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 3990 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 3991 | # ensures that the position-independent executable (PIE) bit |
| 3992 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 3993 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 3994 | # Define change_mach_o_flags in a variable ending in _path |
| 3995 | # so that GYP understands it's a path and performs proper |
| 3996 | # relativization during dict merging. |
| 3997 | 'change_mach_o_flags_path': |
| 3998 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 3999 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4000 | ], |
| 4001 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4002 | ['mac_pie==0 or release_valgrind_build==1', { |
| 4003 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 4004 | # the target specifies mac_pie=0 or if building for |
| 4005 | # Valgrind, because Valgrind doesn't understand slide. |
| 4006 | # See the similar mac_pie/release_valgrind_build check |
| 4007 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4008 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4009 | '--no-pie', |
| 4010 | ], |
| 4011 | }], |
| 4012 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4013 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4014 | 'postbuild_name': 'Change Mach-O Flags', |
| 4015 | 'action': [ |
| 4016 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4017 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4018 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4019 | }, |
| 4020 | ], |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 4021 | 'conditions': [ |
| 4022 | ['asan==1', { |
| 4023 | 'variables': { |
| 4024 | 'asan_saves_file': 'asan.saves', |
| 4025 | }, |
| 4026 | 'xcode_settings': { |
[email protected] | 6a4cad0 | 2011-11-25 07:26:56 | [diff] [blame] | 4027 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 4028 | }, |
| 4029 | }], |
| 4030 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4031 | 'target_conditions': [ |
| 4032 | ['mac_pie==1 and release_valgrind_build==0', { |
| 4033 | # Turn on position-independence (ASLR) for executables. When |
| 4034 | # PIE is on for the Chrome executables, the framework will |
| 4035 | # also be subject to ASLR. |
| 4036 | # Don't do this when building for Valgrind, because Valgrind |
| 4037 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 4038 | # understand slide, and get rid of the Valgrind check. |
| 4039 | 'xcode_settings': { |
| 4040 | 'OTHER_LDFLAGS': [ |
| 4041 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 4042 | ], |
| 4043 | }, |
| 4044 | }], |
| 4045 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 4046 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4047 | ['(_type=="executable" or _type=="shared_library" or \ |
| 4048 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4049 | 'target_conditions': [ |
| 4050 | ['mac_real_dsym == 1', { |
| 4051 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 4052 | # debug information format to dwarf-with-dsym. Since |
| 4053 | # strip_from_xcode will not be used, set Xcode to do the |
| 4054 | # stripping as well. |
| 4055 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4056 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4057 | 'xcode_settings': { |
| 4058 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 4059 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4060 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4061 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 4062 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4063 | # The Xcode default is to strip debugging symbols |
| 4064 | # only (-S). Local symbols should be stripped as |
| 4065 | # well, which will be handled by -x. Xcode will |
| 4066 | # continue to insert -S when stripping even when |
| 4067 | # additional flags are added with STRIPFLAGS. |
| 4068 | 'STRIPFLAGS': '-x', |
[email protected] | ed7e8369 | 2012-12-24 10:13:40 | [diff] [blame] | 4069 | }], # _type=="shared_library" or _type=="loadable_module" |
| 4070 | ['_type=="executable"', { |
| 4071 | 'conditions': [ |
| 4072 | ['asan==1', { |
| 4073 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
| 4074 | }] |
| 4075 | ], |
| 4076 | }], # _type=="executable" and asan==1 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4077 | ], # target_conditions |
| 4078 | }, # xcode_settings |
| 4079 | }, # configuration "Release" |
| 4080 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4081 | }, { # mac_real_dsym != 1 |
| 4082 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 4083 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 4084 | # only operates in the Release configuration. |
| 4085 | 'postbuilds': [ |
| 4086 | { |
| 4087 | 'variables': { |
| 4088 | # Define strip_from_xcode in a variable ending in _path |
| 4089 | # so that gyp understands it's a path and performs proper |
| 4090 | # relativization during dict merging. |
| 4091 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 4092 | }, |
| 4093 | 'postbuild_name': 'Strip If Needed', |
| 4094 | 'action': ['<(strip_from_xcode_path)'], |
| 4095 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4096 | ], # postbuilds |
| 4097 | }], # mac_real_dsym |
| 4098 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4099 | }], # (_type=="executable" or _type=="shared_library" or |
| 4100 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4101 | ], # target_conditions |
| 4102 | }, # target_defaults |
| 4103 | }], # OS=="mac" |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4104 | ['OS=="ios"', { |
| 4105 | 'target_defaults': { |
| 4106 | 'xcode_settings' : { |
| 4107 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
| 4108 | |
| 4109 | # This next block is mostly common with the 'mac' section above, |
| 4110 | # but keying off (or setting) 'clang' isn't valid for iOS as it |
| 4111 | # also seems to mean using the custom build of clang. |
| 4112 | |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 4113 | # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang |
| 4114 | # section above). |
| 4115 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4116 | # Don't use -Wc++0x-extensions, which Xcode 4 enables by default |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4117 | # when building with clang. This warning is triggered when the |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4118 | # override keyword is used via the OVERRIDE macro from |
| 4119 | # base/compiler_specific.h. |
| 4120 | 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4121 | # Warn if automatic synthesis is triggered with |
| 4122 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4123 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4124 | 'WARNING_CFLAGS': [ |
| 4125 | '-Wheader-hygiene', |
| 4126 | # Don't die on dtoa code that uses a char as an array index. |
| 4127 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 4128 | '-Wno-char-subscripts', |
| 4129 | # Clang spots more unused functions. |
| 4130 | '-Wno-unused-function', |
| 4131 | # See comments on this flag higher up in this file. |
| 4132 | '-Wno-unnamed-type-template-args', |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 4133 | # Match OS X clang C++11 warning settings. |
| 4134 | '-Wno-c++11-narrowing', |
| 4135 | '-Wno-reserved-user-defined-literal', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4136 | ], |
| 4137 | }, |
| 4138 | 'target_conditions': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4139 | ['_toolset=="host"', { |
| 4140 | 'xcode_settings': { |
| 4141 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 4142 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 4143 | }, |
| 4144 | }], |
| 4145 | ['_toolset=="target"', { |
| 4146 | 'xcode_settings': { |
| 4147 | # This section should be for overriding host settings. But, |
| 4148 | # since we can't negate the iphone deployment target above, we |
| 4149 | # instead set it here for target only. |
| 4150 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
| 4151 | }, |
| 4152 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4153 | ['_type=="executable"', { |
| 4154 | 'configurations': { |
| 4155 | 'Release_Base': { |
| 4156 | 'xcode_settings': { |
| 4157 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4158 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 4159 | }, |
| 4160 | }, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 4161 | 'Debug_Base': { |
| 4162 | 'xcode_settings': { |
| 4163 | # Remove dSYM to reduce build time. |
| 4164 | 'DEBUG_INFORMATION_FORMAT': 'dwarf', |
| 4165 | }, |
| 4166 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4167 | }, |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4168 | 'conditions': [ |
[email protected] | 8dec8fc5 | 2013-05-23 23:05:05 | [diff] [blame] | 4169 | ['"<(GENERATOR)"=="xcode"', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4170 | 'xcode_settings': { |
[email protected] | 8dec8fc5 | 2013-05-23 23:05:05 | [diff] [blame] | 4171 | # TODO(justincohen): ninja builds don't support signing yet. |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4172 | 'conditions': [ |
| 4173 | ['chromium_ios_signing', { |
| 4174 | # iOS SDK wants everything for device signed. |
| 4175 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 4176 | }, { |
| 4177 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 4178 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 4179 | }], |
| 4180 | ], |
| 4181 | }, |
| 4182 | }], |
[email protected] | 8dec8fc5 | 2013-05-23 23:05:05 | [diff] [blame] | 4183 | ['"<(GENERATOR)"=="xcode" and clang!=1', { |
| 4184 | 'xcode_settings': { |
| 4185 | # It is necessary to link with the -fobjc-arc flag to use |
| 4186 | # subscripting on iOS < 6. |
| 4187 | 'OTHER_LDFLAGS': [ |
| 4188 | '-fobjc-arc', |
| 4189 | ], |
| 4190 | }, |
| 4191 | }], |
| 4192 | ['clang==1', { |
| 4193 | 'target_conditions': [ |
| 4194 | ['_toolset=="target"', { |
| 4195 | 'variables': { |
| 4196 | 'developer_dir': '<!(xcode-select -print-path)', |
| 4197 | 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc', |
| 4198 | }, |
| 4199 | # It is necessary to force load libarclite from Xcode for |
| 4200 | # third_party/llvm-build because libarclite_* is only |
| 4201 | # distributed by Xcode. |
| 4202 | 'conditions': [ |
| 4203 | ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', { |
| 4204 | 'xcode_settings': { |
| 4205 | 'OTHER_LDFLAGS': [ |
| 4206 | '-force_load', |
| 4207 | '<(arc_toolchain_path)/libarclite_iphoneos.a', |
| 4208 | ], |
| 4209 | }, |
| 4210 | }], |
| 4211 | ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', { |
| 4212 | 'xcode_settings': { |
| 4213 | 'OTHER_LDFLAGS': [ |
| 4214 | '-force_load', |
| 4215 | '<(arc_toolchain_path)/libarclite_iphonesimulator.a', |
| 4216 | ], |
| 4217 | }, |
| 4218 | }], |
| 4219 | # Xcode sets target_arch at compile-time. |
| 4220 | ['"<(GENERATOR)"=="xcode"', { |
| 4221 | 'xcode_settings': { |
| 4222 | 'OTHER_LDFLAGS[arch=armv7]': [ |
[email protected] | 8667144 | 2013-06-11 13:25:12 | [diff] [blame] | 4223 | '$(inherited)', |
[email protected] | 8dec8fc5 | 2013-05-23 23:05:05 | [diff] [blame] | 4224 | '-force_load', |
| 4225 | '<(arc_toolchain_path)/libarclite_iphoneos.a', |
| 4226 | ], |
| 4227 | 'OTHER_LDFLAGS[arch=i386]': [ |
[email protected] | 8667144 | 2013-06-11 13:25:12 | [diff] [blame] | 4228 | '$(inherited)', |
[email protected] | 8dec8fc5 | 2013-05-23 23:05:05 | [diff] [blame] | 4229 | '-force_load', |
| 4230 | '<(arc_toolchain_path)/libarclite_iphonesimulator.a', |
| 4231 | ], |
| 4232 | }, |
| 4233 | }], |
| 4234 | ], |
| 4235 | }], |
| 4236 | ], |
| 4237 | }], |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4238 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4239 | }], |
| 4240 | ], # target_conditions |
| 4241 | }, # target_defaults |
| 4242 | }], # OS=="ios" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4243 | ['OS=="win"', { |
| 4244 | 'target_defaults': { |
| 4245 | 'defines': [ |
[email protected] | 8e345da | 2012-07-01 22:10:30 | [diff] [blame] | 4246 | '_WIN32_WINNT=0x0602', |
| 4247 | 'WINVER=0x0602', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4248 | 'WIN32', |
| 4249 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4250 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 4251 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4252 | '_CRT_RAND_S', |
| 4253 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 4254 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 4255 | '_ATL_NO_OPENGL', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4256 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4257 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 4258 | ['buildtype=="Official"', { |
| 4259 | # In official builds, targets can self-select an optimization |
| 4260 | # level by defining a variable named 'optimize', and setting it |
| 4261 | # to one of |
| 4262 | # - "size", optimizes for minimal code size - the default. |
| 4263 | # - "speed", optimizes for speed over code size. |
| 4264 | # - "max", whole program optimization and link-time code |
| 4265 | # generation. This is very expensive and should be used |
| 4266 | # sparingly. |
| 4267 | 'variables': { |
| 4268 | 'optimize%': 'size', |
| 4269 | }, |
| 4270 | 'target_conditions': [ |
| 4271 | ['optimize=="size"', { |
| 4272 | 'msvs_settings': { |
| 4273 | 'VCCLCompilerTool': { |
| 4274 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 4275 | 'Optimization': '1', |
| 4276 | # 2, favorSize - Favor small code (/Os) |
| 4277 | 'FavorSizeOrSpeed': '2', |
| 4278 | }, |
| 4279 | }, |
| 4280 | }, |
| 4281 | ], |
| 4282 | ['optimize=="speed"', { |
| 4283 | 'msvs_settings': { |
| 4284 | 'VCCLCompilerTool': { |
| 4285 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 4286 | 'Optimization': '2', |
| 4287 | # 1, favorSpeed - Favor fast code (/Ot) |
| 4288 | 'FavorSizeOrSpeed': '1', |
| 4289 | }, |
| 4290 | }, |
| 4291 | }, |
| 4292 | ], |
| 4293 | ['optimize=="max"', { |
| 4294 | 'msvs_settings': { |
| 4295 | 'VCCLCompilerTool': { |
| 4296 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 4297 | 'Optimization': '2', |
| 4298 | # 1, favorSpeed - Favor fast code (/Ot) |
| 4299 | 'FavorSizeOrSpeed': '1', |
| 4300 | # This implies link time code generation. |
| 4301 | 'WholeProgramOptimization': 'true', |
| 4302 | }, |
| 4303 | }, |
| 4304 | }, |
| 4305 | ], |
| 4306 | ], |
| 4307 | }, |
| 4308 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4309 | ['component=="static_library"', { |
| 4310 | 'defines': [ |
| 4311 | '_HAS_EXCEPTIONS=0', |
| 4312 | ], |
| 4313 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 4314 | ['secure_atl', { |
| 4315 | 'defines': [ |
| 4316 | '_SECURE_ATL', |
| 4317 | ], |
| 4318 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 4319 | ['msvs_express', { |
| 4320 | 'configurations': { |
| 4321 | 'x86_Base': { |
| 4322 | 'msvs_settings': { |
| 4323 | 'VCLinkerTool': { |
| 4324 | 'AdditionalLibraryDirectories': |
| 4325 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 4326 | }, |
| 4327 | 'VCLibrarianTool': { |
| 4328 | 'AdditionalLibraryDirectories': |
| 4329 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 4330 | }, |
| 4331 | }, |
| 4332 | }, |
| 4333 | 'x64_Base': { |
| 4334 | 'msvs_settings': { |
| 4335 | 'VCLibrarianTool': { |
| 4336 | 'AdditionalLibraryDirectories': |
| 4337 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 4338 | }, |
| 4339 | 'VCLinkerTool': { |
| 4340 | 'AdditionalLibraryDirectories': |
| 4341 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 4342 | }, |
| 4343 | }, |
| 4344 | }, |
| 4345 | }, |
| 4346 | 'msvs_settings': { |
| 4347 | 'VCLinkerTool': { |
| 4348 | # Explicitly required when using the ATL with express |
| 4349 | 'AdditionalDependencies': ['atlthunk.lib'], |
| 4350 | |
| 4351 | # ATL 8.0 included in WDK 7.1 makes the linker to generate |
| 4352 | # almost eight hundred LNK4254 and LNK4078 warnings: |
| 4353 | # - warning LNK4254: section 'ATL' (50000040) merged into |
| 4354 | # '.rdata' (40000040) with different attributes |
| 4355 | # - warning LNK4078: multiple 'ATL' sections found with |
| 4356 | # different attributes |
| 4357 | 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
| 4358 | }, |
| 4359 | }, |
| 4360 | 'msvs_system_include_dirs': [ |
| 4361 | '<(windows_driver_kit_path)/inc/atl71', |
| 4362 | '<(windows_driver_kit_path)/inc/mfc42', |
| 4363 | ], |
| 4364 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4365 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 4366 | 'msvs_system_include_dirs': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4367 | '<(windows_sdk_path)/Include/shared', |
| 4368 | '<(windows_sdk_path)/Include/um', |
| 4369 | '<(windows_sdk_path)/Include/winrt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4370 | '$(VSInstallDir)/VC/atlmfc/include', |
| 4371 | ], |
[email protected] | a8d99cef | 2009-08-26 20:47:49 | [diff] [blame] | 4372 | 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
[email protected] | 7815a36 | 2013-04-26 08:12:00 | [diff] [blame] | 4373 | 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4374 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 4375 | # removed as code is fixed. |
| 4376 | 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
[email protected] | 7815a36 | 2013-04-26 08:12:00 | [diff] [blame] | 4377 | 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702, |
| 4378 | 4706, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4379 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4380 | 'msvs_settings': { |
| 4381 | 'VCCLCompilerTool': { |
[email protected] | e9b96bb | 2012-09-07 01:10:44 | [diff] [blame] | 4382 | 'AdditionalOptions': ['/MP'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4383 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4384 | 'BufferSecurityCheck': 'true', |
| 4385 | 'EnableFunctionLevelLinking': 'true', |
| 4386 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4387 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4388 | 'WarnAsError': 'true', |
| 4389 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 4390 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4391 | ['component=="shared_library"', { |
| 4392 | 'ExceptionHandling': '1', # /EHsc |
| 4393 | }, { |
| 4394 | 'ExceptionHandling': '0', |
| 4395 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 4396 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4397 | }, |
| 4398 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4399 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4400 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4401 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4402 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4403 | }, |
| 4404 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4405 | 'AdditionalDependencies': [ |
| 4406 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 4407 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4408 | 'version.lib', |
| 4409 | 'msimg32.lib', |
| 4410 | 'ws2_32.lib', |
| 4411 | 'usp10.lib', |
| 4412 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 4413 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 4414 | 'winmm.lib', |
| 4415 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4416 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4417 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4418 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4419 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4420 | 'GenerateDebugInformation': 'true', |
| 4421 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 4422 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4423 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 4424 | # SubSystem values: |
| 4425 | # 0 == not set |
| 4426 | # 1 == /SUBSYSTEM:CONSOLE |
| 4427 | # 2 == /SUBSYSTEM:WINDOWS |
| 4428 | # Most of the executables we'll ever create are tests |
| 4429 | # and utilities with console output. |
| 4430 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4431 | }, |
| 4432 | 'VCMIDLTool': { |
| 4433 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 4434 | 'TypeLibraryName': '$(InputName).tlb', |
| 4435 | 'OutputDirectory': '$(IntDir)', |
| 4436 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 4437 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 4438 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 4439 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4440 | }, |
| 4441 | 'VCResourceCompilerTool': { |
| 4442 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 4443 | 'AdditionalIncludeDirectories': [ |
| 4444 | '<(DEPTH)', |
| 4445 | '<(SHARED_INTERMEDIATE_DIR)', |
| 4446 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4447 | }, |
| 4448 | }, |
| 4449 | }, |
| 4450 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 4451 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 4452 | 'target_defaults': { |
| 4453 | 'defines': [ |
| 4454 | 'DISABLE_NACL', |
| 4455 | ], |
| 4456 | }, |
| 4457 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 4458 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4459 | 'target_defaults': { |
| 4460 | 'msvs_settings': { |
| 4461 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4462 | 'DelayLoadDLLs': [ |
| 4463 | 'dbghelp.dll', |
| 4464 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 4465 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4466 | 'uxtheme.dll', |
| 4467 | ], |
| 4468 | }, |
| 4469 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4470 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4471 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4472 | 'msvs_settings': { |
| 4473 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4474 | 'AdditionalOptions': [ |
| 4475 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 4476 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4477 | '/ignore:4199', |
| 4478 | '/ignore:4221', |
| 4479 | '/nxcompat', |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 4480 | ], |
| 4481 | 'conditions': [ |
| 4482 | ['asan==0', { |
| 4483 | 'AdditionalOptions': ['/largeaddressaware'], |
| 4484 | }], |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4485 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4486 | }, |
| 4487 | }, |
| 4488 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4489 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4490 | 'msvs_settings': { |
| 4491 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4492 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4493 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 4494 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4495 | '/ignore:4199', |
| 4496 | '/ignore:4221', |
| 4497 | '/nxcompat', |
| 4498 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4499 | }, |
| 4500 | }, |
| 4501 | }, |
| 4502 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4503 | }, |
| 4504 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 4505 | ['enable_new_npdevice_api==1', { |
| 4506 | 'target_defaults': { |
| 4507 | 'defines': [ |
| 4508 | 'ENABLE_NEW_NPDEVICE_API', |
| 4509 | ], |
| 4510 | }, |
| 4511 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 4512 | # Don't warn about the "typedef 'foo' locally defined but not used" |
| 4513 | # for gcc 4.8. |
| 4514 | # TODO: remove this flag once all builds work. See crbug.com/227506 |
| 4515 | ['gcc_version>=48', { |
| 4516 | 'target_defaults': { |
| 4517 | 'cflags': [ |
| 4518 | '-Wno-unused-local-typedefs', |
| 4519 | ], |
| 4520 | }, |
| 4521 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4522 | ['clang==1', { |
[email protected] | f1faf21 | 2012-10-05 21:04:23 | [diff] [blame] | 4523 | 'conditions': [ |
| 4524 | ['OS=="android"', { |
| 4525 | # Android could use the goma with clang. |
| 4526 | 'make_global_settings': [ |
| 4527 | ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'], |
| 4528 | ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
| 4529 | ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], |
| 4530 | ['CC.host', '$(CC)'], |
| 4531 | ['CXX.host', '$(CXX)'], |
| 4532 | ['LINK.host', '$(LINK)'], |
| 4533 | ], |
| 4534 | }, { |
| 4535 | 'make_global_settings': [ |
| 4536 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 4537 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
| 4538 | ['LINK', '$(CXX)'], |
| 4539 | ['CC.host', '$(CC)'], |
| 4540 | ['CXX.host', '$(CXX)'], |
| 4541 | ['LINK.host', '$(LINK)'], |
| 4542 | ], |
| 4543 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4544 | ], |
| 4545 | }], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 4546 | ['OS=="android" and clang==0', { |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 4547 | # Hardcode the compiler names in the Makefile so that |
| 4548 | # it won't depend on the environment at make time. |
[email protected] | 7fc96c8 | 2012-07-24 18:15:11 | [diff] [blame] | 4549 | 'make_global_settings': [ |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 4550 | ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
| 4551 | ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'], |
| 4552 | ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 4553 | ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'], |
| 4554 | ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
| 4555 | ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 4556 | ], |
| 4557 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4558 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 4559 | 'make_global_settings': [ |
| 4560 | ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], |
| 4561 | ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], |
| 4562 | ['LINK', '$(CXX)'], |
| 4563 | ['CC.host', '<!(which gcc)'], |
| 4564 | ['CXX.host', '<!(which g++)'], |
| 4565 | ['LINK.host', '<!(which g++)'], |
| 4566 | ], |
| 4567 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4568 | ], |
| 4569 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 4570 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 4571 | # This block adds *project-wide* configuration settings to each project |
| 4572 | # file. It's almost always wrong to put things here. Specify your |
| 4573 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 4574 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4575 | 'conditions': [ |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4576 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 4577 | # setting sets the SDK on a project-wide basis. In order to get the |
| 4578 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 4579 | # here at the project level. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4580 | ['OS=="mac"', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4581 | 'conditions': [ |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4582 | ['mac_sdk_path==""', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4583 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4584 | }, { |
| 4585 | 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4586 | }], |
| 4587 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4588 | }], |
| 4589 | ['OS=="ios"', { |
| 4590 | 'conditions': [ |
| 4591 | ['ios_sdk_path==""', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4592 | 'conditions': [ |
| 4593 | # TODO(justincohen): Ninja only supports simulator for now. |
| 4594 | ['"<(GENERATOR)"=="ninja"', { |
| 4595 | 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
| 4596 | }, { |
| 4597 | 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
| 4598 | }], |
| 4599 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4600 | }, { |
| 4601 | 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
| 4602 | }], |
| 4603 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4604 | }], |
| 4605 | ['OS=="ios"', { |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 4606 | # Just build armv7, until armv7s is correctly tested. |
| 4607 | 'VALID_ARCHS': 'armv7 i386', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4608 | # Target both iPhone and iPad. |
| 4609 | 'TARGETED_DEVICE_FAMILY': '1,2', |
| 4610 | }], |
[email protected] | f9335b4 | 2013-01-24 21:00:23 | [diff] [blame] | 4611 | ['target_arch=="x64"', { |
| 4612 | 'ARCHS': [ |
| 4613 | 'x86_64' |
| 4614 | ], |
| 4615 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4616 | ], |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 4617 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4618 | # The Xcode generator will look for an xcode_settings section at the root |
| 4619 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 4620 | # settings should not be here, they should be in target-specific |
| 4621 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 4622 | # settings in target dicts. SYMROOT is a special case, because many other |
| 4623 | # Xcode variables depend on it, including variables such as |
| 4624 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 4625 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 4626 | # files to appear (when present) in the UI as actual files and not red |
| 4627 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 4628 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 4629 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4630 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 4631 | } |