[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] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 30 | # Whether or not we are using CRAS, the ChromeOS Audio Server. |
| 31 | 'use_cras%': 0, |
| 32 | |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 33 | # Use a raw surface abstraction. |
| 34 | 'use_ozone%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 35 | |
| 36 | # Configure the build for small devices. See crbug.com/318413 |
| 37 | 'embedded%': 0, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 38 | }, |
| 39 | # Copy conditionally-set variables out one scope. |
| 40 | 'chromeos%': '<(chromeos)', |
| 41 | 'use_aura%': '<(use_aura)', |
| 42 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 43 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 44 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 45 | 'embedded%': '<(embedded)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 46 | |
[email protected] | 3fa441d | 2011-09-18 17:28:50 | [diff] [blame] | 47 | # Whether we are using Views Toolkit |
| 48 | 'toolkit_views%': 0, |
| 49 | |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 50 | # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 |
| 51 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 52 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 53 | # Disable viewport meta tag by default. |
| 54 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 55 | |
| 56 | # Enable HiDPI support. |
| 57 | 'enable_hidpi%': 0, |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 58 | |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 59 | # Enable touch optimized art assets and metrics. |
| 60 | 'enable_touch_ui%': 0, |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 61 | |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 62 | # Override buildtype to select the desired build flavor. |
| 63 | # Dev - everyday build for development/testing |
| 64 | # Official - release build (generally implies additional processing) |
| 65 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 66 | # conversion is done), some of the things which are now controlled by |
| 67 | # 'branding', such as symbol generation, will need to be refactored |
| 68 | # based on 'buildtype' (i.e. we don't care about saving symbols for |
| 69 | # non-Official # builds). |
| 70 | 'buildtype%': 'Dev', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 71 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 72 | # Override branding to select the desired branding flavor. |
| 73 | 'branding%': 'Chromium', |
| 74 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 75 | 'conditions': [ |
[email protected] | 2d050520 | 2013-09-16 00:22:52 | [diff] [blame] | 76 | # ChromeOS and Windows use Aura and Ash. |
| 77 | ['chromeos==1 or OS=="win"', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 78 | 'use_ash%': 1, |
[email protected] | 978a2ae | 2013-09-13 04:28:01 | [diff] [blame] | 79 | 'use_aura%': 1, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 80 | }], |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 81 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 82 | # Ozone uses Aura. |
| 83 | ['use_ozone==1', { |
| 84 | 'use_aura%': 1, |
| 85 | }], |
| 86 | |
[email protected] | f2f33ffc | 2014-01-18 03:40:17 | [diff] [blame] | 87 | # ToT Linux should be aura. |
| 88 | # |
| 89 | # TODO(erg): Merge this into the previous block once compiling with |
| 90 | # aura safely implies including ash capabilities. |
| 91 | ['OS=="linux"', { |
| 92 | 'use_aura%': 1, |
| 93 | }], |
| 94 | |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 95 | # Whether we're a traditional desktop unix. |
| 96 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', { |
| 97 | 'desktop_linux%': 1, |
| 98 | }, { |
| 99 | 'desktop_linux%': 0, |
| 100 | }], |
| 101 | |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 102 | # Compute the architecture that we're building on. |
| 103 | ['OS=="win" or OS=="mac" or OS=="ios"', { |
| 104 | 'host_arch%': 'ia32', |
| 105 | }, { |
| 106 | # This handles the Unix platforms for which there is some support. |
| 107 | # Anything else gets passed through, which probably won't work |
| 108 | # very well; such hosts should pass an explicit target_arch to |
| 109 | # gyp. |
| 110 | 'host_arch%': |
| 111 | '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', |
| 112 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 113 | |
| 114 | # Embedded implies ozone. |
| 115 | ['embedded==1', { |
| 116 | 'use_ozone%': 1, |
| 117 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 118 | |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 119 | ['embedded==1', { |
| 120 | 'use_system_fontconfig%': 0, |
| 121 | }, { |
| 122 | 'use_system_fontconfig%': 1, |
| 123 | }], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 124 | ], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 125 | }, |
| 126 | # Copy conditionally-set variables out one scope. |
| 127 | 'chromeos%': '<(chromeos)', |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 128 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 129 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 130 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 131 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 132 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 133 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 134 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 135 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 136 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 137 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 138 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 139 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 140 | 'branding%': '<(branding)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 141 | 'host_arch%': '<(host_arch)', |
| 142 | |
| 143 | # Default architecture we're building for is the architecture we're |
| 144 | # building on. |
| 145 | 'target_arch%': '<(host_arch)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 146 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 147 | # This is set when building the Android WebView inside the Android |
| 148 | # build system, using the 'android' gyp backend. The WebView code is |
| 149 | # still built when this is unset, but builds using the normal chromium |
| 150 | # build system. |
| 151 | 'android_webview_build%': 0, |
[email protected] | 0115f04 | 2012-07-27 20:36:53 | [diff] [blame] | 152 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 153 | # Set ARM architecture version. |
| 154 | 'arm_version%': 7, |
| 155 | |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 156 | # Use aurax11 for clipboard implementation. This is true on linux_aura. |
| 157 | 'use_clipboard_aurax11%': 0, |
| 158 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 159 | # goma settings. |
| 160 | # 1 to use goma. |
| 161 | # If no gomadir is set, it uses the default gomadir. |
| 162 | 'use_goma%': 0, |
| 163 | 'gomadir%': '', |
| 164 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 165 | 'conditions': [ |
[email protected] | 2c858a8 | 2013-10-05 01:01:32 | [diff] [blame] | 166 | # Ash needs Aura. |
| 167 | ['use_aura==0', { |
| 168 | 'use_ash%': 0, |
| 169 | }], |
| 170 | |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 171 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 172 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 173 | 'toolkit_views%': 1, |
| 174 | }, { |
| 175 | 'toolkit_views%': 0, |
| 176 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 177 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 178 | # Embedded builds use aura without ash or views. |
| 179 | ['embedded==1', { |
| 180 | 'use_aura%': 1, |
| 181 | 'use_ash%': 0, |
| 182 | 'toolkit_views%': 0, |
| 183 | }], |
| 184 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 185 | # Set toolkit_uses_gtk for the Chromium browser on Linux. |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 186 | ['desktop_linux==1 and use_aura==0 and use_ozone==0', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 187 | 'toolkit_uses_gtk%': 1, |
| 188 | }, { |
| 189 | 'toolkit_uses_gtk%': 0, |
| 190 | }], |
| 191 | |
[email protected] | 3aa8a68 | 2012-08-11 00:04:29 | [diff] [blame] | 192 | # Enable HiDPI on Mac OS and Chrome OS. |
| 193 | ['OS=="mac" or chromeos==1', { |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 194 | 'enable_hidpi%': 1, |
| 195 | }], |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 196 | |
[email protected] | c71fe640 | 2012-08-15 15:22:55 | [diff] [blame] | 197 | # Enable touch UI on Metro. |
| 198 | ['OS=="win"', { |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 199 | 'enable_touch_ui%': 1, |
| 200 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 201 | |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 202 | # Enable App Launcher on ChromeOS, Windows and OSX. |
| 203 | # On Linux, enable App Launcher for the Aura build. |
| 204 | ['use_ash==1 or OS=="win" or OS=="mac" or (desktop_linux==1 and use_aura==1)', { |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 205 | 'enable_app_list%': 1, |
| 206 | }, { |
| 207 | 'enable_app_list%': 0, |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 208 | }], |
| 209 | |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 210 | ['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] | 211 | 'use_default_render_theme%': 1, |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 212 | }, { |
| 213 | 'use_default_render_theme%': 0, |
| 214 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 215 | |
| 216 | ['use_ozone==1', { |
| 217 | 'use_ozone_evdev%': 1, |
| 218 | }, { |
| 219 | 'use_ozone_evdev%': 0, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 220 | }], |
| 221 | |
| 222 | # Set default gomadir. |
| 223 | ['OS=="win"', { |
| 224 | 'gomadir': 'c:\\goma\\goma-win', |
[email protected] | 91b9129 | 2014-01-18 23:54:41 | [diff] [blame^] | 225 | }, { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 226 | 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 227 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 228 | ], |
| 229 | }, |
| 230 | |
| 231 | # Copy conditionally-set variables out one scope. |
| 232 | 'chromeos%': '<(chromeos)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 233 | 'host_arch%': '<(host_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 234 | 'target_arch%': '<(target_arch)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 235 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 236 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 237 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 238 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 239 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 240 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 241 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 242 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 243 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 244 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 245 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 246 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 247 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 248 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 249 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 250 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 251 | 'use_goma%': '<(use_goma)', |
| 252 | 'gomadir%': '<(gomadir)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 253 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 254 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 255 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 256 | 'branding%': '<(branding)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 257 | 'arm_version%': '<(arm_version)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 258 | |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 259 | # Set to 1 to enable fast builds. Set to 2 for even faster builds |
| 260 | # (it disables debug info for fastest compilation - only for use |
| 261 | # on compile-only bots). |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 262 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 263 | |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 264 | # Set to 1 to enable dcheck in release without having to use the flag. |
| 265 | 'dcheck_always_on%': 0, |
| 266 | |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 267 | # Set to 1 to make a build that logs like an official build, but is not |
| 268 | # necessarily an official build, ie DCHECK and DLOG are disabled and |
| 269 | # removed completely in release builds, to minimize binary footprint. |
| 270 | # Note: this setting is ignored if buildtype=="Official". |
| 271 | 'logging_like_official_build%': 0, |
| 272 | |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 273 | # Set to 1 to make a build that disables unshipped tracing events. |
| 274 | # Note: this setting is ignored if buildtype=="Official". |
| 275 | 'tracing_like_official_build%': 0, |
| 276 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 277 | # Disable file manager component extension by default. |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 278 | 'file_manager_extension%': 0, |
| 279 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 280 | # Disable image loader component extension by default. |
| 281 | 'image_loader_extension%': 0, |
| 282 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 283 | # Python version. |
[email protected] | a43c5a0 | 2011-05-27 06:54:51 | [diff] [blame] | 284 | 'python_ver%': '2.6', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 285 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 286 | # Set NEON compilation flags. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 287 | 'arm_neon%': 1, |
| 288 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 289 | # Detect NEON support at run-time. |
| 290 | 'arm_neon_optional%': 0, |
| 291 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 292 | # The system root for cross-compiles. Default: none. |
| 293 | 'sysroot%': '', |
| 294 | |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 295 | # The system libdir used for this ABI. |
| 296 | 'system_libdir%': 'lib', |
| 297 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 298 | # On Linux, we build with sse2 for Chromium builds. |
| 299 | 'disable_sse2%': 0, |
| 300 | |
| 301 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 302 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 303 | |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 304 | # Use system libjpeg. Note that the system's libjepg will be used even if |
| 305 | # use_libjpeg_turbo is set. |
| 306 | 'use_system_libjpeg%': 0, |
| 307 | |
[email protected] | aa5e01fc | 2013-03-06 14:06:17 | [diff] [blame] | 308 | # By default, component is set to static_library and it can be overriden |
| 309 | # by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 310 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 311 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 312 | # Set to select the Title Case versions of strings in GRD files. |
| 313 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 314 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 315 | # Use translations provided by volunteers at launchpad.net. This |
| 316 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 317 | 'use_third_party_translations%': 0, |
| 318 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 319 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 320 | 'remoting%': 1, |
| 321 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 322 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 323 | 'configuration_policy%': 1, |
| 324 | |
[email protected] | 6c521fed | 2012-11-29 17:00:03 | [diff] [blame] | 325 | # Variable safe_browsing is used to control the build time configuration |
| 326 | # for safe browsing feature. Safe browsing can be compiled in 3 different |
| 327 | # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and |
| 328 | # reporting features without enabling phishing and malware detection. This |
| 329 | # is useful to integrate a third party phishing/malware detection to |
| 330 | # existing safe browsing logic. |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 331 | 'safe_browsing%': 1, |
| 332 | |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 333 | # Speech input is compiled in by default. Set to 0 to disable. |
| 334 | 'input_speech%': 1, |
| 335 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 336 | # Notifications are compiled in by default. Set to 0 to disable. |
| 337 | 'notifications%' : 1, |
| 338 | |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 339 | # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for |
| 340 | # regular builds and 1 for ASan builds. |
| 341 | 'mac_want_real_dsym%': 'default', |
| 342 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 343 | # If this is set, the clang plugins used on the buildbot will be used. |
| 344 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 345 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 346 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 347 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 348 | |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 349 | # Enable building with ASAN (Clang's -fsanitize=address option). |
| 350 | # -fsanitize=address only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 351 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 352 | 'asan%': 0, |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 353 | # Enable coverage gathering instrumentation in ASan. This flag also |
| 354 | # controls coverage granularity (experimental). |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 355 | 'asan_coverage%': 0, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 356 | |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 357 | # Enable building with LSan (Clang's -fsanitize=leak option). |
| 358 | # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
| 359 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer |
| 360 | 'lsan%': 0, |
| 361 | |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 362 | # Enable building with TSAN (Clang's -fsanitize=thread option). |
| 363 | # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 364 | # See http://clang.llvm.org/docs/ThreadSanitizer.html |
| 365 | 'tsan%': 0, |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 366 | 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 367 | |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 368 | # Enable building with MSAN (Clang's -fsanitize=memory option). |
| 369 | # MemorySanitizer only works with clang, but msan=1 implies clang=1 |
| 370 | # See http://clang.llvm.org/docs/MemorySanitizer.html |
| 371 | 'msan%': 0, |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 372 | 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 373 | |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 374 | # Use the dynamic libraries instrumented by one of the sanitizers |
| 375 | # instead of the standard system libraries. |
| 376 | 'use_instrumented_libraries%': 0, |
| 377 | |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 378 | # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
| 379 | # stdlibc++ as standard library. This is intended to use for instrumented |
| 380 | # builds. |
| 381 | 'use_custom_libcxx%': 0, |
| 382 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 383 | # Use a modified version of Clang to intercept allocated types and sizes |
| 384 | # for allocated objects. clang_type_profiler=1 implies clang=1. |
| 385 | # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
| 386 | # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
| 387 | 'clang_type_profiler%': 0, |
| 388 | |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 389 | # Set to true to instrument the code with function call logger. |
| 390 | # See src/third_party/cygprofile/cyg-profile.cc for details. |
| 391 | 'order_profiling%': 0, |
| 392 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 393 | # Use the provided profiled order file to link Chrome image with it. |
| 394 | # This makes Chrome faster by better using CPU cache when executing code. |
| 395 | # This is known as PGO (profile guided optimization). |
| 396 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 397 | 'order_text_section%' : "", |
| 398 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 399 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 400 | # libraries on linux x86-64 and arm, plus ASLR. |
| 401 | 'linux_fpic%': 1, |
| 402 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 403 | # Whether one-click signin is enabled or not. |
| 404 | 'enable_one_click_signin%': 0, |
| 405 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 406 | # Enable Chrome browser extensions |
| 407 | 'enable_extensions%': 1, |
| 408 | |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 409 | # Enable browser automation. |
| 410 | 'enable_automation%': 1, |
| 411 | |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 412 | # Enable Google Now. |
| 413 | 'enable_google_now%': 1, |
| 414 | |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 415 | # Enable printing support and UI. This variable is used to configure |
| 416 | # which parts of printing will be built. 0 disables printing completely, |
| 417 | # 1 enables it fully, and 2 enables only the codepath to generate a |
| 418 | # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud |
| 419 | # print, UI, etc. |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 420 | 'enable_printing%': 1, |
| 421 | |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 422 | # Set the version of CLD. |
| 423 | # 0: Don't specify the version. This option is for the Finch testing. |
| 424 | # 1: Use only CLD1. |
| 425 | # 2: Use only CLD2. |
[email protected] | d8ef236 | 2013-10-22 02:10:00 | [diff] [blame] | 426 | 'cld_version%': 2, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 427 | |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 428 | # Enable spell checker. |
| 429 | 'enable_spellcheck%': 1, |
| 430 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 431 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 432 | 'enable_webrtc%': 1, |
| 433 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 434 | # Enables use of the session service, which is enabled by default. |
| 435 | # Support for disabling depends on the platform. |
| 436 | 'enable_session_service%': 1, |
| 437 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 438 | # Enables theme support, which is enabled by default. Support for |
| 439 | # disabling depends on the platform. |
| 440 | 'enable_themes%': 1, |
| 441 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 442 | # Enables autofill dialog and associated features; disabled by default. |
| 443 | 'enable_autofill_dialog%' : 0, |
| 444 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 445 | # Enables support for background apps. |
| 446 | 'enable_background%': 1, |
| 447 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 448 | # Enable the task manager by default. |
| 449 | 'enable_task_manager%': 1, |
[email protected] | e1de87f | 2012-05-02 17:20:45 | [diff] [blame] | 450 | |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 451 | # Enable FTP support by default. |
| 452 | 'disable_ftp_support%': 0, |
| 453 | |
[email protected] | ef4cb64 | 2013-09-14 22:48:02 | [diff] [blame] | 454 | # XInput2 multitouch support is enabled by default (use_xi2_mt=2). |
| 455 | # Setting to zero value disables XI2 MT. When XI2 MT is enabled, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 456 | # the input value also defines the required XI2 minor minimum version. |
| 457 | # For example, use_xi2_mt=2 means XI2.2 or above version is required. |
[email protected] | ef4cb64 | 2013-09-14 22:48:02 | [diff] [blame] | 458 | 'use_xi2_mt%': 2, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 459 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 460 | # Use of precompiled headers on Windows. |
| 461 | # |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 462 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 463 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 464 | # This setting will override the default. |
| 465 | # |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 466 | # See |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 467 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 468 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 469 | 'chromium_win_pch%': 0, |
| 470 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 471 | # Set this to true when building with Clang. |
| 472 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
| 473 | 'clang%': 0, |
| 474 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 475 | # Enable plug-in installation by default. |
| 476 | 'enable_plugin_installation%': 1, |
| 477 | |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 478 | # Enable PPAPI and NPAPI by default. |
| 479 | # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well |
| 480 | # as PPAPI; see crbug.com/162667. |
| 481 | 'enable_plugins%': 1, |
| 482 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 483 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 484 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 485 | # Chrome UI. |
| 486 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 487 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 488 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 489 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 490 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 491 | # with one of those tools. |
| 492 | 'build_for_tool%': '', |
| 493 | |
[email protected] | 3713813 | 2013-01-17 23:08:52 | [diff] [blame] | 494 | # If no directory is specified then a temporary directory will be used. |
| 495 | 'test_isolation_outdir%': '', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 496 | # True if isolate should fail if the isolate files refer to files |
| 497 | # that are missing. |
| 498 | 'test_isolation_fail_on_missing': 0, |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 499 | |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 500 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 501 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 502 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 503 | # Managed users are enabled by default. |
| 504 | 'enable_managed_users%': 1, |
| 505 | |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 506 | # Platform natively supports discardable memory. |
| 507 | 'native_discardable_memory%': 0, |
| 508 | |
| 509 | # Platform sends memory pressure signals natively. |
| 510 | 'native_memory_pressure_signals%': 0, |
| 511 | |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 512 | 'data_reduction_fallback_host%' : '', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 513 | 'data_reduction_dev_host%' : '', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 514 | 'spdy_proxy_auth_origin%' : '', |
| 515 | 'spdy_proxy_auth_property%' : '', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 516 | 'spdy_proxy_auth_value%' : '', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 517 | 'data_reduction_proxy_probe_url%' : '', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 518 | 'enable_mdns%' : 0, |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 519 | 'enable_enhanced_bookmarks%': 0, |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 520 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 521 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 522 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 523 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 524 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 525 | }, { |
| 526 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 527 | }], |
| 528 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 529 | # A flag for BSD platforms |
| 530 | ['OS=="freebsd" or OS=="openbsd"', { |
| 531 | 'os_bsd%': 1, |
| 532 | }, { |
| 533 | 'os_bsd%': 0, |
| 534 | }], |
| 535 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 536 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 537 | ['(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] | 538 | 'use_nss%': 1, |
| 539 | }, { |
| 540 | 'use_nss%': 0, |
| 541 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 542 | |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 543 | # libudev usage. This currently only affects the content layer. |
[email protected] | 048ab5f | 2013-11-22 01:42:47 | [diff] [blame] | 544 | ['OS=="linux" and embedded==0', { |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 545 | 'use_udev%': 1, |
| 546 | }, { |
| 547 | 'use_udev%': 0, |
| 548 | }], |
| 549 | |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 550 | # Flags to use X11 on non-Mac POSIX platforms. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 551 | ['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] | 552 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 553 | }, { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 554 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 555 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 556 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 557 | # Flags to use glib. |
[email protected] | b132edd | 2013-11-22 23:21:55 | [diff] [blame] | 558 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 559 | 'use_glib%': 0, |
| 560 | }, { |
| 561 | 'use_glib%': 1, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 562 | }], |
| 563 | |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 564 | # Flags to use pango and cairo. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 565 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { |
| 566 | 'use_pango%': 0, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 567 | 'use_cairo%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 568 | }, { |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 569 | 'use_pango%': 1, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 570 | 'use_cairo%': 1, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 571 | }], |
| 572 | |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 573 | # DBus usage. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 574 | ['OS=="linux" and embedded==0', { |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 575 | 'use_dbus%': 1, |
| 576 | }, { |
| 577 | 'use_dbus%': 0, |
| 578 | }], |
| 579 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 580 | # We always use skia text rendering in Aura on Windows, since GDI |
| 581 | # doesn't agree with our BackingStore. |
| 582 | # TODO(beng): remove once skia text rendering is on by default. |
| 583 | ['use_aura==1 and OS=="win"', { |
| 584 | 'enable_skia_text%': 1, |
| 585 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 586 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 587 | # A flag to enable or disable our compile-time dependency |
| 588 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 589 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 590 | # for Linux distributions and for Aura. |
[email protected] | 556975ce | 2013-11-15 22:00:22 | [diff] [blame] | 591 | ['OS!="linux" or chromeos==1 or use_aura==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 592 | 'use_gnome_keyring%': 0, |
| 593 | }, { |
| 594 | 'use_gnome_keyring%': 1, |
| 595 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 596 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 597 | ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 598 | # GTK+, Mac and iOS want Title Case strings |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 599 | 'use_titlecase_in_grd_files%': 1, |
| 600 | }], |
| 601 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 602 | # Enable file manager and image loader extensions on Chrome OS. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 603 | ['chromeos==1', { |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 604 | 'file_manager_extension%': 1, |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 605 | 'image_loader_extension%': 1, |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 606 | }, { |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 607 | 'file_manager_extension%': 0, |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 608 | 'image_loader_extension%': 0, |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 609 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 610 | |
[email protected] | c79d197 | 2013-02-06 18:47:29 | [diff] [blame] | 611 | ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { |
[email protected] | f032fe9 | 2012-06-12 19:20:01 | [diff] [blame] | 612 | 'enable_one_click_signin%': 1, |
[email protected] | e4b66bf | 2012-05-29 20:39:51 | [diff] [blame] | 613 | }], |
| 614 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 615 | ['OS=="android"', { |
[email protected] | 098dff8a | 2013-01-23 20:54:49 | [diff] [blame] | 616 | 'enable_automation%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 617 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 618 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 619 | 'cld_version%': 1, |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 620 | 'enable_spellcheck%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 621 | 'enable_themes%': 0, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 622 | 'remoting%': 0, |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 623 | 'arm_neon%': 0, |
| 624 | 'arm_neon_optional%': 1, |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 625 | 'native_discardable_memory%': 1, |
| 626 | 'native_memory_pressure_signals%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 627 | 'enable_printing%': 2, |
| 628 | }], |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 629 | |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 630 | # Android OS includes support for proprietary codecs regardless of |
| 631 | # building Chromium or Google Chrome. We also ship Google Chrome with |
| 632 | # proprietary codecs. |
| 633 | ['OS=="android" or branding=="Chrome"', { |
| 634 | 'proprietary_codecs%': 1, |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 635 | }, { |
| 636 | 'proprietary_codecs%': 0, |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 637 | }], |
| 638 | |
[email protected] | 85f2958 | 2013-12-16 18:02:04 | [diff] [blame] | 639 | ['OS=="mac" or OS=="ios"', { |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 640 | 'native_discardable_memory%': 1, |
| 641 | 'native_memory_pressure_signals%': 1, |
| 642 | }], |
| 643 | |
[email protected] | 8f5999e | 2013-08-10 18:27:05 | [diff] [blame] | 644 | # Enable autofill dialog for Android, Mac and Views-enabled platforms. |
| 645 | ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 646 | 'enable_autofill_dialog%': 1 |
| 647 | }], |
| 648 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 649 | ['OS=="android" and android_webview_build==0', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 650 | 'enable_webrtc%': 1, |
| 651 | }], |
| 652 | |
| 653 | # Disable WebRTC for building WebView as part of Android system. |
| 654 | # TODO(boliu): Decide if we want WebRTC, and if so, also merge |
| 655 | # the necessary third_party repositories. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 656 | ['OS=="android" and android_webview_build==1', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 657 | 'enable_webrtc%': 0, |
| 658 | }], |
| 659 | |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 660 | ['OS=="ios"', { |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 661 | 'configuration_policy%': 0, |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 662 | 'disable_ftp_support%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 663 | 'enable_automation%': 0, |
| 664 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 665 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 666 | 'cld_version%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 667 | 'enable_printing%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 668 | 'enable_session_service%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 669 | 'enable_themes%': 0, |
| 670 | 'enable_webrtc%': 0, |
| 671 | 'notifications%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 672 | 'remoting%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 673 | 'safe_browsing%': 0, |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 674 | 'enable_managed_users%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 675 | }], |
| 676 | |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 677 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 678 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 679 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 680 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 681 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 682 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 683 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 684 | |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 685 | # Turn precompiled headers on by default. |
| 686 | ['OS=="win" and buildtype!="Official"', { |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 687 | 'chromium_win_pch%': 1 |
| 688 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 689 | |
[email protected] | deb8b3cd | 2013-05-07 19:52:10 | [diff] [blame] | 690 | ['chromeos==1 or OS=="android" or OS=="ios"', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 691 | 'enable_plugin_installation%': 0, |
| 692 | }, { |
| 693 | 'enable_plugin_installation%': 1, |
| 694 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 695 | |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 696 | ['OS=="android" or OS=="ios" or embedded==1', { |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 697 | 'enable_plugins%': 0, |
| 698 | }, { |
| 699 | 'enable_plugins%': 1, |
| 700 | }], |
| 701 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 702 | # linux_use_gold_binary: whether to use the binary checked into |
[email protected] | 1e8e7b9 | 2013-03-15 07:27:56 | [diff] [blame] | 703 | # third_party/gold. Gold is not used for 32-bit linux builds |
| 704 | # as it runs out of address space. |
| 705 | ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { |
[email protected] | 1e03348 | 2012-02-09 19:33:51 | [diff] [blame] | 706 | 'linux_use_gold_binary%': 1, |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 707 | }, { |
[email protected] | bd68ea5 | 2013-03-26 09:49:37 | [diff] [blame] | 708 | 'linux_use_gold_binary%': 0, |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 709 | }], |
| 710 | |
| 711 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
| 712 | # On by default for x64 Linux. Temporarily off for ChromeOS as |
| 713 | # it failed on a buildbot. |
| 714 | ['OS=="linux" and target_arch=="x64" and chromeos==0', { |
| 715 | 'linux_use_gold_flags%': 1, |
| 716 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 717 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 718 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 719 | |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 720 | ['OS=="android" or OS=="ios"', { |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 721 | 'enable_captive_portal_detection%': 0, |
| 722 | }, { |
| 723 | 'enable_captive_portal_detection%': 1, |
| 724 | }], |
| 725 | |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 726 | # Enable Skia UI text drawing incrementally on different platforms. |
| 727 | # http://crbug.com/105550 |
| 728 | # |
| 729 | # On Aura, this allows per-tile painting to be used in the browser |
| 730 | # compositor. |
[email protected] | 04b67b6 | 2013-09-14 01:32:17 | [diff] [blame] | 731 | ['OS!="android"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 732 | 'use_canvas_skia%': 1, |
| 733 | }], |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 734 | |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 735 | ['chromeos==1', { |
| 736 | # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
| 737 | 'use_libjpeg_turbo%': 0, |
| 738 | }], |
| 739 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 740 | ['OS=="android"', { |
| 741 | # When building as part of the Android system, use system libraries |
| 742 | # where possible to reduce ROM size. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 743 | 'use_system_libjpeg%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 744 | }], |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 745 | |
[email protected] | 5be161f | 2013-06-18 11:09:33 | [diff] [blame] | 746 | # Do not enable the Settings App on ChromeOS. |
| 747 | ['enable_app_list==1 and chromeos==0', { |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 748 | 'enable_settings_app%': 1, |
| 749 | }, { |
| 750 | 'enable_settings_app%': 0, |
| 751 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 752 | |
| 753 | ['OS=="linux" and target_arch=="arm" and chromeos==0', { |
| 754 | # Set some defaults for arm/linux chrome builds |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 755 | 'linux_use_tcmalloc%': 0, |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 756 | # sysroot needs to be an absolute path otherwise it generates |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 757 | # incorrect results when passed to pkg-config |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 758 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 759 | }], # OS=="linux" and target_arch=="arm" and chromeos==0 |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 760 | |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 761 | ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 762 | 'conditions': [ |
| 763 | ['target_arch=="x64"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 764 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 765 | }], |
| 766 | ['target_arch=="ia32"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 767 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 768 | }], |
| 769 | ], |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 770 | }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 771 | |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 772 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | f147893 | 2013-03-05 20:50:07 | [diff] [blame] | 773 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 774 | 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 775 | }], |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 776 | |
| 777 | # Whether tests targets should be run, archived or just have the |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 778 | # dependencies verified. All the tests targets have the '_run' suffix, |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 779 | # e.g. base_unittests_run runs the target base_unittests. The test |
[email protected] | 10d8ac3 | 2013-10-31 13:34:31 | [diff] [blame] | 780 | # target always calls tools/swarming_client/isolate.py. See the script's |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 781 | # --help for more information and the valid --mode values. Meant to be |
| 782 | # overriden with GYP_DEFINES. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 783 | # TODO(maruel): Remove the conditions as more configurations are |
| 784 | # supported. |
| 785 | # NOTE: The check for disable_nacl==0 and component=="static_library" |
| 786 | # can't be used here because these variables are not defined yet, but it |
| 787 | # is still not supported. |
[email protected] | e51e3565 | 2013-12-19 02:39:08 | [diff] [blame] | 788 | ['OS!="ios" and OS!="android" and chromeos==0', { |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 789 | 'test_isolation_mode%': 'check', |
| 790 | }, { |
| 791 | 'test_isolation_mode%': 'noop', |
| 792 | }], |
[email protected] | 0221139 | 2013-12-09 18:13:14 | [diff] [blame] | 793 | # Whether Android ARM or x86 build uses OpenMAX DL FFT. |
| 794 | ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', { |
| 795 | # Currently only supported on Android ARMv7+, or ia32 |
| 796 | # without webview. When enabled, this will also enable |
| 797 | # WebAudio support on Android ARM and ia32. Default is |
| 798 | # enabled. Whether WebAudio is actually available depends |
| 799 | # on runtime settings and flags. |
[email protected] | 330f3a3 | 2013-04-23 05:47:58 | [diff] [blame] | 800 | 'use_openmax_dl_fft%': 1, |
[email protected] | d29d61b | 2013-04-17 04:00:53 | [diff] [blame] | 801 | }, { |
| 802 | 'use_openmax_dl_fft%': 0, |
| 803 | }], |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 804 | ['OS=="win" or OS=="linux"', { |
| 805 | 'enable_mdns%' : 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 806 | }], |
| 807 | |
| 808 | # Turns on compiler optimizations in V8 in Debug build, except |
| 809 | # on android_clang, where we're hitting a weird linker error. |
| 810 | # TODO(dpranke): http://crbug.com/266155 . |
| 811 | ['OS=="android"', { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 812 | 'v8_optimized_debug%': 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 813 | }, { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 814 | 'v8_optimized_debug%': 2, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 815 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 816 | |
| 817 | # Disable various features by default on embedded. |
| 818 | ['embedded==1', { |
| 819 | 'remoting%': 0, |
| 820 | 'enable_printing%': 0, |
| 821 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 822 | ], |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 823 | |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 824 | # Set this to 1 to enable use of concatenated impulse responses |
| 825 | # for the HRTF panner in WebAudio. |
[email protected] | 508afb7 | 2013-05-02 22:37:26 | [diff] [blame] | 826 | 'use_concatenated_impulse_responses': 1, |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 827 | |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 828 | # You can set the variable 'use_official_google_api_keys' to 1 |
| 829 | # to use the Google-internal file containing official API keys |
| 830 | # for Google Chrome even in a developer build. Setting this |
| 831 | # variable explicitly to 1 will cause your build to fail if the |
| 832 | # internal file is missing. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 833 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 834 | # The variable is documented here, but not handled in this file; |
| 835 | # see //google_apis/determine_use_official_keys.gypi for the |
| 836 | # implementation. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 837 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 838 | # Set the variable to 0 to not use the internal file, even when |
| 839 | # it exists in your checkout. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 840 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 841 | # Leave it unset in your include.gypi to have the variable |
| 842 | # implicitly set to 1 if you have |
| 843 | # src/google_apis/internal/google_chrome_api_keys.h in your |
| 844 | # checkout, and implicitly set to 0 if not. |
| 845 | # |
| 846 | # Note that official builds always behave as if the variable |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 847 | # was explicitly set to 1, i.e. they always use official keys, |
| 848 | # and will fail to build if the internal file is missing. |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 849 | # |
| 850 | # NOTE: You MUST NOT explicitly set the variable to 2 in your |
| 851 | # include.gypi or by other means. Due to subtleties of GYP, this |
| 852 | # is not the same as leaving the variable unset, even though its |
| 853 | # default value in |
| 854 | # //google_apis/determine_use_official_keys.gypi is 2. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 855 | |
| 856 | # Set these to bake the specified API keys and OAuth client |
| 857 | # IDs/secrets into your build. |
| 858 | # |
| 859 | # If you create a build without values baked in, you can instead |
| 860 | # set environment variables to provide the keys at runtime (see |
| 861 | # src/google_apis/google_api_keys.h for details). Features that |
| 862 | # require server-side APIs may fail to work if no keys are |
| 863 | # provided. |
| 864 | # |
| 865 | # Note that if you are building an official build or if |
| 866 | # use_official_google_api_keys has been set to 1 (explicitly or |
| 867 | # implicitly), these values will be ignored and the official |
| 868 | # keys will be used instead. |
| 869 | 'google_api_key%': '', |
| 870 | 'google_default_client_id%': '', |
| 871 | 'google_default_client_secret%': '', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 872 | }, |
| 873 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 874 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 875 | 'branding%': '<(branding)', |
| 876 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 877 | 'target_arch%': '<(target_arch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 878 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 879 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 880 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 881 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 882 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 883 | 'use_cras%': '<(use_cras)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 884 | 'use_openssl%': '<(use_openssl)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 885 | 'use_nss%': '<(use_nss)', |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 886 | 'use_udev%': '<(use_udev)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 887 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 888 | 'os_posix%': '<(os_posix)', |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 889 | 'use_dbus%': '<(use_dbus)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 890 | 'use_glib%': '<(use_glib)', |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 891 | 'use_pango%': '<(use_pango)', |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 892 | 'use_cairo%': '<(use_cairo)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 893 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 894 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 895 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 896 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 897 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 898 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 899 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 900 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 901 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 902 | 'chromeos%': '<(chromeos)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 903 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 904 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 6155e70 | 2012-05-02 17:56:06 | [diff] [blame] | 905 | 'enable_touch_ui%': '<(enable_touch_ui)', |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 906 | 'use_xi2_mt%':'<(use_xi2_mt)', |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 907 | 'file_manager_extension%': '<(file_manager_extension)', |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 908 | 'image_loader_extension%': '<(image_loader_extension)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 909 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 910 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 911 | 'logging_like_official_build%': '<(logging_like_official_build)', |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 912 | 'tracing_like_official_build%': '<(tracing_like_official_build)', |
[email protected] | a76fe1a | 2010-03-01 23:39:36 | [diff] [blame] | 913 | 'python_ver%': '<(python_ver)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 914 | 'arm_version%': '<(arm_version)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 915 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 916 | 'arm_neon_optional%': '<(arm_neon_optional)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 917 | 'sysroot%': '<(sysroot)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 918 | 'system_libdir%': '<(system_libdir)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 919 | 'component%': '<(component)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 920 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 921 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 922 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 923 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 924 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 925 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 926 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 927 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 928 | 'input_speech%': '<(input_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 929 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 930 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 931 | 'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 932 | 'asan%': '<(asan)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 933 | 'asan_coverage%': '<(asan_coverage)', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 934 | 'lsan%': '<(lsan)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 935 | 'msan%': '<(msan)', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 936 | 'msan_blacklist%': '<(msan_blacklist)', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 937 | 'tsan%': '<(tsan)', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 938 | 'tsan_blacklist%': '<(tsan_blacklist)', |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 939 | 'use_instrumented_libraries%': '<(use_instrumented_libraries)', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 940 | 'use_custom_libcxx%': '<(use_custom_libcxx)', |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 941 | 'clang_type_profiler%': '<(clang_type_profiler)', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 942 | 'order_profiling%': '<(order_profiling)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 943 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 944 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 945 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 946 | 'enable_plugins%': '<(enable_plugins)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 947 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 948 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 949 | 'enable_autofill_dialog%': '<(enable_autofill_dialog)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 950 | 'enable_background%': '<(enable_background)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 951 | 'linux_use_gold_binary%': '<(linux_use_gold_binary)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 952 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 953 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0ef3a52 | 2012-05-15 14:56:33 | [diff] [blame] | 954 | 'test_isolation_mode%': '<(test_isolation_mode)', |
| 955 | 'test_isolation_outdir%': '<(test_isolation_outdir)', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 956 | 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 957 | 'enable_automation%': '<(enable_automation)', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 958 | 'enable_printing%': '<(enable_printing)', |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 959 | 'enable_spellcheck%': '<(enable_spellcheck)', |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 960 | 'enable_google_now%': '<(enable_google_now)', |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 961 | 'cld_version%': '<(cld_version)', |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 962 | 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 963 | 'disable_ftp_support%': '<(disable_ftp_support)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 964 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 965 | 'sas_dll_path%': '<(sas_dll_path)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 966 | 'wix_path%': '<(wix_path)', |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 967 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 968 | 'use_system_libjpeg%': '<(use_system_libjpeg)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 969 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 5660f19 | 2013-04-02 16:55:46 | [diff] [blame] | 970 | 'gyp_managed_install%': 0, |
[email protected] | 97d63ec | 2013-06-25 18:42:07 | [diff] [blame] | 971 | 'create_standalone_apk%': 1, |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 972 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 973 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 974 | 'enable_settings_app%': '<(enable_settings_app)', |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 975 | 'google_api_key%': '<(google_api_key)', |
| 976 | 'google_default_client_id%': '<(google_default_client_id)', |
| 977 | 'google_default_client_secret%': '<(google_default_client_secret)', |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 978 | 'enable_managed_users%': '<(enable_managed_users)', |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 979 | 'native_discardable_memory%': '<(native_discardable_memory)', |
| 980 | 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 981 | 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 982 | 'data_reduction_dev_host%': '<(data_reduction_dev_host)', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 983 | 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', |
| 984 | 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 985 | 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 986 | 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 987 | 'enable_mdns%' : '<(enable_mdns)', |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 988 | 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)', |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 989 | 'v8_optimized_debug%': '<(v8_optimized_debug)', |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 990 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 991 | 'use_goma%': '<(use_goma)', |
| 992 | 'gomadir%': '<(gomadir)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 993 | |
[email protected] | c486e4e | 2013-01-08 16:49:07 | [diff] [blame] | 994 | # Use system nspr instead of the bundled one. |
| 995 | 'use_system_nspr%': 0, |
| 996 | |
[email protected] | 2f32567 | 2012-10-31 23:29:37 | [diff] [blame] | 997 | # Use system protobuf instead of bundled one. |
| 998 | 'use_system_protobuf%': 0, |
| 999 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 1000 | # Use system yasm instead of bundled one. |
| 1001 | 'use_system_yasm%': 0, |
| 1002 | |
[email protected] | ea02e96 | 2013-04-26 11:18:16 | [diff] [blame] | 1003 | # Use system ICU instead of bundled one. |
| 1004 | 'use_system_icu%' : 0, |
| 1005 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 1006 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 1007 | # able to turn it off for various reasons. |
| 1008 | 'linux_disable_pie%': 0, |
| 1009 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 1010 | # The release channel that this build targets. This is used to restrict |
| 1011 | # channel-specific build options, like which installer packages to create. |
| 1012 | # The default is 'all', which does no channel-specific filtering. |
| 1013 | 'channel%': 'all', |
| 1014 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1015 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 1016 | # precompiled headers on the Mac. Prefix header injection may still be |
| 1017 | # used, but prefix headers will not be precompiled. This is useful when |
| 1018 | # using distcc to distribute a build to compile slaves that don't |
| 1019 | # share the same compiler executable as the system driving the compilation, |
| 1020 | # because precompiled headers rely on pointers into a specific compiler |
| 1021 | # executable's image. Setting this to 0 is needed to use an experimental |
| 1022 | # Linux-Mac cross compiler distcc farm. |
| 1023 | 'chromium_mac_pch%': 1, |
| 1024 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1025 | # The default value for mac_strip in target_defaults. This cannot be |
| 1026 | # set there, per the comment about variable% in a target_defaults. |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1027 | 'mac_strip_release%': 0, |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1028 | |
[email protected] | c0a1277 | 2013-08-22 00:08:31 | [diff] [blame] | 1029 | # Set to 1 to enable java code coverage. Instruments classes during build |
| 1030 | # to produce .ec files during runtime. |
| 1031 | 'emma_coverage%': 0, |
| 1032 | |
[email protected] | 9662d92 | 2013-10-04 22:02:44 | [diff] [blame] | 1033 | # EMMA filter string consisting of a list of inclusion/exclusion patterns |
| 1034 | # separated with whitespace and/or comma. Only has effect if |
| 1035 | # 'emma_coverage=1'. |
| 1036 | 'emma_filter%': '', |
| 1037 | |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1038 | # Set to 1 to enable running Android lint on java/class files. |
[email protected] | 2219b75 | 2014-01-10 22:42:57 | [diff] [blame] | 1039 | 'android_lint%': 0, |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1040 | |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 1041 | # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
| 1042 | # This is useful for parallel compilation tools which can't support /Zi. |
| 1043 | # Only used on Windows. |
| 1044 | 'win_z7%' : 0, |
| 1045 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 1046 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1047 | # environment variable, the libcmt shim it uses sometimes gets in |
| 1048 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 1049 | # 'win_use_allocator_shim': 0, |
| 1050 | # 'win_release_RuntimeLibrary': 2 |
| 1051 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1052 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 1053 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 1054 | # TODO(bradnelson): eliminate this when possible. |
| 1055 | # To allow local gyp files to prevent release.vsprops from being included. |
| 1056 | # Yes(1) means include release.vsprops. |
| 1057 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 1058 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1059 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1060 | # TODO(bradnelson): eliminate this when possible. |
| 1061 | # To allow local gyp files to override additional linker options for msvs. |
| 1062 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1063 | 'msvs_use_common_linker_extras%': 1, |
| 1064 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 1065 | # TODO(sgk): eliminate this if possible. |
| 1066 | # It would be nicer to support this via a setting in 'target_defaults' |
| 1067 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 1068 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 1069 | # but that doesn't work as we'd like. |
| 1070 | 'msvs_debug_link_incremental%': '2', |
| 1071 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 1072 | # Needed for some of the largest modules. |
| 1073 | 'msvs_debug_link_nonincremental%': '1', |
| 1074 | |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1075 | # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1076 | # to get incremental linking to be faster in debug builds. |
[email protected] | 8f1da83d | 2012-08-06 21:49:26 | [diff] [blame] | 1077 | 'incremental_chrome_dll%': '0', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1078 | |
[email protected] | 1ff6429 | 2013-07-18 20:37:15 | [diff] [blame] | 1079 | # Experimental setting to break chrome.dll into multiple pieces based on |
| 1080 | # process type. |
| 1081 | 'chrome_multiple_dll%': '0', |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1082 | |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 1083 | # The default settings for third party code for treating |
| 1084 | # warnings-as-errors. Ideally, this would not be required, however there |
| 1085 | # is some third party code that takes a long time to fix/roll. So, this |
| 1086 | # flag allows us to have warnings as errors in general to prevent |
| 1087 | # regressions in most modules, while working on the bits that are |
| 1088 | # remaining. |
| 1089 | 'win_third_party_warn_as_error%': 'true', |
| 1090 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1091 | # Clang stuff. |
| 1092 | 'clang%': '<(clang)', |
[email protected] | e4ddf33 | 2011-10-20 21:52:24 | [diff] [blame] | 1093 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1094 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1095 | # These two variables can be set in GYP_DEFINES while running |
| 1096 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 1097 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 1098 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 1099 | # 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] | 1100 | |
| 1101 | 'clang_load%': '', |
| 1102 | 'clang_add_plugin%': '', |
| 1103 | |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 1104 | # Tell ld64 to write map files describing binary layout. Useful |
| 1105 | # for looking at what contributes to binary size, e.g. with |
| 1106 | # https://github.com/nico/bloat |
| 1107 | 'mac_write_linker_maps%': 0, |
| 1108 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1109 | # The default type of gtest. |
| 1110 | 'gtest_target_type%': 'executable', |
| 1111 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1112 | # Enable sampling based profiler. |
| 1113 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 1114 | 'profiling%': '0', |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 1115 | # Profile without optimizing out stack frames when profiling==1. |
| 1116 | 'profiling_full_stack_frames%': '0', |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1117 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1118 | # And if we want to dump symbols for Breakpad-enabled builds. |
[email protected] | 8ebfecb | 2013-11-14 05:30:31 | [diff] [blame] | 1119 | 'linux_dump_symbols%': 0, |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1120 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1121 | 'linux_strip_binary%': 0, |
[email protected] | 1d87c28 | 2010-09-15 22:24:49 | [diff] [blame] | 1122 | # Strip the test binaries needed for Linux reliability tests. |
| 1123 | 'linux_strip_reliability_tests%': 0, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1124 | # If we want stack unwind support for backtrace(). |
| 1125 | 'debug_unwind_tables%': 1, |
| 1126 | 'release_unwind_tables%': 1, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1127 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 1128 | # Enable TCMalloc. |
| 1129 | 'linux_use_tcmalloc%': 1, |
[email protected] | 3c8fe548 | 2013-05-22 15:17:03 | [diff] [blame] | 1130 | 'android_use_tcmalloc%': 0, |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 1131 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1132 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 1133 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1134 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 1135 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1136 | |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1137 | # Default arch variant for MIPS. |
| 1138 | 'mips_arch_variant%': 'mips32r2', |
| 1139 | |
[email protected] | a63e8d2 | 2013-03-23 16:17:08 | [diff] [blame] | 1140 | # Enable use of OpenMAX DL FFT routines. |
| 1141 | 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 1142 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1143 | # Enable new NPDevice API. |
| 1144 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1145 | |
| 1146 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 1147 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1148 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1149 | # .gyp files or targets should set chromium_code to 1 if they build |
| 1150 | # Chromium-specific code, as opposed to external code. This variable is |
| 1151 | # used to control such things as the set of warnings to enable, and |
| 1152 | # whether warnings are treated as errors. |
| 1153 | 'chromium_code%': 0, |
| 1154 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1155 | 'release_valgrind_build%': 0, |
| 1156 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1157 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1158 | 'enable_wexit_time_destructors%': 0, |
| 1159 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1160 | # Set to 1 to compile with the built in pdf viewer. |
| 1161 | 'internal_pdf%': 0, |
| 1162 | |
[email protected] | 9e1149d7 | 2012-07-24 01:27:17 | [diff] [blame] | 1163 | # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
| 1164 | 'internal_gles2_conform_tests%': 0, |
| 1165 | |
[email protected] | 5c18edd | 2013-11-19 22:04:11 | [diff] [blame] | 1166 | # Set to 1 to compile the filter fuzzer. |
| 1167 | 'internal_filter_fuzzer%': 0, |
| 1168 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1169 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 1170 | # so Cocoa is happy (http://crbug.com/20441). |
| 1171 | 'locales': [ |
| 1172 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 1173 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 1174 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1175 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1176 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 1177 | 'vi', 'zh-CN', 'zh-TW', |
| 1178 | ], |
| 1179 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 1180 | # Pseudo locales are special locales which are used for testing and |
| 1181 | # debugging. They don't get copied to the final app. For more info, |
| 1182 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 1183 | 'pseudo_locales': [ |
| 1184 | 'fake-bidi', |
| 1185 | ], |
| 1186 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1187 | 'grit_defines': [], |
| 1188 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 1189 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 1190 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 1191 | # is stored in resources.pak. It is still possible to load JS files |
| 1192 | # from disk by passing --debug-devtools cmdline switch. |
| 1193 | 'debug_devtools%': 0, |
| 1194 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1195 | # The Java Bridge is not compiled in by default. |
| 1196 | 'java_bridge%': 0, |
| 1197 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1198 | # Code signing for iOS binaries. The bots need to be able to disable this. |
| 1199 | 'chromium_ios_signing%': 1, |
| 1200 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 1201 | # This flag is only used when disable_nacl==0 and disables all those |
| 1202 | # subcomponents which would require the installation of a native_client |
| 1203 | # untrusted toolchain. |
| 1204 | 'disable_nacl_untrusted%': 0, |
| 1205 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1206 | # Disable Dart by default. |
| 1207 | 'enable_dart%': 0, |
| 1208 | |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 1209 | # The desired version of Windows SDK can be set in ~/.gyp/include.gypi. |
| 1210 | 'msbuild_toolset%': '', |
| 1211 | |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 1212 | # Native Client is enabled by default. |
| 1213 | 'disable_nacl%': 0, |
| 1214 | |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 1215 | # Portable Native Client is enabled by default. |
| 1216 | 'disable_pnacl%': 0, |
| 1217 | |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 1218 | # Whether to build full debug version for Debug configuration on Android. |
| 1219 | # Compared to full debug version, the default Debug configuration on Android |
| 1220 | # has no full v8 debug, has size optimization and linker gc section, so that |
| 1221 | # we can build a debug version with acceptable size and performance. |
| 1222 | 'android_full_debug%': 0, |
| 1223 | |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1224 | # Sets the default version name and code for Android app, by default we |
| 1225 | # do a developer build. |
| 1226 | 'android_app_version_name%': 'Developer Build', |
| 1227 | 'android_app_version_code%': 0, |
| 1228 | |
[email protected] | 014d1ff1 | 2013-07-02 01:52:33 | [diff] [blame] | 1229 | # Contains data about the attached devices for gyp_managed_install. |
| 1230 | 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', |
| 1231 | |
[email protected] | 5152831 | 2013-09-24 07:36:19 | [diff] [blame] | 1232 | 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")', |
| 1233 | 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1234 | |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1235 | 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
| 1236 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 1237 | |
[email protected] | fd6d882 | 2012-12-08 06:56:11 | [diff] [blame] | 1238 | # Whether we are using the rlz library or not. Platforms like Android send |
| 1239 | # rlz codes for searches but do not use the library. |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1240 | 'enable_rlz%': 0, |
| 1241 | |
[email protected] | 3b4038e | 2013-07-28 08:59:54 | [diff] [blame] | 1242 | # Turns on the i18n support in V8. |
| 1243 | 'v8_enable_i18n_support': 1, |
| 1244 | |
[email protected] | 6a69491 | 2014-01-17 14:17:40 | [diff] [blame] | 1245 | # Compile d8 for the host toolset. |
| 1246 | 'v8_toolset_for_d8': 'host', |
| 1247 | |
[email protected] | d98df12 | 2013-08-12 13:56:43 | [diff] [blame] | 1248 | # Use the chromium skia by default. |
| 1249 | 'use_system_skia%': '0', |
| 1250 | |
[email protected] | 2c14260f | 2013-09-11 11:48:22 | [diff] [blame] | 1251 | # Use brlapi from brltty for braille display support. |
| 1252 | 'use_brlapi%': 0, |
| 1253 | |
[email protected] | c66b5aa | 2013-09-12 13:29:41 | [diff] [blame] | 1254 | # Relative path to icu.gyp from this file. |
| 1255 | 'icu_gyp_path': '../third_party/icu/icu.gyp', |
| 1256 | |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 1257 | # IPC fuzzer is disabled by default. |
| 1258 | 'enable_ipc_fuzzer%': 0, |
| 1259 | |
[email protected] | f35bcea8 | 2013-12-04 04:37:06 | [diff] [blame] | 1260 | # Whether or not to use "icu*.dat" file for ICU data. |
| 1261 | # Do not use it by default. |
| 1262 | 'icu_use_data_file_flag%': 0, |
| 1263 | |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 1264 | # Force disable libstdc++ debug mode. |
| 1265 | 'disable_glibcxx_debug%': 0, |
| 1266 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1267 | 'conditions': [ |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1268 | # The version of GCC in use, set later in platforms that use GCC and have |
| 1269 | # not explicitly chosen to build with clang. Currently, this means all |
| 1270 | # platforms except Windows, Mac and iOS. |
| 1271 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| 1272 | # it takes effect here. |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1273 | ['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] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1274 | 'conditions': [ |
| 1275 | ['OS=="android"', { |
| 1276 | # We directly set the gcc_version since we know what we use. |
| 1277 | 'gcc_version%': 46, |
| 1278 | }, { |
| 1279 | 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
| 1280 | }], |
| 1281 | ], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1282 | }, { |
| 1283 | 'gcc_version%': 0, |
| 1284 | }], |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1285 | ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { |
| 1286 | 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| 1287 | }, { |
| 1288 | 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
| 1289 | }], |
| 1290 | ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', { |
| 1291 | 'directx_sdk_path%': '<(directx_sdk_default_path)', |
| 1292 | }, { |
| 1293 | 'directx_sdk_path%': '$(DXSDK_DIR)', |
| 1294 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1295 | ['OS=="win"', { |
| 1296 | 'windows_driver_kit_path%': '$(WDK_DIR)', |
| 1297 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1298 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1299 | 'conditions': [ |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1300 | ['target_arch=="mipsel"', { |
| 1301 | 'werror%': '', |
| 1302 | 'disable_nacl%': 1, |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1303 | 'nacl_untrusted_build%': 0, |
| 1304 | 'linux_use_tcmalloc%': 0, |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 1305 | }], |
| 1306 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1307 | 'sysroot%': '<(sysroot)', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 1308 | 'CXX%': '<(CXX)', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1309 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1310 | # All Chrome builds have breakpad symbols, but only process the |
| 1311 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 1312 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1313 | 'linux_dump_symbols%': 1, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1314 | |
| 1315 | # Omit unwind support in official release builds to save space. We |
| 1316 | # can use breakpad for these builds. |
| 1317 | 'release_unwind_tables%': 0, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1318 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1319 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1320 | }], # os_posix==1 and OS!="mac" and OS!="ios" |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 1321 | ['OS=="ios"', { |
| 1322 | 'disable_nacl%': 1, |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 1323 | 'enable_background%': 0, |
[email protected] | a35aa36 | 2012-10-30 13:55:07 | [diff] [blame] | 1324 | 'enable_task_manager%': 0, |
[email protected] | abde673 | 2012-08-16 16:10:35 | [diff] [blame] | 1325 | 'icu_use_data_file_flag%': 1, |
[email protected] | 4e3996f9 | 2012-07-17 10:41:13 | [diff] [blame] | 1326 | 'use_system_libxml%': 1, |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 1327 | 'use_system_sqlite%': 1, |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1328 | 'locales==': [ |
[email protected] | 47cf7a3 | 2013-09-03 22:16:39 | [diff] [blame] | 1329 | 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX', |
| 1330 | 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', |
| 1331 | 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', |
| 1332 | 'vi', 'zh-CN', 'zh-TW', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1333 | ], |
[email protected] | 57871bc | 2012-08-20 16:28:12 | [diff] [blame] | 1334 | |
| 1335 | # The Mac SDK is set for iOS builds and passed through to Mac |
| 1336 | # sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
| 1337 | # overridden from the command line the same way it is for a Mac build. |
| 1338 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1339 | |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1340 | # iOS SDK and deployment target support. The |ios_sdk| value is left |
| 1341 | # blank so that when it is set in the project files it will be the |
| 1342 | # "current" iOS SDK. Forcing a specific SDK even if it is "current" |
| 1343 | # causes Xcode to spit out a warning for every single project file for |
| 1344 | # not using the "current" SDK. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1345 | 'ios_sdk%': '', |
| 1346 | 'ios_sdk_path%': '', |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1347 | 'ios_deployment_target%': '6.0', |
[email protected] | fcd63418 | 2012-10-09 10:50:32 | [diff] [blame] | 1348 | |
| 1349 | 'conditions': [ |
| 1350 | # ios_product_name is set to the name of the .app bundle as it should |
| 1351 | # appear on disk. |
| 1352 | ['branding=="Chrome"', { |
| 1353 | 'ios_product_name%': 'Chrome', |
| 1354 | }, { # else: branding!="Chrome" |
| 1355 | 'ios_product_name%': 'Chromium', |
| 1356 | }], |
| 1357 | ['branding=="Chrome" and buildtype=="Official"', { |
| 1358 | 'ios_breakpad%': 1, |
| 1359 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 1360 | 'ios_breakpad%': 0, |
| 1361 | }], |
| 1362 | ], |
| 1363 | }], # OS=="ios" |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1364 | ['OS=="android"', { |
| 1365 | # Location of Android NDK. |
| 1366 | 'variables': { |
| 1367 | 'variables': { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1368 | # Unfortuantely we have to use absolute paths to the SDK/NDK beause |
| 1369 | # they're passed to ant which uses a different relative path from |
| 1370 | # gyp. |
| 1371 | 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', |
| 1372 | 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', |
| 1373 | 'android_host_arch%': '<!(uname -m)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1374 | # Android API-level of the SDK used for compilation. |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1375 | 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})', |
| 1376 | # Android SDK build tools (e.g. dx, aapt, aidl) |
| 1377 | 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1378 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1379 | # Copy conditionally-set variables out one scope. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1380 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1381 | 'android_sdk_root%': '<(android_sdk_root)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1382 | 'android_sdk_version%': '<(android_sdk_version)', |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1383 | 'android_sdk_tools%': '<(android_sdk_tools)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1384 | 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1385 | |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1386 | 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1387 | |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1388 | # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1389 | # platform requirement for Chrome on Android, we use it for native |
| 1390 | # code compilation. |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1391 | 'conditions': [ |
| 1392 | ['target_arch == "ia32"', { |
| 1393 | 'android_app_abi%': 'x86', |
| 1394 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1395 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1396 | 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1397 | }], |
| 1398 | ['target_arch=="arm"', { |
| 1399 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1400 | ['arm_version<7', { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1401 | 'android_app_abi%': 'armeabi', |
| 1402 | }, { |
| 1403 | 'android_app_abi%': 'armeabi-v7a', |
| 1404 | }], |
| 1405 | ], |
| 1406 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1407 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1408 | 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1409 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1410 | ['target_arch == "mipsel"', { |
| 1411 | 'android_app_abi%': 'mips', |
| 1412 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', |
| 1413 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', |
[email protected] | 7a956a6 | 2013-05-10 16:40:47 | [diff] [blame] | 1414 | '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] | 1415 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1416 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1417 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1418 | # Copy conditionally-set variables out one scope. |
| 1419 | 'android_app_abi%': '<(android_app_abi)', |
| 1420 | 'android_gdbserver%': '<(android_gdbserver)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1421 | 'android_ndk_root%': '<(android_ndk_root)', |
| 1422 | 'android_ndk_sysroot': '<(android_ndk_sysroot)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1423 | 'android_sdk_root%': '<(android_sdk_root)', |
| 1424 | 'android_sdk_version%': '<(android_sdk_version)', |
| 1425 | 'android_toolchain%': '<(android_toolchain)', |
| 1426 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1427 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
| 1428 | 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1429 | 'android_sdk_tools%': '<(android_sdk_tools)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1430 | 'android_sdk%': '<(android_sdk)', |
| 1431 | 'android_sdk_jar%': '<(android_sdk)/android.jar', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1432 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1433 | 'android_stlport_root': '<(android_stlport_root)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1434 | 'android_stlport_include': '<(android_stlport_root)/stlport', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1435 | 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1436 | |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 1437 | # Location of the "strip" binary, used by both gyp and scripts. |
| 1438 | 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1439 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1440 | # Location of the "readelf" binary. |
| 1441 | 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| 1442 | |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1443 | # Determines whether we should optimize JNI generation at the cost of |
| 1444 | # breaking assumptions in the build system that when inputs have changed |
| 1445 | # the outputs should always change as well. This is meant purely for |
| 1446 | # developer builds, to avoid spurious re-linking of native files. |
| 1447 | 'optimize_jni_generation%': 0, |
| 1448 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1449 | # Always uses openssl. |
| 1450 | 'use_openssl%': 1, |
| 1451 | |
| 1452 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1453 | 'enable_task_manager%': 0, |
[email protected] | 23a30e6 | 2012-12-01 03:39:07 | [diff] [blame] | 1454 | 'safe_browsing%': 2, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1455 | 'input_speech%': 0, |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1456 | 'enable_automation%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1457 | 'java_bridge%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1458 | 'build_ffmpegsumo%': 0, |
| 1459 | 'linux_use_tcmalloc%': 0, |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1460 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1461 | # Disable Native Client. |
| 1462 | 'disable_nacl%': 1, |
| 1463 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1464 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1465 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1466 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1467 | # Sessions are store separately in the Java side. |
| 1468 | 'enable_session_service%': 0, |
| 1469 | |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1470 | # Set to 1 once we have a notification system for Android. |
| 1471 | # http://crbug.com/115320 |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1472 | 'notifications%': 0, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1473 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1474 | 'p2p_apis%' : 0, |
| 1475 | |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1476 | 'gtest_target_type%': 'shared_library', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1477 | |
| 1478 | # Uses system APIs for decoding audio and video. |
| 1479 | 'use_libffmpeg%': '0', |
| 1480 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1481 | # When building as part of the Android system, use system libraries |
| 1482 | # where possible to reduce ROM size. |
| 1483 | # TODO(steveblock): Investigate using the system version of sqlite. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1484 | 'use_system_sqlite%': 0, # '<(android_webview_build)', |
| 1485 | 'use_system_expat%': '<(android_webview_build)', |
| 1486 | 'use_system_icu%': '<(android_webview_build)', |
| 1487 | 'use_system_stlport%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1488 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1489 | # Copy it out one scope. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1490 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1491 | }], # OS=="android" |
[email protected] | b313955 | 2013-05-30 14:16:12 | [diff] [blame] | 1492 | ['android_webview_build==1', { |
| 1493 | # When building the WebView in the Android tree, jarjar will remap all |
| 1494 | # the class names, so the JNI generator needs to know this. |
| 1495 | 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
| 1496 | }], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1497 | ['OS=="mac"', { |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1498 | # Enable clang on mac by default! |
| 1499 | 'clang%': 1, |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1500 | 'conditions': [ |
| 1501 | # All Chrome builds have breakpad symbols, but only process the |
| 1502 | # symbols from official builds. |
| 1503 | ['(branding=="Chrome" and buildtype=="Official")', { |
| 1504 | 'mac_strip_release%': 1, |
| 1505 | }], |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1506 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1507 | }], # OS=="mac" |
| 1508 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1509 | 'variables': { |
| 1510 | # Mac OS X SDK and deployment target support. The SDK identifies |
| 1511 | # the version of the system headers that will be used, and |
| 1512 | # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
| 1513 | # macro. "Maximum allowed" refers to the operating system version |
| 1514 | # whose APIs are available in the headers. The deployment target |
| 1515 | # identifies the minimum system version that the built products are |
| 1516 | # expected to function on. It corresponds to the |
| 1517 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
| 1518 | # macros are available, #include <AvailabilityMacros.h>. Additional |
| 1519 | # documentation on these macros is available at |
| 1520 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 1521 | # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
| 1522 | # deployment target to 10.6. Other projects, such as O3D, may |
| 1523 | # override these defaults. |
| 1524 | |
| 1525 | # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
| 1526 | # about that is at least the specified version. In official builds, |
| 1527 | # the SDK must match mac_sdk_min exactly. If the SDK is installed |
| 1528 | # someplace that Xcode doesn't know about, set mac_sdk_path to the |
| 1529 | # path to the SDK; when set to a non-empty string, SDK detection |
| 1530 | # based on mac_sdk_min will be bypassed entirely. |
| 1531 | 'mac_sdk_min%': '10.6', |
| 1532 | 'mac_sdk_path%': '', |
| 1533 | |
| 1534 | 'mac_deployment_target%': '10.6', |
| 1535 | }, |
| 1536 | |
| 1537 | 'mac_sdk_min': '<(mac_sdk_min)', |
| 1538 | 'mac_sdk_path': '<(mac_sdk_path)', |
| 1539 | 'mac_deployment_target': '<(mac_deployment_target)', |
| 1540 | |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1541 | # Compile in Breakpad support by default so that it can be |
| 1542 | # tested, even if it is not enabled by default at runtime. |
| 1543 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1544 | 'conditions': [ |
| 1545 | # mac_product_name is set to the name of the .app bundle as it should |
| 1546 | # appear on disk. This duplicates data from |
| 1547 | # chrome/app/theme/chromium/BRANDING and |
| 1548 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 1549 | # these names into the build system. |
| 1550 | ['branding=="Chrome"', { |
| 1551 | 'mac_product_name%': 'Google Chrome', |
| 1552 | }, { # else: branding!="Chrome" |
| 1553 | 'mac_product_name%': 'Chromium', |
| 1554 | }], |
| 1555 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1556 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1557 | '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] | 1558 | # Enable uploading crash dumps. |
| 1559 | 'mac_breakpad_uploads%': 1, |
| 1560 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1561 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1562 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1563 | 'mac_keystone%': 1, |
| 1564 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1565 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1566 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1567 | 'mac_breakpad%': 0, |
| 1568 | 'mac_keystone%': 0, |
| 1569 | }], |
| 1570 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1571 | }], # OS=="mac" or OS=="ios" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1572 | ['OS=="win"', { |
| 1573 | 'conditions': [ |
[email protected] | a7a15f3 | 2013-08-06 06:09:43 | [diff] [blame] | 1574 | # This is the architecture convention used in WinSDK paths. |
| 1575 | ['target_arch=="ia32"', { |
| 1576 | 'winsdk_arch%': 'x86', |
| 1577 | },{ |
| 1578 | 'winsdk_arch%': '<(target_arch)', |
| 1579 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1580 | ['component=="shared_library"', { |
| 1581 | 'win_use_allocator_shim%': 0, |
[email protected] | 45b7c52 | 2013-08-21 06:58:22 | [diff] [blame] | 1582 | },{ |
| 1583 | # Turn on multiple dll by default on Windows when in static_library. |
| 1584 | 'chrome_multiple_dll%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1585 | }], |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1586 | ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1587 | # Only enabled by default for ninja because it's buggy in VS. |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1588 | # Not enabled for component=static_library because some targets |
| 1589 | # are too large and the toolchain fails due to the size of the |
| 1590 | # .obj files. |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1591 | 'incremental_chrome_dll%': 1, |
| 1592 | }], |
[email protected] | a96cf142 | 2013-11-08 08:55:41 | [diff] [blame] | 1593 | # Don't do incremental linking for large modules on 32-bit or when |
| 1594 | # component=static_library as the toolchain fails due to the size of |
| 1595 | # the .ilk files. |
| 1596 | ['MSVS_OS_BITS==32 or component=="static_library"', { |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1597 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 1598 | },{ |
| 1599 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 1600 | }], |
[email protected] | 7876418 | 2013-01-23 20:32:51 | [diff] [blame] | 1601 | ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', { |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1602 | 'msvs_express%': 1, |
| 1603 | 'secure_atl%': 0, |
| 1604 | },{ |
| 1605 | 'msvs_express%': 0, |
| 1606 | 'secure_atl%': 1, |
| 1607 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1608 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1609 | 'nacl_win64_defines': [ |
| 1610 | # This flag is used to minimize dependencies when building |
| 1611 | # Native Client loader for 64-bit Windows. |
| 1612 | 'NACL_WIN64', |
| 1613 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1614 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1615 | |
[email protected] | a35aa36 | 2012-10-30 13:55:07 | [diff] [blame] | 1616 | ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', { |
[email protected] | 8e553f4 | 2010-10-25 20:05:44 | [diff] [blame] | 1617 | 'use_cups%': 1, |
| 1618 | }, { |
| 1619 | 'use_cups%': 0, |
| 1620 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1621 | |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 1622 | ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', { |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1623 | 'enable_pepper_cdms%': 1, |
| 1624 | }, { |
| 1625 | 'enable_pepper_cdms%': 0, |
| 1626 | }], |
| 1627 | |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1628 | # Native Client glibc toolchain is enabled |
| 1629 | # by default except on arm and mips. |
| 1630 | ['target_arch=="arm" or target_arch=="mipsel"', { |
[email protected] | 2f7da67 | 2012-06-21 08:38:32 | [diff] [blame] | 1631 | 'disable_glibc%': 1, |
| 1632 | }, { |
| 1633 | 'disable_glibc%': 0, |
| 1634 | }], |
| 1635 | |
[email protected] | 712c3da | 2012-09-24 21:31:24 | [diff] [blame] | 1636 | # Disable SSE2 when building for ARM or MIPS. |
| 1637 | ['target_arch=="arm" or target_arch=="mipsel"', { |
| 1638 | 'disable_sse2%': 1, |
| 1639 | }, { |
| 1640 | 'disable_sse2%': '<(disable_sse2)', |
| 1641 | }], |
| 1642 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1643 | # Set the relative path from this file to the GYP file of the JPEG |
| 1644 | # library used by Chromium. |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1645 | ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
| 1646 | # Configuration for using the system libjeg is here. |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1647 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1648 | }, { |
| 1649 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 1650 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1651 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1652 | # Options controlling the use of GConf (the classic GNOME configuration |
| 1653 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 1654 | ['chromeos==1 or embedded==1', { |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1655 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1656 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1657 | }, { |
| 1658 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1659 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1660 | }], |
| 1661 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1662 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1663 | ['branding=="Chrome"', { |
| 1664 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 1665 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1666 | 'grit_defines': ['-D', '_google_chrome', |
| 1667 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1668 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1669 | 'grit_defines': ['-D', '_chromium', |
| 1670 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1671 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1672 | ['chromeos==1', { |
[email protected] | d4d81e9 | 2012-06-04 20:10:13 | [diff] [blame] | 1673 | 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1674 | }], |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 1675 | ['desktop_linux==1', { |
| 1676 | 'grit_defines': ['-D', 'desktop_linux'], |
| 1677 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1678 | ['toolkit_views==1', { |
| 1679 | 'grit_defines': ['-D', 'toolkit_views'], |
| 1680 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 1681 | ['use_aura==1', { |
| 1682 | 'grit_defines': ['-D', 'use_aura'], |
| 1683 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1684 | ['use_ash==1', { |
| 1685 | 'grit_defines': ['-D', 'use_ash'], |
| 1686 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1687 | ['use_nss==1', { |
| 1688 | 'grit_defines': ['-D', 'use_nss'], |
| 1689 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1690 | ['use_ozone==1', { |
| 1691 | 'grit_defines': ['-D', 'use_ozone'], |
| 1692 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 1693 | ['file_manager_extension==1', { |
| 1694 | 'grit_defines': ['-D', 'file_manager_extension'], |
| 1695 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1696 | ['image_loader_extension==1', { |
| 1697 | 'grit_defines': ['-D', 'image_loader_extension'], |
| 1698 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1699 | ['remoting==1', { |
| 1700 | 'grit_defines': ['-D', 'remoting'], |
| 1701 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1702 | ['use_titlecase_in_grd_files==1', { |
| 1703 | 'grit_defines': ['-D', 'use_titlecase'], |
| 1704 | }], |
[email protected] | 0221139 | 2013-12-09 18:13:14 | [diff] [blame] | 1705 | ['OS=="android" and target_arch=="ia32"', { |
| 1706 | # WebAudio on Android/x86 is disabled by default, unlike |
| 1707 | # everywhere else, so use appropriate message. |
| 1708 | 'grit_defines': ['-D', 'use_webaudio_enable_message'], |
| 1709 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1710 | ['use_third_party_translations==1', { |
| 1711 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1712 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 1713 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 1714 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1715 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1716 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1717 | ['OS=="android"', { |
[email protected] | 77e59c5 | 2013-05-21 15:29:17 | [diff] [blame] | 1718 | 'grit_defines': ['-t', 'android', |
[email protected] | 7dc7681 | 2013-03-26 07:31:57 | [diff] [blame] | 1719 | '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1720 | }], |
[email protected] | cc1f057 | 2013-07-31 05:41:03 | [diff] [blame] | 1721 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d39e386 | 2012-06-26 22:38:23 | [diff] [blame] | 1722 | 'grit_defines': ['-D', 'scale_factors=2x'], |
| 1723 | }], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1724 | ['OS == "ios"', { |
| 1725 | 'grit_defines': [ |
[email protected] | 03334690 | 2013-08-20 01:01:12 | [diff] [blame] | 1726 | '-t', 'ios', |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1727 | # iOS uses a whitelist to filter resources. |
| 1728 | '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
| 1729 | ], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1730 | |
| 1731 | # Enable clang and host builds when generating with ninja-ios. |
| 1732 | 'conditions': [ |
| 1733 | ['"<(GENERATOR)"=="ninja"', { |
| 1734 | 'clang%': 1, |
| 1735 | 'host_os%': "mac", |
| 1736 | }] |
| 1737 | ], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1738 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1739 | ['enable_extensions==1', { |
| 1740 | 'grit_defines': ['-D', 'enable_extensions'], |
| 1741 | }], |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 1742 | ['enable_plugins!=0', { |
| 1743 | |
| 1744 | 'grit_defines': ['-D', 'enable_plugins'], |
| 1745 | }], |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 1746 | ['enable_printing!=0', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1747 | 'grit_defines': ['-D', 'enable_printing'], |
| 1748 | }], |
[email protected] | c2aad54 | 2012-07-31 20:40:33 | [diff] [blame] | 1749 | ['enable_themes==1', { |
| 1750 | 'grit_defines': ['-D', 'enable_themes'], |
| 1751 | }], |
[email protected] | ef1dd506 | 2012-12-17 06:41:33 | [diff] [blame] | 1752 | ['enable_app_list==1', { |
| 1753 | 'grit_defines': ['-D', 'enable_app_list'], |
| 1754 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1755 | ['enable_settings_app==1', { |
| 1756 | 'grit_defines': ['-D', 'enable_settings_app'], |
| 1757 | }], |
[email protected] | 5411d820 | 2013-01-30 01:32:15 | [diff] [blame] | 1758 | ['enable_google_now==1', { |
| 1759 | 'grit_defines': ['-D', 'enable_google_now'], |
| 1760 | }], |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 1761 | ['use_concatenated_impulse_responses==1', { |
| 1762 | 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], |
| 1763 | }], |
[email protected] | f66ddbd | 2013-06-27 14:17:04 | [diff] [blame] | 1764 | ['enable_webrtc==1', { |
| 1765 | 'grit_defines': ['-D', 'enable_webrtc'], |
| 1766 | }], |
[email protected] | 2163eb9 | 2013-08-27 00:06:24 | [diff] [blame] | 1767 | ['enable_mdns==1', { |
| 1768 | 'grit_defines': ['-D', 'enable_mdns'], |
| 1769 | }], |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 1770 | ['enable_enhanced_bookmarks==1', { |
| 1771 | 'grit_defines': ['-D', 'enable_enhanced_bookmarks'], |
| 1772 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1773 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 7d389e2 | 2013-05-15 00:45:07 | [diff] [blame] | 1774 | 'clang_chrome_plugins_flags': [ |
| 1775 | '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 1776 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1777 | }], |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 1778 | |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 1779 | ['asan==1 and OS!="win"', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1780 | 'clang%': 1, |
| 1781 | }], |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 1782 | ['asan==1 and OS=="mac"', { |
[email protected] | 93064ee | 2013-02-11 19:25:09 | [diff] [blame] | 1783 | # TODO(glider): we do not strip ASan binaries until the dynamic ASan |
[email protected] | 2fccd42 | 2013-05-21 21:27:57 | [diff] [blame] | 1784 | # runtime is fully adopted. See http://crbug.com/242503. |
[email protected] | 93064ee | 2013-02-11 19:25:09 | [diff] [blame] | 1785 | 'mac_strip_release': 0, |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 1786 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1787 | ['lsan==1', { |
| 1788 | 'clang%': 1, |
| 1789 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1790 | ['tsan==1', { |
| 1791 | 'clang%': 1, |
| 1792 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 1793 | ['msan==1', { |
| 1794 | 'clang%': 1, |
| 1795 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1796 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1797 | ['OS=="linux" and clang_type_profiler==1', { |
| 1798 | 'clang%': 1, |
| 1799 | 'clang_use_chrome_plugins%': 0, |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 1800 | 'conditions': [ |
| 1801 | ['host_arch=="x64"', { |
| 1802 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 1803 | }], |
| 1804 | ['host_arch=="ia32"', { |
| 1805 | # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 1806 | # Clang in this directory at your own risk if needed for some |
| 1807 | # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 1808 | # usage). Any failure by this compiler should not close the tree. |
| 1809 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 1810 | }], |
| 1811 | ], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1812 | }], |
| 1813 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1814 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 1815 | # much and make the stacks harder to figure out. |
| 1816 | # |
| 1817 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 1818 | # them under a build_for_tool== condition. |
| 1819 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 1820 | # gcc flags |
| 1821 | 'mac_debug_optimization': '1', |
| 1822 | 'mac_release_optimization': '1', |
| 1823 | 'release_optimize': '1', |
| 1824 | 'no_gc_sections': 1, |
| 1825 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1826 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1827 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1828 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1829 | |
| 1830 | # MSVS flags for TSan on Pin and Windows. |
| 1831 | 'win_debug_RuntimeChecks': '0', |
| 1832 | 'win_debug_disable_iterator_debugging': '1', |
| 1833 | 'win_debug_Optimization': '1', |
| 1834 | 'win_debug_InlineFunctionExpansion': '0', |
| 1835 | 'win_release_InlineFunctionExpansion': '0', |
| 1836 | 'win_release_OmitFramePointers': '0', |
| 1837 | |
| 1838 | 'linux_use_tcmalloc': 1, |
| 1839 | 'release_valgrind_build': 1, |
| 1840 | 'werror': '', |
| 1841 | 'component': 'static_library', |
| 1842 | 'use_system_zlib': 0, |
| 1843 | }], |
| 1844 | |
| 1845 | # Build tweaks for DrMemory. |
| 1846 | # TODO(rnk): Combine with tsan config to share the builder. |
| 1847 | # http://crbug.com/108155 |
| 1848 | ['build_for_tool=="drmemory"', { |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1849 | # These runtime checks force initialization of stack vars which blocks |
| 1850 | # DrMemory's uninit detection. |
| 1851 | 'win_debug_RuntimeChecks': '0', |
[email protected] | 49605d4 | 2013-10-18 13:58:17 | [diff] [blame] | 1852 | # Iterator debugging is slow. |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1853 | 'win_debug_disable_iterator_debugging': '1', |
| 1854 | # Try to disable optimizations that mess up stacks in a release build. |
[email protected] | c13d0030 | 2012-10-18 15:45:16 | [diff] [blame] | 1855 | # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) |
| 1856 | # /O2 and /Ob0 (disable inline) cannot be used together because of a |
| 1857 | # compiler bug, so we use /Ob1 instead. |
| 1858 | 'win_release_InlineFunctionExpansion': '1', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1859 | 'win_release_OmitFramePointers': '0', |
[email protected] | 6bf3373d | 2012-08-15 22:27:50 | [diff] [blame] | 1860 | # Ditto for debug, to support bumping win_debug_Optimization. |
| 1861 | 'win_debug_InlineFunctionExpansion': 0, |
| 1862 | 'win_debug_OmitFramePointers': 0, |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1863 | # Keep the code under #ifndef NVALGRIND. |
| 1864 | 'release_valgrind_build': 1, |
| 1865 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1866 | |
[email protected] | fcc89bf | 2013-10-30 17:37:21 | [diff] [blame] | 1867 | # Enable RLZ on Win, Mac, iOS and ChromeOS. |
| 1868 | ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', { |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1869 | 'enable_rlz%': 1, |
| 1870 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1871 | |
| 1872 | # Set default compiler flags depending on ARM version. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1873 | ['arm_version==6 and android_webview_build==0', { |
| 1874 | 'arm_arch%': 'armv6', |
| 1875 | 'arm_tune%': '', |
[email protected] | 70f970d | 2013-12-16 14:11:38 | [diff] [blame] | 1876 | 'arm_fpu%': 'vfp', |
| 1877 | 'arm_float_abi%': 'softfp', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1878 | 'arm_thumb%': 0, |
| 1879 | }], |
| 1880 | ['arm_version==7 and android_webview_build==0', { |
| 1881 | 'arm_arch%': 'armv7-a', |
| 1882 | 'arm_tune%': 'cortex-a8', |
| 1883 | 'conditions': [ |
| 1884 | ['arm_neon==1', { |
| 1885 | 'arm_fpu%': 'neon', |
| 1886 | }, { |
| 1887 | 'arm_fpu%': 'vfpv3-d16', |
| 1888 | }], |
| 1889 | ], |
[email protected] | 3f85dac3 | 2013-10-29 02:38:46 | [diff] [blame] | 1890 | # Change the default to hard once the armhf transition is complete. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1891 | 'arm_float_abi%': 'softfp', |
| 1892 | 'arm_thumb%': 1, |
| 1893 | }], |
| 1894 | |
| 1895 | ['android_webview_build==1', { |
| 1896 | # The WebView build gets its cpu-specific flags from the Android build system. |
| 1897 | 'arm_arch%': '', |
| 1898 | 'arm_tune%': '', |
| 1899 | 'arm_fpu%': '', |
| 1900 | 'arm_float_abi%': '', |
| 1901 | 'arm_thumb%': 0, |
| 1902 | }], |
[email protected] | 5ac4b90 | 2013-10-22 17:21:29 | [diff] [blame] | 1903 | |
| 1904 | # Enable brlapi by default for chromeos. |
| 1905 | [ 'chromeos==1', { |
| 1906 | 'use_brlapi%': 1, |
| 1907 | }], |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 1908 | |
| 1909 | ['use_ozone==1', { |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 1910 | # This is the default platform |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 1911 | 'ozone_platform%': "test", |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 1912 | |
| 1913 | # Enable built-in ozone platforms if ozone is enabled. |
| 1914 | 'ozone_platform_dri%': 1, |
| 1915 | 'ozone_platform_test%': 1, |
[email protected] | c64a9d2 | 2013-11-07 20:10:44 | [diff] [blame] | 1916 | }, { # use_ozone==0 |
| 1917 | 'ozone_platform_dri%': 0, |
| 1918 | 'ozone_platform_test%': 0, |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 1919 | }], |
[email protected] | da7aed4 | 2013-12-17 22:28:31 | [diff] [blame] | 1920 | |
| 1921 | ['desktop_linux==1 and use_aura==1 and use_x11==1', { |
| 1922 | 'use_clipboard_aurax11%': 1, |
| 1923 | }], |
| 1924 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 1925 | ['OS=="win" and use_goma==1', { |
| 1926 | # goma doesn't support pch yet. |
| 1927 | 'chromium_win_pch': 0, |
| 1928 | # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| 1929 | 'conditions': [ |
| 1930 | ['fastbuild==0', { |
| 1931 | 'win_z7': 1, |
| 1932 | }], |
| 1933 | ], |
| 1934 | }], |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 1935 | # The seccomp-bpf sandbox is only supported on three architectures |
| 1936 | # currently. |
| 1937 | # Do not disable seccomp_bpf anywhere without talking to |
| 1938 | # [email protected]! |
| 1939 | ['((OS=="linux" or OS=="android") and ' |
| 1940 | '(target_arch=="ia32" or target_arch=="x64" or ' |
| 1941 | 'target_arch=="arm"))', { |
| 1942 | 'use_seccomp_bpf%': 1, |
| 1943 | }, { |
| 1944 | 'use_seccomp_bpf%': 0, |
| 1945 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1946 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1947 | |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 1948 | # The path to the ANGLE library. |
| 1949 | 'angle_path': '<(DEPTH)/third_party/angle', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 1950 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1951 | # List of default apps to install in new profiles. The first list contains |
| 1952 | # the source files as found in svn. The second list, used only for linux, |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1953 | # contains the destination location for each of the files. When a crx |
| 1954 | # is added or removed from the list, the chrome/browser/resources/ |
| 1955 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1956 | 'default_apps_list': [ |
| 1957 | 'browser/resources/default_apps/external_extensions.json', |
| 1958 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1959 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1960 | 'browser/resources/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 1961 | 'browser/resources/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 1962 | 'browser/resources/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1963 | ], |
| 1964 | 'default_apps_list_linux_dest': [ |
| 1965 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 1966 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1967 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1968 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 1969 | '<(PRODUCT_DIR)/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 1970 | '<(PRODUCT_DIR)/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1971 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1972 | }, |
| 1973 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1974 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1975 | # The condition that operates on chromium_code is in a target_conditions |
| 1976 | # section, and will not have access to the default fallback value of |
| 1977 | # chromium_code at the top of this file, or to the chromium_code |
| 1978 | # variable placed at the root variables scope of .gyp files, because |
| 1979 | # those variables are not set at target scope. As a workaround, |
| 1980 | # if chromium_code is not set at target scope, define it in target scope |
| 1981 | # to contain whatever value it has during early variable expansion. |
| 1982 | # That's enough to make it available during target conditional |
| 1983 | # processing. |
| 1984 | 'chromium_code%': '<(chromium_code)', |
| 1985 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1986 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 1987 | 'win_release_Optimization%': '2', # 2 = /Os |
| 1988 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1989 | |
| 1990 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1991 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 65d61e6 | 2012-06-01 21:52:11 | [diff] [blame] | 1992 | 'win_release_OmitFramePointers%': '0', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1993 | # Tri-state: blank is default, 1 on, 0 off |
| 1994 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1995 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1996 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 1997 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1998 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1999 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2000 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 2001 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2002 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2003 | # VS inserts quite a lot of extra checks to algorithms like |
| 2004 | # std::partial_sort in Debug build which make them O(N^2) |
| 2005 | # instead of O(N*logN). This is particularly slow under memory |
| 2006 | # tools like ThreadSanitizer so we want it to be disablable. |
| 2007 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
| 2008 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2009 | |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 2010 | # An application manifest fragment to declare compatibility settings for |
| 2011 | # 'executable' targets. Ignored in other target type. |
| 2012 | 'win_exe_compatibility_manifest%': |
| 2013 | '<(DEPTH)\\build\\win\\compatibility.manifest', |
| 2014 | |
| 2015 | # Set to 1 to generate external manifest instead of embedding it for |
| 2016 | # 'executable' target. Does nothing for other target type. This flag is |
| 2017 | # used to make mini_installer compatible with the component build. |
| 2018 | # See http://crbug.com/127233 |
| 2019 | 'win_use_external_manifest%': 0, |
| 2020 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2021 | 'release_extra_cflags%': '', |
| 2022 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2023 | |
| 2024 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2025 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2026 | # the non-qualified versions are widely assumed to be *nix-only |
| 2027 | 'win_release_extra_cflags%': '', |
| 2028 | 'win_debug_extra_cflags%': '', |
| 2029 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2030 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 2031 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 2032 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 2033 | # Only used by Windows build for now. Can be used to build into a |
| 2034 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 2035 | # output files in src/build/VS2010_{Debug,Release}. |
| 2036 | 'build_dir_prefix%': '', |
| 2037 | |
[email protected] | 9ac2db69 | 2012-06-08 01:01:57 | [diff] [blame] | 2038 | # Targets are by default not nacl untrusted code. |
| 2039 | 'nacl_untrusted_build%': 0, |
| 2040 | |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2041 | 'pnacl_compile_flags': [ |
[email protected] | 7dcd93c | 2013-11-02 02:05:53 | [diff] [blame] | 2042 | # pnacl uses the clang compiler so we need to suppress all the |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2043 | # same warnings as we do for clang. |
| 2044 | # TODO(sbc): Remove these if/when they are removed from the clang |
| 2045 | # build. |
| 2046 | '-Wno-unused-function', |
| 2047 | '-Wno-char-subscripts', |
| 2048 | '-Wno-c++11-extensions', |
| 2049 | '-Wno-unnamed-type-template-args', |
| 2050 | ], |
| 2051 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2052 | 'conditions': [ |
| 2053 | ['OS=="win" and component=="shared_library"', { |
| 2054 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 2055 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 2056 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2057 | }, { |
| 2058 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 2059 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 2060 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 2061 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2062 | ['OS=="ios"', { |
| 2063 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2064 | 'mac_release_optimization%': 's', # Use -Os unless overridden |
| 2065 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2066 | }, { |
| 2067 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2068 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
| 2069 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2070 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2071 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2072 | }, |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2073 | 'defines': [ |
[email protected] | 6d84e0b | 2013-12-05 12:16:13 | [diff] [blame] | 2074 | # Don't use deprecated V8 APIs anywhere. |
| 2075 | 'V8_DEPRECATION_WARNINGS', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2076 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2077 | 'conditions': [ |
[email protected] | d808e21 | 2013-03-12 14:06:16 | [diff] [blame] | 2078 | ['(OS=="mac" or OS=="ios") and asan==1', { |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 2079 | 'dependencies': [ |
| 2080 | '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 2081 | ], |
| 2082 | }], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2083 | ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', { |
| 2084 | 'cflags_cc!': ['-fno-rtti'], |
| 2085 | 'cflags_cc+': [ |
| 2086 | '-frtti', |
| 2087 | '-gline-tables-only', |
| 2088 | '-fintercept-allocation-functions', |
| 2089 | ], |
| 2090 | 'defines': ['TYPE_PROFILING'], |
| 2091 | 'dependencies': [ |
| 2092 | '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
| 2093 | ], |
| 2094 | }], |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 2095 | ['OS=="linux" and clang==1 and host_arch=="ia32"', { |
| 2096 | # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed. |
| 2097 | # See http://crbug.com/162818. |
| 2098 | 'cflags+': ['-Wno-sentinel'], |
| 2099 | }], |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 2100 | ['OS=="win" and "<(msbuild_toolset)"!=""', { |
| 2101 | 'msbuild_toolset': '<(msbuild_toolset)', |
| 2102 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2103 | ['branding=="Chrome"', { |
| 2104 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 2105 | }, { # else: branding!="Chrome" |
| 2106 | 'defines': ['CHROMIUM_BUILD'], |
| 2107 | }], |
[email protected] | 286d9a1 | 2012-05-30 16:20:38 | [diff] [blame] | 2108 | ['OS=="mac" and component=="shared_library"', { |
| 2109 | 'xcode_settings': { |
| 2110 | 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 2111 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 2112 | # For unbundled binaries. |
| 2113 | '@loader_path/.', |
| 2114 | # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
| 2115 | '@loader_path/../../..', |
| 2116 | ], |
| 2117 | }, |
| 2118 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2119 | ['enable_rlz==1', { |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 2120 | 'defines': ['ENABLE_RLZ'], |
| 2121 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2122 | ['component=="shared_library"', { |
| 2123 | 'defines': ['COMPONENT_BUILD'], |
| 2124 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 2125 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 2126 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 2127 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 2128 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 2129 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 2130 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 2131 | ['use_aura==1', { |
| 2132 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 2133 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2134 | ['use_ash==1', { |
| 2135 | 'defines': ['USE_ASH=1'], |
| 2136 | }], |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 2137 | ['use_cairo==1', { |
| 2138 | 'defines': ['USE_CAIRO=1'], |
| 2139 | }], |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 2140 | ['use_cras==1', { |
| 2141 | 'defines': ['USE_CRAS=1'], |
| 2142 | }], |
[email protected] | 6ec70cc7 | 2013-11-20 05:33:46 | [diff] [blame] | 2143 | ['use_glib==1', { |
| 2144 | 'defines': ['USE_GLIB=1'], |
| 2145 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2146 | ['use_ozone==1', { |
| 2147 | 'defines': ['USE_OZONE=1'], |
| 2148 | }], |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 2149 | ['use_default_render_theme==1', { |
| 2150 | 'defines': ['USE_DEFAULT_RENDER_THEME=1'], |
| 2151 | }], |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 2152 | ['use_libjpeg_turbo==1', { |
| 2153 | 'defines': ['USE_LIBJPEG_TURBO=1'], |
| 2154 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 2155 | ['use_nss==1', { |
| 2156 | 'defines': ['USE_NSS=1'], |
| 2157 | }], |
[email protected] | 2fa2f2d8 | 2013-04-29 18:13:12 | [diff] [blame] | 2158 | ['use_x11==1', { |
| 2159 | 'defines': ['USE_X11=1'], |
| 2160 | }], |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 2161 | ['use_clipboard_aurax11==1', { |
| 2162 | 'defines': ['USE_CLIPBOARD_AURAX11=1'], |
| 2163 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 2164 | ['enable_one_click_signin==1', { |
| 2165 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 2166 | }], |
[email protected] | a47aa89 | 2011-11-22 03:12:31 | [diff] [blame] | 2167 | ['toolkit_uses_gtk==1 and toolkit_views==0', { |
| 2168 | # TODO(erg): We are progressively sealing up use of deprecated features |
| 2169 | # in gtk in preparation for an eventual porting to gtk3. |
| 2170 | 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], |
| 2171 | }], |
[email protected] | fdc5bed | 2010-01-09 01:16:57 | [diff] [blame] | 2172 | ['chromeos==1', { |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 2173 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 2174 | }], |
[email protected] | 23485ba | 2013-09-15 00:50:00 | [diff] [blame] | 2175 | ['use_xi2_mt!=0 and use_x11==1', { |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 2176 | 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
| 2177 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 2178 | ['file_manager_extension==1', { |
| 2179 | 'defines': ['FILE_MANAGER_EXTENSION=1'], |
| 2180 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2181 | ['image_loader_extension==1', { |
| 2182 | 'defines': ['IMAGE_LOADER_EXTENSION=1'], |
| 2183 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2184 | ['profiling==1', { |
| 2185 | 'defines': ['ENABLE_PROFILING=1'], |
| 2186 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 2187 | ['remoting==1', { |
| 2188 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 2189 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 2190 | ['enable_webrtc==1', { |
| 2191 | 'defines': ['ENABLE_WEBRTC=1'], |
| 2192 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2193 | ['proprietary_codecs==1', { |
| 2194 | 'defines': ['USE_PROPRIETARY_CODECS'], |
| 2195 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 2196 | ['enable_viewport==1', { |
| 2197 | 'defines': ['ENABLE_VIEWPORT'], |
| 2198 | }], |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 2199 | ['enable_pepper_cdms==1', { |
| 2200 | 'defines': ['ENABLE_PEPPER_CDMS'], |
| 2201 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 2202 | ['configuration_policy==1', { |
| 2203 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 2204 | }], |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 2205 | ['input_speech==1', { |
| 2206 | 'defines': ['ENABLE_INPUT_SPEECH'], |
| 2207 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 2208 | ['notifications==1', { |
| 2209 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 2210 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 2211 | ['enable_hidpi==1', { |
| 2212 | 'defines': ['ENABLE_HIDPI=1'], |
| 2213 | }], |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 2214 | ['native_discardable_memory==1', { |
| 2215 | 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'], |
| 2216 | }], |
| 2217 | ['native_memory_pressure_signals==1', { |
| 2218 | 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'], |
| 2219 | }], |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 2220 | ['use_udev==1', { |
| 2221 | 'defines': ['USE_UDEV'], |
| 2222 | }], |
[email protected] | f35bcea8 | 2013-12-04 04:37:06 | [diff] [blame] | 2223 | ['icu_use_data_file_flag==1', { |
| 2224 | 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], |
| 2225 | }, { # else icu_use_data_file_flag !=1 |
| 2226 | 'conditions': [ |
| 2227 | ['OS=="win"', { |
| 2228 | 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'], |
| 2229 | }, { |
| 2230 | 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'], |
| 2231 | }], |
| 2232 | ], |
| 2233 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2234 | ['fastbuild!=0', { |
[email protected] | 3b0bc5e | 2013-04-24 11:42:31 | [diff] [blame] | 2235 | 'xcode_settings': { |
| 2236 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 2237 | }, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2238 | 'conditions': [ |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2239 | ['clang==1', { |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2240 | # Clang creates chubby debug information, which makes linking very |
| 2241 | # slow. For now, don't create debug information with clang. See |
| 2242 | # http://crbug.com/70000 |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2243 | 'conditions': [ |
| 2244 | ['OS=="linux"', { |
| 2245 | 'variables': { |
| 2246 | 'debug_extra_cflags': '-g0', |
| 2247 | }, |
| 2248 | }], |
| 2249 | # Android builds symbols on release by default, disable them. |
| 2250 | ['OS=="android"', { |
| 2251 | 'variables': { |
| 2252 | 'debug_extra_cflags': '-g0', |
| 2253 | 'release_extra_cflags': '-g0', |
| 2254 | }, |
| 2255 | }], |
| 2256 | ], |
| 2257 | }, { # else clang!=1 |
| 2258 | 'conditions': [ |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2259 | ['OS=="win" and fastbuild==2', { |
| 2260 | # Completely disable debug information. |
| 2261 | 'msvs_settings': { |
| 2262 | 'VCLinkerTool': { |
| 2263 | 'GenerateDebugInformation': 'false', |
| 2264 | }, |
| 2265 | 'VCCLCompilerTool': { |
| 2266 | 'DebugInformationFormat': '0', |
| 2267 | }, |
| 2268 | }, |
| 2269 | }], |
| 2270 | ['OS=="win" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2271 | 'msvs_settings': { |
| 2272 | 'VCLinkerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2273 | # This tells the linker to generate .pdbs, so that |
| 2274 | # we can get meaningful stack traces. |
| 2275 | 'GenerateDebugInformation': 'true', |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2276 | }, |
| 2277 | 'VCCLCompilerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2278 | # No debug info to be generated by compiler. |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2279 | 'DebugInformationFormat': '0', |
| 2280 | }, |
| 2281 | }, |
| 2282 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2283 | ['OS=="linux" and fastbuild==2', { |
| 2284 | 'variables': { |
| 2285 | 'debug_extra_cflags': '-g0', |
| 2286 | }, |
| 2287 | }], |
| 2288 | ['OS=="linux" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2289 | 'variables': { |
| 2290 | 'debug_extra_cflags': '-g1', |
| 2291 | }, |
| 2292 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2293 | ['OS=="android" and fastbuild==2', { |
| 2294 | 'variables': { |
| 2295 | 'debug_extra_cflags': '-g0', |
| 2296 | 'release_extra_cflags': '-g0', |
| 2297 | }, |
| 2298 | }], |
| 2299 | ['OS=="android" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2300 | 'variables': { |
| 2301 | 'debug_extra_cflags': '-g1', |
| 2302 | 'release_extra_cflags': '-g1', |
| 2303 | }, |
| 2304 | }], |
| 2305 | ], |
| 2306 | }], # clang!=1 |
| 2307 | ], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2308 | }], # fastbuild!=0 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 2309 | ['dcheck_always_on!=0', { |
| 2310 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 2311 | }], # dcheck_always_on!=0 |
[email protected] | 65b0819e | 2013-06-21 15:24:00 | [diff] [blame] | 2312 | ['logging_like_official_build!=0', { |
| 2313 | 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'], |
| 2314 | }], # logging_like_official_build!=0 |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 2315 | ['tracing_like_official_build!=0', { |
| 2316 | 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'], |
| 2317 | }], # tracing_like_official_build!=0 |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2318 | ['win_use_allocator_shim==0', { |
| 2319 | 'conditions': [ |
| 2320 | ['OS=="win"', { |
| 2321 | 'defines': ['NO_TCMALLOC'], |
| 2322 | }], |
| 2323 | ], |
| 2324 | }], |
[email protected] | b1c2a554 | 2010-10-08 12:44:40 | [diff] [blame] | 2325 | ['use_openssl==1', { |
| 2326 | 'defines': [ |
| 2327 | 'USE_OPENSSL=1', |
| 2328 | ], |
| 2329 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 2330 | ['enable_eglimage==1', { |
| 2331 | 'defines': [ |
| 2332 | 'ENABLE_EGLIMAGE=1', |
| 2333 | ], |
| 2334 | }], |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2335 | ['asan==1 and OS=="win"', { |
| 2336 | # Since asan on windows uses Syzygy, we need /PROFILE turned on to |
| 2337 | # produce appropriate pdbs. |
| 2338 | 'msvs_settings': { |
| 2339 | 'VCLinkerTool': { |
| 2340 | 'Profile': 'true', |
| 2341 | }, |
| 2342 | }, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2343 | 'defines': [ |
[email protected] | bba0fea3 | 2013-06-14 12:29:35 | [diff] [blame] | 2344 | 'ADDRESS_SANITIZER', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2345 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 2346 | ], |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2347 | }], # asan==1 and OS=="win" |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2348 | ['OS=="win"', { |
| 2349 | 'defines': [ |
| 2350 | '__STD_C', |
| 2351 | '_CRT_SECURE_NO_DEPRECATE', |
| 2352 | '_SCL_SECURE_NO_DEPRECATE', |
[email protected] | 2d0aa324 | 2012-10-22 16:23:10 | [diff] [blame] | 2353 | # This define is required to pull in the new Win8 interfaces from |
| 2354 | # system headers like ShObjIdl.h. |
| 2355 | 'NTDDI_VERSION=0x06020000', |
[email protected] | 3741674 | 2013-11-12 07:13:33 | [diff] [blame] | 2356 | # This is required for ATL to use XP-safe versions of its functions. |
| 2357 | '_USING_V110_SDK71_', |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2358 | ], |
| 2359 | 'include_dirs': [ |
| 2360 | '<(DEPTH)/third_party/wtl/include', |
| 2361 | ], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2362 | 'conditions': [ |
| 2363 | ['win_z7!=0', { |
| 2364 | 'msvs_settings': { |
[email protected] | 5146e0b | 2012-08-23 05:49:09 | [diff] [blame] | 2365 | # Generates debug info when win_z7=1 |
| 2366 | # even if fastbuild=1 (that makes GenerateDebugInformation false). |
| 2367 | 'VCLinkerTool': { |
| 2368 | 'GenerateDebugInformation': 'true', |
| 2369 | }, |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2370 | 'VCCLCompilerTool': { |
| 2371 | 'DebugInformationFormat': '1', |
| 2372 | } |
| 2373 | } |
| 2374 | }], |
[email protected] | 45a7707 | 2012-11-17 00:28:42 | [diff] [blame] | 2375 | ['"<(GENERATOR)"=="msvs"', { |
| 2376 | 'msvs_settings': { |
| 2377 | 'VCLinkerTool': { |
| 2378 | # Make the pdb name sane. Otherwise foo.exe and foo.dll both |
| 2379 | # have foo.pdb. The ninja generator already defaults to this and |
| 2380 | # can't handle the $(TargetPath) macro. |
| 2381 | 'ProgramDatabaseFile': '$(TargetPath).pdb', |
| 2382 | } |
| 2383 | }, |
| 2384 | }], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2385 | ], # win_z7!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2386 | }], # OS==win |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 2387 | ['enable_task_manager==1', { |
| 2388 | 'defines': [ |
| 2389 | 'ENABLE_TASK_MANAGER=1', |
| 2390 | ], |
| 2391 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2392 | ['enable_extensions==1', { |
| 2393 | 'defines': [ |
| 2394 | 'ENABLE_EXTENSIONS=1', |
| 2395 | ], |
| 2396 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 2397 | ['OS=="win" and branding=="Chrome"', { |
| 2398 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 2399 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 2400 | ['enable_dart==1', { |
| 2401 | 'defines': ['WEBKIT_USING_DART=1'], |
| 2402 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 2403 | ['enable_plugin_installation==1', { |
| 2404 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 2405 | }], |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 2406 | ['enable_plugins==1', { |
| 2407 | 'defines': ['ENABLE_PLUGINS=1'], |
| 2408 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 2409 | ['enable_session_service==1', { |
| 2410 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 2411 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 2412 | ['enable_themes==1', { |
| 2413 | 'defines': ['ENABLE_THEMES=1'], |
| 2414 | }], |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 2415 | ['enable_autofill_dialog==1', { |
| 2416 | 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], |
| 2417 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 2418 | ['enable_background==1', { |
| 2419 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 2420 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 2421 | ['enable_automation==1', { |
| 2422 | 'defines': ['ENABLE_AUTOMATION=1'], |
| 2423 | }], |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 2424 | ['enable_google_now==1', { |
| 2425 | 'defines': ['ENABLE_GOOGLE_NOW=1'], |
| 2426 | }], |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 2427 | ['cld_version!=0', { |
| 2428 | 'defines': ['CLD_VERSION=<(cld_version)'], |
| 2429 | }], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2430 | ['enable_printing==1', { |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2431 | 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'], |
| 2432 | }], |
| 2433 | ['enable_printing==2', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2434 | 'defines': ['ENABLE_PRINTING=1'], |
| 2435 | }], |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 2436 | ['enable_spellcheck==1', { |
| 2437 | 'defines': ['ENABLE_SPELLCHECK=1'], |
| 2438 | }], |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 2439 | ['enable_captive_portal_detection==1', { |
| 2440 | 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
| 2441 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2442 | ['enable_app_list==1', { |
| 2443 | 'defines': ['ENABLE_APP_LIST=1'], |
| 2444 | }], |
| 2445 | ['enable_settings_app==1', { |
| 2446 | 'defines': ['ENABLE_SETTINGS_APP=1'], |
| 2447 | }], |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 2448 | ['disable_ftp_support==1', { |
| 2449 | 'defines': ['DISABLE_FTP_SUPPORT=1'], |
| 2450 | }], |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 2451 | ['enable_managed_users==1', { |
| 2452 | 'defines': ['ENABLE_MANAGED_USERS=1'], |
| 2453 | }], |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 2454 | ['data_reduction_fallback_host != ""', { |
| 2455 | 'defines': [ |
| 2456 | 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'], |
| 2457 | }], |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 2458 | ['data_reduction_dev_host != ""', { |
| 2459 | 'defines': [ |
| 2460 | 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'], |
| 2461 | }], |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 2462 | ['spdy_proxy_auth_origin != ""', { |
| 2463 | 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'], |
| 2464 | }], |
| 2465 | ['spdy_proxy_auth_property != ""', { |
| 2466 | 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], |
| 2467 | }], |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 2468 | ['spdy_proxy_auth_value != ""', { |
| 2469 | 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], |
| 2470 | }], |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 2471 | ['data_reduction_proxy_probe_url != ""', { |
| 2472 | 'defines': [ |
| 2473 | 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'], |
| 2474 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 2475 | ['enable_mdns==1', { |
| 2476 | 'defines': ['ENABLE_MDNS=1'], |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 2477 | }], |
| 2478 | ['enable_enhanced_bookmarks==1', { |
| 2479 | 'defines': ['ENABLE_ENHANCED_BOOKMARKS=1'], |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 2480 | }], |
| 2481 | ['enable_ipc_fuzzer==1', { |
| 2482 | 'defines': ['ENABLE_IPC_FUZZER=1'], |
| 2483 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2484 | ], # conditions for 'target_defaults' |
| 2485 | 'target_conditions': [ |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2486 | ['enable_wexit_time_destructors==1', { |
| 2487 | 'conditions': [ |
| 2488 | [ 'clang==1', { |
| 2489 | 'cflags': [ |
| 2490 | '-Wexit-time-destructors', |
| 2491 | ], |
| 2492 | 'xcode_settings': { |
| 2493 | 'WARNING_CFLAGS': [ |
| 2494 | '-Wexit-time-destructors', |
| 2495 | ], |
| 2496 | }, |
| 2497 | }], |
| 2498 | ], |
| 2499 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2500 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2501 | 'conditions': [ |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2502 | [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2503 | # We don't want to get warnings from third-party code, |
| 2504 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2505 | 'cflags!': [ |
| 2506 | '-Wall', |
| 2507 | '-Wextra', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2508 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2509 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2510 | # Don't warn about hash_map in third-party code. |
| 2511 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2512 | ], |
| 2513 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2514 | # Don't warn about printf format problems. |
| 2515 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 2516 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2517 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2518 | 'cflags_cc!': [ |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 2519 | # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2520 | '-Wsign-compare', |
| 2521 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2522 | }], |
[email protected] | 82dd5eb3 | 2012-08-18 04:24:32 | [diff] [blame] | 2523 | # TODO: Fix all warnings on chromeos too. |
| 2524 | [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
| 2525 | 'cflags!': [ |
| 2526 | '-Werror', |
| 2527 | ], |
| 2528 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2529 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2530 | 'cflags': [ |
| 2531 | # Don't warn about ignoring the return value from e.g. close(). |
| 2532 | # This is off by default in some gccs but on by default in others. |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2533 | # BSD systems do not support this option, since they are usually |
| 2534 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2535 | '-Wno-unused-result', |
| 2536 | ], |
| 2537 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2538 | [ 'OS=="win"', { |
| 2539 | 'defines': [ |
| 2540 | '_CRT_SECURE_NO_DEPRECATE', |
| 2541 | '_CRT_NONSTDC_NO_WARNINGS', |
| 2542 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 2543 | '_SCL_SECURE_NO_DEPRECATE', |
| 2544 | ], |
| 2545 | 'msvs_disabled_warnings': [4800], |
| 2546 | 'msvs_settings': { |
| 2547 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 2548 | 'WarningLevel': '3', |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2549 | 'WarnAsError': '<(win_third_party_warn_as_error)', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2550 | 'Detect64BitPortabilityProblems': 'false', |
| 2551 | }, |
| 2552 | }, |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2553 | 'conditions': [ |
| 2554 | ['buildtype=="Official"', { |
| 2555 | 'msvs_settings': { |
| 2556 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 2557 | } |
| 2558 | }], |
| 2559 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2560 | }], |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2561 | # TODO(darin): Unfortunately, some third_party code depends on base. |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 2562 | [ 'OS=="win" and component=="shared_library"', { |
| 2563 | 'msvs_disabled_warnings': [ |
| 2564 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2565 | ], |
| 2566 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2567 | [ 'OS=="mac" or OS=="ios"', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2568 | 'xcode_settings': { |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 2569 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2570 | }, |
[email protected] | 3a352c36 | 2012-05-08 19:45:49 | [diff] [blame] | 2571 | 'conditions': [ |
| 2572 | ['buildtype=="Official"', { |
| 2573 | 'xcode_settings': { |
| 2574 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 2575 | }, |
| 2576 | }], |
| 2577 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2578 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2579 | [ 'OS=="ios"', { |
| 2580 | 'xcode_settings': { |
[email protected] | 7afca86 | 2012-07-11 15:11:22 | [diff] [blame] | 2581 | # TODO(ios): Fix remaining warnings in third-party code, then |
| 2582 | # remove this; the Mac cleanup didn't get everything that's |
| 2583 | # flagged in an iOS build. |
| 2584 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2585 | 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
[email protected] | 5a2637d0 | 2013-11-12 17:01:17 | [diff] [blame] | 2586 | # Several internal ios directories generate numerous warnings for |
| 2587 | # -Wobjc-missing-property-synthesis. |
| 2588 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2589 | }, |
| 2590 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2591 | ], |
| 2592 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 2593 | 'includes': [ |
| 2594 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 2595 | 'filename_rules.gypi', |
| 2596 | ], |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2597 | # In Chromium code, we define __STDC_foo_MACROS in order to get the |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2598 | # C99 macros on Mac and Linux. |
| 2599 | 'defines': [ |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2600 | '__STDC_CONSTANT_MACROS', |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2601 | '__STDC_FORMAT_MACROS', |
| 2602 | ], |
| 2603 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2604 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 2605 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 2606 | 'msvs_settings': { |
| 2607 | 'VCCLCompilerTool': { |
| 2608 | 'AdditionalOptions': ['/we4389'], |
| 2609 | }, |
| 2610 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2611 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2612 | ['OS=="win" and component=="shared_library"', { |
| 2613 | 'msvs_disabled_warnings': [ |
| 2614 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2615 | ], |
| 2616 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2617 | ], |
| 2618 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2619 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2620 | 'default_configuration': 'Debug', |
| 2621 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2622 | # VCLinkerTool LinkIncremental values below: |
| 2623 | # 0 == default |
| 2624 | # 1 == /INCREMENTAL:NO |
| 2625 | # 2 == /INCREMENTAL |
| 2626 | # Debug links incremental, Release does not. |
| 2627 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 2628 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2629 | # |
| 2630 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2631 | 'abstract': 1, |
| 2632 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 2633 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2634 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 2635 | 'CharacterSet': '1', |
| 2636 | }, |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 2637 | # Add the default import libs. |
| 2638 | 'msvs_settings':{ |
| 2639 | 'VCLinkerTool': { |
| 2640 | 'AdditionalDependencies': [ |
| 2641 | 'kernel32.lib', |
| 2642 | 'gdi32.lib', |
| 2643 | 'winspool.lib', |
| 2644 | 'comdlg32.lib', |
| 2645 | 'advapi32.lib', |
| 2646 | 'shell32.lib', |
| 2647 | 'ole32.lib', |
| 2648 | 'oleaut32.lib', |
| 2649 | 'user32.lib', |
| 2650 | 'uuid.lib', |
| 2651 | 'odbc32.lib', |
| 2652 | 'odbccp32.lib', |
[email protected] | 36bb739c | 2013-02-25 22:10:39 | [diff] [blame] | 2653 | 'delayimp.lib', |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 2654 | 'credui.lib', |
| 2655 | 'netapi32.lib', |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 2656 | ], |
| 2657 | }, |
| 2658 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2659 | }, |
| 2660 | 'x86_Base': { |
| 2661 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2662 | 'msvs_settings': { |
| 2663 | 'VCLinkerTool': { |
| 2664 | 'TargetMachine': '1', |
| 2665 | }, |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 2666 | 'VCLibrarianTool': { |
| 2667 | 'TargetMachine': '1', |
| 2668 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2669 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 2670 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2671 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2672 | 'x64_Base': { |
| 2673 | 'abstract': 1, |
| 2674 | 'msvs_configuration_platform': 'x64', |
| 2675 | 'msvs_settings': { |
| 2676 | 'VCLinkerTool': { |
| 2677 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2678 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2679 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2680 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2681 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 50f9966 | 2013-03-04 20:58:36 | [diff] [blame] | 2682 | # Doesn't exist x64 SDK. Should use oleaut32 in any case. |
| 2683 | 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2684 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 2685 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2686 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2687 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2688 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 2689 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 2690 | 'TargetMachine': '17', # x64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2691 | }, |
| 2692 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2693 | }, |
| 2694 | 'Debug_Base': { |
| 2695 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2696 | 'defines': [ |
| 2697 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 2698 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 2699 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2700 | 'xcode_settings': { |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 2701 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 2702 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 2703 | '<@(debug_extra_cflags)', |
| 2704 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2705 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2706 | 'msvs_settings': { |
| 2707 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2708 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2709 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2710 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2711 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2712 | 'conditions': [ |
| 2713 | # According to MSVS, InlineFunctionExpansion=0 means |
| 2714 | # "default inlining", not "/Ob0". |
| 2715 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 2716 | ['win_debug_InlineFunctionExpansion==0', { |
| 2717 | 'AdditionalOptions': ['/Ob0'], |
| 2718 | }], |
| 2719 | ['win_debug_InlineFunctionExpansion!=""', { |
| 2720 | 'InlineFunctionExpansion': |
| 2721 | '<(win_debug_InlineFunctionExpansion)', |
| 2722 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2723 | ['win_debug_disable_iterator_debugging==1', { |
| 2724 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 2725 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2726 | |
| 2727 | # if win_debug_OmitFramePointers is blank, leave as default |
| 2728 | ['win_debug_OmitFramePointers==1', { |
| 2729 | 'OmitFramePointers': 'true', |
| 2730 | }], |
| 2731 | ['win_debug_OmitFramePointers==0', { |
| 2732 | 'OmitFramePointers': 'false', |
| 2733 | # The above is not sufficient (http://crbug.com/106711): it |
| 2734 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 2735 | # perform FPO regardless, so we must explicitly disable. |
| 2736 | # We still want the false setting above to avoid having |
| 2737 | # "/Oy /Oy-" and warnings about overriding. |
| 2738 | 'AdditionalOptions': ['/Oy-'], |
| 2739 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2740 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2741 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2742 | }, |
| 2743 | 'VCLinkerTool': { |
| 2744 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 2745 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 2746 | # Chrome.dll share the same base name. As result, windbg will |
| 2747 | # name the Chrome.dll module like chrome_<base address>, where |
| 2748 | # <base address> typically changes with each launch. This in turn |
| 2749 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 2750 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 2751 | # Note that this is a three-way bool, where 0 means to pick up |
| 2752 | # the default setting, 1 is off and 2 is on. |
| 2753 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2754 | }, |
| 2755 | 'VCResourceCompilerTool': { |
| 2756 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 2757 | }, |
| 2758 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2759 | 'conditions': [ |
[email protected] | 78204c9 | 2012-09-14 04:42:55 | [diff] [blame] | 2760 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 2761 | 'target_conditions': [ |
| 2762 | ['_toolset=="target"', { |
| 2763 | 'cflags': [ |
| 2764 | '<@(debug_extra_cflags)', |
| 2765 | ], |
| 2766 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2767 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2768 | }], |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 2769 | ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', { |
[email protected] | a8d94b4 | 2013-12-10 18:52:22 | [diff] [blame] | 2770 | # Enable libstdc++ debugging facilities to help catch problems |
| 2771 | # early, see http://crbug.com/65151 . |
| 2772 | # TODO(phajdan.jr): Should we enable this for all of POSIX? |
| 2773 | 'defines': ['_GLIBCXX_DEBUG=1',], |
| 2774 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2775 | # Disabled on iOS because it was causing a crash on startup. |
| 2776 | # TODO(michelea): investigate, create a reduced test and possibly |
| 2777 | # submit a radar. |
| 2778 | ['release_valgrind_build==0 and OS!="ios"', { |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 2779 | 'xcode_settings': { |
| 2780 | 'OTHER_CFLAGS': [ |
| 2781 | '-fstack-protector-all', # Implies -fstack-protector |
| 2782 | ], |
| 2783 | }, |
| 2784 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2785 | ], |
| 2786 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2787 | 'Release_Base': { |
| 2788 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2789 | 'defines': [ |
| 2790 | 'NDEBUG', |
| 2791 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2792 | 'xcode_settings': { |
| 2793 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 2794 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2795 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2796 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2797 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2798 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2799 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2800 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 2801 | # In official builds, each target will self-select |
| 2802 | # an optimization level. |
| 2803 | ['buildtype!="Official"', { |
| 2804 | 'Optimization': '<(win_release_Optimization)', |
| 2805 | }, |
| 2806 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2807 | # According to MSVS, InlineFunctionExpansion=0 means |
| 2808 | # "default inlining", not "/Ob0". |
| 2809 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 2810 | ['win_release_InlineFunctionExpansion==0', { |
| 2811 | 'AdditionalOptions': ['/Ob0'], |
| 2812 | }], |
| 2813 | ['win_release_InlineFunctionExpansion!=""', { |
| 2814 | 'InlineFunctionExpansion': |
| 2815 | '<(win_release_InlineFunctionExpansion)', |
| 2816 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2817 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2818 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2819 | ['win_release_OmitFramePointers==1', { |
| 2820 | 'OmitFramePointers': 'true', |
| 2821 | }], |
| 2822 | ['win_release_OmitFramePointers==0', { |
| 2823 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2824 | # The above is not sufficient (http://crbug.com/106711): it |
| 2825 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 2826 | # perform FPO regardless, so we must explicitly disable. |
| 2827 | # We still want the false setting above to avoid having |
| 2828 | # "/Oy /Oy-" and warnings about overriding. |
| 2829 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2830 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2831 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2832 | 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2833 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2834 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 2835 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 2836 | # (i.e., inherit from parent solution), 1 means false, and |
| 2837 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2838 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 2839 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 2840 | # file contains FIXUP information (growing the PDB file by about |
| 2841 | # 5%) but does not otherwise alter the output binary. This |
| 2842 | # information is used by the Syzygy optimization tool when |
| 2843 | # decomposing the release image. |
| 2844 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2845 | }, |
| 2846 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2847 | 'conditions': [ |
[email protected] | fd3fb3bf | 2012-05-23 22:15:16 | [diff] [blame] | 2848 | ['msvs_use_common_release', { |
| 2849 | 'includes': ['release.gypi'], |
| 2850 | }], |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 2851 | ['release_valgrind_build==0 and tsan==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2852 | 'defines': [ |
| 2853 | 'NVALGRIND', |
| 2854 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 2855 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 2856 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2857 | 'defines': [ |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2858 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 2859 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 2860 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 2861 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 2862 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2863 | ['win_use_allocator_shim==0', { |
| 2864 | 'defines': ['NO_TCMALLOC'], |
| 2865 | }], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 2866 | ['os_posix==1', { |
| 2867 | 'target_conditions': [ |
| 2868 | ['chromium_code==1', { |
| 2869 | # Non-chromium code is not guaranteed to compile cleanly |
| 2870 | # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 2871 | # when optimizations are disabled, so only do that for Release |
| 2872 | # build. |
| 2873 | 'defines': [ |
| 2874 | '_FORTIFY_SOURCE=2', |
| 2875 | ], |
| 2876 | }], |
[email protected] | 37305ae | 2012-12-11 01:54:58 | [diff] [blame] | 2877 | ], |
| 2878 | }], |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2879 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 2880 | 'target_conditions': [ |
| 2881 | ['_toolset=="target"', { |
| 2882 | 'cflags': [ |
| 2883 | '<@(release_extra_cflags)', |
| 2884 | ], |
| 2885 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2886 | ], |
| 2887 | }], |
[email protected] | b64ec82 | 2013-05-23 12:57:41 | [diff] [blame] | 2888 | ['OS=="ios"', { |
| 2889 | 'defines': [ |
| 2890 | 'NS_BLOCK_ASSERTIONS=1', |
| 2891 | ], |
| 2892 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2893 | ], |
| 2894 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2895 | # |
| 2896 | # Concrete configurations |
| 2897 | # |
| 2898 | 'Debug': { |
| 2899 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 2900 | }, |
| 2901 | 'Release': { |
| 2902 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2903 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 2904 | 'conditions': [ |
| 2905 | [ 'OS=="win"', { |
| 2906 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2907 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2908 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 2909 | }, |
| 2910 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2911 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 2912 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 2913 | }], |
| 2914 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2915 | }, |
| 2916 | }, |
| 2917 | 'conditions': [ |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2918 | ['os_posix==1', { |
| 2919 | 'target_defaults': { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2920 | 'ldflags': [ |
| 2921 | '-Wl,-z,now', |
| 2922 | '-Wl,-z,relro', |
| 2923 | ], |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 2924 | }, |
| 2925 | }], |
[email protected] | d2ca75c | 2013-02-01 05:47:17 | [diff] [blame] | 2926 | ['os_posix==1 and chromeos==0', { |
| 2927 | # Chrome OS enables -fstack-protector-strong via its build wrapper, |
| 2928 | # and we want to avoid overriding this, so stack-protector is only |
| 2929 | # enabled when not building on Chrome OS. |
| 2930 | # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc |
| 2931 | # supports it. |
| 2932 | 'target_defaults': { |
| 2933 | 'cflags': [ |
| 2934 | '-fstack-protector', |
| 2935 | '--param=ssp-buffer-size=4', |
| 2936 | ], |
| 2937 | }, |
| 2938 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2939 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2940 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 2941 | # Enable -Werror by default, but put it in a variable so it can |
| 2942 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 2943 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 2944 | 'werror%': '-Werror', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2945 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 2946 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 2947 | 'defines': [ |
| 2948 | '_FILE_OFFSET_BITS=64', |
| 2949 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2950 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 2951 | '<(werror)', # See note above about the werror variable. |
| 2952 | '-pthread', |
| 2953 | '-fno-exceptions', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 2954 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 2955 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 2956 | # TODO(evan): turn this back on once all the builds work. |
| 2957 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 2958 | # Don't warn about unused function params. We use those everywhere. |
| 2959 | '-Wno-unused-parameter', |
| 2960 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 2961 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 2962 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 2963 | # Note: this is *required* to make some plugins work. |
| 2964 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 2965 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 2966 | ], |
| 2967 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 2968 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 2969 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 2970 | # Make inline functions have hidden visiblity by default. |
| 2971 | # Surprisingly, not covered by -fvisibility=hidden. |
| 2972 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 2973 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 2974 | # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 2975 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2976 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 2977 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 2978 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2979 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2980 | 'libraries' : [ |
| 2981 | '<(libraries_for_target)', |
| 2982 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2983 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2984 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 2985 | 'variables': { |
| 2986 | 'debug_optimize%': '0', |
| 2987 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2988 | 'defines': [ |
| 2989 | '_DEBUG', |
| 2990 | ], |
| 2991 | 'cflags': [ |
[email protected] | 95ad203 | 2012-08-24 00:49:25 | [diff] [blame] | 2992 | '-O>(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 2993 | '-g', |
| 2994 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2995 | 'conditions' : [ |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2996 | ['OS=="android"', { |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 2997 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 2998 | '-Wl,--fatal-warnings', |
| 2999 | # Only link with needed input sections. This is to avoid |
| 3000 | # getting undefined reference to __cxa_bad_typeid in the CDU |
| 3001 | # library. |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3002 | '-Wl,--gc-sections', |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3003 | # Warn in case of text relocations. |
| 3004 | '-Wl,--warn-shared-textrel', |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3005 | ], |
| 3006 | }], |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 3007 | ['OS=="android" and android_full_debug==0', { |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3008 | # Some configurations are copied from Release_Base to reduce |
| 3009 | # the binary size. |
| 3010 | 'variables': { |
| 3011 | 'debug_optimize%': 's', |
| 3012 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3013 | 'cflags': [ |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3014 | '-fomit-frame-pointer', |
| 3015 | '-fdata-sections', |
| 3016 | '-ffunction-sections', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3017 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3018 | 'ldflags': [ |
| 3019 | '-Wl,-O1', |
| 3020 | '-Wl,--as-needed', |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3021 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3022 | }], |
[email protected] | d4c0ec5b | 2013-03-10 03:07:45 | [diff] [blame] | 3023 | ['OS=="linux" and target_arch=="ia32"', { |
| 3024 | 'ldflags': [ |
| 3025 | '-Wl,--no-as-needed', |
| 3026 | ], |
| 3027 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3028 | ['debug_unwind_tables==1', { |
| 3029 | 'cflags': ['-funwind-tables'], |
| 3030 | }, { |
| 3031 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
| 3032 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3033 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3034 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3035 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3036 | 'variables': { |
| 3037 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3038 | # Binaries become big and gold is unable to perform GC |
| 3039 | # and remove unused sections for some of test targets |
| 3040 | # on 32 bit platform. |
| 3041 | # (This is currently observed only in chromeos valgrind bots) |
| 3042 | # The following flag is to disable --gc-sections linker |
| 3043 | # option for these bots. |
| 3044 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 3045 | |
| 3046 | # TODO(bradnelson): reexamine how this is done if we change the |
| 3047 | # expansion of configurations |
| 3048 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3049 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3050 | 'cflags': [ |
[email protected] | 296ce7ce | 2012-08-02 19:41:18 | [diff] [blame] | 3051 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 3052 | # Don't emit the GCC version ident directives, they just end up |
| 3053 | # in the .comment section taking up binary size. |
| 3054 | '-fno-ident', |
| 3055 | # Put data and code in their own sections, so that unused symbols |
| 3056 | # can be removed at link time with --gc-sections. |
| 3057 | '-fdata-sections', |
| 3058 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3059 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3060 | 'ldflags': [ |
| 3061 | # Specifically tell the linker to perform optimizations. |
| 3062 | # See http://lwn.net/Articles/192624/ . |
| 3063 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 3064 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3065 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3066 | 'conditions' : [ |
| 3067 | ['no_gc_sections==0', { |
| 3068 | 'ldflags': [ |
| 3069 | '-Wl,--gc-sections', |
| 3070 | ], |
| 3071 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3072 | ['OS=="android"', { |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 3073 | 'variables': { |
| 3074 | 'release_optimize%': 's', |
| 3075 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3076 | 'cflags': [ |
| 3077 | '-fomit-frame-pointer', |
| 3078 | ], |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3079 | 'ldflags': [ |
| 3080 | '-Wl,--fatal-warnings', |
| 3081 | # Warn in case of text relocations. |
| 3082 | '-Wl,--warn-shared-textrel', |
| 3083 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3084 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 3085 | ['clang==1', { |
| 3086 | 'cflags!': [ |
| 3087 | '-fno-ident', |
| 3088 | ], |
| 3089 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3090 | ['profiling==1', { |
| 3091 | 'cflags': [ |
| 3092 | '-fno-omit-frame-pointer', |
| 3093 | '-g', |
| 3094 | ], |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 3095 | 'conditions' : [ |
| 3096 | ['profiling_full_stack_frames==1', { |
| 3097 | 'cflags': [ |
| 3098 | '-fno-inline', |
| 3099 | '-fno-optimize-sibling-calls', |
| 3100 | ], |
| 3101 | }], |
| 3102 | ], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3103 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3104 | ['release_unwind_tables==1', { |
| 3105 | 'cflags': ['-funwind-tables'], |
| 3106 | }, { |
| 3107 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
[email protected] | a637d438 | 2014-01-11 03:12:05 | [diff] [blame] | 3108 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3109 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3110 | }, |
| 3111 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3112 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3113 | ['target_arch=="ia32"', { |
| 3114 | 'target_conditions': [ |
| 3115 | ['_toolset=="target"', { |
| 3116 | 'asflags': [ |
| 3117 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 3118 | # are compatible with the general 32-bit-ness. |
| 3119 | '-32', |
| 3120 | ], |
| 3121 | # All floating-point computations on x87 happens in 80-bit |
| 3122 | # precision. Because the C and C++ language standards allow |
| 3123 | # the compiler to keep the floating-point values in higher |
| 3124 | # precision than what's specified in the source and doing so |
| 3125 | # is more efficient than constantly rounding up to 64-bit or |
| 3126 | # 32-bit precision as specified in the source, the compiler, |
| 3127 | # especially in the optimized mode, tries very hard to keep |
| 3128 | # values in x87 floating-point stack (in 80-bit precision) |
| 3129 | # as long as possible. This has important side effects, that |
| 3130 | # the real value used in computation may change depending on |
| 3131 | # how the compiler did the optimization - that is, the value |
| 3132 | # kept in 80-bit is different than the value rounded down to |
| 3133 | # 64-bit or 32-bit. There are possible compiler options to |
| 3134 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 3135 | # all floating-values in the memory, thus force them to be |
| 3136 | # rounded to its original precision) but they have significant |
| 3137 | # runtime performance penalty. |
| 3138 | # |
| 3139 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 3140 | # which keep floating-point values in SSE registers in its |
| 3141 | # native precision (32-bit for single precision, and 64-bit |
| 3142 | # for double precision values). This means the floating-point |
| 3143 | # value used during computation does not change depending on |
| 3144 | # how the compiler optimized the code, since the value is |
| 3145 | # always kept in its specified precision. |
| 3146 | 'conditions': [ |
| 3147 | ['branding=="Chromium" and disable_sse2==0', { |
| 3148 | 'cflags': [ |
| 3149 | '-march=pentium4', |
| 3150 | '-msse2', |
| 3151 | '-mfpmath=sse', |
| 3152 | ], |
| 3153 | }], |
| 3154 | # ChromeOS targets Pinetrail, which is sse3, but most of the |
| 3155 | # benefit comes from sse2 so this setting allows ChromeOS |
| 3156 | # to build on other CPUs. In the future -march=atom would |
| 3157 | # help but requires a newer compiler. |
| 3158 | ['chromeos==1 and disable_sse2==0', { |
| 3159 | 'cflags': [ |
| 3160 | '-msse2', |
[email protected] | 1d07e92b | 2013-08-16 19:54:51 | [diff] [blame] | 3161 | '-mfpmath=sse', |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3162 | ], |
| 3163 | }], |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3164 | # Use gold linker for Android ia32 target. |
| 3165 | ['OS=="android"', { |
| 3166 | 'cflags': [ |
| 3167 | '-fuse-ld=gold', |
| 3168 | ], |
| 3169 | 'ldflags': [ |
| 3170 | '-fuse-ld=gold', |
| 3171 | ], |
| 3172 | }], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3173 | # Install packages have started cropping up with |
| 3174 | # different headers between the 32-bit and 64-bit |
| 3175 | # versions, so we have to shadow those differences off |
| 3176 | # and make sure a 32-bit-on-64-bit build picks up the |
| 3177 | # right files. |
[email protected] | 3259402 | 2012-05-10 03:22:28 | [diff] [blame] | 3178 | # For android build, use NDK headers instead of host headers |
| 3179 | ['host_arch!="ia32" and OS!="android"', { |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3180 | 'include_dirs+': [ |
| 3181 | '/usr/include32', |
| 3182 | ], |
| 3183 | }], |
| 3184 | ], |
| 3185 | # -mmmx allows mmintrin.h to be used for mmx intrinsics. |
| 3186 | # video playback is mmx and sse2 optimized. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 3187 | 'cflags': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3188 | '-m32', |
| 3189 | '-mmmx', |
| 3190 | ], |
| 3191 | 'ldflags': [ |
| 3192 | '-m32', |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 3193 | ], |
| 3194 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3195 | ], |
| 3196 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3197 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3198 | 'target_conditions': [ |
| 3199 | ['_toolset=="target"', { |
| 3200 | 'cflags_cc': [ |
| 3201 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 3202 | # has changed whenever it encounters a varargs function. This |
| 3203 | # silences those warnings, as they are not helpful and |
| 3204 | # clutter legitimate warnings. |
| 3205 | '-Wno-abi', |
| 3206 | ], |
| 3207 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3208 | ['arm_arch!=""', { |
| 3209 | 'cflags': [ |
| 3210 | '-march=<(arm_arch)', |
| 3211 | ], |
| 3212 | }], |
| 3213 | ['arm_tune!=""', { |
| 3214 | 'cflags': [ |
| 3215 | '-mtune=<(arm_tune)', |
| 3216 | ], |
| 3217 | }], |
| 3218 | ['arm_fpu!=""', { |
| 3219 | 'cflags': [ |
| 3220 | '-mfpu=<(arm_fpu)', |
| 3221 | ], |
| 3222 | }], |
| 3223 | ['arm_float_abi!=""', { |
| 3224 | 'cflags': [ |
| 3225 | '-mfloat-abi=<(arm_float_abi)', |
| 3226 | ], |
| 3227 | }], |
| 3228 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3229 | 'cflags': [ |
| 3230 | '-mthumb', |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3231 | ] |
| 3232 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3233 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3234 | # Most of the following flags are derived from what Android |
| 3235 | # uses by default when building for arm, reference for which |
| 3236 | # can be found in the following file in the Android NDK: |
| 3237 | # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
| 3238 | 'cflags': [ |
| 3239 | # The tree-sra optimization (scalar replacement for |
| 3240 | # aggregates enabling subsequent optimizations) leads to |
| 3241 | # invalid code generation when using the Android NDK's |
| 3242 | # compiler (r5-r7). This can be verified using |
[email protected] | b78f8f6 | 2013-04-24 01:35:43 | [diff] [blame] | 3243 | # webkit_unit_tests' WTF.Checked_int8_t test. |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3244 | '-fno-tree-sra', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3245 | '-fuse-ld=gold', |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3246 | '-Wno-psabi', |
| 3247 | ], |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3248 | # Android now supports .relro sections properly. |
| 3249 | # NOTE: While these flags enable the generation of .relro |
| 3250 | # sections, the generated libraries can still be loaded on |
| 3251 | # older Android platform versions. |
| 3252 | 'ldflags': [ |
| 3253 | '-Wl,-z,relro', |
| 3254 | '-Wl,-z,now', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3255 | '-fuse-ld=gold', |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3256 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3257 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3258 | ['arm_thumb==1', { |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 3259 | 'cflags': [ '-mthumb-interwork' ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3260 | }], |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3261 | ['profiling==1', { |
| 3262 | 'cflags': [ |
| 3263 | '-marm', # Probably reduntant, but recommend by "perf" docs. |
| 3264 | '-mapcs-frame', # Seems required by -fno-omit-frame-pointer. |
| 3265 | ], |
| 3266 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3267 | ['clang==1', { |
| 3268 | 'cflags!': [ |
| 3269 | # Clang does not support the following options. |
| 3270 | '-mthumb-interwork', |
| 3271 | '-finline-limit=64', |
| 3272 | '-fno-tree-sra', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3273 | '-fuse-ld=gold', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3274 | '-Wno-psabi', |
| 3275 | ], |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3276 | 'cflags': [ |
| 3277 | # TODO(hans) Enable integrated-as (crbug.com/124610). |
| 3278 | '-no-integrated-as', |
| 3279 | ], |
| 3280 | |
[email protected] | 7d899e9a | 2013-10-12 06:02:42 | [diff] [blame] | 3281 | 'ldflags!': [ |
| 3282 | # Clang does not support the following options. |
| 3283 | '-fuse-ld=gold', |
| 3284 | ], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3285 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3286 | ], |
| 3287 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3288 | ], |
| 3289 | }], |
| 3290 | ], |
| 3291 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3292 | ['target_arch=="mipsel"', { |
| 3293 | 'target_conditions': [ |
| 3294 | ['_toolset=="target"', { |
| 3295 | 'conditions': [ |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3296 | ['android_webview_build==0 and mips_arch_variant=="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3297 | 'cflags': ['-mips32r2', '-Wa,-mips32r2'], |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3298 | }], |
| 3299 | ['android_webview_build==0 and mips_arch_variant!="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3300 | 'cflags': ['-mips32', '-Wa,-mips32'], |
| 3301 | }], |
| 3302 | ], |
| 3303 | 'cflags': [ |
| 3304 | '-EL', |
| 3305 | '-mhard-float', |
| 3306 | ], |
| 3307 | 'ldflags': [ |
| 3308 | '-EL', |
| 3309 | '-Wl,--no-keep-memory' |
| 3310 | ], |
| 3311 | 'cflags_cc': [ |
| 3312 | '-Wno-uninitialized', |
| 3313 | ], |
| 3314 | }], |
| 3315 | ], |
| 3316 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 3317 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3318 | 'cflags': [ |
| 3319 | '-fPIC', |
| 3320 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 3321 | 'ldflags': [ |
| 3322 | '-fPIC', |
| 3323 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3324 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3325 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3326 | 'target_conditions': [ |
| 3327 | ['_toolset=="target"', { |
| 3328 | 'cflags': [ |
| 3329 | '--sysroot=<(sysroot)', |
| 3330 | ], |
| 3331 | 'ldflags': [ |
| 3332 | '--sysroot=<(sysroot)', |
[email protected] | a7e10b9a | 2013-03-22 05:26:15 | [diff] [blame] | 3333 | '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3334 | ], |
| 3335 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3336 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 3337 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 3338 | 'cflags': [ |
| 3339 | '-Wheader-hygiene', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3340 | |
[email protected] | 7ddcb1d | 2013-04-19 04:52:53 | [diff] [blame] | 3341 | # Don't die on dtoa code that uses a char as an array index. |
| 3342 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3343 | |
[email protected] | 64bbd6c | 2013-11-12 05:05:41 | [diff] [blame] | 3344 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 3345 | # which we no longer use. Check if it makes sense to remove |
| 3346 | # this as well. http://crbug.com/316352 |
| 3347 | '-Wno-unneeded-internal-declaration', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 3348 | |
| 3349 | # Warns on switches on enums that cover all enum values but |
| 3350 | # also contain a default: branch. Chrome is full of that. |
| 3351 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 3352 | |
| 3353 | # Warns when a const char[] is converted to bool. |
| 3354 | '-Wstring-conversion', |
[email protected] | ce889c2 | 2013-07-16 22:37:18 | [diff] [blame] | 3355 | |
| 3356 | # C++11-related flags: |
| 3357 | |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3358 | # This warns on using ints as initializers for floats in |
| 3359 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 3360 | # which happens in several places in chrome code. Not sure if |
| 3361 | # this is worth fixing. |
| 3362 | '-Wno-c++11-narrowing', |
| 3363 | |
[email protected] | 00c83cc | 2013-07-25 00:55:50 | [diff] [blame] | 3364 | # TODO(thakis): Remove, http://crbug.com/263960 |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3365 | '-Wno-reserved-user-defined-literal', |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 3366 | |
| 3367 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 3368 | # code generated by flex (used in angle) contains that keyword. |
| 3369 | # http://crbug.com/255186 |
| 3370 | '-Wno-deprecated-register', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3371 | ], |
[email protected] | ce889c2 | 2013-07-16 22:37:18 | [diff] [blame] | 3372 | 'cflags!': [ |
| 3373 | # Clang doesn't seem to know know this flag. |
| 3374 | '-mfpmath=sse', |
| 3375 | ], |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3376 | 'cflags_cc': [ |
| 3377 | # See the comment in the Mac section for what it takes to move |
| 3378 | # this to -std=c++11. |
| 3379 | '-std=gnu++11', |
| 3380 | ], |
| 3381 | }], |
[email protected] | bca3e08 | 2013-05-30 21:13:44 | [diff] [blame] | 3382 | ['clang==1 and OS=="android"', { |
[email protected] | ce889c2 | 2013-07-16 22:37:18 | [diff] [blame] | 3383 | # Android uses stlport, whose include/new defines |
| 3384 | # `void operator delete[](void* ptr) throw();`, which |
| 3385 | # clang's -Wimplicit-exception-spec-mismatch warns about for some |
| 3386 | # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport |
| 3387 | # via -isystem instead. |
| 3388 | 'cflags_cc': [ |
| 3389 | '-Wno-implicit-exception-spec-mismatch', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3390 | ], |
| 3391 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3392 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3393 | 'cflags': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 3394 | '<@(clang_chrome_plugins_flags)', |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3395 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3396 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3397 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3398 | 'cflags': [ |
| 3399 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3400 | ], |
| 3401 | }], |
| 3402 | ['clang==1 and clang_add_plugin!=""', { |
| 3403 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3404 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 3405 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 3406 | }], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3407 | ['clang==1 and target_arch=="ia32"', { |
| 3408 | 'cflags': [ |
| 3409 | # Else building libyuv gives clang's register allocator issues, |
| 3410 | # see llvm.org/PR15798 / crbug.com/233709 |
| 3411 | '-momit-leaf-frame-pointer', |
| 3412 | ], |
| 3413 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 3414 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 3415 | 'cflags': [ |
| 3416 | # See http://crbug.com/110262 |
| 3417 | '-fcolor-diagnostics', |
| 3418 | ], |
| 3419 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3420 | # Common options for AddressSanitizer, LeakSanitizer, |
| 3421 | # ThreadSanitizer and MemorySanitizer. |
| 3422 | ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3423 | 'target_conditions': [ |
| 3424 | ['_toolset=="target"', { |
| 3425 | 'cflags': [ |
| 3426 | '-fno-omit-frame-pointer', |
| 3427 | '-gline-tables-only', |
| 3428 | ], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3429 | 'ldflags!': [ |
| 3430 | # Functions interposed by the sanitizers can make ld think |
| 3431 | # that some libraries aren't needed when they actually are, |
| 3432 | # http://crbug.com/234010. As workaround, disable --as-needed. |
| 3433 | '-Wl,--as-needed', |
| 3434 | ], |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3435 | 'defines': [ |
| 3436 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 3437 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3438 | }], |
| 3439 | ], |
| 3440 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3441 | ['asan==1', { |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3442 | 'target_conditions': [ |
| 3443 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3444 | 'cflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3445 | '-fsanitize=address', |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3446 | '-w', # http://crbug.com/162783 |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3447 | ], |
| 3448 | 'ldflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3449 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3450 | ], |
| 3451 | 'defines': [ |
| 3452 | 'ADDRESS_SANITIZER', |
| 3453 | ], |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3454 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3455 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3456 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 3457 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 3458 | 'target_conditions': [ |
| 3459 | ['_toolset=="target"', { |
| 3460 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 3461 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 3462 | ], |
| 3463 | }], |
| 3464 | ], |
| 3465 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3466 | ['lsan==1', { |
| 3467 | 'target_conditions': [ |
| 3468 | ['_toolset=="target"', { |
| 3469 | 'cflags': [ |
| 3470 | '-fsanitize=leak', |
| 3471 | ], |
| 3472 | 'ldflags': [ |
| 3473 | '-fsanitize=leak', |
| 3474 | ], |
| 3475 | 'defines': [ |
| 3476 | 'LEAK_SANITIZER', |
[email protected] | f6f65a0 | 2013-09-06 05:40:52 | [diff] [blame] | 3477 | 'WTF_USE_LEAK_SANITIZER=1', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3478 | ], |
| 3479 | }], |
| 3480 | ], |
| 3481 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3482 | ['tsan==1', { |
| 3483 | 'target_conditions': [ |
| 3484 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3485 | 'cflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3486 | '-fsanitize=thread', |
[email protected] | 9d46a57 | 2013-01-23 10:38:29 | [diff] [blame] | 3487 | '-fPIC', |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3488 | '-mllvm', '-tsan-blacklist=<(tsan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3489 | ], |
| 3490 | 'ldflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3491 | '-fsanitize=thread', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3492 | ], |
| 3493 | 'defines': [ |
| 3494 | 'THREAD_SANITIZER', |
| 3495 | 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3496 | 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3497 | ], |
| 3498 | 'target_conditions': [ |
| 3499 | ['_type=="executable"', { |
| 3500 | 'ldflags': [ |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3501 | '-pie', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3502 | ], |
| 3503 | }], |
| 3504 | ], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3505 | }], |
| 3506 | ], |
| 3507 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 3508 | ['msan==1', { |
| 3509 | 'target_conditions': [ |
| 3510 | ['_toolset=="target"', { |
| 3511 | 'cflags': [ |
| 3512 | '-fsanitize=memory', |
| 3513 | '-fsanitize-memory-track-origins', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 3514 | '-fPIC', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 3515 | '-fsanitize-blacklist=<(msan_blacklist)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 3516 | ], |
| 3517 | 'ldflags': [ |
| 3518 | '-fsanitize=memory', |
| 3519 | ], |
| 3520 | 'defines': [ |
| 3521 | 'MEMORY_SANITIZER', |
| 3522 | ], |
| 3523 | 'target_conditions': [ |
| 3524 | ['_type=="executable"', { |
| 3525 | 'ldflags': [ |
| 3526 | '-pie', |
| 3527 | ], |
| 3528 | }], |
| 3529 | ], |
| 3530 | }], |
| 3531 | ], |
| 3532 | }], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 3533 | ['use_instrumented_libraries==1', { |
| 3534 | 'dependencies': [ |
| 3535 | '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', |
| 3536 | ], |
| 3537 | 'conditions': [ |
| 3538 | ['asan==1', { |
| 3539 | 'target_conditions': [ |
| 3540 | ['_toolset=="target"', { |
| 3541 | 'ldflags': [ |
| 3542 | # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH) |
| 3543 | '-Wl,-R,\$$ORIGIN/instrumented_libraries/asan/lib/:\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/', |
| 3544 | '-Wl,-z,origin', |
| 3545 | ], |
| 3546 | }], |
| 3547 | ], |
| 3548 | }], |
[email protected] | 819f219 | 2013-12-03 14:33:41 | [diff] [blame] | 3549 | ['msan==1', { |
| 3550 | 'target_conditions': [ |
| 3551 | ['_toolset=="target"', { |
| 3552 | 'ldflags': [ |
| 3553 | '-Wl,-R,\$$ORIGIN/instrumented_libraries/msan/lib/:\$$ORIGIN/instrumented_libraries/msan/usr/lib/x86_64-linux-gnu/', |
| 3554 | '-Wl,-z,origin', |
| 3555 | ], |
| 3556 | }], |
| 3557 | ], |
| 3558 | }], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 3559 | ], |
| 3560 | }], |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 3561 | ['use_custom_libcxx==1', { |
| 3562 | 'dependencies': [ |
| 3563 | '<(DEPTH)/third_party/libc++/libc++.gyp:libc++', |
| 3564 | '<(DEPTH)/third_party/libc++abi/libc++abi.gyp:libc++abi', |
| 3565 | ], |
| 3566 | }], |
[email protected] | 8a48f3f | 2012-12-04 20:14:04 | [diff] [blame] | 3567 | ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 3568 | 'target_conditions' : [ |
| 3569 | ['_toolset=="target"', { |
| 3570 | 'cflags': [ |
| 3571 | '-finstrument-functions', |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 3572 | # Allow mmx intrinsics to inline, so that the |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 3573 | #0 compiler can expand the intrinsics. |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 3574 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 3575 | ], |
| 3576 | }], |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 3577 | ['_toolset=="target" and OS=="android"', { |
| 3578 | 'cflags': [ |
| 3579 | # Avoids errors with current NDK: |
| 3580 | # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant" |
| 3581 | '-finstrument-functions-exclude-file-list=arm_neon.h', |
| 3582 | ], |
| 3583 | }], |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 3584 | ], |
| 3585 | }], |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 3586 | ['linux_dump_symbols==1', { |
| 3587 | 'cflags': [ '-g' ], |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3588 | 'conditions': [ |
[email protected] | 791262fe | 2013-02-21 17:20:15 | [diff] [blame] | 3589 | ['target_arch=="ia32" and OS!="android"', { |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3590 | 'target_conditions': [ |
| 3591 | ['_toolset=="target"', { |
| 3592 | 'ldflags': [ |
[email protected] | 567370a3 | 2013-03-01 00:11:23 | [diff] [blame] | 3593 | # Workaround for linker OOM. |
| 3594 | '-Wl,--no-keep-memory', |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 3595 | ], |
| 3596 | }], |
| 3597 | ], |
| 3598 | }], |
| 3599 | ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 3600 | }], |
[email protected] | 3c8fe548 | 2013-05-22 15:17:03 | [diff] [blame] | 3601 | ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', { |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 3602 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 3603 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3604 | ['linux_use_gold_flags==1', { |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 3605 | 'target_conditions': [ |
| 3606 | ['_toolset=="target"', { |
| 3607 | 'ldflags': [ |
| 3608 | # Experimentation found that using four linking threads |
| 3609 | # saved ~20% of link time. |
| 3610 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 3611 | # Only apply this to the target linker, since the host |
| 3612 | # linker might not be gold, but isn't used much anyway. |
[email protected] | 21ed97e | 2014-01-14 23:40:55 | [diff] [blame] | 3613 | # TODO(raymes): Disable threading because gold is frequently |
| 3614 | # crashing on the bots: crbug.com/161942. |
| 3615 | # '-Wl,--threads', |
| 3616 | # '-Wl,--thread-count=4', |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 3617 | ], |
| 3618 | }], |
[email protected] | 68d01e8 | 2012-12-08 03:36:32 | [diff] [blame] | 3619 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3620 | 'conditions': [ |
| 3621 | ['release_valgrind_build==0', { |
| 3622 | 'target_conditions': [ |
| 3623 | ['_toolset=="target"', { |
| 3624 | 'ldflags': [ |
[email protected] | ffc4616 | 2014-01-16 12:19:49 | [diff] [blame] | 3625 | # There seems to be a conflict of --icf and -pie |
| 3626 | # in gold which can generate crashy binaries. As |
| 3627 | # a security measure, -pie takes precendence for |
| 3628 | # now. |
| 3629 | #'-Wl,--icf=safe', |
| 3630 | '-Wl,--icf=none', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3631 | ], |
| 3632 | }], |
| 3633 | ], |
| 3634 | }], |
| 3635 | ], |
| 3636 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3637 | ['linux_use_gold_binary==1', { |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3638 | 'ldflags': [ |
| 3639 | # Put our gold binary in the search path for the linker. |
[email protected] | 0dc310a3 | 2013-05-08 23:52:44 | [diff] [blame] | 3640 | # We pass the path to gold to the compiler. gyp leaves |
| 3641 | # unspecified what the cwd is when running the compiler, |
| 3642 | # so the normal gyp path-munging fails us. This hack |
| 3643 | # gets the right path. |
[email protected] | c0dada1 | 2013-11-22 20:46:53 | [diff] [blame] | 3644 | '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 3645 | ], |
| 3646 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3647 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3648 | }, |
| 3649 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 3650 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 3651 | # with Linux. |
| 3652 | ['OS=="freebsd"', { |
| 3653 | 'target_defaults': { |
| 3654 | 'ldflags': [ |
| 3655 | '-Wl,--no-keep-memory', |
| 3656 | ], |
| 3657 | }, |
| 3658 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3659 | # Android-specific options; note that most are set above with Linux. |
| 3660 | ['OS=="android"', { |
| 3661 | 'variables': { |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 3662 | # This is a unique identifier for a given build. It's used for |
| 3663 | # identifying various build artifacts corresponding to a particular |
| 3664 | # build of chrome (e.g. where to find archived symbols). |
| 3665 | 'chrome_build_id%': '', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3666 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3667 | # Use shared stlport library when system one used. |
| 3668 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 3669 | # has to be before that in the set of libraries. |
| 3670 | ['use_system_stlport==1', { |
| 3671 | 'android_stlport_library': 'stlport', |
| 3672 | }, { |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3673 | 'conditions': [ |
| 3674 | ['component=="shared_library"', { |
| 3675 | 'android_stlport_library': 'stlport_shared', |
| 3676 | }, { |
| 3677 | 'android_stlport_library': 'stlport_static', |
| 3678 | }], |
| 3679 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3680 | }], |
| 3681 | ], |
| 3682 | |
| 3683 | # Placing this variable here prevents from forking libvpx, used |
| 3684 | # by remoting. Remoting is off, so it needn't built, |
| 3685 | # so forking it's deps seems like overkill. |
| 3686 | # But this variable need defined to properly run gyp. |
| 3687 | # A proper solution is to have an OS==android conditional |
| 3688 | # in third_party/libvpx/libvpx.gyp to define it. |
| 3689 | 'libvpx_path': 'lib/linux/arm', |
| 3690 | }, |
| 3691 | 'target_defaults': { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3692 | 'variables': { |
| 3693 | 'release_extra_cflags%': '', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 3694 | 'conditions': [ |
| 3695 | # If we're using the components build, append "cr" to all shared |
| 3696 | # libraries to avoid naming collisions with android system library |
| 3697 | # versions with the same name (e.g. skia, icu). |
| 3698 | ['component=="shared_library"', { |
| 3699 | 'android_product_extension': 'cr.so', |
| 3700 | }, { |
| 3701 | 'android_product_extension': 'so', |
| 3702 | } ], |
| 3703 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3704 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3705 | 'target_conditions': [ |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 3706 | ['_type=="shared_library"', { |
| 3707 | 'product_extension': '<(android_product_extension)', |
| 3708 | }], |
| 3709 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3710 | # Settings for building device targets using Android's toolchain. |
| 3711 | # These are based on the setup.mk file from the Android NDK. |
| 3712 | # |
| 3713 | # The NDK Android executable link step looks as follows: |
| 3714 | # $LDFLAGS |
| 3715 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 3716 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 3717 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 3718 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 3719 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 3720 | # $(PRIVATE_LDLIBS) <-- System .so |
| 3721 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 3722 | # |
| 3723 | # For now the above are approximated for executables by adding |
| 3724 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 3725 | # of 'libraries'. |
| 3726 | # |
| 3727 | # The NDK Android shared library link step looks as follows: |
| 3728 | # $LDFLAGS |
| 3729 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 3730 | # -l,--whole-archive |
| 3731 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 3732 | # -l,--no-whole-archive |
| 3733 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 3734 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 3735 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 3736 | # $(PRIVATE_LDLIBS) <-- System .so |
| 3737 | # |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3738 | # For now, assume that whole static libraries are not needed. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3739 | # |
| 3740 | # For both executables and shared libraries, add the proper |
| 3741 | # libgcc.a to the start of libraries which puts it in the |
| 3742 | # proper spot after .o and .a files get linked in. |
| 3743 | # |
| 3744 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 3745 | # support for a custom link command line. |
| 3746 | ['_toolset=="target"', { |
| 3747 | 'cflags!': [ |
| 3748 | '-pthread', # Not supported by Android toolchain. |
| 3749 | ], |
| 3750 | 'cflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3751 | '-ffunction-sections', |
| 3752 | '-funwind-tables', |
| 3753 | '-g', |
| 3754 | '-fstack-protector', |
| 3755 | '-fno-short-enums', |
| 3756 | '-finline-limit=64', |
| 3757 | '-Wa,--noexecstack', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3758 | '<@(release_extra_cflags)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3759 | ], |
| 3760 | 'defines': [ |
| 3761 | 'ANDROID', |
| 3762 | '__GNU_SOURCE=1', # Necessary for clone() |
| 3763 | 'USE_STLPORT=1', |
| 3764 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 3765 | 'CHROME_BUILD_ID="<(chrome_build_id)"', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3766 | ], |
| 3767 | 'ldflags!': [ |
| 3768 | '-pthread', # Not supported by Android toolchain. |
| 3769 | ], |
| 3770 | 'ldflags': [ |
| 3771 | '-nostdlib', |
| 3772 | '-Wl,--no-undefined', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3773 | # Don't export symbols from statically linked libraries. |
| 3774 | '-Wl,--exclude-libs=ALL', |
| 3775 | ], |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 3776 | 'libraries': [ |
| 3777 | '-l<(android_stlport_library)', |
| 3778 | # Manually link the libgcc.a that the cross compiler uses. |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 3779 | '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 3780 | '-lc', |
| 3781 | '-ldl', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 3782 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3783 | ], |
| 3784 | 'conditions': [ |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3785 | ['component=="shared_library"', { |
[email protected] | 4d6f9d7db | 2012-11-21 16:27:47 | [diff] [blame] | 3786 | 'ldflags!': [ |
| 3787 | '-Wl,--exclude-libs=ALL', |
| 3788 | ], |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 3789 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3790 | ['clang==1', { |
| 3791 | 'cflags': [ |
| 3792 | # Work around incompatibilities between bionic and clang |
| 3793 | # headers. |
| 3794 | '-D__compiler_offsetof=__builtin_offsetof', |
| 3795 | '-Dnan=__builtin_nan', |
| 3796 | ], |
| 3797 | 'conditions': [ |
| 3798 | ['target_arch=="arm"', { |
| 3799 | 'cflags': [ |
| 3800 | '-target arm-linux-androideabi', |
| 3801 | '-mllvm -arm-enable-ehabi', |
| 3802 | ], |
| 3803 | 'ldflags': [ |
| 3804 | '-target arm-linux-androideabi', |
| 3805 | ], |
| 3806 | }], |
| 3807 | ['target_arch=="ia32"', { |
| 3808 | 'cflags': [ |
| 3809 | '-target x86-linux-androideabi', |
| 3810 | ], |
| 3811 | 'ldflags': [ |
| 3812 | '-target x86-linux-androideabi', |
| 3813 | ], |
| 3814 | }], |
| 3815 | ], |
| 3816 | }], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 3817 | ['asan==1', { |
| 3818 | 'cflags': [ |
| 3819 | # Android build relies on -Wl,--gc-sections removing |
| 3820 | # unreachable code. ASan instrumentation for globals inhibits |
| 3821 | # this and results in a library with unresolvable relocations. |
| 3822 | # TODO(eugenis): find a way to reenable this. |
| 3823 | '-mllvm -asan-globals=0', |
| 3824 | ], |
| 3825 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 3826 | ['android_webview_build==0', { |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 3827 | 'defines': [ |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 3828 | # The NDK has these things, but doesn't define the constants |
| 3829 | # to say that it does. Define them here instead. |
| 3830 | 'HAVE_SYS_UIO_H', |
| 3831 | ], |
| 3832 | 'cflags': [ |
| 3833 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 3834 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3835 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 3836 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3837 | ], |
| 3838 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 3839 | ['android_webview_build==1', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3840 | 'include_dirs': [ |
| 3841 | # OpenAL headers from the Android tree. |
| 3842 | '<(android_src)/frameworks/wilhelm/include', |
| 3843 | ], |
| 3844 | 'cflags': [ |
[email protected] | 0488213 | 2012-11-21 12:40:45 | [diff] [blame] | 3845 | # Android predefines this as 1; undefine it here so Chromium |
| 3846 | # can redefine it later to be 2 for chromium code and unset |
| 3847 | # for third party code. This works because cflags are added |
| 3848 | # before defines. |
| 3849 | '-U_FORTIFY_SOURCE', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3850 | # Disable any additional warnings enabled by the Android build system but which |
| 3851 | # chromium does not build cleanly with (when treating warning as errors). |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3852 | # Things that are part of -Wextra: |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 3853 | '-Wno-extra', # Enabled by -Wextra, but no specific flag |
| 3854 | '-Wno-ignored-qualifiers', |
| 3855 | '-Wno-type-limits', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3856 | ], |
| 3857 | 'cflags_cc': [ |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 3858 | # Other things unrelated to -Wextra: |
| 3859 | '-Wno-non-virtual-dtor', |
| 3860 | '-Wno-sign-promo', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3861 | ], |
| 3862 | }], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 3863 | ['android_webview_build==1', { |
| 3864 | 'target_conditions': [ |
| 3865 | ['chromium_code==0', { |
| 3866 | 'cflags': [ |
| 3867 | # There is a class of warning which: |
| 3868 | # 1) Android always enables and also treats as errors |
| 3869 | # 2) Chromium ignores in third party code |
| 3870 | # So we re-enable those warnings when building Android. |
| 3871 | '-Wno-address', |
| 3872 | '-Wno-format-security', |
| 3873 | '-Wno-return-type', |
| 3874 | '-Wno-sequence-point', |
| 3875 | ], |
| 3876 | 'cflags_cc': [ |
| 3877 | '-Wno-non-virtual-dtor', |
| 3878 | ], |
| 3879 | }], |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 3880 | ], |
| 3881 | }], |
[email protected] | febd357 | 2012-05-03 09:17:45 | [diff] [blame] | 3882 | ['target_arch == "arm"', { |
| 3883 | 'ldflags': [ |
| 3884 | # Enable identical code folding to reduce size. |
| 3885 | '-Wl,--icf=safe', |
| 3886 | ], |
| 3887 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3888 | # NOTE: The stlport header include paths below are specified in |
| 3889 | # cflags rather than include_dirs because they need to come |
| 3890 | # after include_dirs. Think of them like system headers, but |
| 3891 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 3892 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 3893 | # The include ordering here is important; change with caution. |
[email protected] | f91ba81 | 2012-07-11 00:00:51 | [diff] [blame] | 3894 | ['use_system_stlport==1', { |
| 3895 | 'cflags': [ |
| 3896 | # For libstdc++/include, which is used by stlport. |
| 3897 | '-I<(android_src)/bionic', |
| 3898 | '-I<(android_src)/external/stlport/stlport', |
| 3899 | ], |
| 3900 | }, { # else: use_system_stlport!=1 |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3901 | 'cflags': [ |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 3902 | '-I<(android_stlport_include)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3903 | ], |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 3904 | 'ldflags': [ |
| 3905 | '-L<(android_stlport_libs_dir)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3906 | ], |
| 3907 | }], |
| 3908 | ['target_arch=="ia32"', { |
| 3909 | # The x86 toolchain currently has problems with stack-protector. |
| 3910 | 'cflags!': [ |
| 3911 | '-fstack-protector', |
| 3912 | ], |
| 3913 | 'cflags': [ |
| 3914 | '-fno-stack-protector', |
| 3915 | ], |
| 3916 | }], |
| 3917 | ], |
| 3918 | 'target_conditions': [ |
| 3919 | ['_type=="executable"', { |
| 3920 | 'ldflags': [ |
| 3921 | '-Bdynamic', |
| 3922 | '-Wl,-dynamic-linker,/system/bin/linker', |
| 3923 | '-Wl,--gc-sections', |
| 3924 | '-Wl,-z,nocopyreloc', |
| 3925 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 3926 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 3927 | ], |
| 3928 | 'libraries': [ |
| 3929 | # crtend_android.o needs to be the last item in libraries. |
| 3930 | # Do not add any libraries after this! |
| 3931 | '<(android_ndk_lib)/crtend_android.o', |
| 3932 | ], |
[email protected] | 63a131fd | 2012-11-06 16:01:21 | [diff] [blame] | 3933 | 'conditions': [ |
| 3934 | ['asan==1', { |
| 3935 | 'cflags': [ |
| 3936 | '-fPIE', |
| 3937 | ], |
| 3938 | 'ldflags': [ |
| 3939 | '-pie', |
| 3940 | ], |
| 3941 | }], |
| 3942 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3943 | }], |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 3944 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3945 | 'ldflags': [ |
| 3946 | '-Wl,-shared,-Bsymbolic', |
| 3947 | ], |
[email protected] | d093fe8b | 2013-04-30 18:00:23 | [diff] [blame] | 3948 | 'conditions': [ |
| 3949 | ['android_webview_build==0', { |
| 3950 | 'ldflags': [ |
| 3951 | # crtbegin_so.o should be the last item in ldflags. |
| 3952 | '<(android_ndk_lib)/crtbegin_so.o', |
| 3953 | ], |
| 3954 | 'libraries': [ |
| 3955 | # crtend_so.o needs to be the last item in libraries. |
| 3956 | # Do not add any libraries after this! |
| 3957 | '<(android_ndk_lib)/crtend_so.o', |
| 3958 | ], |
| 3959 | }], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 3960 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3961 | }], |
| 3962 | ], |
| 3963 | }], |
| 3964 | # Settings for building host targets using the system toolchain. |
| 3965 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 3966 | 'cflags!': [ |
| 3967 | # Due to issues in Clang build system, using ASan on 32-bit |
| 3968 | # binaries on x86_64 host is problematic. |
| 3969 | # TODO(eugenis): re-enable. |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3970 | '-fsanitize=address', |
| 3971 | '-w', # http://crbug.com/162783 |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 3972 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3973 | 'ldflags!': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 3974 | '-fsanitize=address', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3975 | '-Wl,-z,noexecstack', |
| 3976 | '-Wl,--gc-sections', |
| 3977 | '-Wl,-O1', |
| 3978 | '-Wl,--as-needed', |
[email protected] | df24071 | 2013-09-02 23:17:22 | [diff] [blame] | 3979 | '-Wl,--warn-shared-textrel', |
| 3980 | '-Wl,--fatal-warnings', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3981 | ], |
| 3982 | }], |
[email protected] | 0ccf578f | 2013-03-13 11:13:39 | [diff] [blame] | 3983 | # Settings for building host targets on mac. |
| 3984 | ['_toolset=="host" and host_os=="mac"', { |
| 3985 | 'ldflags!': [ |
| 3986 | '-Wl,-z,now', |
| 3987 | '-Wl,-z,relro', |
| 3988 | ], |
| 3989 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3990 | ], |
| 3991 | }, |
| 3992 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 3993 | ['OS=="solaris"', { |
| 3994 | 'cflags!': ['-fvisibility=hidden'], |
| 3995 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 3996 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3997 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3998 | 'target_defaults': { |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 3999 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4000 | 'xcode_settings': { |
| 4001 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | 2429bb73 | 2012-10-19 00:24:24 | [diff] [blame] | 4002 | # Don't link in libarclite_macosx.a, see http://crbug.com/156530. |
| 4003 | 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime |
[email protected] | 47c3e85 | 2013-09-13 02:22:31 | [diff] [blame] | 4004 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4005 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 4006 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4007 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 4008 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 4009 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 4010 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 4011 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4012 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 4013 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 4014 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 4015 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4016 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4017 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4018 | 'USE_HEADERMAP': 'NO', |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 4019 | 'WARNING_CFLAGS': [ |
| 4020 | '-Wall', |
| 4021 | '-Wendif-labels', |
| 4022 | '-Wextra', |
| 4023 | # Don't warn about unused function parameters. |
| 4024 | '-Wno-unused-parameter', |
| 4025 | # Don't warn about the "struct foo f = {0};" initialization |
| 4026 | # pattern. |
| 4027 | '-Wno-missing-field-initializers', |
| 4028 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4029 | 'conditions': [ |
| 4030 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 4031 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 4032 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4033 | # Note that the prebuilt Clang binaries should not be used for iOS |
| 4034 | # development except for ASan builds. |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4035 | ['clang==1', { |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4036 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 4037 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | a79fd88 | 2011-10-03 18:22:38 | [diff] [blame] | 4038 | |
[email protected] | 9e0756c | 2013-09-01 01:37:02 | [diff] [blame] | 4039 | # gnu++11 instead of c++11 is needed because some code uses |
| 4040 | # typeof() (a GNU extension). |
| 4041 | # TODO(thakis): Eventually switch this to c++11 instead of |
| 4042 | # gnu++11 (once typeof can be removed, which is blocked on c++11 |
| 4043 | # being available everywhere). |
| 4044 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11 |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4045 | # Warn if automatic synthesis is triggered with |
| 4046 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4047 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4048 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4049 | 'WARNING_CFLAGS': [ |
[email protected] | 7f8d486f | 2011-04-05 19:49:07 | [diff] [blame] | 4050 | '-Wheader-hygiene', |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 4051 | |
| 4052 | # This warns on using ints as initializers for floats in |
| 4053 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 4054 | # which happens in several places in chrome code. Not sure if |
| 4055 | # this is worth fixing. |
| 4056 | '-Wno-c++11-narrowing', |
| 4057 | |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4058 | # Don't die on dtoa code that uses a char as an array index. |
| 4059 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 4060 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 4061 | |
[email protected] | a6aef30 | 2013-11-09 04:18:21 | [diff] [blame] | 4062 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 4063 | # which we no longer use. Check if it makes sense to remove |
| 4064 | # this as well. http://crbug.com/316352 |
| 4065 | '-Wno-unneeded-internal-declaration', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 4066 | |
| 4067 | # Warns on switches on enums that cover all enum values but |
| 4068 | # also contain a default: branch. Chrome is full of that. |
| 4069 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 4070 | |
| 4071 | # Warns when a const char[] is converted to bool. |
| 4072 | '-Wstring-conversion', |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 4073 | |
| 4074 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 4075 | # code generated by flex (used in angle) contains that keyword. |
| 4076 | # http://crbug.com/255186 |
| 4077 | '-Wno-deprecated-register', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4078 | ], |
| 4079 | }], |
[email protected] | 2fccd42 | 2013-05-21 21:27:57 | [diff] [blame] | 4080 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4081 | 'OTHER_CFLAGS': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4082 | '<@(clang_chrome_plugins_flags)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4083 | ], |
| 4084 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4085 | ['clang==1 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4086 | 'OTHER_CFLAGS': [ |
| 4087 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4088 | ], |
| 4089 | }], |
| 4090 | ['clang==1 and clang_add_plugin!=""', { |
| 4091 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4092 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4093 | ], |
| 4094 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4095 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4096 | 'OTHER_CFLAGS': [ |
| 4097 | # See http://crbug.com/110262 |
| 4098 | '-fcolor-diagnostics', |
| 4099 | ], |
| 4100 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4101 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4102 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4103 | 'conditions': [ |
| 4104 | ['clang==1', { |
| 4105 | 'variables': { |
| 4106 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 4107 | }, |
| 4108 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4109 | ['asan==1', { |
| 4110 | 'xcode_settings': { |
| 4111 | 'OTHER_CFLAGS': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4112 | '-fsanitize=address', |
| 4113 | '-w', # http://crbug.com/162783 |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4114 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4115 | }, |
| 4116 | 'defines': [ |
| 4117 | 'ADDRESS_SANITIZER', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 4118 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4119 | ], |
| 4120 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4121 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4122 | 'target_conditions': [ |
| 4123 | ['_toolset=="target"', { |
| 4124 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4125 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4126 | ], |
| 4127 | }], |
| 4128 | ], |
| 4129 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4130 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4131 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4132 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4133 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4134 | 'conditions': [ |
| 4135 | ['asan==1', { |
| 4136 | 'xcode_settings': { |
| 4137 | 'OTHER_LDFLAGS': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4138 | '-fsanitize=address', |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4139 | ], |
| 4140 | }, |
| 4141 | }], |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 4142 | ['mac_write_linker_maps==1', { |
| 4143 | 'xcode_settings': { |
| 4144 | 'OTHER_LDFLAGS': [ |
| 4145 | '-Wl,-map,>(_target_name).map', |
| 4146 | ], |
| 4147 | }, |
| 4148 | }], |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4149 | ], |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4150 | }], |
| 4151 | ['_mac_bundle', { |
| 4152 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 4153 | 'target_conditions': [ |
| 4154 | ['_type=="executable"', { |
| 4155 | 'conditions': [ |
| 4156 | ['asan==1', { |
| 4157 | 'postbuilds': [ |
| 4158 | { |
| 4159 | 'variables': { |
| 4160 | # Define copy_asan_dylib_path in a variable ending in |
| 4161 | # _path so that gyp understands it's a path and |
| 4162 | # performs proper relativization during dict merging. |
| 4163 | 'copy_asan_dylib_path': |
| 4164 | 'mac/copy_asan_runtime_dylib.sh', |
| 4165 | }, |
| 4166 | 'postbuild_name': 'Copy ASan runtime dylib', |
| 4167 | 'action': [ |
| 4168 | '<(copy_asan_dylib_path)', |
| 4169 | ], |
| 4170 | }, |
| 4171 | ], |
| 4172 | }], |
| 4173 | ], |
| 4174 | }], |
| 4175 | ], |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 4176 | }], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4177 | ], # target_conditions |
| 4178 | }, # target_defaults |
| 4179 | }], # OS=="mac" or OS=="ios" |
| 4180 | ['OS=="mac"', { |
| 4181 | 'target_defaults': { |
| 4182 | 'variables': { |
| 4183 | # These should end with %, but there seems to be a bug with % in |
| 4184 | # variables that are intended to be set to different values in |
| 4185 | # different targets, like these. |
| 4186 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4187 | # Strip debugging symbols from the target. |
| 4188 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4189 | 'conditions': [ |
| 4190 | ['asan==1', { |
| 4191 | 'conditions': [ |
| 4192 | ['mac_want_real_dsym=="default"', { |
[email protected] | 97ab1fa | 2012-12-24 10:50:35 | [diff] [blame] | 4193 | 'mac_real_dsym': 1, |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4194 | }, { |
| 4195 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4196 | }], |
| 4197 | ], |
| 4198 | }, { |
| 4199 | 'conditions': [ |
| 4200 | ['mac_want_real_dsym=="default"', { |
| 4201 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 4202 | }, { |
| 4203 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4204 | }], |
| 4205 | ], |
| 4206 | }], |
| 4207 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4208 | }, |
| 4209 | 'xcode_settings': { |
| 4210 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 4211 | # (Equivalent to -fPIC) |
| 4212 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 4213 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 4214 | # Keep pch files below xcodebuild/. |
| 4215 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
[email protected] | 6211f62 | 2013-07-29 23:35:39 | [diff] [blame] | 4216 | 'OTHER_CFLAGS': [ |
| 4217 | # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
| 4218 | # xcode_setting, but not until all downstream projects' mac bots are |
| 4219 | # using xcode >= 4.6, because that's when the default value of the |
| 4220 | # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
| 4221 | # setting is a no-op as far as xcode is concerned, but the compiler |
| 4222 | # behaves differently based on whether -fno-strict-aliasing is |
| 4223 | # specified or not. |
| 4224 | '-fno-strict-aliasing', # See http://crbug.com/32204. |
| 4225 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4226 | }, |
| 4227 | 'target_conditions': [ |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4228 | ['_type=="executable"', { |
| 4229 | 'postbuilds': [ |
| 4230 | { |
| 4231 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4232 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 4233 | # ensures that the position-independent executable (PIE) bit |
| 4234 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4235 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4236 | # Define change_mach_o_flags in a variable ending in _path |
| 4237 | # so that GYP understands it's a path and performs proper |
| 4238 | # relativization during dict merging. |
| 4239 | 'change_mach_o_flags_path': |
| 4240 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4241 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4242 | ], |
| 4243 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4244 | ['mac_pie==0 or release_valgrind_build==1', { |
| 4245 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 4246 | # the target specifies mac_pie=0 or if building for |
| 4247 | # Valgrind, because Valgrind doesn't understand slide. |
| 4248 | # See the similar mac_pie/release_valgrind_build check |
| 4249 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4250 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4251 | '--no-pie', |
| 4252 | ], |
| 4253 | }], |
| 4254 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4255 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4256 | 'postbuild_name': 'Change Mach-O Flags', |
| 4257 | 'action': [ |
| 4258 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4259 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4260 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4261 | }, |
| 4262 | ], |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 4263 | 'conditions': [ |
| 4264 | ['asan==1', { |
| 4265 | 'variables': { |
| 4266 | 'asan_saves_file': 'asan.saves', |
| 4267 | }, |
| 4268 | 'xcode_settings': { |
[email protected] | 6a4cad0 | 2011-11-25 07:26:56 | [diff] [blame] | 4269 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 4270 | }, |
| 4271 | }], |
| 4272 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4273 | 'target_conditions': [ |
| 4274 | ['mac_pie==1 and release_valgrind_build==0', { |
| 4275 | # Turn on position-independence (ASLR) for executables. When |
| 4276 | # PIE is on for the Chrome executables, the framework will |
| 4277 | # also be subject to ASLR. |
| 4278 | # Don't do this when building for Valgrind, because Valgrind |
| 4279 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 4280 | # understand slide, and get rid of the Valgrind check. |
| 4281 | 'xcode_settings': { |
| 4282 | 'OTHER_LDFLAGS': [ |
| 4283 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 4284 | ], |
| 4285 | }, |
| 4286 | }], |
| 4287 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 4288 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4289 | ['(_type=="executable" or _type=="shared_library" or \ |
| 4290 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4291 | 'target_conditions': [ |
| 4292 | ['mac_real_dsym == 1', { |
| 4293 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 4294 | # debug information format to dwarf-with-dsym. Since |
| 4295 | # strip_from_xcode will not be used, set Xcode to do the |
| 4296 | # stripping as well. |
| 4297 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4298 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4299 | 'xcode_settings': { |
| 4300 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 4301 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4302 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4303 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 4304 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4305 | # The Xcode default is to strip debugging symbols |
| 4306 | # only (-S). Local symbols should be stripped as |
| 4307 | # well, which will be handled by -x. Xcode will |
| 4308 | # continue to insert -S when stripping even when |
| 4309 | # additional flags are added with STRIPFLAGS. |
| 4310 | 'STRIPFLAGS': '-x', |
[email protected] | ed7e8369 | 2012-12-24 10:13:40 | [diff] [blame] | 4311 | }], # _type=="shared_library" or _type=="loadable_module" |
| 4312 | ['_type=="executable"', { |
| 4313 | 'conditions': [ |
| 4314 | ['asan==1', { |
| 4315 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
| 4316 | }] |
| 4317 | ], |
| 4318 | }], # _type=="executable" and asan==1 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4319 | ], # target_conditions |
| 4320 | }, # xcode_settings |
| 4321 | }, # configuration "Release" |
| 4322 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4323 | }, { # mac_real_dsym != 1 |
| 4324 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 4325 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 4326 | # only operates in the Release configuration. |
| 4327 | 'postbuilds': [ |
| 4328 | { |
| 4329 | 'variables': { |
| 4330 | # Define strip_from_xcode in a variable ending in _path |
| 4331 | # so that gyp understands it's a path and performs proper |
| 4332 | # relativization during dict merging. |
| 4333 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 4334 | }, |
| 4335 | 'postbuild_name': 'Strip If Needed', |
| 4336 | 'action': ['<(strip_from_xcode_path)'], |
| 4337 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4338 | ], # postbuilds |
| 4339 | }], # mac_real_dsym |
| 4340 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4341 | }], # (_type=="executable" or _type=="shared_library" or |
| 4342 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4343 | ], # target_conditions |
| 4344 | }, # target_defaults |
| 4345 | }], # OS=="mac" |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4346 | ['OS=="ios"', { |
| 4347 | 'target_defaults': { |
| 4348 | 'xcode_settings' : { |
| 4349 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
| 4350 | |
| 4351 | # This next block is mostly common with the 'mac' section above, |
| 4352 | # but keying off (or setting) 'clang' isn't valid for iOS as it |
[email protected] | 7503ad1f | 2013-09-09 15:59:05 | [diff] [blame] | 4353 | # also means using Chromium's build of clang. |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4354 | |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 4355 | # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang |
| 4356 | # section above). |
| 4357 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4358 | # Warn if automatic synthesis is triggered with |
| 4359 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4360 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4361 | 'WARNING_CFLAGS': [ |
| 4362 | '-Wheader-hygiene', |
| 4363 | # Don't die on dtoa code that uses a char as an array index. |
| 4364 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 4365 | '-Wno-char-subscripts', |
[email protected] | e3a8545 | 2013-11-14 01:46:17 | [diff] [blame] | 4366 | # See comment in the mac clang section above for this flag. |
| 4367 | '-Wno-unneeded-internal-declaration', |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 4368 | # Match OS X clang C++11 warning settings. |
| 4369 | '-Wno-c++11-narrowing', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4370 | ], |
| 4371 | }, |
| 4372 | 'target_conditions': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4373 | ['_toolset=="host"', { |
| 4374 | 'xcode_settings': { |
| 4375 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 4376 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4377 | 'ARCHS': [ |
| 4378 | 'x86_64' |
| 4379 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4380 | }, |
| 4381 | }], |
| 4382 | ['_toolset=="target"', { |
| 4383 | 'xcode_settings': { |
| 4384 | # This section should be for overriding host settings. But, |
| 4385 | # since we can't negate the iphone deployment target above, we |
| 4386 | # instead set it here for target only. |
| 4387 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
| 4388 | }, |
| 4389 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4390 | ['_type=="executable"', { |
| 4391 | 'configurations': { |
| 4392 | 'Release_Base': { |
| 4393 | 'xcode_settings': { |
| 4394 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4395 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 4396 | }, |
| 4397 | }, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 4398 | 'Debug_Base': { |
| 4399 | 'xcode_settings': { |
| 4400 | # Remove dSYM to reduce build time. |
| 4401 | 'DEBUG_INFORMATION_FORMAT': 'dwarf', |
| 4402 | }, |
| 4403 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4404 | }, |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4405 | 'xcode_settings': { |
| 4406 | 'conditions': [ |
| 4407 | ['chromium_ios_signing', { |
| 4408 | # iOS SDK wants everything for device signed. |
| 4409 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 4410 | }, { |
| 4411 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 4412 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 4413 | }], |
| 4414 | ], |
| 4415 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4416 | }], |
| 4417 | ], # target_conditions |
| 4418 | }, # target_defaults |
| 4419 | }], # OS=="ios" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4420 | ['OS=="win"', { |
| 4421 | 'target_defaults': { |
| 4422 | 'defines': [ |
[email protected] | 8e345da | 2012-07-01 22:10:30 | [diff] [blame] | 4423 | '_WIN32_WINNT=0x0602', |
| 4424 | 'WINVER=0x0602', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4425 | 'WIN32', |
| 4426 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4427 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 4428 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4429 | '_CRT_RAND_S', |
| 4430 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 4431 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 4432 | '_ATL_NO_OPENGL', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4433 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4434 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 4435 | ['buildtype=="Official"', { |
| 4436 | # In official builds, targets can self-select an optimization |
| 4437 | # level by defining a variable named 'optimize', and setting it |
| 4438 | # to one of |
| 4439 | # - "size", optimizes for minimal code size - the default. |
| 4440 | # - "speed", optimizes for speed over code size. |
| 4441 | # - "max", whole program optimization and link-time code |
| 4442 | # generation. This is very expensive and should be used |
| 4443 | # sparingly. |
| 4444 | 'variables': { |
| 4445 | 'optimize%': 'size', |
| 4446 | }, |
| 4447 | 'target_conditions': [ |
| 4448 | ['optimize=="size"', { |
| 4449 | 'msvs_settings': { |
| 4450 | 'VCCLCompilerTool': { |
| 4451 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 4452 | 'Optimization': '1', |
| 4453 | # 2, favorSize - Favor small code (/Os) |
| 4454 | 'FavorSizeOrSpeed': '2', |
| 4455 | }, |
| 4456 | }, |
| 4457 | }, |
| 4458 | ], |
| 4459 | ['optimize=="speed"', { |
| 4460 | 'msvs_settings': { |
| 4461 | 'VCCLCompilerTool': { |
| 4462 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 4463 | 'Optimization': '2', |
| 4464 | # 1, favorSpeed - Favor fast code (/Ot) |
| 4465 | 'FavorSizeOrSpeed': '1', |
| 4466 | }, |
| 4467 | }, |
| 4468 | }, |
| 4469 | ], |
| 4470 | ['optimize=="max"', { |
| 4471 | 'msvs_settings': { |
| 4472 | 'VCCLCompilerTool': { |
| 4473 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 4474 | 'Optimization': '2', |
| 4475 | # 1, favorSpeed - Favor fast code (/Ot) |
| 4476 | 'FavorSizeOrSpeed': '1', |
| 4477 | # This implies link time code generation. |
| 4478 | 'WholeProgramOptimization': 'true', |
| 4479 | }, |
| 4480 | }, |
| 4481 | }, |
| 4482 | ], |
| 4483 | ], |
| 4484 | }, |
| 4485 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4486 | ['component=="static_library"', { |
| 4487 | 'defines': [ |
| 4488 | '_HAS_EXCEPTIONS=0', |
| 4489 | ], |
| 4490 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 4491 | ['secure_atl', { |
| 4492 | 'defines': [ |
| 4493 | '_SECURE_ATL', |
| 4494 | ], |
| 4495 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 4496 | ['msvs_express', { |
| 4497 | 'configurations': { |
| 4498 | 'x86_Base': { |
| 4499 | 'msvs_settings': { |
| 4500 | 'VCLinkerTool': { |
| 4501 | 'AdditionalLibraryDirectories': |
| 4502 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 4503 | }, |
| 4504 | 'VCLibrarianTool': { |
| 4505 | 'AdditionalLibraryDirectories': |
| 4506 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 4507 | }, |
| 4508 | }, |
| 4509 | }, |
| 4510 | 'x64_Base': { |
| 4511 | 'msvs_settings': { |
| 4512 | 'VCLibrarianTool': { |
| 4513 | 'AdditionalLibraryDirectories': |
| 4514 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 4515 | }, |
| 4516 | 'VCLinkerTool': { |
| 4517 | 'AdditionalLibraryDirectories': |
| 4518 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 4519 | }, |
| 4520 | }, |
| 4521 | }, |
| 4522 | }, |
| 4523 | 'msvs_settings': { |
| 4524 | 'VCLinkerTool': { |
| 4525 | # Explicitly required when using the ATL with express |
| 4526 | 'AdditionalDependencies': ['atlthunk.lib'], |
| 4527 | |
| 4528 | # ATL 8.0 included in WDK 7.1 makes the linker to generate |
| 4529 | # almost eight hundred LNK4254 and LNK4078 warnings: |
| 4530 | # - warning LNK4254: section 'ATL' (50000040) merged into |
| 4531 | # '.rdata' (40000040) with different attributes |
| 4532 | # - warning LNK4078: multiple 'ATL' sections found with |
| 4533 | # different attributes |
| 4534 | 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
| 4535 | }, |
| 4536 | }, |
| 4537 | 'msvs_system_include_dirs': [ |
| 4538 | '<(windows_driver_kit_path)/inc/atl71', |
| 4539 | '<(windows_driver_kit_path)/inc/mfc42', |
| 4540 | ], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 4541 | 'target_conditions': [ |
| 4542 | ['chromium_code', { |
| 4543 | # Workaround for intsafe in 2010 Express + WDK. |
| 4544 | # ATL code uses intsafe.h and both intsafe.h and stdint.h |
| 4545 | # define INT8_MIN et al. |
| 4546 | # We can't use this workaround in third_party code because |
| 4547 | # it has various levels of intolerance for including stdint.h. |
| 4548 | 'msvs_system_include_dirs': [ |
| 4549 | '<(DEPTH)/build', |
| 4550 | ], |
| 4551 | 'msvs_settings': { |
| 4552 | 'VCCLCompilerTool': { |
| 4553 | 'ForcedIncludeFiles': [ 'intsafe_workaround.h', ], |
| 4554 | }, |
| 4555 | }, |
| 4556 | }], |
[email protected] | 3f3f45f | 2013-10-28 19:30:43 | [diff] [blame] | 4557 | ], |
[email protected] | 3f3f45f | 2013-10-28 19:30:43 | [diff] [blame] | 4558 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4559 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 4560 | 'msvs_system_include_dirs': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4561 | '<(windows_sdk_path)/Include/shared', |
| 4562 | '<(windows_sdk_path)/Include/um', |
| 4563 | '<(windows_sdk_path)/Include/winrt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4564 | '$(VSInstallDir)/VC/atlmfc/include', |
| 4565 | ], |
[email protected] | a8d99cef | 2009-08-26 20:47:49 | [diff] [blame] | 4566 | 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
[email protected] | bab6e23 | 2013-11-27 22:52:39 | [diff] [blame] | 4567 | 'msvs_cygwin_shell': 0, |
[email protected] | 7815a36 | 2013-04-26 08:12:00 | [diff] [blame] | 4568 | 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4569 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 4570 | # removed as code is fixed. |
| 4571 | 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
[email protected] | 7815a36 | 2013-04-26 08:12:00 | [diff] [blame] | 4572 | 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702, |
| 4573 | 4706, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4574 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4575 | 'msvs_settings': { |
| 4576 | 'VCCLCompilerTool': { |
[email protected] | e9b96bb | 2012-09-07 01:10:44 | [diff] [blame] | 4577 | 'AdditionalOptions': ['/MP'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4578 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4579 | 'BufferSecurityCheck': 'true', |
| 4580 | 'EnableFunctionLevelLinking': 'true', |
| 4581 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 4582 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4583 | 'WarnAsError': 'true', |
| 4584 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 4585 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 4586 | ['component=="shared_library"', { |
| 4587 | 'ExceptionHandling': '1', # /EHsc |
| 4588 | }, { |
| 4589 | 'ExceptionHandling': '0', |
| 4590 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 4591 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4592 | }, |
| 4593 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4594 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4595 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4596 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4597 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4598 | }, |
| 4599 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4600 | 'AdditionalDependencies': [ |
| 4601 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 4602 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4603 | 'version.lib', |
| 4604 | 'msimg32.lib', |
| 4605 | 'ws2_32.lib', |
| 4606 | 'usp10.lib', |
| 4607 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 4608 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 4609 | 'winmm.lib', |
| 4610 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4611 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4612 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 4613 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 4614 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4615 | 'GenerateDebugInformation': 'true', |
| 4616 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 4617 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4618 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 4619 | # SubSystem values: |
| 4620 | # 0 == not set |
| 4621 | # 1 == /SUBSYSTEM:CONSOLE |
| 4622 | # 2 == /SUBSYSTEM:WINDOWS |
| 4623 | # Most of the executables we'll ever create are tests |
| 4624 | # and utilities with console output. |
| 4625 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4626 | }, |
| 4627 | 'VCMIDLTool': { |
| 4628 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 4629 | 'TypeLibraryName': '$(InputName).tlb', |
| 4630 | 'OutputDirectory': '$(IntDir)', |
| 4631 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 4632 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 4633 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 4634 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4635 | }, |
| 4636 | 'VCResourceCompilerTool': { |
| 4637 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 4638 | 'AdditionalIncludeDirectories': [ |
| 4639 | '<(DEPTH)', |
| 4640 | '<(SHARED_INTERMEDIATE_DIR)', |
| 4641 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4642 | }, |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 4643 | 'target_conditions': [ |
| 4644 | ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', { |
| 4645 | 'VCManifestTool': { |
| 4646 | 'AdditionalManifestFiles': [ |
| 4647 | '>(win_exe_compatibility_manifest)', |
| 4648 | ], |
| 4649 | }, |
| 4650 | }], |
| 4651 | ['_type=="executable" and >(win_use_external_manifest)==0', { |
| 4652 | 'VCManifestTool': { |
| 4653 | 'EmbedManifest': 'true', |
| 4654 | } |
| 4655 | }], |
| 4656 | ['_type=="executable" and >(win_use_external_manifest)==1', { |
| 4657 | 'VCManifestTool': { |
| 4658 | 'EmbedManifest': 'false', |
| 4659 | } |
| 4660 | }], |
| 4661 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4662 | }, |
| 4663 | }, |
| 4664 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 4665 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 4666 | 'target_defaults': { |
| 4667 | 'defines': [ |
| 4668 | 'DISABLE_NACL', |
| 4669 | ], |
| 4670 | }, |
| 4671 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 4672 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4673 | 'target_defaults': { |
| 4674 | 'msvs_settings': { |
| 4675 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4676 | 'DelayLoadDLLs': [ |
| 4677 | 'dbghelp.dll', |
| 4678 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 4679 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4680 | 'uxtheme.dll', |
| 4681 | ], |
| 4682 | }, |
| 4683 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4684 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4685 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4686 | 'msvs_settings': { |
| 4687 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4688 | 'AdditionalOptions': [ |
| 4689 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 4690 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4691 | '/ignore:4199', |
| 4692 | '/ignore:4221', |
| 4693 | '/nxcompat', |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 4694 | ], |
| 4695 | 'conditions': [ |
| 4696 | ['asan==0', { |
| 4697 | 'AdditionalOptions': ['/largeaddressaware'], |
| 4698 | }], |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4699 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4700 | }, |
| 4701 | }, |
| 4702 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4703 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4704 | 'msvs_settings': { |
| 4705 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4706 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4707 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 4708 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 4709 | '/ignore:4199', |
| 4710 | '/ignore:4221', |
| 4711 | '/nxcompat', |
| 4712 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 4713 | }, |
| 4714 | }, |
| 4715 | }, |
| 4716 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 4717 | }, |
| 4718 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 4719 | ['enable_new_npdevice_api==1', { |
| 4720 | 'target_defaults': { |
| 4721 | 'defines': [ |
| 4722 | 'ENABLE_NEW_NPDEVICE_API', |
| 4723 | ], |
| 4724 | }, |
| 4725 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 4726 | # Don't warn about the "typedef 'foo' locally defined but not used" |
| 4727 | # for gcc 4.8. |
| 4728 | # TODO: remove this flag once all builds work. See crbug.com/227506 |
| 4729 | ['gcc_version>=48', { |
| 4730 | 'target_defaults': { |
| 4731 | 'cflags': [ |
| 4732 | '-Wno-unused-local-typedefs', |
| 4733 | ], |
| 4734 | }, |
| 4735 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4736 | ['clang==1', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 4737 | 'make_global_settings': [ |
| 4738 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 4739 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
| 4740 | ['CC.host', '$(CC)'], |
| 4741 | ['CXX.host', '$(CXX)'], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4742 | ], |
| 4743 | }], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 4744 | ['OS=="android" and clang==0', { |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 4745 | # Hardcode the compiler names in the Makefile so that |
| 4746 | # it won't depend on the environment at make time. |
[email protected] | 7fc96c8 | 2012-07-24 18:15:11 | [diff] [blame] | 4747 | 'make_global_settings': [ |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 4748 | ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| 4749 | ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
| 4750 | ['CC.host', '<!(which gcc)'], |
| 4751 | ['CXX.host', '<!(which g++)'], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 4752 | ], |
| 4753 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4754 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 4755 | 'make_global_settings': [ |
| 4756 | ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], |
| 4757 | ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 4758 | ['CC.host', '<!(which gcc)'], |
| 4759 | ['CXX.host', '<!(which g++)'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 4760 | ], |
| 4761 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 4762 | |
| 4763 | # TODO(yyanagisawa): supports GENERATOR==make |
| 4764 | # make generator doesn't support CC_wrapper without CC |
| 4765 | # in make_global_settings yet. |
| 4766 | ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
| 4767 | 'make_global_settings': [ |
| 4768 | ['CC_wrapper', '<(gomadir)/gomacc'], |
| 4769 | ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 4770 | ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 4771 | ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 4772 | ], |
| 4773 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4774 | ], |
| 4775 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 4776 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 4777 | # This block adds *project-wide* configuration settings to each project |
| 4778 | # file. It's almost always wrong to put things here. Specify your |
| 4779 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 4780 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4781 | 'conditions': [ |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4782 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 4783 | # setting sets the SDK on a project-wide basis. In order to get the |
| 4784 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 4785 | # here at the project level. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4786 | ['OS=="mac"', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4787 | 'conditions': [ |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4788 | ['mac_sdk_path==""', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4789 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4790 | }, { |
| 4791 | 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 4792 | }], |
| 4793 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4794 | }], |
| 4795 | ['OS=="ios"', { |
| 4796 | 'conditions': [ |
| 4797 | ['ios_sdk_path==""', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4798 | 'conditions': [ |
| 4799 | # TODO(justincohen): Ninja only supports simulator for now. |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4800 | ['"<(GENERATOR)"=="xcode"', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4801 | 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
[email protected] | 187e0e3 | 2013-07-18 21:49:38 | [diff] [blame] | 4802 | }, { |
| 4803 | 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 4804 | }], |
| 4805 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 4806 | }, { |
| 4807 | 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
| 4808 | }], |
| 4809 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4810 | }], |
| 4811 | ['OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4812 | # Target both iPhone and iPad. |
| 4813 | 'TARGETED_DEVICE_FAMILY': '1,2', |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4814 | 'VALID_ARCHS': 'armv7 i386', |
[email protected] | 72c0d365 | 2013-11-05 19:11:42 | [diff] [blame] | 4815 | }, { # OS!="ios" |
| 4816 | 'conditions': [ |
| 4817 | ['target_arch=="x64"', { |
| 4818 | 'ARCHS': [ |
| 4819 | 'x86_64' |
| 4820 | ], |
| 4821 | }], |
| 4822 | ['target_arch=="ia32"', { |
| 4823 | 'ARCHS': [ |
| 4824 | 'i386' |
| 4825 | ], |
| 4826 | }], |
| 4827 | ], |
[email protected] | d6455401 | 2013-10-31 18:40:00 | [diff] [blame] | 4828 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4829 | ], |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 4830 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4831 | # The Xcode generator will look for an xcode_settings section at the root |
| 4832 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 4833 | # settings should not be here, they should be in target-specific |
| 4834 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 4835 | # settings in target dicts. SYMROOT is a special case, because many other |
| 4836 | # Xcode variables depend on it, including variables such as |
| 4837 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 4838 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 4839 | # files to appear (when present) in the UI as actual files and not red |
| 4840 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 4841 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 4842 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4843 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 4844 | } |