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