[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 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 24 | # Whether we're building the cast (chromecast) shell |
| 25 | 'chromecast%': 0, |
| 26 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 27 | # Whether or not we are using the Aura windowing framework. |
| 28 | 'use_aura%': 0, |
| 29 | |
| 30 | # Whether or not we are building the Ash shell. |
| 31 | 'use_ash%': 0, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 32 | |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 33 | # Whether or not we are using CRAS, the ChromeOS Audio Server. |
| 34 | 'use_cras%': 0, |
| 35 | |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 36 | # Use a raw surface abstraction. |
| 37 | 'use_ozone%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 38 | |
| 39 | # Configure the build for small devices. See crbug.com/318413 |
| 40 | 'embedded%': 0, |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 41 | |
| 42 | 'conditions': [ |
| 43 | # Compute the architecture that we're building on. |
| 44 | ['OS=="win" or OS=="mac" or OS=="ios"', { |
| 45 | 'host_arch%': 'ia32', |
| 46 | }, { |
[email protected] | d2f38924 | 2014-06-06 09:56:44 | [diff] [blame] | 47 | 'host_arch%': '<!pymod_do_main(detect_host_arch)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 48 | }], |
| 49 | ], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 50 | }, |
| 51 | # Copy conditionally-set variables out one scope. |
| 52 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 53 | 'chromecast%': '<(chromecast)', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 54 | 'use_aura%': '<(use_aura)', |
| 55 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 56 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 57 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 58 | 'embedded%': '<(embedded)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 59 | 'host_arch%': '<(host_arch)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 60 | |
[email protected] | 3fa441d | 2011-09-18 17:28:50 | [diff] [blame] | 61 | # Whether we are using Views Toolkit |
| 62 | 'toolkit_views%': 0, |
| 63 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 64 | # Use OpenSSL instead of NSS as the underlying SSL and crypto |
| 65 | # implementation. Certificate verification will in most cases be |
| 66 | # handled by the OS. If OpenSSL's struct X509 is used to represent |
| 67 | # certificates, use_openssl_certs must be set. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 68 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 69 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 70 | # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*. |
| 71 | 'use_openssl_certs%': 0, |
| 72 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 73 | # Disable viewport meta tag by default. |
| 74 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 75 | |
| 76 | # Enable HiDPI support. |
| 77 | 'enable_hidpi%': 0, |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 78 | |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 79 | # Override buildtype to select the desired build flavor. |
| 80 | # Dev - everyday build for development/testing |
| 81 | # Official - release build (generally implies additional processing) |
| 82 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 83 | # conversion is done), some of the things which are now controlled by |
| 84 | # 'branding', such as symbol generation, will need to be refactored |
| 85 | # based on 'buildtype' (i.e. we don't care about saving symbols for |
| 86 | # non-Official # builds). |
| 87 | 'buildtype%': 'Dev', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 88 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 89 | # Override branding to select the desired branding flavor. |
| 90 | 'branding%': 'Chromium', |
| 91 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 92 | 'conditions': [ |
[email protected] | 2d050520 | 2013-09-16 00:22:52 | [diff] [blame] | 93 | # ChromeOS and Windows use Aura and Ash. |
[email protected] | 1511930 | 2014-05-20 19:23:58 | [diff] [blame] | 94 | ['chromeos==1 or OS=="win" or OS=="linux"', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 95 | 'use_ash%': 1, |
[email protected] | 978a2ae | 2013-09-13 04:28:01 | [diff] [blame] | 96 | 'use_aura%': 1, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 97 | }], |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 98 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 99 | ['chromecast==1', { |
| 100 | 'embedded%': 1, |
| 101 | 'use_ozone%': 1, |
| 102 | }], |
| 103 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 104 | # Ozone uses Aura. |
| 105 | ['use_ozone==1', { |
| 106 | 'use_aura%': 1, |
| 107 | }], |
| 108 | |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 109 | # Whether we're a traditional desktop unix. |
| 110 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', { |
| 111 | 'desktop_linux%': 1, |
| 112 | }, { |
| 113 | 'desktop_linux%': 0, |
| 114 | }], |
| 115 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 116 | # Embedded implies ozone. |
| 117 | ['embedded==1', { |
| 118 | 'use_ozone%': 1, |
| 119 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 120 | |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 121 | ['OS=="android"', { |
| 122 | 'target_arch%': 'arm', |
| 123 | }, { |
| 124 | # Default architecture we're building for is the architecture we're |
| 125 | # building on, and possibly sub-architecture (for iOS builds). |
| 126 | 'target_arch%': '<(host_arch)', |
| 127 | }], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 128 | ], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 129 | }, |
| 130 | # Copy conditionally-set variables out one scope. |
| 131 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 132 | 'chromecast%': '<(chromecast)', |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 133 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 134 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 135 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 136 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 137 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 138 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 139 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 140 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 141 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 142 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 143 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 144 | 'branding%': '<(branding)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 145 | 'host_arch%': '<(host_arch)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 146 | 'target_arch%': '<(target_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 147 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 148 | 'target_subarch%': '', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 149 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 150 | # This is set when building the Android WebView inside the Android |
| 151 | # build system, using the 'android' gyp backend. The WebView code is |
| 152 | # still built when this is unset, but builds using the normal chromium |
| 153 | # build system. |
| 154 | 'android_webview_build%': 0, |
[email protected] | 0115f04 | 2012-07-27 20:36:53 | [diff] [blame] | 155 | |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 156 | # This is set when building the Android WebView in ninja for the |
| 157 | # telemetry bot. |
| 158 | 'android_webview_telemetry_build%': 0, |
| 159 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 160 | # Set ARM architecture version. |
| 161 | 'arm_version%': 7, |
| 162 | |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 163 | # Use aurax11 for clipboard implementation. This is true on linux_aura. |
| 164 | 'use_clipboard_aurax11%': 0, |
| 165 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 166 | # goma settings. |
| 167 | # 1 to use goma. |
| 168 | # If no gomadir is set, it uses the default gomadir. |
| 169 | 'use_goma%': 0, |
| 170 | 'gomadir%': '', |
| 171 | |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 172 | # The system root for cross-compiles. Default: none. |
| 173 | 'sysroot%': '', |
| 174 | 'chroot_cmd%': '', |
| 175 | |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 176 | # The system libdir used for this ABI. |
| 177 | 'system_libdir%': 'lib', |
| 178 | |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 179 | # Default MIPS arch variant. This is set in the conditions block |
| 180 | # below for MIPS targets. |
| 181 | 'mips_arch_variant%': '', |
| 182 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 183 | 'conditions': [ |
[email protected] | 2c858a8 | 2013-10-05 01:01:32 | [diff] [blame] | 184 | # Ash needs Aura. |
| 185 | ['use_aura==0', { |
| 186 | 'use_ash%': 0, |
| 187 | }], |
| 188 | |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 189 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 190 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 191 | 'toolkit_views%': 1, |
| 192 | }, { |
| 193 | 'toolkit_views%': 0, |
| 194 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 195 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 196 | # Embedded builds use aura without ash or views. |
| 197 | ['embedded==1', { |
| 198 | 'use_aura%': 1, |
| 199 | 'use_ash%': 0, |
| 200 | 'toolkit_views%': 0, |
| 201 | }], |
| 202 | |
[email protected] | d2b16e3 | 2014-03-06 22:10:49 | [diff] [blame] | 203 | # Enable HiDPI on Mac OS, Chrome OS and Windows. |
| 204 | ['OS=="mac" or chromeos==1 or OS=="win"', { |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 205 | 'enable_hidpi%': 1, |
| 206 | }], |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 207 | |
[email protected] | b11c0cc0 | 2014-06-28 05:36:50 | [diff] [blame] | 208 | # Enable App Launcher everywhere but mobile. |
| 209 | ['OS!="ios" and OS!="android"', { |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 210 | 'enable_app_list%': 1, |
| 211 | }, { |
| 212 | 'enable_app_list%': 0, |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 213 | }], |
| 214 | |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 215 | ['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] | 216 | 'use_default_render_theme%': 1, |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 217 | }, { |
| 218 | 'use_default_render_theme%': 0, |
| 219 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 220 | |
| 221 | ['use_ozone==1', { |
| 222 | 'use_ozone_evdev%': 1, |
| 223 | }, { |
| 224 | 'use_ozone_evdev%': 0, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 225 | }], |
| 226 | |
| 227 | # Set default gomadir. |
| 228 | ['OS=="win"', { |
| 229 | 'gomadir': 'c:\\goma\\goma-win', |
[email protected] | 91b9129 | 2014-01-18 23:54:41 | [diff] [blame] | 230 | }, { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 231 | 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 232 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 233 | |
| 234 | # Set the default "target_subarch" on iOS. Valid values are "arm32", |
| 235 | # "arm64" and "both" (meaning a fat binary). |
| 236 | # |
| 237 | # TODO(sdefresne): change the default from "arm32" to "both" for |
| 238 | # "target_subarch" once http://crbug.com/339477 is fixed. |
| 239 | # |
| 240 | # TODO(sdefresne): set the "target_arch" to "arm" once compilation |
| 241 | # of skia has been fixed for simulator. http://crbug.com/342377 |
| 242 | ['OS=="ios"', { |
| 243 | 'target_subarch%': 'arm32', |
| 244 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 245 | |
| 246 | # Set arch variants for MIPS platforms. |
| 247 | ['target_arch=="mips64el"', { |
| 248 | 'conditions': [ |
| 249 | ['OS=="android"', { |
| 250 | 'mips_arch_variant%': 'r6', |
| 251 | }, { |
| 252 | 'mips_arch_variant%': 'r2', |
| 253 | }], |
| 254 | ], |
| 255 | }], |
| 256 | |
| 257 | ['target_arch=="mipsel"', { |
| 258 | 'mips_arch_variant%': 'r1', |
| 259 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 260 | ], |
| 261 | }, |
| 262 | |
| 263 | # Copy conditionally-set variables out one scope. |
| 264 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 265 | 'chromecast%': '<(chromecast)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 266 | 'host_arch%': '<(host_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 267 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 268 | 'target_subarch%': '<(target_subarch)', |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 269 | 'mips_arch_variant%': '<(mips_arch_variant)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 270 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 271 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 272 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 273 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 274 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 275 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 276 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 277 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 278 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 279 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 280 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 281 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 282 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 283 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 284 | 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 285 | 'use_goma%': '<(use_goma)', |
| 286 | 'gomadir%': '<(gomadir)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 287 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 288 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 289 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 290 | 'branding%': '<(branding)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 291 | 'arm_version%': '<(arm_version)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 292 | 'sysroot%': '<(sysroot)', |
| 293 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 294 | 'system_libdir%': '<(system_libdir)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 295 | |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 296 | # Set to 1 to enable fast builds. Set to 2 for even faster builds |
| 297 | # (it disables debug info for fastest compilation - only for use |
| 298 | # on compile-only bots). |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 299 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 300 | |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 301 | # Set to 1 to not store any build metadata (this isn't working yet but |
| 302 | # this flag will help us to get there). See http://crbug.com/314403. |
| 303 | # TODO(sebmarchand): Update this comment once this flag guarantee that |
| 304 | # there's no build metadata in the build artifacts. |
| 305 | 'dont_embed_build_metadata%': 0, |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 306 | |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 307 | # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
| 308 | # This is useful for parallel compilation tools which can't support /Zi. |
| 309 | # Only used on Windows. |
| 310 | 'win_z7%' : 0, |
| 311 | |
[email protected] | 1a150551 | 2014-03-10 18:23:38 | [diff] [blame] | 312 | # Set to 1 to enable dcheck in release. |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 313 | 'dcheck_always_on%': 0, |
| 314 | |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 315 | # Set to 1 to make a build that disables unshipped tracing events. |
| 316 | # Note: this setting is ignored if buildtype=="Official". |
| 317 | 'tracing_like_official_build%': 0, |
| 318 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 319 | # Disable image loader component extension by default. |
| 320 | 'image_loader_extension%': 0, |
| 321 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 322 | # Set NEON compilation flags. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 323 | 'arm_neon%': 1, |
| 324 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 325 | # Detect NEON support at run-time. |
| 326 | 'arm_neon_optional%': 0, |
| 327 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 328 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 329 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 330 | |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 331 | # Use system libjpeg. Note that the system's libjepg will be used even if |
| 332 | # use_libjpeg_turbo is set. |
| 333 | 'use_system_libjpeg%': 0, |
| 334 | |
[email protected] | aa5e01fc | 2013-03-06 14:06:17 | [diff] [blame] | 335 | # By default, component is set to static_library and it can be overriden |
| 336 | # by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 337 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 338 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 339 | # Set to select the Title Case versions of strings in GRD files. |
| 340 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 341 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 342 | # Use translations provided by volunteers at launchpad.net. This |
| 343 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 344 | 'use_third_party_translations%': 0, |
| 345 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 346 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 347 | 'remoting%': 1, |
| 348 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 349 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 350 | 'configuration_policy%': 1, |
| 351 | |
[email protected] | 6c521fed | 2012-11-29 17:00:03 | [diff] [blame] | 352 | # Variable safe_browsing is used to control the build time configuration |
| 353 | # for safe browsing feature. Safe browsing can be compiled in 3 different |
| 354 | # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and |
| 355 | # reporting features without enabling phishing and malware detection. This |
| 356 | # is useful to integrate a third party phishing/malware detection to |
| 357 | # existing safe browsing logic. |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 358 | 'safe_browsing%': 1, |
| 359 | |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 360 | # Web speech is enabled by default. Set to 0 to disable. |
| 361 | 'enable_web_speech%': 1, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 362 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 363 | # Notifications are compiled in by default. Set to 0 to disable. |
| 364 | 'notifications%' : 1, |
| 365 | |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 366 | # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for |
| 367 | # regular builds and 1 for ASan builds. |
| 368 | 'mac_want_real_dsym%': 'default', |
| 369 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 370 | # If this is set, the clang plugins used on the buildbot will be used. |
| 371 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 372 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 373 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 374 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 375 | |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 376 | # Enable building with ASAN (Clang's -fsanitize=address option). |
| 377 | # -fsanitize=address only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 378 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 379 | 'asan%': 0, |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 380 | # Enable coverage gathering instrumentation in ASan. This flag also |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 381 | # controls coverage granularity (1 for function-level coverage, 2 for |
| 382 | # block-level coverage). |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 383 | 'asan_coverage%': 0, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 384 | |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 385 | # Enable Chromium overrides of the default configurations for various |
| 386 | # dynamic tools (like ASan). |
| 387 | 'use_sanitizer_options%': 1, |
| 388 | |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 389 | # Enable building with SyzyAsan. |
| 390 | # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo |
| 391 | 'syzyasan%': 0, |
| 392 | |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 393 | # Enable building with LSan (Clang's -fsanitize=leak option). |
| 394 | # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
| 395 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer |
| 396 | 'lsan%': 0, |
| 397 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 398 | # Enable building with TSan (Clang's -fsanitize=thread option). |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 399 | # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 400 | # See http://clang.llvm.org/docs/ThreadSanitizer.html |
| 401 | 'tsan%': 0, |
[email protected] | 0b5ec8bf | 2014-06-25 21:11:54 | [diff] [blame] | 402 | 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 403 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 404 | # Enable building with MSan (Clang's -fsanitize=memory option). |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 405 | # MemorySanitizer only works with clang, but msan=1 implies clang=1 |
| 406 | # See http://clang.llvm.org/docs/MemorySanitizer.html |
| 407 | 'msan%': 0, |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 408 | 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 409 | # Track where uninitialized memory originates from. From fastest to |
| 410 | # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 |
| 411 | # - track the chain of stores leading from allocation site to use site. |
| 412 | 'msan_track_origins%': 1, |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 413 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 414 | # Enable building with UBSan (Clang's -fsanitize=undefined option). |
| 415 | # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1 |
| 416 | # See http://clang.llvm.org/docs/UsersManual.html |
| 417 | 'ubsan%': 0, |
| 418 | |
[email protected] | 22e1554 | 2014-07-18 23:09:24 | [diff] [blame] | 419 | # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option). |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 420 | # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1 |
| 421 | 'ubsan_vptr%': 0, |
| 422 | 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt', |
| 423 | |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 424 | # Use the dynamic libraries instrumented by one of the sanitizers |
| 425 | # instead of the standard system libraries. |
| 426 | 'use_instrumented_libraries%': 0, |
| 427 | |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 428 | # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
| 429 | # stdlibc++ as standard library. This is intended to use for instrumented |
| 430 | # builds. |
| 431 | 'use_custom_libcxx%': 0, |
| 432 | |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 433 | # Use system libc++ instead of the default C++ library, usually libstdc++. |
| 434 | # This is intended for iOS builds only. |
| 435 | 'use_system_libcxx%': 0, |
| 436 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 437 | # Use a modified version of Clang to intercept allocated types and sizes |
| 438 | # for allocated objects. clang_type_profiler=1 implies clang=1. |
| 439 | # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
| 440 | # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
| 441 | 'clang_type_profiler%': 0, |
| 442 | |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 443 | # Set to true to instrument the code with function call logger. |
| 444 | # See src/third_party/cygprofile/cyg-profile.cc for details. |
| 445 | 'order_profiling%': 0, |
| 446 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 447 | # Use the provided profiled order file to link Chrome image with it. |
| 448 | # This makes Chrome faster by better using CPU cache when executing code. |
| 449 | # This is known as PGO (profile guided optimization). |
| 450 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 451 | 'order_text_section%' : "", |
| 452 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 453 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 454 | # libraries on linux x86-64 and arm, plus ASLR. |
| 455 | 'linux_fpic%': 1, |
| 456 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 457 | # Whether one-click signin is enabled or not. |
| 458 | 'enable_one_click_signin%': 0, |
| 459 | |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 460 | # Whether to back up data before sync. |
| 461 | 'enable_pre_sync_backup%': 0, |
| 462 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 463 | # Enable Chrome browser extensions |
| 464 | 'enable_extensions%': 1, |
| 465 | |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 466 | # Enable Google Now. |
[email protected] | 9a5bb05 | 2014-04-17 16:50:56 | [diff] [blame] | 467 | 'enable_google_now%': 1, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 468 | |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 469 | # Enable printing support and UI. This variable is used to configure |
| 470 | # which parts of printing will be built. 0 disables printing completely, |
| 471 | # 1 enables it fully, and 2 enables only the codepath to generate a |
| 472 | # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud |
| 473 | # print, UI, etc. |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 474 | 'enable_printing%': 1, |
| 475 | |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 476 | # Set the version of CLD. |
| 477 | # 0: Don't specify the version. This option is for the Finch testing. |
| 478 | # 1: Use only CLD1. |
| 479 | # 2: Use only CLD2. |
[email protected] | d8ef236 | 2013-10-22 02:10:00 | [diff] [blame] | 480 | 'cld_version%': 2, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 481 | |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 482 | # For CLD2, the size of the tables that should be included in the build |
[email protected] | e5a7a2a | 2014-03-27 16:16:03 | [diff] [blame] | 483 | # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data |
| 484 | # tool explicitly. |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 485 | # See third_party/cld_2/cld_2.gyp for more information. |
| 486 | # 0: Small tables, lower accuracy |
| 487 | # 1: Medium tables, medium accuracy |
| 488 | # 2: Large tables, high accuracy |
| 489 | 'cld2_table_size%': 2, |
| 490 | |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 491 | # The data acquisition mode for CLD2. Possible values are: |
| 492 | # static: CLD2 data is statically linked to the executable. |
| 493 | # standalone: CLD2 data is provided in a standalone file that is |
| 494 | # bundled with the executable. |
| 495 | # component: CLD2 data is provided as a Chrome "component" and is |
| 496 | # downloaded via the component updater. |
[email protected] | 916748e | 2014-06-25 12:57:15 | [diff] [blame] | 497 | # |
| 498 | # For more information on switching the CLD2 data source, see: |
| 499 | # https://sites.google.com/a/chromium.org/dev/developers/how-tos/compact-language-detector-cld-data-source-configuration |
[email protected] | 34621d1 | 2014-07-16 22:33:10 | [diff] [blame] | 500 | # |
| 501 | # This string will be exposed in chrome://translate-internals under the |
| 502 | # heading "CLD Data Source". This allows easy determination of which |
| 503 | # data source the browser was built with. |
[email protected] | df0c5ef | 2014-06-26 08:35:01 | [diff] [blame] | 504 | 'cld2_data_source%': 'static', |
[email protected] | fb53e65 | 2014-04-30 11:27:19 | [diff] [blame] | 505 | |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 506 | # Enable spell checker. |
| 507 | 'enable_spellcheck%': 1, |
| 508 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 509 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 510 | 'enable_webrtc%': 1, |
| 511 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 512 | # Enables use of the session service, which is enabled by default. |
| 513 | # Support for disabling depends on the platform. |
| 514 | 'enable_session_service%': 1, |
| 515 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 516 | # Enables theme support, which is enabled by default. Support for |
| 517 | # disabling depends on the platform. |
| 518 | 'enable_themes%': 1, |
| 519 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 520 | # Enables autofill dialog and associated features; disabled by default. |
| 521 | 'enable_autofill_dialog%' : 0, |
| 522 | |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 523 | # Defaults Wallet integration in Autofill dialog to use production |
| 524 | # servers. Unofficial builds won't have the proper API keys. |
| 525 | 'enable_prod_wallet_service%': 0, |
| 526 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 527 | # Enables support for background apps. |
| 528 | 'enable_background%': 1, |
| 529 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 530 | # Enable the task manager by default. |
| 531 | 'enable_task_manager%': 1, |
[email protected] | e1de87f | 2012-05-02 17:20:45 | [diff] [blame] | 532 | |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 533 | # Enables used resource whitelist generation; disabled by default. |
| 534 | 'enable_resource_whitelist_generation%': 0, |
| 535 | |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 536 | # Enable FILE support by default. |
| 537 | 'disable_file_support%': 0, |
| 538 | |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 539 | # Enable FTP support by default. |
| 540 | 'disable_ftp_support%': 0, |
| 541 | |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 542 | # Use native android functions in place of ICU. Not supported by most |
| 543 | # components. |
| 544 | 'use_icu_alternatives_on_android%': 0, |
| 545 | |
[email protected] | ef4cb64 | 2013-09-14 22:48:02 | [diff] [blame] | 546 | # XInput2 multitouch support is enabled by default (use_xi2_mt=2). |
| 547 | # Setting to zero value disables XI2 MT. When XI2 MT is enabled, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 548 | # the input value also defines the required XI2 minor minimum version. |
| 549 | # 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] | 550 | 'use_xi2_mt%': 2, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 551 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 552 | # Use of precompiled headers on Windows. |
| 553 | # |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 554 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 555 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 556 | # This setting will override the default. |
| 557 | # |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 558 | # See |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 559 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 560 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 561 | 'chromium_win_pch%': 0, |
| 562 | |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 563 | # Clang stuff. |
| 564 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 565 | # Set this to true when building with Clang. |
| 566 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 567 | # If this is set, clang is used as both host and target compiler in |
| 568 | # cross-compile builds. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 569 | 'clang%': 0, |
| 570 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 571 | # Enable plug-in installation by default. |
| 572 | 'enable_plugin_installation%': 1, |
| 573 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 574 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 575 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 576 | # Chrome UI. |
| 577 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 578 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 579 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 580 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 581 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 582 | # with one of those tools. |
| 583 | 'build_for_tool%': '', |
| 584 | |
[email protected] | 3713813 | 2013-01-17 23:08:52 | [diff] [blame] | 585 | # If no directory is specified then a temporary directory will be used. |
| 586 | 'test_isolation_outdir%': '', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 587 | # True if isolate should fail if the isolate files refer to files |
| 588 | # that are missing. |
| 589 | 'test_isolation_fail_on_missing': 0, |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 590 | |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 591 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 592 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 593 | # Managed users are enabled by default. |
| 594 | 'enable_managed_users%': 1, |
| 595 | |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 596 | # Platform natively supports discardable memory. |
| 597 | 'native_discardable_memory%': 0, |
| 598 | |
| 599 | # Platform sends memory pressure signals natively. |
| 600 | 'native_memory_pressure_signals%': 0, |
| 601 | |
[email protected] | 9be0a7f | 2014-05-08 06:05:33 | [diff] [blame] | 602 | 'data_reduction_fallback_host%' : '', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 603 | 'data_reduction_dev_host%' : '', |
[email protected] | 9be0a7f | 2014-05-08 06:05:33 | [diff] [blame] | 604 | 'spdy_proxy_auth_origin%' : '', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 605 | 'spdy_proxy_auth_property%' : '', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 606 | 'spdy_proxy_auth_value%' : '', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 607 | 'data_reduction_proxy_probe_url%' : '', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 608 | 'data_reduction_proxy_warmup_url%' : '', |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 609 | 'data_reduction_proxy_ssl_origin%' : '', |
| 610 | 'data_reduction_proxy_alt_origin%' : '', |
| 611 | 'data_reduction_proxy_alt_fallback_origin%' : '', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 612 | 'enable_mdns%' : 0, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 613 | 'enable_service_discovery%': 0, |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 614 | 'enable_wifi_bootstrapping%': 0, |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 615 | 'enable_hangout_services_extension%': 0, |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 616 | |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 617 | # Enable the Syzygy optimization step. |
| 618 | 'syzygy_optimize%': 0, |
| 619 | |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 620 | # Enable hole punching for the protected video. |
| 621 | 'video_hole%': 0, |
| 622 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 623 | # Automatically select platforms under ozone. Turn this off to |
| 624 | # build only explicitly selected platforms. |
| 625 | 'ozone_auto_platforms%': 1, |
| 626 | |
torne | ed51a58 | 2014-08-28 18:28:17 | [diff] [blame] | 627 | # If this is set clang is used as host compiler, but not as target |
| 628 | # compiler. Always do this by default. |
| 629 | 'host_clang%': 1, |
| 630 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 631 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 632 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 633 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 634 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 635 | }, { |
| 636 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 637 | }], |
| 638 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 639 | # A flag for BSD platforms |
| 640 | ['OS=="freebsd" or OS=="openbsd"', { |
| 641 | 'os_bsd%': 1, |
| 642 | }, { |
| 643 | 'os_bsd%': 0, |
| 644 | }], |
| 645 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 646 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 647 | ['(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] | 648 | 'use_nss%': 1, |
| 649 | }, { |
| 650 | 'use_nss%': 0, |
| 651 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 652 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 653 | # When OpenSSL is used for SSL and crypto on Unix-like systems, use |
| 654 | # OpenSSL's certificate definition. |
| 655 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', { |
| 656 | 'use_openssl_certs%': 1, |
| 657 | }, { |
| 658 | 'use_openssl_certs%': 0, |
| 659 | }], |
| 660 | |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 661 | # libudev usage. This currently only affects the content layer. |
[email protected] | 048ab5f | 2013-11-22 01:42:47 | [diff] [blame] | 662 | ['OS=="linux" and embedded==0', { |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 663 | 'use_udev%': 1, |
| 664 | }, { |
| 665 | 'use_udev%': 0, |
| 666 | }], |
| 667 | |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 668 | # Flags to use X11 on non-Mac POSIX platforms. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 669 | ['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] | 670 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 671 | }, { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 672 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 673 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 674 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 675 | # Flags to use glib. |
[email protected] | 559d8f4f | 2014-04-23 18:28:51 | [diff] [blame] | 676 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 677 | 'use_glib%': 0, |
| 678 | }, { |
| 679 | 'use_glib%': 1, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 680 | }], |
| 681 | |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 682 | # Flags to use pango and cairo. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 683 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { |
| 684 | 'use_pango%': 0, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 685 | 'use_cairo%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 686 | }, { |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 687 | 'use_pango%': 1, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 688 | 'use_cairo%': 1, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 689 | }], |
| 690 | |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 691 | # DBus usage. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 692 | ['OS=="linux" and embedded==0', { |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 693 | 'use_dbus%': 1, |
| 694 | }, { |
| 695 | 'use_dbus%': 0, |
| 696 | }], |
| 697 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 698 | # We always use skia text rendering in Aura on Windows, since GDI |
| 699 | # doesn't agree with our BackingStore. |
| 700 | # TODO(beng): remove once skia text rendering is on by default. |
| 701 | ['use_aura==1 and OS=="win"', { |
| 702 | 'enable_skia_text%': 1, |
| 703 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 704 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 705 | # A flag to enable or disable our compile-time dependency |
| 706 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 707 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 708 | # for Linux distributions and for Aura. |
[email protected] | 8370a62 | 2014-02-19 08:12:29 | [diff] [blame] | 709 | ['OS!="linux" or chromeos==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 710 | 'use_gnome_keyring%': 0, |
| 711 | }, { |
| 712 | 'use_gnome_keyring%': 1, |
| 713 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 714 | |
[email protected] | ce67da1b6 | 2014-04-17 19:20:23 | [diff] [blame] | 715 | ['OS=="mac" or OS=="ios"', { |
| 716 | # Mac and iOS want Title Case strings |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 717 | 'use_titlecase_in_grd_files%': 1, |
| 718 | }], |
| 719 | |
[email protected] | ff930087 | 2014-01-22 11:09:32 | [diff] [blame] | 720 | # Enable loader extensions on Chrome OS. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 721 | ['chromeos==1', { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 722 | 'image_loader_extension%': 1, |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 723 | }, { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 724 | 'image_loader_extension%': 0, |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 725 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 726 | |
[email protected] | c79d197 | 2013-02-06 18:47:29 | [diff] [blame] | 727 | ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { |
[email protected] | f032fe9 | 2012-06-12 19:20:01 | [diff] [blame] | 728 | 'enable_one_click_signin%': 1, |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 729 | 'enable_pre_sync_backup%': 1, |
[email protected] | e4b66bf | 2012-05-29 20:39:51 | [diff] [blame] | 730 | }], |
| 731 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 732 | ['OS=="android"', { |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 733 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 734 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 735 | 'cld_version%': 1, |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 736 | 'enable_spellcheck%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 737 | 'enable_themes%': 0, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 738 | 'remoting%': 0, |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 739 | 'arm_neon%': 0, |
| 740 | 'arm_neon_optional%': 1, |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 741 | 'native_discardable_memory%': 1, |
| 742 | 'native_memory_pressure_signals%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 743 | 'enable_printing%': 2, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 744 | 'enable_task_manager%':0, |
[email protected] | 335b687 | 2014-02-13 20:14:13 | [diff] [blame] | 745 | # Set to 1 once we have a notification system for Android. |
| 746 | # http://crbug.com/115320 |
| 747 | 'notifications%': 0, |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 748 | 'video_hole%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 749 | }], |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 750 | |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 751 | # Android OS includes support for proprietary codecs regardless of |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 752 | # building Chromium or Google Chrome. We also ship Google Chrome and |
| 753 | # Chromecast with proprietary codecs. |
| 754 | ['OS=="android" or branding=="Chrome" or chromecast==1', { |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 755 | 'proprietary_codecs%': 1, |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 756 | }, { |
| 757 | 'proprietary_codecs%': 0, |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 758 | }], |
| 759 | |
[email protected] | 85f2958 | 2013-12-16 18:02:04 | [diff] [blame] | 760 | ['OS=="mac" or OS=="ios"', { |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 761 | 'native_discardable_memory%': 1, |
| 762 | 'native_memory_pressure_signals%': 1, |
| 763 | }], |
| 764 | |
[email protected] | 8f5999e | 2013-08-10 18:27:05 | [diff] [blame] | 765 | # Enable autofill dialog for Android, Mac and Views-enabled platforms. |
| 766 | ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 767 | 'enable_autofill_dialog%': 1, |
| 768 | |
| 769 | 'conditions': [ |
| 770 | ['buildtype=="Official"', { |
| 771 | 'enable_prod_wallet_service%': 1, |
| 772 | }], |
| 773 | ] |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 774 | }], |
| 775 | |
[email protected] | f96d63b | 2014-04-01 19:22:44 | [diff] [blame] | 776 | ['OS=="android"', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 777 | 'enable_webrtc%': 1, |
| 778 | }], |
| 779 | |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 780 | ['OS=="ios"', { |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 781 | 'disable_ftp_support%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 782 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 783 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 784 | 'cld_version%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 785 | 'enable_printing%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 786 | 'enable_session_service%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 787 | 'enable_themes%': 0, |
| 788 | 'enable_webrtc%': 0, |
| 789 | 'notifications%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 790 | 'remoting%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 791 | 'safe_browsing%': 0, |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 792 | 'enable_managed_users%': 0, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 793 | 'enable_task_manager%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 794 | }], |
| 795 | |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 796 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 797 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 798 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 799 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 800 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 801 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 802 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 803 | |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 804 | # Turn precompiled headers on by default. |
| 805 | ['OS=="win" and buildtype!="Official"', { |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 806 | 'chromium_win_pch%': 1 |
| 807 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 808 | |
[email protected] | 321dd1b | 2014-06-02 21:51:04 | [diff] [blame] | 809 | ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 810 | 'enable_plugin_installation%': 0, |
| 811 | }, { |
| 812 | 'enable_plugin_installation%': 1, |
| 813 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 814 | |
[email protected] | 50d3c4a4 | 2014-04-22 08:29:14 | [diff] [blame] | 815 | # Whether PPAPI is enabled. |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 816 | ['OS=="android" or OS=="ios" or embedded==1', { |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 817 | 'enable_plugins%': 0, |
| 818 | }, { |
| 819 | 'enable_plugins%': 1, |
| 820 | }], |
| 821 | |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 822 | # linux_use_bundled_gold: whether to use the gold linker binary checked |
| 823 | # into third_party/binutils. Force this off via GYP_DEFINES when you |
| 824 | # are using a custom toolchain and need to control -B in ldflags. |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 825 | # Do not use 32-bit gold on 32-bit hosts as it runs out address space |
| 826 | # for component=static_library builds. |
| 827 | ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 828 | 'linux_use_bundled_gold%': 1, |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 829 | }, { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 830 | 'linux_use_bundled_gold%': 0, |
| 831 | }], |
| 832 | |
| 833 | # linux_use_bundled_binutils: whether to use the binary binutils |
| 834 | # checked into third_party/binutils. These are not multi-arch so cannot |
| 835 | # be used except on x86 and x86-64 (the only two architectures which |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 836 | # are currently checke in). Force this off via GYP_DEFINES when you |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 837 | # are using a custom toolchain and need to control -B in cflags. |
| 838 | ['OS=="linux" and (target_arch=="x64")', { |
| 839 | 'linux_use_bundled_binutils%': 1, |
| 840 | }, { |
| 841 | 'linux_use_bundled_binutils%': 0, |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 842 | }], |
| 843 | |
| 844 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
[email protected] | fd6d17c | 2014-04-29 22:01:49 | [diff] [blame] | 845 | # On by default for x64 Linux. |
| 846 | ['OS=="linux" and target_arch=="x64"', { |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 847 | 'linux_use_gold_flags%': 1, |
| 848 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 849 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 850 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 851 | |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 852 | # linux_use_debug_fission: whether to use split DWARF debug info |
| 853 | # files. This can reduce link time significantly, but is incompatible |
| 854 | # with some utilities such as icecc and ccache. Requires gold and |
| 855 | # gcc >= 4.8 or clang. |
| 856 | # http://gcc.gnu.org/wiki/DebugFission |
| 857 | ['OS=="linux" and target_arch=="x64"', { |
| 858 | 'linux_use_debug_fission%': 1, |
| 859 | }, { |
| 860 | 'linux_use_debug_fission%': 0, |
| 861 | }], |
| 862 | |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 863 | ['OS=="android" or OS=="ios"', { |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 864 | 'enable_captive_portal_detection%': 0, |
| 865 | }, { |
| 866 | 'enable_captive_portal_detection%': 1, |
| 867 | }], |
| 868 | |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 869 | # Enable Skia UI text drawing incrementally on different platforms. |
| 870 | # http://crbug.com/105550 |
| 871 | # |
| 872 | # On Aura, this allows per-tile painting to be used in the browser |
| 873 | # compositor. |
[email protected] | 04b67b6 | 2013-09-14 01:32:17 | [diff] [blame] | 874 | ['OS!="android"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 875 | 'use_canvas_skia%': 1, |
| 876 | }], |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 877 | |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 878 | ['chromeos==1', { |
| 879 | # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
| 880 | 'use_libjpeg_turbo%': 0, |
| 881 | }], |
| 882 | |
[email protected] | 5be161f | 2013-06-18 11:09:33 | [diff] [blame] | 883 | # Do not enable the Settings App on ChromeOS. |
| 884 | ['enable_app_list==1 and chromeos==0', { |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 885 | 'enable_settings_app%': 1, |
| 886 | }, { |
| 887 | 'enable_settings_app%': 0, |
| 888 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 889 | |
| 890 | ['OS=="linux" and target_arch=="arm" and chromeos==0', { |
| 891 | # Set some defaults for arm/linux chrome builds |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 892 | 'use_allocator%': 'none', |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 893 | # sysroot needs to be an absolute path otherwise it generates |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 894 | # incorrect results when passed to pkg-config |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 895 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 896 | }], # OS=="linux" and target_arch=="arm" and chromeos==0 |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 897 | |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 898 | ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 899 | 'conditions': [ |
| 900 | ['target_arch=="x64"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 901 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 902 | }], |
| 903 | ['target_arch=="ia32"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 904 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 905 | }], |
| 906 | ], |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 907 | }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 908 | |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 909 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | f147893 | 2013-03-05 20:50:07 | [diff] [blame] | 910 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 911 | 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 912 | }], |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 913 | |
| 914 | # Whether tests targets should be run, archived or just have the |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 915 | # dependencies verified. All the tests targets have the '_run' suffix, |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 916 | # e.g. base_unittests_run runs the target base_unittests. The test |
[email protected] | 10d8ac3 | 2013-10-31 13:34:31 | [diff] [blame] | 917 | # target always calls tools/swarming_client/isolate.py. See the script's |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 918 | # --help for more information and the valid --mode values. Meant to be |
| 919 | # overriden with GYP_DEFINES. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 920 | # TODO(maruel): Remove the conditions as more configurations are |
| 921 | # supported. |
| 922 | # NOTE: The check for disable_nacl==0 and component=="static_library" |
| 923 | # can't be used here because these variables are not defined yet, but it |
| 924 | # is still not supported. |
[email protected] | e51e3565 | 2013-12-19 02:39:08 | [diff] [blame] | 925 | ['OS!="ios" and OS!="android" and chromeos==0', { |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 926 | 'test_isolation_mode%': 'check', |
| 927 | }, { |
| 928 | 'test_isolation_mode%': 'noop', |
| 929 | }], |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 930 | # Whether Android build uses OpenMAX DL FFT. |
| 931 | ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64" or target_arch=="arm64" or target_arch=="mipsel")', { |
| 932 | # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel. |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 933 | # When enabled, this will also enable WebAudio support on |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 934 | # Android for these architectures. Default is enabled. Whether |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 935 | # WebAudio is actually available depends on runtime settings |
| 936 | # and flags. |
[email protected] | 330f3a3 | 2013-04-23 05:47:58 | [diff] [blame] | 937 | 'use_openmax_dl_fft%': 1, |
[email protected] | d29d61b | 2013-04-17 04:00:53 | [diff] [blame] | 938 | }, { |
| 939 | 'use_openmax_dl_fft%': 0, |
| 940 | }], |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 941 | ['OS=="win" or OS=="linux"', { |
| 942 | 'enable_mdns%' : 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 943 | }], |
| 944 | |
| 945 | # Turns on compiler optimizations in V8 in Debug build, except |
| 946 | # on android_clang, where we're hitting a weird linker error. |
| 947 | # TODO(dpranke): http://crbug.com/266155 . |
| 948 | ['OS=="android"', { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 949 | 'v8_optimized_debug%': 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 950 | }, { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 951 | 'v8_optimized_debug%': 2, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 952 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 953 | |
| 954 | # Disable various features by default on embedded. |
| 955 | ['embedded==1', { |
| 956 | 'remoting%': 0, |
| 957 | 'enable_printing%': 0, |
| 958 | }], |
[email protected] | b390dd7d | 2014-03-20 14:49:41 | [diff] [blame] | 959 | |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 960 | # By default, use ICU data file (icudtl.dat) on all platforms |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 961 | # except when building Android WebView or Chromecast. |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 962 | # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium). |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 963 | # Set the data reduction proxy origin for Android Webview. |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 964 | ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', { |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 965 | 'icu_use_data_file_flag%' : 1, |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 966 | 'spdy_proxy_auth_origin%': '', |
| 967 | 'data_reduction_proxy_probe_url%': '', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 968 | 'data_reduction_proxy_warmup_url%': '', |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 969 | 'data_reduction_dev_host%': '', |
| 970 | 'data_reduction_fallback_host%': '', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 971 | }, { |
| 972 | 'icu_use_data_file_flag%' : 0, |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 973 | 'spdy_proxy_auth_origin%': 'https://proxy.googlezip.net:443/', |
| 974 | 'data_reduction_proxy_probe_url%': 'http://check.googlezip.net/connect', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 975 | 'data_reduction_proxy_warmup_url%': 'http://www.gstatic.com/generate_204', |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 976 | 'data_reduction_dev_host%': 'http://proxy-dev.googlezip.net:80/', |
| 977 | 'data_reduction_fallback_host%': 'http://compress.googlezip.net:80/', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 978 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 979 | ['OS=="win" or OS=="mac"', { |
| 980 | 'enable_wifi_bootstrapping%' : 1, |
| 981 | }], |
[email protected] | 91464ea | 2014-07-18 05:32:11 | [diff] [blame] | 982 | |
| 983 | # Path to sas.dll, which provides the SendSAS function. |
| 984 | # http://msdn.microsoft.com/en-us/library/windows/desktop/dd979761(v=vs.85).aspx |
| 985 | ['target_arch=="x64"', { |
| 986 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/amd64', |
| 987 | }, { |
| 988 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
| 989 | }], |
mlamouri | 2366875 | 2014-08-28 20:56:45 | [diff] [blame] | 990 | |
| 991 | # Turn on JNI generation optimizations on non-WebView builds. |
| 992 | ['OS=="android" and android_webview_build==0', { |
| 993 | 'optimize_jni_generation%': 1, |
| 994 | }, { |
| 995 | 'optimize_jni_generation%': 0, |
| 996 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 997 | ], |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 998 | |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 999 | # Set this to 1 to enable use of concatenated impulse responses |
| 1000 | # for the HRTF panner in WebAudio. |
[email protected] | 508afb7 | 2013-05-02 22:37:26 | [diff] [blame] | 1001 | 'use_concatenated_impulse_responses': 1, |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 1002 | |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1003 | # You can set the variable 'use_official_google_api_keys' to 1 |
| 1004 | # to use the Google-internal file containing official API keys |
| 1005 | # for Google Chrome even in a developer build. Setting this |
| 1006 | # variable explicitly to 1 will cause your build to fail if the |
| 1007 | # internal file is missing. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1008 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1009 | # The variable is documented here, but not handled in this file; |
| 1010 | # see //google_apis/determine_use_official_keys.gypi for the |
| 1011 | # implementation. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1012 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1013 | # Set the variable to 0 to not use the internal file, even when |
| 1014 | # it exists in your checkout. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1015 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1016 | # Leave it unset in your include.gypi to have the variable |
| 1017 | # implicitly set to 1 if you have |
| 1018 | # src/google_apis/internal/google_chrome_api_keys.h in your |
| 1019 | # checkout, and implicitly set to 0 if not. |
| 1020 | # |
| 1021 | # Note that official builds always behave as if the variable |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1022 | # was explicitly set to 1, i.e. they always use official keys, |
| 1023 | # and will fail to build if the internal file is missing. |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1024 | # |
| 1025 | # NOTE: You MUST NOT explicitly set the variable to 2 in your |
| 1026 | # include.gypi or by other means. Due to subtleties of GYP, this |
| 1027 | # is not the same as leaving the variable unset, even though its |
| 1028 | # default value in |
| 1029 | # //google_apis/determine_use_official_keys.gypi is 2. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1030 | |
| 1031 | # Set these to bake the specified API keys and OAuth client |
| 1032 | # IDs/secrets into your build. |
| 1033 | # |
| 1034 | # If you create a build without values baked in, you can instead |
| 1035 | # set environment variables to provide the keys at runtime (see |
| 1036 | # src/google_apis/google_api_keys.h for details). Features that |
| 1037 | # require server-side APIs may fail to work if no keys are |
| 1038 | # provided. |
| 1039 | # |
| 1040 | # Note that if you are building an official build or if |
| 1041 | # use_official_google_api_keys has been set to 1 (explicitly or |
| 1042 | # implicitly), these values will be ignored and the official |
| 1043 | # keys will be used instead. |
| 1044 | 'google_api_key%': '', |
| 1045 | 'google_default_client_id%': '', |
| 1046 | 'google_default_client_secret%': '', |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1047 | # Native Client is enabled by default. |
| 1048 | 'disable_nacl%': '0', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1049 | }, |
| 1050 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1051 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1052 | 'branding%': '<(branding)', |
| 1053 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 1054 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1055 | 'target_subarch%': '<(target_subarch)', |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1056 | 'mips_arch_variant%': '<(mips_arch_variant)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 1057 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1058 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 1059 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 1060 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1061 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 1062 | 'use_cras%': '<(use_cras)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 1063 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1064 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1065 | 'use_nss%': '<(use_nss)', |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 1066 | 'use_udev%': '<(use_udev)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 1067 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1068 | 'os_posix%': '<(os_posix)', |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 1069 | 'use_dbus%': '<(use_dbus)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 1070 | 'use_glib%': '<(use_glib)', |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 1071 | 'use_pango%': '<(use_pango)', |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 1072 | 'use_cairo%': '<(use_cairo)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1073 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 1074 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 1075 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 1076 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1077 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 1078 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 1079 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1080 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1081 | 'chromecast%': '<(chromecast)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 1082 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 1083 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 1084 | 'use_xi2_mt%':'<(use_xi2_mt)', |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1085 | 'image_loader_extension%': '<(image_loader_extension)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1086 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 1087 | 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)', |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 1088 | 'win_z7%': '<(win_z7)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 1089 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 1090 | 'tracing_like_official_build%': '<(tracing_like_official_build)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1091 | 'arm_version%': '<(arm_version)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 1092 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1093 | 'arm_neon_optional%': '<(arm_neon_optional)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 1094 | 'sysroot%': '<(sysroot)', |
[email protected] | a23d714 | 2014-02-14 16:58:45 | [diff] [blame] | 1095 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 1096 | 'system_libdir%': '<(system_libdir)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1097 | 'component%': '<(component)', |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 1098 | 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1099 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 1100 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1101 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 1102 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 1103 | 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 1104 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 1105 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 1106 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 1107 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1108 | 'enable_web_speech%': '<(enable_web_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1109 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1110 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 1111 | 'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1112 | 'asan%': '<(asan)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 1113 | 'asan_coverage%': '<(asan_coverage)', |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 1114 | 'use_sanitizer_options%': '<(use_sanitizer_options)', |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 1115 | 'syzyasan%': '<(syzyasan)', |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1116 | 'syzygy_optimize%': '<(syzygy_optimize)', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1117 | 'lsan%': '<(lsan)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 1118 | 'msan%': '<(msan)', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 1119 | 'msan_blacklist%': '<(msan_blacklist)', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 1120 | 'msan_track_origins%': '<(msan_track_origins)', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1121 | 'tsan%': '<(tsan)', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 1122 | 'tsan_blacklist%': '<(tsan_blacklist)', |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 1123 | 'ubsan%': '<(ubsan)', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1124 | 'ubsan_vptr%': '<(ubsan_vptr)', |
| 1125 | 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)', |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 1126 | 'use_instrumented_libraries%': '<(use_instrumented_libraries)', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 1127 | 'use_custom_libcxx%': '<(use_custom_libcxx)', |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 1128 | 'use_system_libcxx%': '<(use_system_libcxx)', |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1129 | 'clang_type_profiler%': '<(clang_type_profiler)', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 1130 | 'order_profiling%': '<(order_profiling)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 1131 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1132 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 1133 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 1134 | 'enable_plugins%': '<(enable_plugins)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1135 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 1136 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 1137 | 'enable_autofill_dialog%': '<(enable_autofill_dialog)', |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 1138 | 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1139 | 'enable_background%': '<(enable_background)', |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1140 | 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', |
| 1141 | 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1142 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 1143 | 'linux_use_debug_fission%': '<(linux_use_debug_fission)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 1144 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0ef3a52 | 2012-05-15 14:56:33 | [diff] [blame] | 1145 | 'test_isolation_mode%': '<(test_isolation_mode)', |
| 1146 | 'test_isolation_outdir%': '<(test_isolation_outdir)', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 1147 | 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1148 | 'enable_printing%': '<(enable_printing)', |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 1149 | 'enable_spellcheck%': '<(enable_spellcheck)', |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 1150 | 'enable_google_now%': '<(enable_google_now)', |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 1151 | 'cld_version%': '<(cld_version)', |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 1152 | 'cld2_table_size%': '<(cld2_table_size)', |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 1153 | 'cld2_data_source%': '<(cld2_data_source)', |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 1154 | 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 1155 | 'disable_file_support%': '<(disable_file_support)', |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 1156 | 'disable_ftp_support%': '<(disable_ftp_support)', |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 1157 | 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1158 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 1159 | 'sas_dll_path%': '<(sas_dll_path)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1160 | 'wix_path%': '<(wix_path)', |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 1161 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1162 | 'use_system_libjpeg%': '<(use_system_libjpeg)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1163 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 1164 | 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1165 | 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)', |
[email protected] | 5660f19 | 2013-04-02 16:55:46 | [diff] [blame] | 1166 | 'gyp_managed_install%': 0, |
[email protected] | 97d63ec | 2013-06-25 18:42:07 | [diff] [blame] | 1167 | 'create_standalone_apk%': 1, |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1168 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 1169 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1170 | 'enable_settings_app%': '<(enable_settings_app)', |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1171 | 'google_api_key%': '<(google_api_key)', |
| 1172 | 'google_default_client_id%': '<(google_default_client_id)', |
| 1173 | 'google_default_client_secret%': '<(google_default_client_secret)', |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 1174 | 'enable_managed_users%': '<(enable_managed_users)', |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 1175 | 'native_discardable_memory%': '<(native_discardable_memory)', |
| 1176 | 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 1177 | 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 1178 | 'data_reduction_dev_host%': '<(data_reduction_dev_host)', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 1179 | 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', |
| 1180 | 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 1181 | 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 1182 | 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 1183 | 'data_reduction_proxy_warmup_url%': '<(data_reduction_proxy_warmup_url)', |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 1184 | 'data_reduction_proxy_ssl_origin%' : '<(data_reduction_proxy_ssl_origin)', |
| 1185 | 'data_reduction_proxy_alt_origin%' : '<(data_reduction_proxy_alt_origin)', |
| 1186 | 'data_reduction_proxy_alt_fallback_origin%' : '<(data_reduction_proxy_alt_fallback_origin)', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 1187 | 'enable_mdns%' : '<(enable_mdns)', |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1188 | 'enable_service_discovery%' : '<(enable_service_discovery)', |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 1189 | 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 1190 | 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)', |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 1191 | 'v8_optimized_debug%': '<(v8_optimized_debug)', |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 1192 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 1193 | 'use_goma%': '<(use_goma)', |
| 1194 | 'gomadir%': '<(gomadir)', |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 1195 | 'video_hole%': '<(video_hole)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 1196 | |
Sadrul Habib Chowdhury | ec96ebf | 2014-09-05 19:13:34 | [diff] [blame] | 1197 | # Whether or not we are building the Athena shell. |
| 1198 | 'use_athena%': '0', |
| 1199 | |
[email protected] | 2f32567 | 2012-10-31 23:29:37 | [diff] [blame] | 1200 | # Use system protobuf instead of bundled one. |
| 1201 | 'use_system_protobuf%': 0, |
| 1202 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 1203 | # Use system yasm instead of bundled one. |
| 1204 | 'use_system_yasm%': 0, |
| 1205 | |
[email protected] | ea02e96 | 2013-04-26 11:18:16 | [diff] [blame] | 1206 | # Use system ICU instead of bundled one. |
| 1207 | 'use_system_icu%' : 0, |
| 1208 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 1209 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 1210 | # able to turn it off for various reasons. |
| 1211 | 'linux_disable_pie%': 0, |
| 1212 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 1213 | # The release channel that this build targets. This is used to restrict |
| 1214 | # channel-specific build options, like which installer packages to create. |
| 1215 | # The default is 'all', which does no channel-specific filtering. |
| 1216 | 'channel%': 'all', |
| 1217 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1218 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 1219 | # precompiled headers on the Mac. Prefix header injection may still be |
| 1220 | # used, but prefix headers will not be precompiled. This is useful when |
| 1221 | # using distcc to distribute a build to compile slaves that don't |
| 1222 | # share the same compiler executable as the system driving the compilation, |
| 1223 | # because precompiled headers rely on pointers into a specific compiler |
| 1224 | # executable's image. Setting this to 0 is needed to use an experimental |
| 1225 | # Linux-Mac cross compiler distcc farm. |
| 1226 | 'chromium_mac_pch%': 1, |
| 1227 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1228 | # The default value for mac_strip in target_defaults. This cannot be |
| 1229 | # set there, per the comment about variable% in a target_defaults. |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1230 | 'mac_strip_release%': 0, |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1231 | |
[email protected] | c0a1277 | 2013-08-22 00:08:31 | [diff] [blame] | 1232 | # Set to 1 to enable java code coverage. Instruments classes during build |
| 1233 | # to produce .ec files during runtime. |
| 1234 | 'emma_coverage%': 0, |
| 1235 | |
[email protected] | 9662d92 | 2013-10-04 22:02:44 | [diff] [blame] | 1236 | # EMMA filter string consisting of a list of inclusion/exclusion patterns |
| 1237 | # separated with whitespace and/or comma. Only has effect if |
| 1238 | # 'emma_coverage=1'. |
| 1239 | 'emma_filter%': '', |
| 1240 | |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1241 | # Set to 1 to enable running Android lint on java/class files. |
[email protected] | 2faf2bf | 2014-08-06 19:12:24 | [diff] [blame] | 1242 | 'android_lint%': 1, |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1243 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 1244 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1245 | # environment variable, the libcmt shim it uses sometimes gets in |
| 1246 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 1247 | # 'win_use_allocator_shim': 0, |
| 1248 | # 'win_release_RuntimeLibrary': 2 |
| 1249 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1250 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 1251 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 1252 | # TODO(bradnelson): eliminate this when possible. |
| 1253 | # To allow local gyp files to prevent release.vsprops from being included. |
| 1254 | # Yes(1) means include release.vsprops. |
| 1255 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 1256 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1257 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1258 | # TODO(bradnelson): eliminate this when possible. |
| 1259 | # To allow local gyp files to override additional linker options for msvs. |
| 1260 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1261 | 'msvs_use_common_linker_extras%': 1, |
| 1262 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 1263 | # TODO(sgk): eliminate this if possible. |
| 1264 | # It would be nicer to support this via a setting in 'target_defaults' |
| 1265 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 1266 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 1267 | # but that doesn't work as we'd like. |
| 1268 | 'msvs_debug_link_incremental%': '2', |
| 1269 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 1270 | # Needed for some of the largest modules. |
| 1271 | 'msvs_debug_link_nonincremental%': '1', |
| 1272 | |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1273 | # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1274 | # to get incremental linking to be faster in debug builds. |
[email protected] | 8f1da83d | 2012-08-06 21:49:26 | [diff] [blame] | 1275 | 'incremental_chrome_dll%': '0', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1276 | |
[email protected] | 1ff6429 | 2013-07-18 20:37:15 | [diff] [blame] | 1277 | # Experimental setting to break chrome.dll into multiple pieces based on |
| 1278 | # process type. |
| 1279 | 'chrome_multiple_dll%': '0', |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1280 | |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 1281 | # Experimental setting to optimize Chrome's DLLs with PGO. |
| 1282 | 'chrome_pgo_phase%': '0', |
| 1283 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1284 | # Clang stuff. |
| 1285 | 'clang%': '<(clang)', |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 1286 | 'host_clang%': '<(host_clang)', |
| 1287 | 'make_clang_dir%': '<(make_clang_dir)', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1288 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1289 | # Control which version of clang to use when building for iOS. If set to |
| 1290 | # '1', uses the version of clang that ships with Xcode. If set to '0', uses |
| 1291 | # the version of clang that ships with the Chromium source. This variable |
| 1292 | # is automatically set to '1' when using the Xcode generator. |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1293 | 'clang_xcode%': 0, |
| 1294 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1295 | # These two variables can be set in GYP_DEFINES while running |
| 1296 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 1297 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 1298 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 1299 | # 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] | 1300 | |
| 1301 | 'clang_load%': '', |
| 1302 | 'clang_add_plugin%': '', |
| 1303 | |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 1304 | # Tell ld64 to write map files describing binary layout. Useful |
| 1305 | # for looking at what contributes to binary size, e.g. with |
| 1306 | # https://github.com/nico/bloat |
| 1307 | 'mac_write_linker_maps%': 0, |
| 1308 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1309 | # The default type of gtest. |
| 1310 | 'gtest_target_type%': 'executable', |
| 1311 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1312 | # Enable sampling based profiler. |
| 1313 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 1314 | 'profiling%': '0', |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 1315 | # Profile without optimizing out stack frames when profiling==1. |
| 1316 | 'profiling_full_stack_frames%': '0', |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1317 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1318 | # And if we want to dump symbols for Breakpad-enabled builds. |
[email protected] | 8ebfecb | 2013-11-14 05:30:31 | [diff] [blame] | 1319 | 'linux_dump_symbols%': 0, |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1320 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1321 | 'linux_strip_binary%': 0, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1322 | # If we want stack unwind support for backtrace(). |
| 1323 | 'debug_unwind_tables%': 1, |
| 1324 | 'release_unwind_tables%': 1, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1325 | |
[email protected] | 8d949f1a0 | 2014-04-10 14:01:57 | [diff] [blame] | 1326 | # Override where to find binutils |
| 1327 | 'binutils_version%': 0, |
| 1328 | 'binutils_dir%': '', |
| 1329 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 1330 | # Enable TCMalloc. |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1331 | # Default of 'use_allocator' is set to 'none' if OS=='android' later. |
| 1332 | 'use_allocator%': 'tcmalloc', |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 1333 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1334 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 1335 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1336 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 1337 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1338 | |
[email protected] | a63e8d2 | 2013-03-23 16:17:08 | [diff] [blame] | 1339 | # Enable use of OpenMAX DL FFT routines. |
| 1340 | 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 1341 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1342 | # Enable new NPDevice API. |
| 1343 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1344 | |
| 1345 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 1346 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1347 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1348 | # .gyp files or targets should set chromium_code to 1 if they build |
| 1349 | # Chromium-specific code, as opposed to external code. This variable is |
| 1350 | # used to control such things as the set of warnings to enable, and |
| 1351 | # whether warnings are treated as errors. |
| 1352 | 'chromium_code%': 0, |
| 1353 | |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 1354 | # Disable fatal linker warnings, similarly to how we make it possible |
| 1355 | # to disable -Werror (e.g. for different toolchain versions). |
| 1356 | 'disable_fatal_linker_warnings%': 0, |
| 1357 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1358 | 'release_valgrind_build%': 0, |
| 1359 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1360 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1361 | 'enable_wexit_time_destructors%': 0, |
| 1362 | |
[email protected] | d69acbc | 2014-02-10 21:14:46 | [diff] [blame] | 1363 | # Build libpeerconnection as a static library by default. |
| 1364 | 'libpeer_target_type%': 'static_library', |
| 1365 | |
[email protected] | 9e1149d7 | 2012-07-24 01:27:17 | [diff] [blame] | 1366 | # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
| 1367 | 'internal_gles2_conform_tests%': 0, |
| 1368 | |
[email protected] | 5c18edd | 2013-11-19 22:04:11 | [diff] [blame] | 1369 | # Set to 1 to compile the filter fuzzer. |
| 1370 | 'internal_filter_fuzzer%': 0, |
| 1371 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1372 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 1373 | # so Cocoa is happy (http://crbug.com/20441). |
| 1374 | 'locales': [ |
| 1375 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 1376 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 1377 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1378 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1379 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 1380 | 'vi', 'zh-CN', 'zh-TW', |
| 1381 | ], |
| 1382 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 1383 | # Pseudo locales are special locales which are used for testing and |
| 1384 | # debugging. They don't get copied to the final app. For more info, |
| 1385 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 1386 | 'pseudo_locales': [ |
| 1387 | 'fake-bidi', |
| 1388 | ], |
| 1389 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1390 | 'grit_defines': [], |
| 1391 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 1392 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 1393 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 1394 | # is stored in resources.pak. It is still possible to load JS files |
| 1395 | # from disk by passing --debug-devtools cmdline switch. |
| 1396 | 'debug_devtools%': 0, |
| 1397 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1398 | # The Java Bridge is not compiled in by default. |
| 1399 | 'java_bridge%': 0, |
| 1400 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1401 | # Code signing for iOS binaries. The bots need to be able to disable this. |
| 1402 | 'chromium_ios_signing%': 1, |
| 1403 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 1404 | # This flag is only used when disable_nacl==0 and disables all those |
| 1405 | # subcomponents which would require the installation of a native_client |
| 1406 | # untrusted toolchain. |
| 1407 | 'disable_nacl_untrusted%': 0, |
| 1408 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1409 | # Disable Dart by default. |
| 1410 | 'enable_dart%': 0, |
| 1411 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1412 | # Copy out the setting of disable_nacl. |
| 1413 | 'disable_nacl%': '<(disable_nacl)', |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 1414 | |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 1415 | # Portable Native Client is enabled by default. |
| 1416 | 'disable_pnacl%': 0, |
| 1417 | |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 1418 | # Whether to build full debug version for Debug configuration on Android. |
| 1419 | # Compared to full debug version, the default Debug configuration on Android |
| 1420 | # has no full v8 debug, has size optimization and linker gc section, so that |
| 1421 | # we can build a debug version with acceptable size and performance. |
| 1422 | 'android_full_debug%': 0, |
| 1423 | |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1424 | # Sets the default version name and code for Android app, by default we |
| 1425 | # do a developer build. |
| 1426 | 'android_app_version_name%': 'Developer Build', |
| 1427 | 'android_app_version_code%': 0, |
| 1428 | |
[email protected] | 014d1ff1 | 2013-07-02 01:52:33 | [diff] [blame] | 1429 | # Contains data about the attached devices for gyp_managed_install. |
| 1430 | 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', |
| 1431 | |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1432 | 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")', |
| 1433 | 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1434 | |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1435 | 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
| 1436 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 1437 | |
[email protected] | fd6d882 | 2012-12-08 06:56:11 | [diff] [blame] | 1438 | # Whether we are using the rlz library or not. Platforms like Android send |
| 1439 | # rlz codes for searches but do not use the library. |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1440 | 'enable_rlz%': 0, |
| 1441 | |
[email protected] | 3b4038e | 2013-07-28 08:59:54 | [diff] [blame] | 1442 | # Turns on the i18n support in V8. |
| 1443 | 'v8_enable_i18n_support': 1, |
| 1444 | |
[email protected] | 6a69491 | 2014-01-17 14:17:40 | [diff] [blame] | 1445 | # Compile d8 for the host toolset. |
| 1446 | 'v8_toolset_for_d8': 'host', |
| 1447 | |
[email protected] | d98df12 | 2013-08-12 13:56:43 | [diff] [blame] | 1448 | # Use the chromium skia by default. |
| 1449 | 'use_system_skia%': '0', |
| 1450 | |
[email protected] | 2c14260f | 2013-09-11 11:48:22 | [diff] [blame] | 1451 | # Use brlapi from brltty for braille display support. |
| 1452 | 'use_brlapi%': 0, |
| 1453 | |
[email protected] | c66b5aa | 2013-09-12 13:29:41 | [diff] [blame] | 1454 | # Relative path to icu.gyp from this file. |
| 1455 | 'icu_gyp_path': '../third_party/icu/icu.gyp', |
| 1456 | |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 1457 | # IPC fuzzer is disabled by default. |
| 1458 | 'enable_ipc_fuzzer%': 0, |
| 1459 | |
[email protected] | f35bcea8 | 2013-12-04 04:37:06 | [diff] [blame] | 1460 | |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 1461 | # Force disable libstdc++ debug mode. |
| 1462 | 'disable_glibcxx_debug%': 0, |
| 1463 | |
[email protected] | 8063669f | 2014-04-01 01:50:29 | [diff] [blame] | 1464 | # Set to 1 to compile with MSE support for MPEG2 TS |
| 1465 | 'enable_mpeg2ts_stream_parser%': 0, |
| 1466 | |
[email protected] | ec13bd7 | 2014-04-16 19:04:30 | [diff] [blame] | 1467 | # Support ChromeOS touchpad gestures with ozone. |
| 1468 | 'use_evdev_gestures%': 0, |
| 1469 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1470 | # Default ozone platform (if no --ozone-platform flag). |
| 1471 | 'ozone_platform%': "", |
| 1472 | |
| 1473 | # Ozone platforms to include in the build. |
| 1474 | 'ozone_platform_caca%': 0, |
| 1475 | 'ozone_platform_dri%': 0, |
| 1476 | 'ozone_platform_egltest%': 0, |
[email protected] | 26ce20d5 | 2014-05-29 17:22:50 | [diff] [blame] | 1477 | 'ozone_platform_gbm%': 0, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1478 | 'ozone_platform_ozonex%': 0, |
| 1479 | 'ozone_platform_test%': 0, |
| 1480 | |
[email protected] | 54d5b065 | 2014-05-22 08:52:05 | [diff] [blame] | 1481 | # Chrome OS: whether to build ChromeVox from sources in the Chromium |
| 1482 | # repository rather than using precompiled JavaScript in |
| 1483 | # chrome/third_party/chromevox. This is still experimental. |
[email protected] | d7a6ba7 | 2014-06-26 18:00:55 | [diff] [blame] | 1484 | 'use_migrated_chromevox%': 1, |
[email protected] | 54d5b065 | 2014-05-22 08:52:05 | [diff] [blame] | 1485 | |
[email protected] | b3819c2e | 2014-05-18 14:13:07 | [diff] [blame] | 1486 | # Chrome OS: whether to also build the upcoming version of |
| 1487 | # ChromeVox, which can then be enabled via a command-line switch. |
| 1488 | 'use_chromevox_next%': 0, |
| 1489 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1490 | 'conditions': [ |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 1491 | # The version of clang shipped upstream does not find C++ headers when |
| 1492 | # using -stdlib=libc++ so we instead need to use the version of clang |
| 1493 | # coming with Xcode. |
| 1494 | ['OS=="ios" and use_system_libcxx==1', { |
| 1495 | 'clang_xcode%': 1, |
| 1496 | }], |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1497 | # Enable the Syzygy optimization step for the official builds. |
| 1498 | ['OS=="win" and buildtype=="Official" and syzyasan!=1', { |
| 1499 | 'syzygy_optimize%': 1, |
| 1500 | }, { |
| 1501 | 'syzygy_optimize%': 0, |
| 1502 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1503 | # Get binutils version so we can enable debug fission if we can. |
| 1504 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
| 1505 | 'conditions': [ |
| 1506 | # compiler_version doesn't work with clang |
| 1507 | # TODO(mithro): Land https://codereview.chromium.org/199793014/ so |
| 1508 | # compiler_version works with clang. |
| 1509 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so |
| 1510 | # that it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1511 | ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan==0 and ubsan_vptr==0', { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1512 | 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)', |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1513 | }], |
| 1514 | # On Android we know the binutils version in the toolchain. |
| 1515 | ['OS=="android"', { |
| 1516 | 'binutils_version%': 222, |
| 1517 | }], |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 1518 | ['host_arch=="x64"', { |
| 1519 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1520 | }], |
| 1521 | ['host_arch=="ia32"', { |
| 1522 | 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', |
| 1523 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1524 | # Our version of binutils in third_party/binutils |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1525 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1526 | 'binutils_version%': 224, |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1527 | }], |
| 1528 | ], |
| 1529 | }, { |
| 1530 | 'binutils_version%': 0, |
| 1531 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1532 | # The version of GCC in use, set later in platforms that use GCC and have |
| 1533 | # not explicitly chosen to build with clang. Currently, this means all |
| 1534 | # platforms except Windows, Mac and iOS. |
| 1535 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| 1536 | # it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1537 | ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan_vptr==0', { |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1538 | 'conditions': [ |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1539 | ['OS=="android" and android_webview_build==0', { |
| 1540 | 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
| 1541 | # We directly set the gcc version since we know what we use. |
| 1542 | 'gcc_version%': 49, |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1543 | }], |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1544 | ['OS=="android" and android_webview_build==1', { |
torne | ed51a58 | 2014-08-28 18:28:17 | [diff] [blame] | 1545 | # Android WebView uses a hermetic clang toolchain for host builds. |
| 1546 | 'host_gcc_version%': 0, |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1547 | # Android WebView uses the GCC toolchain from the Android build. |
| 1548 | 'gcc_version%': 48, |
| 1549 | }], |
| 1550 | ['OS!="android"', { |
[email protected] | 313fcf63 | 2014-05-27 13:58:59 | [diff] [blame] | 1551 | 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1552 | 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
[email protected] | 313fcf63 | 2014-05-27 13:58:59 | [diff] [blame] | 1553 | }], |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1554 | ], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1555 | }, { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1556 | 'host_gcc_version%': 0, |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1557 | 'gcc_version%': 0, |
| 1558 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1559 | ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1560 | 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| 1561 | }, { |
| 1562 | 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
| 1563 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1564 | ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1565 | 'directx_sdk_path%': '<(directx_sdk_default_path)', |
| 1566 | }, { |
| 1567 | 'directx_sdk_path%': '$(DXSDK_DIR)', |
| 1568 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1569 | ['OS=="win"', { |
| 1570 | 'windows_driver_kit_path%': '$(WDK_DIR)', |
| 1571 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1572 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1573 | 'conditions': [ |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1574 | ['target_arch=="mipsel" or target_arch=="mips64el"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1575 | 'werror%': '', |
| 1576 | 'disable_nacl%': 1, |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1577 | 'nacl_untrusted_build%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1578 | 'use_allocator%': 'none', |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 1579 | }], |
| 1580 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1581 | 'sysroot%': '<(sysroot)', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 1582 | 'CXX%': '<(CXX)', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1583 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1584 | # All Chrome builds have breakpad symbols, but only process the |
| 1585 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 1586 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1587 | 'linux_dump_symbols%': 1, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1588 | |
| 1589 | # Omit unwind support in official release builds to save space. We |
| 1590 | # can use breakpad for these builds. |
| 1591 | 'release_unwind_tables%': 0, |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 1592 | |
| 1593 | 'conditions': [ |
| 1594 | # For official builds, use a 64-bit linker to avoid running out |
| 1595 | # of address space. The buildbots should have a 64-bit kernel |
| 1596 | # and a 64-bit libc installed. |
| 1597 | ['host_arch=="ia32" and target_arch=="ia32"', { |
| 1598 | 'linux_use_bundled_gold%': '1', |
| 1599 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1600 | }], |
| 1601 | ], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1602 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1603 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1604 | }], # os_posix==1 and OS!="mac" and OS!="ios" |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 1605 | ['OS=="ios"', { |
| 1606 | 'disable_nacl%': 1, |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 1607 | 'enable_background%': 0, |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1608 | 'icu_use_data_file_flag%': 1, |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1609 | 'enable_web_speech%': 0, |
[email protected] | 4e3996f9 | 2012-07-17 10:41:13 | [diff] [blame] | 1610 | 'use_system_libxml%': 1, |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 1611 | 'use_system_sqlite%': 1, |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1612 | 'locales==': [ |
[email protected] | 47cf7a3 | 2013-09-03 22:16:39 | [diff] [blame] | 1613 | 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX', |
[email protected] | 27a1d6b | 2014-07-23 17:14:53 | [diff] [blame] | 1614 | 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', |
| 1615 | 'nb', 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', |
| 1616 | 'uk', 'vi', 'zh-CN', 'zh-TW', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1617 | ], |
[email protected] | 57871bc | 2012-08-20 16:28:12 | [diff] [blame] | 1618 | |
| 1619 | # The Mac SDK is set for iOS builds and passed through to Mac |
| 1620 | # sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
| 1621 | # overridden from the command line the same way it is for a Mac build. |
| 1622 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1623 | |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1624 | # iOS SDK and deployment target support. The |ios_sdk| value is left |
| 1625 | # blank so that when it is set in the project files it will be the |
| 1626 | # "current" iOS SDK. Forcing a specific SDK even if it is "current" |
| 1627 | # causes Xcode to spit out a warning for every single project file for |
| 1628 | # not using the "current" SDK. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1629 | 'ios_sdk%': '', |
| 1630 | 'ios_sdk_path%': '', |
[email protected] | 7c613ee9 | 2014-08-14 21:22:31 | [diff] [blame] | 1631 | 'ios_deployment_target%': '7.0', |
[email protected] | fcd63418 | 2012-10-09 10:50:32 | [diff] [blame] | 1632 | |
| 1633 | 'conditions': [ |
| 1634 | # ios_product_name is set to the name of the .app bundle as it should |
| 1635 | # appear on disk. |
| 1636 | ['branding=="Chrome"', { |
| 1637 | 'ios_product_name%': 'Chrome', |
| 1638 | }, { # else: branding!="Chrome" |
| 1639 | 'ios_product_name%': 'Chromium', |
| 1640 | }], |
| 1641 | ['branding=="Chrome" and buildtype=="Official"', { |
| 1642 | 'ios_breakpad%': 1, |
| 1643 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 1644 | 'ios_breakpad%': 0, |
| 1645 | }], |
| 1646 | ], |
| 1647 | }], # OS=="ios" |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1648 | ['OS=="android"', { |
| 1649 | # Location of Android NDK. |
| 1650 | 'variables': { |
| 1651 | 'variables': { |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1652 | # Unfortunately we have to use absolute paths to the SDK/NDK because |
| 1653 | # they're passed to ant which uses a different relative path from |
| 1654 | # gyp. |
| 1655 | 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', |
| 1656 | 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', |
| 1657 | 'android_host_arch%': '<!(uname -m)', |
| 1658 | # Android API-level of the SDK used for compilation. |
[email protected] | 7ced8ad | 2014-07-16 21:47:17 | [diff] [blame] | 1659 | 'android_sdk_version%': '20', |
[email protected] | c91e767 | 2014-07-14 20:04:49 | [diff] [blame] | 1660 | 'android_sdk_build_tools_version%': '20.0.0', |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1661 | 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1662 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1663 | # Copy conditionally-set variables out one scope. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1664 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1665 | 'android_sdk_root%': '<(android_sdk_root)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1666 | 'android_sdk_version%': '<(android_sdk_version)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1667 | 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1668 | 'host_os%': '<(host_os)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1669 | |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1670 | 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', |
[email protected] | aeaf0121 | 2014-02-19 00:52:52 | [diff] [blame] | 1671 | # Android SDK build tools (e.g. dx, aapt, aidl) |
| 1672 | 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1673 | |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1674 | # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1675 | # platform requirement for Chrome on Android, we use it for native |
| 1676 | # code compilation. |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1677 | 'conditions': [ |
| 1678 | ['target_arch == "ia32"', { |
| 1679 | 'android_app_abi%': 'x86', |
| 1680 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1681 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1682 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1683 | 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1684 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 1685 | ['target_arch == "x64"', { |
| 1686 | 'android_app_abi%': 'x86_64', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1687 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver', |
| 1688 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-x86_64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1689 | 'android_ndk_lib_dir%': 'usr/lib64', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1690 | 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 1691 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1692 | ['target_arch=="arm"', { |
| 1693 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1694 | ['arm_version<7', { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1695 | 'android_app_abi%': 'armeabi', |
| 1696 | }, { |
| 1697 | 'android_app_abi%': 'armeabi-v7a', |
| 1698 | }], |
| 1699 | ], |
| 1700 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1701 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1702 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1703 | 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1704 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 1705 | ['target_arch == "arm64"', { |
[email protected] | fa84609 | 2014-03-25 04:01:00 | [diff] [blame] | 1706 | 'android_app_abi%': 'arm64-v8a', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1707 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver', |
| 1708 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-arm64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1709 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1710 | 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 1711 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1712 | ['target_arch == "mipsel"', { |
| 1713 | 'android_app_abi%': 'mips', |
| 1714 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', |
| 1715 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1716 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1717 | 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1718 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1719 | ['target_arch == "mips64el"', { |
| 1720 | 'android_app_abi%': 'mips64', |
| 1721 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64/gdbserver/gdbserver', |
| 1722 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-mips64', |
| 1723 | 'android_ndk_lib_dir%': 'usr/lib64', |
| 1724 | 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1725 | 'gcc_version%': 49, |
| 1726 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1727 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1728 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1729 | # Copy conditionally-set variables out one scope. |
| 1730 | 'android_app_abi%': '<(android_app_abi)', |
| 1731 | 'android_gdbserver%': '<(android_gdbserver)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1732 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 941c6ab | 2014-03-24 04:07:34 | [diff] [blame] | 1733 | 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1734 | 'android_sdk_root%': '<(android_sdk_root)', |
| 1735 | 'android_sdk_version%': '<(android_sdk_version)', |
| 1736 | 'android_toolchain%': '<(android_toolchain)', |
| 1737 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1738 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1739 | 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1740 | 'android_sdk_tools%': '<(android_sdk_tools)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1741 | 'android_sdk%': '<(android_sdk)', |
| 1742 | 'android_sdk_jar%': '<(android_sdk)/android.jar', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1743 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1744 | 'android_stlport_root': '<(android_stlport_root)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1745 | 'android_stlport_include': '<(android_stlport_root)/stlport', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1746 | 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1747 | 'host_os%': '<(host_os)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1748 | |
[email protected] | 8ecd30e | 2014-07-04 19:58:34 | [diff] [blame] | 1749 | # Location of the "objcopy" binary, used by both gyp and scripts. |
| 1750 | 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
| 1751 | |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 1752 | # Location of the "strip" binary, used by both gyp and scripts. |
| 1753 | 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1754 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1755 | # Location of the "readelf" binary. |
| 1756 | 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| 1757 | |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1758 | # Determines whether we should optimize JNI generation at the cost of |
| 1759 | # breaking assumptions in the build system that when inputs have changed |
| 1760 | # the outputs should always change as well. This is meant purely for |
| 1761 | # developer builds, to avoid spurious re-linking of native files. |
mlamouri | 2366875 | 2014-08-28 20:56:45 | [diff] [blame] | 1762 | 'optimize_jni_generation%': '<(optimize_jni_generation)', |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1763 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1764 | # Always uses openssl. |
| 1765 | 'use_openssl%': 1, |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1766 | 'use_openssl_certs%': 1, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1767 | |
| 1768 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 9c8eb98 | 2014-07-09 07:51:50 | [diff] [blame] | 1769 | 'safe_browsing%': 1, |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1770 | 'enable_web_speech%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1771 | 'java_bridge%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1772 | 'build_ffmpegsumo%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1773 | 'use_allocator%': 'none', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1774 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1775 | # Disable Native Client. |
| 1776 | 'disable_nacl%': 1, |
| 1777 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1778 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1779 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1780 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1781 | # Sessions are store separately in the Java side. |
| 1782 | 'enable_session_service%': 0, |
| 1783 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1784 | 'p2p_apis%' : 0, |
| 1785 | |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1786 | 'gtest_target_type%': 'shared_library', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1787 | |
| 1788 | # Uses system APIs for decoding audio and video. |
| 1789 | 'use_libffmpeg%': '0', |
| 1790 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1791 | # When building as part of the Android system, use system libraries |
| 1792 | # where possible to reduce ROM size. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1793 | 'use_system_stlport%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1794 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1795 | # Copy it out one scope. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1796 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 1797 | |
| 1798 | # Default android linker script for shared library exports. |
| 1799 | 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.lst', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1800 | }], # OS=="android" |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1801 | ['embedded==1', { |
| 1802 | 'use_system_fontconfig%': 0, |
| 1803 | }, { |
| 1804 | 'use_system_fontconfig%': 1, |
| 1805 | }], |
| 1806 | ['chromecast==1', { |
[email protected] | bef14159 | 2014-08-15 04:28:01 | [diff] [blame] | 1807 | 'enable_mpeg2ts_stream_parser%': 1, |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1808 | 'ffmpeg_branding%': 'Chrome', |
| 1809 | 'ozone_platform_ozonex%': 1, |
| 1810 | 'conditions': [ |
| 1811 | ['target_arch=="arm"', { |
| 1812 | 'arm_arch%': '', |
| 1813 | 'arm_tune%': 'cortex-a9', |
| 1814 | 'arm_thumb%': 1, |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1815 | 'video_hole%': 1, |
| 1816 | }], |
| 1817 | ], |
| 1818 | }], |
hjd | 46eac8f | 2014-09-09 15:42:31 | [diff] [blame^] | 1819 | ['android_webview_build==1', { |
[email protected] | b313955 | 2013-05-30 14:16:12 | [diff] [blame] | 1820 | # When building the WebView in the Android tree, jarjar will remap all |
| 1821 | # the class names, so the JNI generator needs to know this. |
| 1822 | 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
| 1823 | }], |
[email protected] | b9b8f9cf | 2014-07-17 04:42:26 | [diff] [blame] | 1824 | ['OS=="linux" and target_arch!="mipsel"', { |
[email protected] | 5b61a7b | 2014-07-10 07:36:38 | [diff] [blame] | 1825 | # TODO(thakis): This is here to measure perf for a while. |
| 1826 | 'clang%': 1, |
| 1827 | }], # OS=="mac" |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1828 | ['OS=="mac"', { |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1829 | 'conditions': [ |
| 1830 | # All Chrome builds have breakpad symbols, but only process the |
| 1831 | # symbols from official builds. |
| 1832 | ['(branding=="Chrome" and buildtype=="Official")', { |
| 1833 | 'mac_strip_release%': 1, |
| 1834 | }], |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1835 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1836 | }], # OS=="mac" |
| 1837 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1838 | 'clang%': 1, |
| 1839 | |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1840 | 'variables': { |
| 1841 | # Mac OS X SDK and deployment target support. The SDK identifies |
| 1842 | # the version of the system headers that will be used, and |
| 1843 | # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
| 1844 | # macro. "Maximum allowed" refers to the operating system version |
| 1845 | # whose APIs are available in the headers. The deployment target |
| 1846 | # identifies the minimum system version that the built products are |
| 1847 | # expected to function on. It corresponds to the |
| 1848 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
| 1849 | # macros are available, #include <AvailabilityMacros.h>. Additional |
| 1850 | # documentation on these macros is available at |
| 1851 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 1852 | # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
| 1853 | # deployment target to 10.6. Other projects, such as O3D, may |
| 1854 | # override these defaults. |
| 1855 | |
| 1856 | # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
| 1857 | # about that is at least the specified version. In official builds, |
| 1858 | # the SDK must match mac_sdk_min exactly. If the SDK is installed |
| 1859 | # someplace that Xcode doesn't know about, set mac_sdk_path to the |
| 1860 | # path to the SDK; when set to a non-empty string, SDK detection |
| 1861 | # based on mac_sdk_min will be bypassed entirely. |
| 1862 | 'mac_sdk_min%': '10.6', |
| 1863 | 'mac_sdk_path%': '', |
| 1864 | |
| 1865 | 'mac_deployment_target%': '10.6', |
| 1866 | }, |
| 1867 | |
| 1868 | 'mac_sdk_min': '<(mac_sdk_min)', |
| 1869 | 'mac_sdk_path': '<(mac_sdk_path)', |
| 1870 | 'mac_deployment_target': '<(mac_deployment_target)', |
| 1871 | |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1872 | # Compile in Breakpad support by default so that it can be |
| 1873 | # tested, even if it is not enabled by default at runtime. |
| 1874 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1875 | 'conditions': [ |
| 1876 | # mac_product_name is set to the name of the .app bundle as it should |
| 1877 | # appear on disk. This duplicates data from |
| 1878 | # chrome/app/theme/chromium/BRANDING and |
| 1879 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 1880 | # these names into the build system. |
| 1881 | ['branding=="Chrome"', { |
| 1882 | 'mac_product_name%': 'Google Chrome', |
| 1883 | }, { # else: branding!="Chrome" |
| 1884 | 'mac_product_name%': 'Chromium', |
| 1885 | }], |
| 1886 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1887 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1888 | '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] | 1889 | # Enable uploading crash dumps. |
| 1890 | 'mac_breakpad_uploads%': 1, |
| 1891 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1892 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1893 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1894 | 'mac_keystone%': 1, |
| 1895 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1896 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1897 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1898 | 'mac_breakpad%': 0, |
| 1899 | 'mac_keystone%': 0, |
| 1900 | }], |
| 1901 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1902 | }], # OS=="mac" or OS=="ios" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1903 | ['OS=="win"', { |
| 1904 | 'conditions': [ |
[email protected] | a7a15f3 | 2013-08-06 06:09:43 | [diff] [blame] | 1905 | # This is the architecture convention used in WinSDK paths. |
| 1906 | ['target_arch=="ia32"', { |
| 1907 | 'winsdk_arch%': 'x86', |
| 1908 | },{ |
| 1909 | 'winsdk_arch%': '<(target_arch)', |
| 1910 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1911 | ['component=="shared_library"', { |
| 1912 | 'win_use_allocator_shim%': 0, |
[email protected] | 45b7c52 | 2013-08-21 06:58:22 | [diff] [blame] | 1913 | },{ |
| 1914 | # Turn on multiple dll by default on Windows when in static_library. |
| 1915 | 'chrome_multiple_dll%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1916 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 1917 | ['asan==1', { |
| 1918 | 'win_use_allocator_shim%': 0, |
| 1919 | }], |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1920 | ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1921 | # Only enabled by default for ninja because it's buggy in VS. |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1922 | # Not enabled for component=static_library because some targets |
| 1923 | # are too large and the toolchain fails due to the size of the |
| 1924 | # .obj files. |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1925 | 'incremental_chrome_dll%': 1, |
| 1926 | }], |
[email protected] | a96cf142 | 2013-11-08 08:55:41 | [diff] [blame] | 1927 | # Don't do incremental linking for large modules on 32-bit or when |
| 1928 | # component=static_library as the toolchain fails due to the size of |
| 1929 | # the .ilk files. |
| 1930 | ['MSVS_OS_BITS==32 or component=="static_library"', { |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1931 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 1932 | },{ |
| 1933 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 1934 | }], |
[email protected] | 49ee7ef | 2014-04-12 03:07:46 | [diff] [blame] | 1935 | ['MSVS_VERSION=="2013e"', { |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1936 | 'msvs_express%': 1, |
| 1937 | 'secure_atl%': 0, |
| 1938 | },{ |
| 1939 | 'msvs_express%': 0, |
| 1940 | 'secure_atl%': 1, |
| 1941 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1942 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1943 | 'nacl_win64_defines': [ |
| 1944 | # This flag is used to minimize dependencies when building |
| 1945 | # Native Client loader for 64-bit Windows. |
| 1946 | 'NACL_WIN64', |
| 1947 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1948 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1949 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1950 | ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios" and embedded==0', { |
[email protected] | 8e553f4 | 2010-10-25 20:05:44 | [diff] [blame] | 1951 | 'use_cups%': 1, |
| 1952 | }, { |
| 1953 | 'use_cups%': 0, |
| 1954 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1955 | |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 1956 | ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', { |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1957 | 'enable_pepper_cdms%': 1, |
| 1958 | }, { |
| 1959 | 'enable_pepper_cdms%': 0, |
| 1960 | }], |
| 1961 | |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 1962 | ['OS=="android"', { |
| 1963 | 'enable_browser_cdms%': 1, |
| 1964 | }, { |
| 1965 | 'enable_browser_cdms%': 0, |
| 1966 | }], |
| 1967 | |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1968 | # Native Client glibc toolchain is enabled |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1969 | # by default except on arm, mips and mips64. |
| 1970 | ['target_arch=="arm" or target_arch=="mipsel" or target_arch=="mips64el"', { |
[email protected] | 2f7da67 | 2012-06-21 08:38:32 | [diff] [blame] | 1971 | 'disable_glibc%': 1, |
| 1972 | }, { |
| 1973 | 'disable_glibc%': 0, |
| 1974 | }], |
| 1975 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1976 | # Set the relative path from this file to the GYP file of the JPEG |
| 1977 | # library used by Chromium. |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1978 | ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
| 1979 | # Configuration for using the system libjeg is here. |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1980 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1981 | }, { |
| 1982 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 1983 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1984 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1985 | # Options controlling the use of GConf (the classic GNOME configuration |
| 1986 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 1987 | ['chromeos==1 or embedded==1', { |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1988 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1989 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1990 | }, { |
| 1991 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1992 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1993 | }], |
| 1994 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1995 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1996 | ['branding=="Chrome"', { |
| 1997 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 1998 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1999 | 'grit_defines': ['-D', '_google_chrome', |
| 2000 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 2001 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 2002 | 'grit_defines': ['-D', '_chromium', |
| 2003 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 2004 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2005 | ['chromeos==1', { |
[email protected] | d4d81e9 | 2012-06-04 20:10:13 | [diff] [blame] | 2006 | 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2007 | }], |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 2008 | ['desktop_linux==1', { |
| 2009 | 'grit_defines': ['-D', 'desktop_linux'], |
| 2010 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2011 | ['toolkit_views==1', { |
| 2012 | 'grit_defines': ['-D', 'toolkit_views'], |
| 2013 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 2014 | ['use_aura==1', { |
| 2015 | 'grit_defines': ['-D', 'use_aura'], |
| 2016 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2017 | ['use_ash==1', { |
| 2018 | 'grit_defines': ['-D', 'use_ash'], |
| 2019 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 2020 | ['use_nss==1', { |
| 2021 | 'grit_defines': ['-D', 'use_nss'], |
| 2022 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2023 | ['use_ozone==1', { |
| 2024 | 'grit_defines': ['-D', 'use_ozone'], |
| 2025 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2026 | ['image_loader_extension==1', { |
| 2027 | 'grit_defines': ['-D', 'image_loader_extension'], |
| 2028 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 2029 | ['remoting==1', { |
| 2030 | 'grit_defines': ['-D', 'remoting'], |
| 2031 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2032 | ['use_titlecase_in_grd_files==1', { |
| 2033 | 'grit_defines': ['-D', 'use_titlecase'], |
| 2034 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 2035 | ['use_third_party_translations==1', { |
| 2036 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 2037 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 2038 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 2039 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 2040 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 2041 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2042 | ['OS=="android"', { |
[email protected] | 77e59c5 | 2013-05-21 15:29:17 | [diff] [blame] | 2043 | 'grit_defines': ['-t', 'android', |
[email protected] | 7dc7681 | 2013-03-26 07:31:57 | [diff] [blame] | 2044 | '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2045 | }], |
[email protected] | cc1f057 | 2013-07-31 05:41:03 | [diff] [blame] | 2046 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d39e386 | 2012-06-26 22:38:23 | [diff] [blame] | 2047 | 'grit_defines': ['-D', 'scale_factors=2x'], |
| 2048 | }], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2049 | ['OS == "ios"', { |
| 2050 | 'grit_defines': [ |
[email protected] | 03334690 | 2013-08-20 01:01:12 | [diff] [blame] | 2051 | '-t', 'ios', |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2052 | # iOS uses a whitelist to filter resources. |
| 2053 | '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
| 2054 | ], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2055 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 2056 | # Enable host builds when generating with ninja-ios. |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2057 | 'conditions': [ |
| 2058 | ['"<(GENERATOR)"=="ninja"', { |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2059 | 'host_os%': "mac", |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 2060 | }], |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 2061 | |
| 2062 | # TODO(sdefresne): Remove the target_subarch check once Apple has |
| 2063 | # upstreamed the support for "arm64". http://crbug.com/341453 |
| 2064 | ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', { |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 2065 | 'clang_xcode%': 1, |
| 2066 | }], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2067 | ], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2068 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2069 | ['enable_extensions==1', { |
| 2070 | 'grit_defines': ['-D', 'enable_extensions'], |
| 2071 | }], |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2072 | ['enable_plugins!=0', { |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2073 | 'grit_defines': ['-D', 'enable_plugins'], |
| 2074 | }], |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2075 | ['enable_printing!=0', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2076 | 'grit_defines': ['-D', 'enable_printing'], |
| 2077 | }], |
[email protected] | b429eb19b | 2014-01-27 21:07:50 | [diff] [blame] | 2078 | ['enable_printing==1', { |
| 2079 | 'grit_defines': ['-D', 'enable_full_printing'], |
| 2080 | }], |
[email protected] | c2aad54 | 2012-07-31 20:40:33 | [diff] [blame] | 2081 | ['enable_themes==1', { |
| 2082 | 'grit_defines': ['-D', 'enable_themes'], |
| 2083 | }], |
[email protected] | ef1dd506 | 2012-12-17 06:41:33 | [diff] [blame] | 2084 | ['enable_app_list==1', { |
| 2085 | 'grit_defines': ['-D', 'enable_app_list'], |
| 2086 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2087 | ['enable_settings_app==1', { |
| 2088 | 'grit_defines': ['-D', 'enable_settings_app'], |
| 2089 | }], |
[email protected] | 5411d820 | 2013-01-30 01:32:15 | [diff] [blame] | 2090 | ['enable_google_now==1', { |
| 2091 | 'grit_defines': ['-D', 'enable_google_now'], |
| 2092 | }], |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 2093 | ['use_concatenated_impulse_responses==1', { |
| 2094 | 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], |
| 2095 | }], |
[email protected] | f66ddbd | 2013-06-27 14:17:04 | [diff] [blame] | 2096 | ['enable_webrtc==1', { |
| 2097 | 'grit_defines': ['-D', 'enable_webrtc'], |
| 2098 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2099 | ['enable_hangout_services_extension==1', { |
| 2100 | 'grit_defines': ['-D', 'enable_hangout_services_extension'], |
| 2101 | }], |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 2102 | ['enable_task_manager==1', { |
| 2103 | 'grit_defines': ['-D', 'enable_task_manager'], |
| 2104 | }], |
[email protected] | 335b687 | 2014-02-13 20:14:13 | [diff] [blame] | 2105 | ['notifications==1', { |
| 2106 | 'grit_defines': ['-D', 'enable_notifications'], |
| 2107 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2108 | ['enable_wifi_bootstrapping==1', { |
| 2109 | 'grit_defines': ['-D', 'enable_wifi_bootstrapping'], |
| 2110 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2111 | ['enable_resource_whitelist_generation==1 and OS!="win"', { |
[email protected] | e4fdab9 | 2014-04-04 00:52:22 | [diff] [blame] | 2112 | 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'], |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 2113 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2114 | ['enable_resource_whitelist_generation==1 and OS=="win"', { |
| 2115 | 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'], |
| 2116 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2117 | ['enable_mdns==1 or OS=="mac"', { |
| 2118 | 'grit_defines': ['-D', 'enable_service_discovery'], |
| 2119 | 'enable_service_discovery%': 1 |
| 2120 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 2121 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 7d389e2 | 2013-05-15 00:45:07 | [diff] [blame] | 2122 | 'clang_chrome_plugins_flags': [ |
| 2123 | '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 2124 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2125 | }], |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2126 | ['asan==1 or msan==1 or lsan==1 or tsan==1', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2127 | 'clang%': 1, |
[email protected] | 3a0278b1 | 2014-05-20 15:37:58 | [diff] [blame] | 2128 | 'use_allocator%': 'none', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2129 | }], |
[email protected] | 17b15a16 | 2014-07-24 15:41:42 | [diff] [blame] | 2130 | ['asan==1 and OS=="linux" and chromeos==0', { |
[email protected] | 49d75ae | 2014-07-22 13:28:08 | [diff] [blame] | 2131 | 'use_custom_libcxx%': 1, |
| 2132 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 2133 | ['ubsan==1', { |
| 2134 | 'clang%': 1, |
| 2135 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2136 | ['ubsan_vptr==1', { |
| 2137 | 'clang%': 1, |
| 2138 | }], |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2139 | ['asan==1 and OS=="mac"', { |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 2140 | # TODO(glider): we do not strip ASan binaries until the dynamic ASan |
| 2141 | # runtime is fully adopted. See http://crbug.com/242503. |
| 2142 | 'mac_strip_release': 0, |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2143 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2144 | ['tsan==1', { |
[email protected] | 193149c | 2014-04-08 23:56:09 | [diff] [blame] | 2145 | 'use_custom_libcxx%': 1, |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2146 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2147 | ['msan==1', { |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2148 | # Use a just-built, MSan-instrumented libc++ instead of the system-wide |
| 2149 | # libstdc++. This is required to avoid false positive reports whenever |
| 2150 | # the C++ standard library is used. |
| 2151 | 'use_custom_libcxx%': 1, |
| 2152 | # Running the V8-generated code on an ARM simulator is a powerful hack |
| 2153 | # that allows the tool to see the memory accesses from JITted code. |
| 2154 | # Without this flag, JS code causes false positive reports from MSan. |
| 2155 | 'v8_target_arch': 'arm64', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2156 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2157 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2158 | ['OS=="linux" and clang_type_profiler==1', { |
| 2159 | 'clang%': 1, |
| 2160 | 'clang_use_chrome_plugins%': 0, |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 2161 | 'conditions': [ |
| 2162 | ['host_arch=="x64"', { |
| 2163 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 2164 | }], |
| 2165 | ['host_arch=="ia32"', { |
| 2166 | # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 2167 | # Clang in this directory at your own risk if needed for some |
| 2168 | # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 2169 | # usage). Any failure by this compiler should not close the tree. |
| 2170 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 2171 | }], |
| 2172 | ], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2173 | }], |
| 2174 | |
[email protected] | 85a75e57 | 2014-05-06 20:13:38 | [diff] [blame] | 2175 | ['OS=="win"', { |
| 2176 | # The Clang plugins don't currently work on Windows. |
| 2177 | # TODO(hans): One day, this will work. (crbug.com/82385) |
| 2178 | 'clang_use_chrome_plugins%': 0, |
| 2179 | }], |
| 2180 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2181 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 2182 | # much and make the stacks harder to figure out. |
| 2183 | # |
| 2184 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 2185 | # them under a build_for_tool== condition. |
| 2186 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 2187 | # gcc flags |
| 2188 | 'mac_debug_optimization': '1', |
| 2189 | 'mac_release_optimization': '1', |
| 2190 | 'release_optimize': '1', |
| 2191 | 'no_gc_sections': 1, |
| 2192 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2193 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2194 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2195 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2196 | |
| 2197 | # MSVS flags for TSan on Pin and Windows. |
| 2198 | 'win_debug_RuntimeChecks': '0', |
| 2199 | 'win_debug_disable_iterator_debugging': '1', |
| 2200 | 'win_debug_Optimization': '1', |
| 2201 | 'win_debug_InlineFunctionExpansion': '0', |
| 2202 | 'win_release_InlineFunctionExpansion': '0', |
| 2203 | 'win_release_OmitFramePointers': '0', |
| 2204 | |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2205 | 'use_allocator': 'tcmalloc', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2206 | 'release_valgrind_build': 1, |
| 2207 | 'werror': '', |
| 2208 | 'component': 'static_library', |
| 2209 | 'use_system_zlib': 0, |
| 2210 | }], |
| 2211 | |
| 2212 | # Build tweaks for DrMemory. |
| 2213 | # TODO(rnk): Combine with tsan config to share the builder. |
| 2214 | # http://crbug.com/108155 |
| 2215 | ['build_for_tool=="drmemory"', { |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2216 | # These runtime checks force initialization of stack vars which blocks |
| 2217 | # DrMemory's uninit detection. |
| 2218 | 'win_debug_RuntimeChecks': '0', |
[email protected] | 49605d4 | 2013-10-18 13:58:17 | [diff] [blame] | 2219 | # Iterator debugging is slow. |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2220 | 'win_debug_disable_iterator_debugging': '1', |
| 2221 | # Try to disable optimizations that mess up stacks in a release build. |
[email protected] | c13d0030 | 2012-10-18 15:45:16 | [diff] [blame] | 2222 | # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) |
| 2223 | # /O2 and /Ob0 (disable inline) cannot be used together because of a |
| 2224 | # compiler bug, so we use /Ob1 instead. |
| 2225 | 'win_release_InlineFunctionExpansion': '1', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2226 | 'win_release_OmitFramePointers': '0', |
[email protected] | 6bf3373d | 2012-08-15 22:27:50 | [diff] [blame] | 2227 | # Ditto for debug, to support bumping win_debug_Optimization. |
| 2228 | 'win_debug_InlineFunctionExpansion': 0, |
| 2229 | 'win_debug_OmitFramePointers': 0, |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2230 | # Keep the code under #ifndef NVALGRIND. |
| 2231 | 'release_valgrind_build': 1, |
| 2232 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2233 | |
[email protected] | fcc89bf | 2013-10-30 17:37:21 | [diff] [blame] | 2234 | # Enable RLZ on Win, Mac, iOS and ChromeOS. |
| 2235 | ['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] | 2236 | 'enable_rlz%': 1, |
| 2237 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2238 | |
| 2239 | # Set default compiler flags depending on ARM version. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2240 | ['arm_version==6 and android_webview_build==0', { |
| 2241 | 'arm_arch%': 'armv6', |
| 2242 | 'arm_tune%': '', |
[email protected] | 70f970d | 2013-12-16 14:11:38 | [diff] [blame] | 2243 | 'arm_fpu%': 'vfp', |
| 2244 | 'arm_float_abi%': 'softfp', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2245 | 'arm_thumb%': 0, |
| 2246 | }], |
| 2247 | ['arm_version==7 and android_webview_build==0', { |
| 2248 | 'arm_arch%': 'armv7-a', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 2249 | 'arm_tune%': 'generic-armv7-a', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2250 | 'conditions': [ |
| 2251 | ['arm_neon==1', { |
| 2252 | 'arm_fpu%': 'neon', |
| 2253 | }, { |
| 2254 | 'arm_fpu%': 'vfpv3-d16', |
| 2255 | }], |
| 2256 | ], |
[email protected] | 3f85dac3 | 2013-10-29 02:38:46 | [diff] [blame] | 2257 | # Change the default to hard once the armhf transition is complete. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2258 | 'arm_float_abi%': 'softfp', |
| 2259 | 'arm_thumb%': 1, |
| 2260 | }], |
| 2261 | |
| 2262 | ['android_webview_build==1', { |
| 2263 | # The WebView build gets its cpu-specific flags from the Android build system. |
| 2264 | 'arm_arch%': '', |
| 2265 | 'arm_tune%': '', |
| 2266 | 'arm_fpu%': '', |
| 2267 | 'arm_float_abi%': '', |
| 2268 | 'arm_thumb%': 0, |
| 2269 | }], |
[email protected] | 5ac4b90 | 2013-10-22 17:21:29 | [diff] [blame] | 2270 | |
| 2271 | # Enable brlapi by default for chromeos. |
| 2272 | [ 'chromeos==1', { |
| 2273 | 'use_brlapi%': 1, |
| 2274 | }], |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 2275 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2276 | ['use_ozone==1 and ozone_auto_platforms==1', { |
| 2277 | # Use test as the default platform. |
| 2278 | 'ozone_platform%': 'test', |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2279 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2280 | # Build all platforms whose deps are in install-build-deps.sh. |
| 2281 | # Only these platforms will be compile tested by buildbots. |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2282 | 'ozone_platform_dri%': 1, |
| 2283 | 'ozone_platform_test%': 1, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2284 | 'ozone_platform_egltest%': 1, |
| 2285 | }], |
| 2286 | |
[email protected] | da7aed4 | 2013-12-17 22:28:31 | [diff] [blame] | 2287 | ['desktop_linux==1 and use_aura==1 and use_x11==1', { |
| 2288 | 'use_clipboard_aurax11%': 1, |
| 2289 | }], |
| 2290 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2291 | ['OS=="win" and use_goma==1', { |
| 2292 | # goma doesn't support pch yet. |
| 2293 | 'chromium_win_pch': 0, |
| 2294 | # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| 2295 | 'conditions': [ |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 2296 | ['win_z7==0', { |
| 2297 | 'fastbuild': 1, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2298 | }], |
| 2299 | ], |
| 2300 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2301 | |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 2302 | ['OS=="win" and (clang==1 or asan==1)', { |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2303 | 'chromium_win_pch': 0, |
| 2304 | }], |
| 2305 | |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 2306 | ['host_clang==1', { |
| 2307 | 'host_cc': '<(make_clang_dir)/bin/clang', |
| 2308 | 'host_cxx': '<(make_clang_dir)/bin/clang++', |
| 2309 | }, { |
| 2310 | 'host_cc': '<!(which gcc)', |
| 2311 | 'host_cxx': '<!(which g++)', |
| 2312 | }], |
| 2313 | |
leecam | e6f6b73 | 2014-08-24 23:38:09 | [diff] [blame] | 2314 | # The seccomp-bpf sandbox is only supported on five architectures |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 2315 | # currently. |
| 2316 | # Do not disable seccomp_bpf anywhere without talking to |
| 2317 | # [email protected]! |
| 2318 | ['((OS=="linux" or OS=="android") and ' |
| 2319 | '(target_arch=="ia32" or target_arch=="x64" or ' |
leecam | e6f6b73 | 2014-08-24 23:38:09 | [diff] [blame] | 2320 | 'target_arch=="arm" or target_arch=="mipsel" or ' |
| 2321 | 'target_arch=="arm64"))', { |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 2322 | 'use_seccomp_bpf%': 1, |
| 2323 | }, { |
| 2324 | 'use_seccomp_bpf%': 0, |
| 2325 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 2326 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2327 | |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 2328 | # The path to the ANGLE library. |
| 2329 | 'angle_path': '<(DEPTH)/third_party/angle', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2330 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2331 | # List of default apps to install in new profiles. The first list contains |
| 2332 | # 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] | 2333 | # contains the destination location for each of the files. When a crx |
| 2334 | # is added or removed from the list, the chrome/browser/resources/ |
| 2335 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2336 | 'default_apps_list': [ |
| 2337 | 'browser/resources/default_apps/external_extensions.json', |
| 2338 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2339 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2340 | 'browser/resources/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2341 | 'browser/resources/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2342 | 'browser/resources/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2343 | ], |
| 2344 | 'default_apps_list_linux_dest': [ |
| 2345 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 2346 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2347 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2348 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2349 | '<(PRODUCT_DIR)/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2350 | '<(PRODUCT_DIR)/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2351 | ], |
[email protected] | 27572d1 | 2014-08-11 20:36:04 | [diff] [blame] | 2352 | |
| 2353 | # Whether to allow building of the GPU-related isolates. |
| 2354 | 'archive_gpu_tests%': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2355 | }, |
| 2356 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2357 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2358 | # The condition that operates on chromium_code is in a target_conditions |
| 2359 | # section, and will not have access to the default fallback value of |
| 2360 | # chromium_code at the top of this file, or to the chromium_code |
| 2361 | # variable placed at the root variables scope of .gyp files, because |
| 2362 | # those variables are not set at target scope. As a workaround, |
| 2363 | # if chromium_code is not set at target scope, define it in target scope |
| 2364 | # to contain whatever value it has during early variable expansion. |
| 2365 | # That's enough to make it available during target conditional |
| 2366 | # processing. |
| 2367 | 'chromium_code%': '<(chromium_code)', |
| 2368 | |
[email protected] | 7cd58be | 2014-03-21 12:39:56 | [diff] [blame] | 2369 | 'component%': '<(component)', |
| 2370 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 2371 | 'chromecast%': '<(chromecast)', |
| 2372 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2373 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 2374 | 'win_release_Optimization%': '2', # 2 = /Os |
| 2375 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2376 | |
| 2377 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2378 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 65d61e6 | 2012-06-01 21:52:11 | [diff] [blame] | 2379 | 'win_release_OmitFramePointers%': '0', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2380 | # Tri-state: blank is default, 1 on, 0 off |
| 2381 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2382 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2383 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 2384 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2385 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2386 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2387 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 2388 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2389 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2390 | # VS inserts quite a lot of extra checks to algorithms like |
| 2391 | # std::partial_sort in Debug build which make them O(N^2) |
| 2392 | # instead of O(N*logN). This is particularly slow under memory |
| 2393 | # tools like ThreadSanitizer so we want it to be disablable. |
| 2394 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
[email protected] | 907cb98d | 2014-02-23 07:19:55 | [diff] [blame] | 2395 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2396 | |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 2397 | # An application manifest fragment to declare compatibility settings for |
| 2398 | # 'executable' targets. Ignored in other target type. |
| 2399 | 'win_exe_compatibility_manifest%': |
| 2400 | '<(DEPTH)\\build\\win\\compatibility.manifest', |
| 2401 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2402 | 'release_extra_cflags%': '', |
| 2403 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2404 | |
| 2405 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2406 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2407 | # the non-qualified versions are widely assumed to be *nix-only |
| 2408 | 'win_release_extra_cflags%': '', |
| 2409 | 'win_debug_extra_cflags%': '', |
| 2410 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2411 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 2412 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 2413 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 2414 | # Only used by Windows build for now. Can be used to build into a |
| 2415 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 2416 | # output files in src/build/VS2010_{Debug,Release}. |
| 2417 | 'build_dir_prefix%': '', |
| 2418 | |
[email protected] | 9ac2db69 | 2012-06-08 01:01:57 | [diff] [blame] | 2419 | # Targets are by default not nacl untrusted code. |
| 2420 | 'nacl_untrusted_build%': 0, |
| 2421 | |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2422 | 'pnacl_compile_flags': [ |
[email protected] | 7dcd93c | 2013-11-02 02:05:53 | [diff] [blame] | 2423 | # pnacl uses the clang compiler so we need to suppress all the |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2424 | # same warnings as we do for clang. |
| 2425 | # TODO(sbc): Remove these if/when they are removed from the clang |
| 2426 | # build. |
| 2427 | '-Wno-unused-function', |
| 2428 | '-Wno-char-subscripts', |
| 2429 | '-Wno-c++11-extensions', |
| 2430 | '-Wno-unnamed-type-template-args', |
| 2431 | ], |
| 2432 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2433 | 'conditions': [ |
| 2434 | ['OS=="win" and component=="shared_library"', { |
| 2435 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 2436 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 2437 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2438 | }, { |
| 2439 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 2440 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 2441 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 2442 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2443 | ['OS=="ios"', { |
| 2444 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2445 | 'mac_release_optimization%': 's', # Use -Os unless overridden |
| 2446 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2447 | }, { |
| 2448 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2449 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
| 2450 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2451 | }], |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 2452 | ['OS=="android"', { |
| 2453 | 'host_os%': '<(host_os)', # See comment above chromium_code. |
| 2454 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2455 | ], |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 2456 | 'clang_warning_flags': [ |
| 2457 | '-Wheader-hygiene', |
| 2458 | |
| 2459 | # Don't die on dtoa code that uses a char as an array index. |
| 2460 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 2461 | '-Wno-char-subscripts', |
| 2462 | |
| 2463 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 2464 | # which we no longer use. Check if it makes sense to remove |
| 2465 | # this as well. http://crbug.com/316352 |
| 2466 | '-Wno-unneeded-internal-declaration', |
| 2467 | |
| 2468 | # Warns on switches on enums that cover all enum values but |
| 2469 | # also contain a default: branch. Chrome is full of that. |
| 2470 | '-Wno-covered-switch-default', |
| 2471 | |
| 2472 | # Warns when a const char[] is converted to bool. |
| 2473 | '-Wstring-conversion', |
| 2474 | |
| 2475 | # C++11-related flags: |
| 2476 | |
| 2477 | # This warns on using ints as initializers for floats in |
| 2478 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 2479 | # which happens in several places in chrome code. Not sure if |
| 2480 | # this is worth fixing. |
| 2481 | '-Wno-c++11-narrowing', |
| 2482 | |
| 2483 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 2484 | # code generated by flex (used in angle) contains that keyword. |
| 2485 | # http://crbug.com/255186 |
| 2486 | '-Wno-deprecated-register', |
| 2487 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2488 | }, |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 2489 | 'includes': [ 'set_clang_warning_flags.gypi', ], |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2490 | 'defines': [ |
[email protected] | 6d84e0b | 2013-12-05 12:16:13 | [diff] [blame] | 2491 | # Don't use deprecated V8 APIs anywhere. |
| 2492 | 'V8_DEPRECATION_WARNINGS', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2493 | ], |
[email protected] | 9786502 | 2014-06-13 23:18:04 | [diff] [blame] | 2494 | 'include_dirs': [ |
| 2495 | '<(SHARED_INTERMEDIATE_DIR)', |
| 2496 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2497 | 'conditions': [ |
[email protected] | d808e21 | 2013-03-12 14:06:16 | [diff] [blame] | 2498 | ['(OS=="mac" or OS=="ios") and asan==1', { |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 2499 | 'dependencies': [ |
| 2500 | '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 2501 | ], |
| 2502 | }], |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 2503 | ['OS=="win" and asan==1 and component=="shared_library"', { |
| 2504 | 'dependencies': [ |
| 2505 | '<(DEPTH)/build/win/asan.gyp:asan_dynamic_runtime', |
| 2506 | ], |
| 2507 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2508 | ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', { |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2509 | 'cflags_cc!': ['-fno-rtti'], |
| 2510 | 'cflags_cc+': [ |
| 2511 | '-frtti', |
| 2512 | '-gline-tables-only', |
| 2513 | '-fintercept-allocation-functions', |
| 2514 | ], |
| 2515 | 'defines': ['TYPE_PROFILING'], |
| 2516 | 'dependencies': [ |
| 2517 | '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
| 2518 | ], |
| 2519 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2520 | ['branding=="Chrome"', { |
| 2521 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 2522 | }, { # else: branding!="Chrome" |
| 2523 | 'defines': ['CHROMIUM_BUILD'], |
| 2524 | }], |
[email protected] | 286d9a1 | 2012-05-30 16:20:38 | [diff] [blame] | 2525 | ['OS=="mac" and component=="shared_library"', { |
| 2526 | 'xcode_settings': { |
| 2527 | 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 2528 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 2529 | # For unbundled binaries. |
| 2530 | '@loader_path/.', |
| 2531 | # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
| 2532 | '@loader_path/../../..', |
| 2533 | ], |
| 2534 | }, |
| 2535 | }], |
[email protected] | 6fcbf9d | 2014-05-09 22:01:28 | [diff] [blame] | 2536 | ['clang==1 and OS!="win"', { |
| 2537 | # This is here so that all files get recompiled after a clang roll and |
| 2538 | # when turning clang on or off. |
| 2539 | # (defines are passed via the command line, and build systems rebuild |
| 2540 | # things when their commandline changes). Nothing should ever read this |
| 2541 | # define. |
| 2542 | 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], |
| 2543 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2544 | ['enable_rlz==1', { |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 2545 | 'defines': ['ENABLE_RLZ'], |
| 2546 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2547 | ['component=="shared_library"', { |
| 2548 | 'defines': ['COMPONENT_BUILD'], |
| 2549 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 2550 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 2551 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 2552 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 2553 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 2554 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 2555 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 2556 | ['use_aura==1', { |
| 2557 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 2558 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2559 | ['use_ash==1', { |
| 2560 | 'defines': ['USE_ASH=1'], |
| 2561 | }], |
[email protected] | 91e273a10 | 2014-07-22 19:50:47 | [diff] [blame] | 2562 | ['use_pango==1', { |
| 2563 | 'defines': ['USE_PANGO=1'], |
| 2564 | }], |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 2565 | ['use_cairo==1', { |
| 2566 | 'defines': ['USE_CAIRO=1'], |
| 2567 | }], |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 2568 | ['use_cras==1', { |
| 2569 | 'defines': ['USE_CRAS=1'], |
| 2570 | }], |
[email protected] | 6ec70cc7 | 2013-11-20 05:33:46 | [diff] [blame] | 2571 | ['use_glib==1', { |
| 2572 | 'defines': ['USE_GLIB=1'], |
| 2573 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2574 | ['use_ozone==1', { |
| 2575 | 'defines': ['USE_OZONE=1'], |
| 2576 | }], |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 2577 | ['use_default_render_theme==1', { |
| 2578 | 'defines': ['USE_DEFAULT_RENDER_THEME=1'], |
| 2579 | }], |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 2580 | ['use_libjpeg_turbo==1', { |
| 2581 | 'defines': ['USE_LIBJPEG_TURBO=1'], |
| 2582 | }], |
[email protected] | 2fa2f2d8 | 2013-04-29 18:13:12 | [diff] [blame] | 2583 | ['use_x11==1', { |
| 2584 | 'defines': ['USE_X11=1'], |
| 2585 | }], |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 2586 | ['use_clipboard_aurax11==1', { |
| 2587 | 'defines': ['USE_CLIPBOARD_AURAX11=1'], |
| 2588 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 2589 | ['enable_one_click_signin==1', { |
| 2590 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 2591 | }], |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 2592 | ['enable_pre_sync_backup==1', { |
| 2593 | 'defines': ['ENABLE_PRE_SYNC_BACKUP'], |
| 2594 | }], |
[email protected] | 23485ba | 2013-09-15 00:50:00 | [diff] [blame] | 2595 | ['use_xi2_mt!=0 and use_x11==1', { |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 2596 | 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
| 2597 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2598 | ['image_loader_extension==1', { |
| 2599 | 'defines': ['IMAGE_LOADER_EXTENSION=1'], |
| 2600 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2601 | ['profiling==1', { |
| 2602 | 'defines': ['ENABLE_PROFILING=1'], |
| 2603 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 2604 | ['remoting==1', { |
| 2605 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 2606 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 2607 | ['enable_webrtc==1', { |
| 2608 | 'defines': ['ENABLE_WEBRTC=1'], |
| 2609 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2610 | ['proprietary_codecs==1', { |
| 2611 | 'defines': ['USE_PROPRIETARY_CODECS'], |
damienv | a6c9763 | 2014-08-27 01:47:58 | [diff] [blame] | 2612 | 'conditions': [ |
| 2613 | ['enable_mpeg2ts_stream_parser==1', { |
| 2614 | 'defines': ['ENABLE_MPEG2TS_STREAM_PARSER'], |
| 2615 | }], |
| 2616 | ], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2617 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 2618 | ['enable_viewport==1', { |
| 2619 | 'defines': ['ENABLE_VIEWPORT'], |
| 2620 | }], |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 2621 | ['enable_pepper_cdms==1', { |
| 2622 | 'defines': ['ENABLE_PEPPER_CDMS'], |
| 2623 | }], |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 2624 | ['enable_browser_cdms==1', { |
| 2625 | 'defines': ['ENABLE_BROWSER_CDMS'], |
| 2626 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 2627 | ['configuration_policy==1', { |
| 2628 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 2629 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 2630 | ['notifications==1', { |
| 2631 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 2632 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 2633 | ['enable_hidpi==1', { |
| 2634 | 'defines': ['ENABLE_HIDPI=1'], |
| 2635 | }], |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 2636 | ['native_discardable_memory==1', { |
| 2637 | 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'], |
| 2638 | }], |
| 2639 | ['native_memory_pressure_signals==1', { |
| 2640 | 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'], |
| 2641 | }], |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 2642 | ['use_udev==1', { |
| 2643 | 'defines': ['USE_UDEV'], |
| 2644 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2645 | ['fastbuild!=0', { |
[email protected] | 3b0bc5e | 2013-04-24 11:42:31 | [diff] [blame] | 2646 | 'xcode_settings': { |
| 2647 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 2648 | }, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2649 | 'conditions': [ |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2650 | ['clang==1 and asan==0 and msan==0 and tsan==0 and ubsan_vptr==0', { |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2651 | # Clang creates chubby debug information, which makes linking very |
| 2652 | # slow. For now, don't create debug information with clang. See |
| 2653 | # http://crbug.com/70000 |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2654 | 'conditions': [ |
| 2655 | ['OS=="linux"', { |
| 2656 | 'variables': { |
| 2657 | 'debug_extra_cflags': '-g0', |
| 2658 | }, |
| 2659 | }], |
| 2660 | # Android builds symbols on release by default, disable them. |
| 2661 | ['OS=="android"', { |
| 2662 | 'variables': { |
| 2663 | 'debug_extra_cflags': '-g0', |
| 2664 | 'release_extra_cflags': '-g0', |
| 2665 | }, |
| 2666 | }], |
| 2667 | ], |
| 2668 | }, { # else clang!=1 |
| 2669 | 'conditions': [ |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2670 | ['OS=="win" and fastbuild==2', { |
| 2671 | # Completely disable debug information. |
| 2672 | 'msvs_settings': { |
| 2673 | 'VCLinkerTool': { |
| 2674 | 'GenerateDebugInformation': 'false', |
| 2675 | }, |
| 2676 | 'VCCLCompilerTool': { |
| 2677 | 'DebugInformationFormat': '0', |
| 2678 | }, |
| 2679 | }, |
| 2680 | }], |
| 2681 | ['OS=="win" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2682 | 'msvs_settings': { |
| 2683 | 'VCLinkerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2684 | # This tells the linker to generate .pdbs, so that |
| 2685 | # we can get meaningful stack traces. |
| 2686 | 'GenerateDebugInformation': 'true', |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2687 | }, |
| 2688 | 'VCCLCompilerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2689 | # No debug info to be generated by compiler. |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2690 | 'DebugInformationFormat': '0', |
| 2691 | }, |
| 2692 | }, |
| 2693 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2694 | ['OS=="linux" and fastbuild==2', { |
| 2695 | 'variables': { |
| 2696 | 'debug_extra_cflags': '-g0', |
| 2697 | }, |
| 2698 | }], |
| 2699 | ['OS=="linux" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2700 | 'variables': { |
| 2701 | 'debug_extra_cflags': '-g1', |
| 2702 | }, |
| 2703 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2704 | ['OS=="android" and fastbuild==2', { |
| 2705 | 'variables': { |
| 2706 | 'debug_extra_cflags': '-g0', |
| 2707 | 'release_extra_cflags': '-g0', |
| 2708 | }, |
| 2709 | }], |
| 2710 | ['OS=="android" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2711 | 'variables': { |
| 2712 | 'debug_extra_cflags': '-g1', |
| 2713 | 'release_extra_cflags': '-g1', |
| 2714 | }, |
| 2715 | }], |
| 2716 | ], |
| 2717 | }], # clang!=1 |
| 2718 | ], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2719 | }], # fastbuild!=0 |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2720 | ['dont_embed_build_metadata==1', { |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2721 | 'defines': [ |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2722 | 'DONT_EMBED_BUILD_METADATA', |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2723 | ], |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2724 | }], # dont_embed_build_metadata==1 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 2725 | ['dcheck_always_on!=0', { |
| 2726 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 2727 | }], # dcheck_always_on!=0 |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 2728 | ['tracing_like_official_build!=0', { |
| 2729 | 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'], |
| 2730 | }], # tracing_like_official_build!=0 |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2731 | ['win_use_allocator_shim==0', { |
| 2732 | 'conditions': [ |
| 2733 | ['OS=="win"', { |
| 2734 | 'defines': ['NO_TCMALLOC'], |
| 2735 | }], |
| 2736 | ], |
| 2737 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 2738 | ['enable_eglimage==1', { |
| 2739 | 'defines': [ |
| 2740 | 'ENABLE_EGLIMAGE=1', |
| 2741 | ], |
| 2742 | }], |
[email protected] | 6c65f2b | 2014-05-07 08:57:46 | [diff] [blame] | 2743 | ['asan==1', { |
| 2744 | 'defines': [ |
| 2745 | 'ADDRESS_SANITIZER', |
| 2746 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 2747 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 6c65f2b | 2014-05-07 08:57:46 | [diff] [blame] | 2748 | ], |
| 2749 | }], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2750 | ['syzyasan==1', { |
| 2751 | # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2752 | 'msvs_settings': { |
| 2753 | 'VCLinkerTool': { |
| 2754 | 'Profile': 'true', |
| 2755 | }, |
| 2756 | }, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2757 | 'defines': [ |
[email protected] | aee2f33 | 2014-03-27 15:08:04 | [diff] [blame] | 2758 | 'SYZYASAN', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2759 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 2760 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2761 | ], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2762 | }], |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2763 | ['OS=="win"', { |
| 2764 | 'defines': [ |
| 2765 | '__STD_C', |
| 2766 | '_CRT_SECURE_NO_DEPRECATE', |
| 2767 | '_SCL_SECURE_NO_DEPRECATE', |
[email protected] | 2d0aa324 | 2012-10-22 16:23:10 | [diff] [blame] | 2768 | # This define is required to pull in the new Win8 interfaces from |
| 2769 | # system headers like ShObjIdl.h. |
| 2770 | 'NTDDI_VERSION=0x06020000', |
[email protected] | 3741674 | 2013-11-12 07:13:33 | [diff] [blame] | 2771 | # This is required for ATL to use XP-safe versions of its functions. |
| 2772 | '_USING_V110_SDK71_', |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2773 | ], |
| 2774 | 'include_dirs': [ |
| 2775 | '<(DEPTH)/third_party/wtl/include', |
| 2776 | ], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2777 | 'conditions': [ |
| 2778 | ['win_z7!=0', { |
| 2779 | 'msvs_settings': { |
[email protected] | 5146e0b | 2012-08-23 05:49:09 | [diff] [blame] | 2780 | # Generates debug info when win_z7=1 |
| 2781 | # even if fastbuild=1 (that makes GenerateDebugInformation false). |
| 2782 | 'VCLinkerTool': { |
| 2783 | 'GenerateDebugInformation': 'true', |
| 2784 | }, |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2785 | 'VCCLCompilerTool': { |
| 2786 | 'DebugInformationFormat': '1', |
| 2787 | } |
| 2788 | } |
| 2789 | }], |
| 2790 | ], # win_z7!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2791 | }], # OS==win |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 2792 | ['chromecast==1', { |
| 2793 | 'defines': [ |
| 2794 | 'LOG_DISABLED=0', |
| 2795 | ], |
| 2796 | 'conditions': [ |
| 2797 | ['target_arch=="arm"', { |
| 2798 | 'defines': [ |
| 2799 | # TODO(lcwu): Work around an error when building Chromium |
| 2800 | # with gcc-4.5.3 (e.g. v8/src/platform-linux.cc). Remove |
| 2801 | # this define once the toolchain is updated. |
| 2802 | # See crbug.com/388933. |
| 2803 | '__SOFTFP', |
| 2804 | ], |
| 2805 | }], |
| 2806 | ], |
| 2807 | }], |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 2808 | ['enable_task_manager==1', { |
| 2809 | 'defines': [ |
| 2810 | 'ENABLE_TASK_MANAGER=1', |
| 2811 | ], |
| 2812 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2813 | ['enable_extensions==1', { |
| 2814 | 'defines': [ |
| 2815 | 'ENABLE_EXTENSIONS=1', |
| 2816 | ], |
| 2817 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 2818 | ['OS=="win" and branding=="Chrome"', { |
| 2819 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 2820 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 2821 | ['enable_dart==1', { |
| 2822 | 'defines': ['WEBKIT_USING_DART=1'], |
| 2823 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 2824 | ['enable_plugin_installation==1', { |
| 2825 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 2826 | }], |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 2827 | ['enable_plugins==1', { |
| 2828 | 'defines': ['ENABLE_PLUGINS=1'], |
| 2829 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 2830 | ['enable_session_service==1', { |
| 2831 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 2832 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 2833 | ['enable_themes==1', { |
| 2834 | 'defines': ['ENABLE_THEMES=1'], |
| 2835 | }], |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 2836 | ['enable_autofill_dialog==1', { |
| 2837 | 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], |
| 2838 | }], |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 2839 | ['enable_prod_wallet_service==1', { |
| 2840 | 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'], |
| 2841 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 2842 | ['enable_background==1', { |
| 2843 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 2844 | }], |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 2845 | ['enable_google_now==1', { |
| 2846 | 'defines': ['ENABLE_GOOGLE_NOW=1'], |
| 2847 | }], |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 2848 | ['cld_version!=0', { |
| 2849 | 'defines': ['CLD_VERSION=<(cld_version)'], |
| 2850 | }], |
[email protected] | 34621d1 | 2014-07-16 22:33:10 | [diff] [blame] | 2851 | ['cld_version==2', { |
| 2852 | # This is used to populate the "CLD Data Source" field in: |
| 2853 | # chrome://translate-internals |
| 2854 | 'defines': ['CLD2_DATA_SOURCE=<(cld2_data_source)'], |
| 2855 | }], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2856 | ['enable_printing==1', { |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2857 | 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'], |
| 2858 | }], |
vitalybuka | f9433e4 | 2014-09-08 10:04:55 | [diff] [blame] | 2859 | ['enable_printing==1 and OS=="win"', { |
| 2860 | 'defines': ['DISABLE_BASIC_PRINTING=1'], |
| 2861 | }], |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2862 | ['enable_printing==2', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2863 | 'defines': ['ENABLE_PRINTING=1'], |
| 2864 | }], |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 2865 | ['enable_spellcheck==1', { |
| 2866 | 'defines': ['ENABLE_SPELLCHECK=1'], |
| 2867 | }], |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 2868 | ['enable_captive_portal_detection==1', { |
| 2869 | 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
| 2870 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2871 | ['enable_app_list==1', { |
| 2872 | 'defines': ['ENABLE_APP_LIST=1'], |
| 2873 | }], |
| 2874 | ['enable_settings_app==1', { |
| 2875 | 'defines': ['ENABLE_SETTINGS_APP=1'], |
| 2876 | }], |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 2877 | ['disable_file_support==1', { |
| 2878 | 'defines': ['DISABLE_FILE_SUPPORT=1'], |
| 2879 | }], |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 2880 | ['disable_ftp_support==1', { |
| 2881 | 'defines': ['DISABLE_FTP_SUPPORT=1'], |
| 2882 | }], |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 2883 | ['use_icu_alternatives_on_android==1', { |
| 2884 | 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'], |
| 2885 | }], |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 2886 | ['enable_managed_users==1', { |
| 2887 | 'defines': ['ENABLE_MANAGED_USERS=1'], |
| 2888 | }], |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 2889 | ['data_reduction_fallback_host != ""', { |
| 2890 | 'defines': [ |
| 2891 | 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'], |
| 2892 | }], |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 2893 | ['data_reduction_dev_host != ""', { |
| 2894 | 'defines': [ |
| 2895 | 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'], |
| 2896 | }], |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 2897 | ['spdy_proxy_auth_origin != ""', { |
| 2898 | 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'], |
| 2899 | }], |
| 2900 | ['spdy_proxy_auth_property != ""', { |
| 2901 | 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], |
| 2902 | }], |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 2903 | ['spdy_proxy_auth_value != ""', { |
| 2904 | 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], |
| 2905 | }], |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 2906 | ['data_reduction_proxy_probe_url != ""', { |
| 2907 | 'defines': [ |
| 2908 | 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'], |
| 2909 | }], |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 2910 | ['data_reduction_proxy_warmup_url != ""', { |
| 2911 | 'defines': [ |
| 2912 | 'DATA_REDUCTION_PROXY_WARMUP_URL="<(data_reduction_proxy_warmup_url)"'], |
| 2913 | }], |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 2914 | ['data_reduction_proxy_ssl_origin != ""', { |
| 2915 | 'defines': [ |
| 2916 | 'DATA_REDUCTION_PROXY_SSL_ORIGIN="<(data_reduction_proxy_ssl_origin)"'], |
| 2917 | }], |
| 2918 | ['data_reduction_proxy_alt_origin != ""', { |
| 2919 | 'defines': [ |
| 2920 | 'DATA_REDUCTION_PROXY_ALT_ORIGIN="<(data_reduction_proxy_alt_origin)"'], |
| 2921 | }], |
| 2922 | ['data_reduction_proxy_alt_fallback_origin != ""', { |
| 2923 | 'defines': [ |
| 2924 | 'DATA_REDUCTION_PROXY_ALT_FALLBACK_ORIGIN="<(data_reduction_proxy_alt_fallback_origin)"'], |
| 2925 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 2926 | ['enable_mdns==1', { |
| 2927 | 'defines': ['ENABLE_MDNS=1'], |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 2928 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2929 | ['enable_service_discovery==1', { |
| 2930 | 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ], |
| 2931 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2932 | ['enable_wifi_bootstrapping==1', { |
| 2933 | 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ], |
| 2934 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2935 | ['enable_hangout_services_extension==1', { |
| 2936 | 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'], |
| 2937 | }], |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 2938 | ['enable_ipc_fuzzer==1', { |
| 2939 | 'defines': ['ENABLE_IPC_FUZZER=1'], |
| 2940 | }], |
[email protected] | 8b4efe9 | 2014-02-21 16:08:20 | [diff] [blame] | 2941 | ['video_hole==1', { |
| 2942 | 'defines': ['VIDEO_HOLE=1'], |
| 2943 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2944 | ], # conditions for 'target_defaults' |
| 2945 | 'target_conditions': [ |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2946 | ['<(use_openssl)==1', { |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 2947 | 'defines': ['USE_OPENSSL=1'], |
| 2948 | }], |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2949 | ['<(use_openssl_certs)==1', { |
| 2950 | 'defines': ['USE_OPENSSL_CERTS=1'], |
| 2951 | }], |
| 2952 | ['>(nacl_untrusted_build)==1', { |
| 2953 | 'defines': [ |
| 2954 | 'USE_OPENSSL=1', |
| 2955 | 'USE_OPENSSL_CERTS=1', |
| 2956 | ], |
| 2957 | }], |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 2958 | ['<(use_nss)==1 and >(nacl_untrusted_build)==0', { |
| 2959 | 'defines': ['USE_NSS=1'], |
| 2960 | }], |
[email protected] | 0251701 | 2014-06-13 09:28:41 | [diff] [blame] | 2961 | ['<(chromeos)==1 and >(nacl_untrusted_build)==0', { |
| 2962 | 'defines': ['OS_CHROMEOS=1'], |
| 2963 | }], |
[email protected] | e59443e | 2014-08-18 14:13:33 | [diff] [blame] | 2964 | ['enable_wexit_time_destructors==1 and OS!="win"', { |
| 2965 | # TODO: Enable on Windows too, http://crbug.com/404525 |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 2966 | 'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']}, |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2967 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2968 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2969 | 'conditions': [ |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2970 | [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2971 | # We don't want to get warnings from third-party code, |
| 2972 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2973 | 'cflags!': [ |
| 2974 | '-Wall', |
| 2975 | '-Wextra', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2976 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2977 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2978 | # Don't warn about hash_map in third-party code. |
| 2979 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2980 | ], |
| 2981 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2982 | # Don't warn about printf format problems. |
| 2983 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 2984 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2985 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2986 | 'cflags_cc!': [ |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 2987 | # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2988 | '-Wsign-compare', |
| 2989 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2990 | }], |
[email protected] | 82dd5eb3 | 2012-08-18 04:24:32 | [diff] [blame] | 2991 | # TODO: Fix all warnings on chromeos too. |
| 2992 | [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
| 2993 | 'cflags!': [ |
| 2994 | '-Werror', |
| 2995 | ], |
| 2996 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2997 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2998 | 'cflags': [ |
| 2999 | # Don't warn about ignoring the return value from e.g. close(). |
| 3000 | # 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] | 3001 | # BSD systems do not support this option, since they are usually |
| 3002 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 3003 | '-Wno-unused-result', |
| 3004 | ], |
| 3005 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3006 | [ 'OS=="win"', { |
| 3007 | 'defines': [ |
| 3008 | '_CRT_SECURE_NO_DEPRECATE', |
| 3009 | '_CRT_NONSTDC_NO_WARNINGS', |
| 3010 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 3011 | '_SCL_SECURE_NO_DEPRECATE', |
| 3012 | ], |
| 3013 | 'msvs_disabled_warnings': [4800], |
| 3014 | 'msvs_settings': { |
| 3015 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 3016 | 'WarningLevel': '3', |
[email protected] | 86caa405 | 2014-07-18 07:22:09 | [diff] [blame] | 3017 | 'WarnAsError': 'true', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3018 | 'Detect64BitPortabilityProblems': 'false', |
| 3019 | }, |
| 3020 | }, |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 3021 | 'conditions': [ |
| 3022 | ['buildtype=="Official"', { |
| 3023 | 'msvs_settings': { |
| 3024 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 3025 | } |
| 3026 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 3027 | ['clang==1', { |
| 3028 | 'msvs_settings': { |
| 3029 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 3030 | } |
| 3031 | }], |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 3032 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3033 | }], |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 3034 | # TODO(darin): Unfortunately, some third_party code depends on base. |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 3035 | [ 'OS=="win" and component=="shared_library"', { |
| 3036 | 'msvs_disabled_warnings': [ |
| 3037 | 4251, # class 'std::xx' needs to have dll-interface. |
| 3038 | ], |
| 3039 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3040 | [ 'OS=="mac" or OS=="ios"', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3041 | 'xcode_settings': { |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 3042 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3043 | }, |
[email protected] | 3a352c36 | 2012-05-08 19:45:49 | [diff] [blame] | 3044 | 'conditions': [ |
| 3045 | ['buildtype=="Official"', { |
| 3046 | 'xcode_settings': { |
| 3047 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 3048 | }, |
| 3049 | }], |
| 3050 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3051 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3052 | [ 'OS=="ios"', { |
| 3053 | 'xcode_settings': { |
[email protected] | 7afca86 | 2012-07-11 15:11:22 | [diff] [blame] | 3054 | # TODO(ios): Fix remaining warnings in third-party code, then |
| 3055 | # remove this; the Mac cleanup didn't get everything that's |
| 3056 | # flagged in an iOS build. |
| 3057 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3058 | 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
[email protected] | 5a2637d0 | 2013-11-12 17:01:17 | [diff] [blame] | 3059 | # Several internal ios directories generate numerous warnings for |
| 3060 | # -Wobjc-missing-property-synthesis. |
| 3061 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3062 | }, |
| 3063 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3064 | ], |
| 3065 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 3066 | 'includes': [ |
| 3067 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 3068 | 'filename_rules.gypi', |
| 3069 | ], |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 3070 | # In Chromium code, we define __STDC_foo_MACROS in order to get the |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3071 | # C99 macros on Mac and Linux. |
| 3072 | 'defines': [ |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 3073 | '__STDC_CONSTANT_MACROS', |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3074 | '__STDC_FORMAT_MACROS', |
| 3075 | ], |
| 3076 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3077 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 3078 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 3079 | 'msvs_settings': { |
| 3080 | 'VCCLCompilerTool': { |
| 3081 | 'AdditionalOptions': ['/we4389'], |
| 3082 | }, |
| 3083 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3084 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 3085 | ['OS=="win" and component=="shared_library"', { |
| 3086 | 'msvs_disabled_warnings': [ |
| 3087 | 4251, # class 'std::xx' needs to have dll-interface. |
| 3088 | ], |
| 3089 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3090 | ], |
| 3091 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 3092 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3093 | 'default_configuration': 'Debug', |
| 3094 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3095 | # VCLinkerTool LinkIncremental values below: |
| 3096 | # 0 == default |
| 3097 | # 1 == /INCREMENTAL:NO |
| 3098 | # 2 == /INCREMENTAL |
| 3099 | # Debug links incremental, Release does not. |
| 3100 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 3101 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3102 | # |
| 3103 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3104 | 'abstract': 1, |
| 3105 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 3106 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3107 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 3108 | 'CharacterSet': '1', |
| 3109 | }, |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3110 | # Add the default import libs. |
| 3111 | 'msvs_settings':{ |
| 3112 | 'VCLinkerTool': { |
| 3113 | 'AdditionalDependencies': [ |
| 3114 | 'kernel32.lib', |
| 3115 | 'gdi32.lib', |
| 3116 | 'winspool.lib', |
| 3117 | 'comdlg32.lib', |
| 3118 | 'advapi32.lib', |
| 3119 | 'shell32.lib', |
| 3120 | 'ole32.lib', |
| 3121 | 'oleaut32.lib', |
| 3122 | 'user32.lib', |
| 3123 | 'uuid.lib', |
| 3124 | 'odbc32.lib', |
| 3125 | 'odbccp32.lib', |
[email protected] | 36bb739c | 2013-02-25 22:10:39 | [diff] [blame] | 3126 | 'delayimp.lib', |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 3127 | 'credui.lib', |
| 3128 | 'netapi32.lib', |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3129 | ], |
| 3130 | }, |
| 3131 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3132 | }, |
| 3133 | 'x86_Base': { |
| 3134 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3135 | 'msvs_settings': { |
| 3136 | 'VCLinkerTool': { |
[email protected] | 388484f0 | 2014-02-06 09:49:21 | [diff] [blame] | 3137 | 'MinimumRequiredVersion': '5.01', # XP. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3138 | 'TargetMachine': '1', |
| 3139 | }, |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3140 | 'VCLibrarianTool': { |
| 3141 | 'TargetMachine': '1', |
| 3142 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3143 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 3144 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3145 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3146 | 'x64_Base': { |
| 3147 | 'abstract': 1, |
| 3148 | 'msvs_configuration_platform': 'x64', |
| 3149 | 'msvs_settings': { |
| 3150 | 'VCLinkerTool': { |
[email protected] | 68c88b0 | 2014-06-04 17:16:04 | [diff] [blame] | 3151 | # Make sure to understand http://crbug.com/361720 if you want to |
| 3152 | # increase this. |
| 3153 | 'MinimumRequiredVersion': '5.02', # Server 2003. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3154 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3155 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3156 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3157 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3158 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 50f9966 | 2013-03-04 20:58:36 | [diff] [blame] | 3159 | # Doesn't exist x64 SDK. Should use oleaut32 in any case. |
| 3160 | 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3161 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 3162 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3163 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3164 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3165 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3166 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3167 | 'TargetMachine': '17', # x64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3168 | }, |
| 3169 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3170 | }, |
| 3171 | 'Debug_Base': { |
| 3172 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3173 | 'defines': [ |
| 3174 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3175 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3176 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3177 | 'xcode_settings': { |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 3178 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3179 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3180 | '<@(debug_extra_cflags)', |
| 3181 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3182 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3183 | 'msvs_settings': { |
| 3184 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3185 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3186 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 3187 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3188 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3189 | 'conditions': [ |
| 3190 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3191 | # "default inlining", not "/Ob0". |
| 3192 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3193 | ['win_debug_InlineFunctionExpansion==0', { |
| 3194 | 'AdditionalOptions': ['/Ob0'], |
| 3195 | }], |
| 3196 | ['win_debug_InlineFunctionExpansion!=""', { |
| 3197 | 'InlineFunctionExpansion': |
| 3198 | '<(win_debug_InlineFunctionExpansion)', |
| 3199 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 3200 | ['win_debug_disable_iterator_debugging==1', { |
| 3201 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 3202 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3203 | |
| 3204 | # if win_debug_OmitFramePointers is blank, leave as default |
| 3205 | ['win_debug_OmitFramePointers==1', { |
| 3206 | 'OmitFramePointers': 'true', |
| 3207 | }], |
| 3208 | ['win_debug_OmitFramePointers==0', { |
| 3209 | 'OmitFramePointers': 'false', |
| 3210 | # The above is not sufficient (http://crbug.com/106711): it |
| 3211 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3212 | # perform FPO regardless, so we must explicitly disable. |
| 3213 | # We still want the false setting above to avoid having |
| 3214 | # "/Oy /Oy-" and warnings about overriding. |
| 3215 | 'AdditionalOptions': ['/Oy-'], |
| 3216 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3217 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3218 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3219 | }, |
| 3220 | 'VCLinkerTool': { |
| 3221 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 3222 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 3223 | # Chrome.dll share the same base name. As result, windbg will |
| 3224 | # name the Chrome.dll module like chrome_<base address>, where |
| 3225 | # <base address> typically changes with each launch. This in turn |
| 3226 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 3227 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 3228 | # Note that this is a three-way bool, where 0 means to pick up |
| 3229 | # the default setting, 1 is off and 2 is on. |
| 3230 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3231 | }, |
| 3232 | 'VCResourceCompilerTool': { |
| 3233 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 3234 | }, |
| 3235 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3236 | 'conditions': [ |
[email protected] | 78204c9 | 2012-09-14 04:42:55 | [diff] [blame] | 3237 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3238 | 'target_conditions': [ |
| 3239 | ['_toolset=="target"', { |
| 3240 | 'cflags': [ |
| 3241 | '<@(debug_extra_cflags)', |
| 3242 | ], |
| 3243 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3244 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3245 | }], |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 3246 | ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', { |
[email protected] | a8d94b4 | 2013-12-10 18:52:22 | [diff] [blame] | 3247 | # Enable libstdc++ debugging facilities to help catch problems |
| 3248 | # early, see http://crbug.com/65151 . |
| 3249 | # TODO(phajdan.jr): Should we enable this for all of POSIX? |
| 3250 | 'defines': ['_GLIBCXX_DEBUG=1',], |
| 3251 | }], |
[email protected] | 330ba6d | 2014-03-06 05:41:36 | [diff] [blame] | 3252 | ['release_valgrind_build==0', { |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 3253 | 'xcode_settings': { |
| 3254 | 'OTHER_CFLAGS': [ |
| 3255 | '-fstack-protector-all', # Implies -fstack-protector |
| 3256 | ], |
| 3257 | }, |
| 3258 | }], |
[email protected] | e86432a | 2014-08-18 21:01:08 | [diff] [blame] | 3259 | ['clang==1', { |
| 3260 | 'cflags': [ |
| 3261 | # Allow comparing the address of references and 'this' against 0 |
| 3262 | # in debug builds. Technically, these can never be null in |
| 3263 | # well-defined C/C++ and Clang can optimize such checks away in |
| 3264 | # release builds, but they may be used in asserts in debug builds. |
| 3265 | '-Wno-undefined-bool-conversion', |
| 3266 | '-Wno-tautological-undefined-compare', |
| 3267 | ], |
| 3268 | 'xcode_settings': { |
| 3269 | 'OTHER_CFLAGS': [ |
| 3270 | '-Wno-undefined-bool-conversion', |
| 3271 | '-Wno-tautological-undefined-compare', |
| 3272 | ], |
| 3273 | }, |
| 3274 | 'msvs_settings': { |
| 3275 | 'VCCLCompilerTool': { |
| 3276 | 'AdditionalOptions': [ |
| 3277 | '-Wno-undefined-bool-conversion', |
| 3278 | '-Wno-tautological-undefined-compare', |
| 3279 | ], |
| 3280 | }, |
| 3281 | }, |
| 3282 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3283 | ], |
| 3284 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3285 | 'Release_Base': { |
| 3286 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3287 | 'defines': [ |
| 3288 | 'NDEBUG', |
| 3289 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3290 | 'xcode_settings': { |
| 3291 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 3292 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 3293 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3294 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3295 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3296 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3297 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3298 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 3299 | # In official builds, each target will self-select |
| 3300 | # an optimization level. |
| 3301 | ['buildtype!="Official"', { |
| 3302 | 'Optimization': '<(win_release_Optimization)', |
| 3303 | }, |
| 3304 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3305 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3306 | # "default inlining", not "/Ob0". |
| 3307 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3308 | ['win_release_InlineFunctionExpansion==0', { |
| 3309 | 'AdditionalOptions': ['/Ob0'], |
| 3310 | }], |
| 3311 | ['win_release_InlineFunctionExpansion!=""', { |
| 3312 | 'InlineFunctionExpansion': |
| 3313 | '<(win_release_InlineFunctionExpansion)', |
| 3314 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3315 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3316 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3317 | ['win_release_OmitFramePointers==1', { |
| 3318 | 'OmitFramePointers': 'true', |
| 3319 | }], |
| 3320 | ['win_release_OmitFramePointers==0', { |
| 3321 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3322 | # The above is not sufficient (http://crbug.com/106711): it |
| 3323 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3324 | # perform FPO regardless, so we must explicitly disable. |
| 3325 | # We still want the false setting above to avoid having |
| 3326 | # "/Oy /Oy-" and warnings about overriding. |
| 3327 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3328 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3329 | ], |
[email protected] | 21fac24 | 2014-07-18 09:30:33 | [diff] [blame] | 3330 | 'AdditionalOptions': [ |
| 3331 | '/d2Zi+', # Improve debugging of Release builds. |
scottmg | 4f828c94 | 2014-08-29 04:11:07 | [diff] [blame] | 3332 | '/Zc:inline', # Remove unreferenced COMDAT (faster links). |
[email protected] | 21fac24 | 2014-07-18 09:30:33 | [diff] [blame] | 3333 | '<@(win_release_extra_cflags)', |
| 3334 | ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3335 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3336 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3337 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 3338 | # (i.e., inherit from parent solution), 1 means false, and |
| 3339 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3340 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3341 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 3342 | # file contains FIXUP information (growing the PDB file by about |
| 3343 | # 5%) but does not otherwise alter the output binary. This |
| 3344 | # information is used by the Syzygy optimization tool when |
| 3345 | # decomposing the release image. |
| 3346 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3347 | }, |
| 3348 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3349 | 'conditions': [ |
[email protected] | fd3fb3bf | 2012-05-23 22:15:16 | [diff] [blame] | 3350 | ['msvs_use_common_release', { |
| 3351 | 'includes': ['release.gypi'], |
| 3352 | }], |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3353 | ['release_valgrind_build==0 and tsan==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3354 | 'defines': [ |
| 3355 | 'NVALGRIND', |
| 3356 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 3357 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 3358 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3359 | 'defines': [ |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3360 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 3361 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3362 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3363 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3364 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 3365 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3366 | ['win_use_allocator_shim==0', { |
| 3367 | 'defines': ['NO_TCMALLOC'], |
| 3368 | }], |
[email protected] | 8b22522 | 2014-02-18 22:54:44 | [diff] [blame] | 3369 | # _FORTIFY_SOURCE isn't really supported by Clang now, see |
| 3370 | # http://llvm.org/bugs/show_bug.cgi?id=16821. |
[email protected] | ed472ad | 2014-07-10 00:50:52 | [diff] [blame] | 3371 | # It seems to work fine with Ubuntu 12 headers though, so use it |
| 3372 | # in official builds. |
| 3373 | ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubsan!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', { |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 3374 | 'target_conditions': [ |
| 3375 | ['chromium_code==1', { |
| 3376 | # Non-chromium code is not guaranteed to compile cleanly |
| 3377 | # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 3378 | # when optimizations are disabled, so only do that for Release |
| 3379 | # build. |
| 3380 | 'defines': [ |
| 3381 | '_FORTIFY_SOURCE=2', |
| 3382 | ], |
| 3383 | }], |
[email protected] | 37305ae | 2012-12-11 01:54:58 | [diff] [blame] | 3384 | ], |
| 3385 | }], |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 3386 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3387 | 'target_conditions': [ |
| 3388 | ['_toolset=="target"', { |
| 3389 | 'cflags': [ |
| 3390 | '<@(release_extra_cflags)', |
| 3391 | ], |
[email protected] | 9082bba | 2014-05-20 06:50:21 | [diff] [blame] | 3392 | 'conditions': [ |
| 3393 | ['enable_resource_whitelist_generation==1', { |
| 3394 | 'cflags': [ |
| 3395 | '-Wunknown-pragmas -Wno-error=unknown-pragmas', |
| 3396 | ], |
| 3397 | }], |
| 3398 | ], |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3399 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3400 | ], |
| 3401 | }], |
[email protected] | b64ec82 | 2013-05-23 12:57:41 | [diff] [blame] | 3402 | ['OS=="ios"', { |
| 3403 | 'defines': [ |
| 3404 | 'NS_BLOCK_ASSERTIONS=1', |
| 3405 | ], |
| 3406 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3407 | ], |
| 3408 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3409 | # |
| 3410 | # Concrete configurations |
| 3411 | # |
| 3412 | 'Debug': { |
| 3413 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 3414 | }, |
| 3415 | 'Release': { |
| 3416 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3417 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3418 | 'conditions': [ |
[email protected] | 8125fba7 | 2014-02-26 14:32:58 | [diff] [blame] | 3419 | [ 'OS=="ios"', { |
| 3420 | 'Profile': { |
| 3421 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 3422 | 'target_conditions': [ |
| 3423 | [ '_type=="executable"', { |
| 3424 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 3425 | # debug information format to dwarf-with-dsym. Since |
| 3426 | # strip_from_xcode will not be used, set Xcode to do the |
| 3427 | # stripping as well. |
| 3428 | 'xcode_settings': { |
| 3429 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 3430 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 3431 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 3432 | }, |
| 3433 | }], |
| 3434 | ], |
| 3435 | }, |
| 3436 | }], |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3437 | [ 'OS=="win"', { |
| 3438 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3439 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3440 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3441 | }, |
| 3442 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3443 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3444 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3445 | }], |
| 3446 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3447 | }, |
| 3448 | }, |
| 3449 | 'conditions': [ |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 3450 | ['os_posix==1', { |
| 3451 | 'target_defaults': { |
| 3452 | 'ldflags': [ |
| 3453 | '-Wl,-z,now', |
| 3454 | '-Wl,-z,relro', |
| 3455 | ], |
| 3456 | }, |
| 3457 | }], |
[email protected] | 713d6e4a | 2014-03-28 18:18:20 | [diff] [blame] | 3458 | # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
[email protected] | 453a8ad3 | 2014-05-20 17:32:49 | [diff] [blame] | 3459 | ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3460 | 'target_defaults': { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3461 | 'ldflags': [ |
[email protected] | a89c460c | 2014-03-17 13:42:13 | [diff] [blame] | 3462 | '-Wl,--fatal-warnings', |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3463 | ], |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3464 | }, |
| 3465 | }], |
[email protected] | d2ca75c | 2013-02-01 05:47:17 | [diff] [blame] | 3466 | ['os_posix==1 and chromeos==0', { |
| 3467 | # Chrome OS enables -fstack-protector-strong via its build wrapper, |
| 3468 | # and we want to avoid overriding this, so stack-protector is only |
| 3469 | # enabled when not building on Chrome OS. |
| 3470 | # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc |
| 3471 | # supports it. |
| 3472 | 'target_defaults': { |
| 3473 | 'cflags': [ |
| 3474 | '-fstack-protector', |
| 3475 | '--param=ssp-buffer-size=4', |
| 3476 | ], |
| 3477 | }, |
| 3478 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3479 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3480 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3481 | # Enable -Werror by default, but put it in a variable so it can |
| 3482 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 3483 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 3484 | 'werror%': '-Werror', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3485 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3486 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 3487 | 'defines': [ |
| 3488 | '_FILE_OFFSET_BITS=64', |
| 3489 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3490 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3491 | '<(werror)', # See note above about the werror variable. |
| 3492 | '-pthread', |
| 3493 | '-fno-exceptions', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 3494 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3495 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 3496 | # TODO(evan): turn this back on once all the builds work. |
| 3497 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 3498 | # Don't warn about unused function params. We use those everywhere. |
| 3499 | '-Wno-unused-parameter', |
| 3500 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 3501 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 3502 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 3503 | # Note: this is *required* to make some plugins work. |
| 3504 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 3505 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3506 | ], |
| 3507 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 3508 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3509 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 3510 | # Make inline functions have hidden visiblity by default. |
| 3511 | # Surprisingly, not covered by -fvisibility=hidden. |
| 3512 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3513 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 3514 | # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3515 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3516 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 3517 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 3518 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3519 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3520 | 'libraries' : [ |
| 3521 | '<(libraries_for_target)', |
| 3522 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3523 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3524 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 3525 | 'variables': { |
| 3526 | 'debug_optimize%': '0', |
| 3527 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3528 | 'defines': [ |
| 3529 | '_DEBUG', |
| 3530 | ], |
| 3531 | 'cflags': [ |
[email protected] | 95ad203 | 2012-08-24 00:49:25 | [diff] [blame] | 3532 | '-O>(debug_optimize)', |
[email protected] | 230023c | 2014-07-02 09:31:33 | [diff] [blame] | 3533 | '-g', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3534 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3535 | 'conditions' : [ |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3536 | ['OS=="android"', { |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3537 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3538 | # Warn in case of text relocations. |
| 3539 | '-Wl,--warn-shared-textrel', |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3540 | ], |
| 3541 | }], |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 3542 | ['OS=="android" and android_full_debug==0', { |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3543 | # Some configurations are copied from Release_Base to reduce |
| 3544 | # the binary size. |
| 3545 | 'variables': { |
| 3546 | 'debug_optimize%': 's', |
| 3547 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3548 | 'cflags': [ |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3549 | '-fdata-sections', |
| 3550 | '-ffunction-sections', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3551 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3552 | 'ldflags': [ |
| 3553 | '-Wl,-O1', |
| 3554 | '-Wl,--as-needed', |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3555 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3556 | }], |
[email protected] | 264868d2 | 2014-07-10 17:37:37 | [diff] [blame] | 3557 | ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', { |
| 3558 | # We don't omit frame pointers on arm64 since they are required |
| 3559 | # to correctly unwind stackframes which contain system library |
| 3560 | # function frames (crbug.com/391706). |
| 3561 | 'cflags': [ |
| 3562 | '-fomit-frame-pointer', |
| 3563 | ], |
| 3564 | }], |
[email protected] | d4c0ec5b | 2013-03-10 03:07:45 | [diff] [blame] | 3565 | ['OS=="linux" and target_arch=="ia32"', { |
| 3566 | 'ldflags': [ |
| 3567 | '-Wl,--no-as-needed', |
| 3568 | ], |
| 3569 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3570 | ['debug_unwind_tables==1', { |
| 3571 | 'cflags': ['-funwind-tables'], |
| 3572 | }, { |
| 3573 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
| 3574 | }], |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 3575 | # TODO(mostynb): shuffle clang/gcc_version/binutils_version |
| 3576 | # definitions in to the right scope to use them when setting |
| 3577 | # linux_use_debug_fission, so it can be used here alone. |
| 3578 | ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', { |
[email protected] | 1c26c6a | 2014-03-17 14:11:21 | [diff] [blame] | 3579 | 'cflags': ['-gsplit-dwarf'], |
[email protected] | 1c26c6a | 2014-03-17 14:11:21 | [diff] [blame] | 3580 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3581 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3582 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3583 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3584 | 'variables': { |
| 3585 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3586 | # Binaries become big and gold is unable to perform GC |
| 3587 | # and remove unused sections for some of test targets |
| 3588 | # on 32 bit platform. |
| 3589 | # (This is currently observed only in chromeos valgrind bots) |
| 3590 | # The following flag is to disable --gc-sections linker |
| 3591 | # option for these bots. |
| 3592 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 3593 | |
| 3594 | # TODO(bradnelson): reexamine how this is done if we change the |
| 3595 | # expansion of configurations |
| 3596 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3597 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3598 | 'cflags': [ |
[email protected] | 4c33a9b | 2014-06-23 22:20:19 | [diff] [blame] | 3599 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 3600 | # Don't emit the GCC version ident directives, they just end up |
| 3601 | # in the .comment section taking up binary size. |
| 3602 | '-fno-ident', |
| 3603 | # Put data and code in their own sections, so that unused symbols |
| 3604 | # can be removed at link time with --gc-sections. |
| 3605 | '-fdata-sections', |
| 3606 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3607 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3608 | 'ldflags': [ |
| 3609 | # Specifically tell the linker to perform optimizations. |
| 3610 | # See http://lwn.net/Articles/192624/ . |
| 3611 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 3612 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3613 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3614 | 'conditions' : [ |
| 3615 | ['no_gc_sections==0', { |
| 3616 | 'ldflags': [ |
| 3617 | '-Wl,--gc-sections', |
| 3618 | ], |
| 3619 | }], |
[email protected] | 264868d2 | 2014-07-10 17:37:37 | [diff] [blame] | 3620 | ['OS=="android" and target_arch!="arm64"', { |
| 3621 | # We don't omit frame pointers on arm64 since they are required |
| 3622 | # to correctly unwind stackframes which contain system library |
| 3623 | # function frames (crbug.com/391706). |
| 3624 | 'cflags': [ |
| 3625 | '-fomit-frame-pointer', |
| 3626 | ] |
| 3627 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3628 | ['OS=="android"', { |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 3629 | 'variables': { |
| 3630 | 'release_optimize%': 's', |
| 3631 | }, |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3632 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3633 | # Warn in case of text relocations. |
| 3634 | '-Wl,--warn-shared-textrel', |
| 3635 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3636 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 3637 | ['clang==1', { |
| 3638 | 'cflags!': [ |
| 3639 | '-fno-ident', |
| 3640 | ], |
[email protected] | b31dbfc | 2014-07-18 20:14:47 | [diff] [blame] | 3641 | # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed |
| 3642 | # and the fix is in chromium. |
| 3643 | 'cflags': [ '-fno-slp-vectorize', ], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 3644 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3645 | ['profiling==1', { |
| 3646 | 'cflags': [ |
| 3647 | '-fno-omit-frame-pointer', |
| 3648 | '-g', |
| 3649 | ], |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 3650 | 'conditions' : [ |
| 3651 | ['profiling_full_stack_frames==1', { |
| 3652 | 'cflags': [ |
| 3653 | '-fno-inline', |
| 3654 | '-fno-optimize-sibling-calls', |
| 3655 | ], |
| 3656 | }], |
| 3657 | ], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3658 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3659 | ['release_unwind_tables==1', { |
| 3660 | 'cflags': ['-funwind-tables'], |
| 3661 | }, { |
| 3662 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
[email protected] | a637d438 | 2014-01-11 03:12:05 | [diff] [blame] | 3663 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3664 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3665 | }, |
| 3666 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3667 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3668 | ['target_arch=="ia32"', { |
| 3669 | 'target_conditions': [ |
| 3670 | ['_toolset=="target"', { |
| 3671 | 'asflags': [ |
| 3672 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 3673 | # are compatible with the general 32-bit-ness. |
| 3674 | '-32', |
| 3675 | ], |
| 3676 | # All floating-point computations on x87 happens in 80-bit |
| 3677 | # precision. Because the C and C++ language standards allow |
| 3678 | # the compiler to keep the floating-point values in higher |
| 3679 | # precision than what's specified in the source and doing so |
| 3680 | # is more efficient than constantly rounding up to 64-bit or |
| 3681 | # 32-bit precision as specified in the source, the compiler, |
| 3682 | # especially in the optimized mode, tries very hard to keep |
| 3683 | # values in x87 floating-point stack (in 80-bit precision) |
| 3684 | # as long as possible. This has important side effects, that |
| 3685 | # the real value used in computation may change depending on |
| 3686 | # how the compiler did the optimization - that is, the value |
| 3687 | # kept in 80-bit is different than the value rounded down to |
| 3688 | # 64-bit or 32-bit. There are possible compiler options to |
| 3689 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 3690 | # all floating-values in the memory, thus force them to be |
| 3691 | # rounded to its original precision) but they have significant |
| 3692 | # runtime performance penalty. |
| 3693 | # |
| 3694 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 3695 | # which keep floating-point values in SSE registers in its |
| 3696 | # native precision (32-bit for single precision, and 64-bit |
| 3697 | # for double precision values). This means the floating-point |
| 3698 | # value used during computation does not change depending on |
| 3699 | # how the compiler optimized the code, since the value is |
| 3700 | # always kept in its specified precision. |
[email protected] | 6c0d3067 | 2014-03-12 00:31:30 | [diff] [blame] | 3701 | # |
| 3702 | # Refer to http://crbug.com/348761 for rationale behind SSE2 |
| 3703 | # being a minimum requirement for 32-bit Linux builds and |
| 3704 | # http://crbug.com/313032 for an example where this has "bit" |
| 3705 | # us in the past. |
| 3706 | 'cflags': [ |
| 3707 | '-msse2', |
| 3708 | '-mfpmath=sse', |
| 3709 | '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
| 3710 | '-m32', |
| 3711 | ], |
| 3712 | 'ldflags': [ |
| 3713 | '-m32', |
| 3714 | ], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3715 | 'conditions': [ |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3716 | # Use gold linker for Android ia32 target. |
| 3717 | ['OS=="android"', { |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3718 | 'ldflags': [ |
| 3719 | '-fuse-ld=gold', |
| 3720 | ], |
| 3721 | }], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3722 | # Install packages have started cropping up with |
| 3723 | # different headers between the 32-bit and 64-bit |
| 3724 | # versions, so we have to shadow those differences off |
| 3725 | # and make sure a 32-bit-on-64-bit build picks up the |
| 3726 | # right files. |
[email protected] | 3259402 | 2012-05-10 03:22:28 | [diff] [blame] | 3727 | # For android build, use NDK headers instead of host headers |
| 3728 | ['host_arch!="ia32" and OS!="android"', { |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3729 | 'include_dirs+': [ |
| 3730 | '/usr/include32', |
| 3731 | ], |
| 3732 | }], |
| 3733 | ], |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 3734 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3735 | ], |
| 3736 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3737 | ['target_arch=="x64"', { |
| 3738 | 'target_conditions': [ |
| 3739 | ['_toolset=="target"', { |
| 3740 | 'conditions': [ |
| 3741 | # Use gold linker for Android x64 target. |
| 3742 | ['OS=="android"', { |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3743 | 'ldflags': [ |
| 3744 | '-fuse-ld=gold', |
| 3745 | ], |
| 3746 | }], |
| 3747 | ], |
| 3748 | 'cflags': [ |
| 3749 | '-m64', |
| 3750 | '-march=x86-64', |
| 3751 | ], |
| 3752 | 'ldflags': [ |
| 3753 | '-m64', |
| 3754 | ], |
| 3755 | }], |
| 3756 | ], |
| 3757 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3758 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3759 | 'target_conditions': [ |
| 3760 | ['_toolset=="target"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3761 | 'conditions': [ |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3762 | ['clang==0', { |
| 3763 | 'cflags_cc': [ |
| 3764 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 3765 | # has changed whenever it encounters a varargs function. This |
| 3766 | # silences those warnings, as they are not helpful and |
| 3767 | # clutter legitimate warnings. |
| 3768 | '-Wno-abi', |
| 3769 | ], |
| 3770 | }], |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3771 | ['clang==1 and arm_arch!="" and OS!="android"', { |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3772 | 'cflags': [ |
| 3773 | '-target arm-linux-gnueabihf', |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3774 | ], |
| 3775 | 'ldflags': [ |
| 3776 | '-target arm-linux-gnueabihf', |
| 3777 | ], |
| 3778 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3779 | ['arm_arch!=""', { |
| 3780 | 'cflags': [ |
| 3781 | '-march=<(arm_arch)', |
| 3782 | ], |
| 3783 | }], |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3784 | ['clang==1 and OS!="android"', { |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3785 | 'cflags': [ |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3786 | # We need to disable clang's builtin assembler as it can't |
| 3787 | # handle several asm files, crbug.com/124610 |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3788 | '-no-integrated-as', |
| 3789 | ], |
| 3790 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3791 | ['arm_tune!=""', { |
| 3792 | 'cflags': [ |
| 3793 | '-mtune=<(arm_tune)', |
| 3794 | ], |
| 3795 | }], |
| 3796 | ['arm_fpu!=""', { |
| 3797 | 'cflags': [ |
| 3798 | '-mfpu=<(arm_fpu)', |
| 3799 | ], |
| 3800 | }], |
| 3801 | ['arm_float_abi!=""', { |
| 3802 | 'cflags': [ |
| 3803 | '-mfloat-abi=<(arm_float_abi)', |
| 3804 | ], |
| 3805 | }], |
| 3806 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3807 | 'cflags': [ |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3808 | '-mthumb', |
| 3809 | ], |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3810 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3811 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3812 | # Most of the following flags are derived from what Android |
| 3813 | # uses by default when building for arm, reference for which |
| 3814 | # can be found in the following file in the Android NDK: |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3815 | # toolchains/arm-linux-androideabi-4.9/setup.mk |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3816 | 'cflags': [ |
| 3817 | # The tree-sra optimization (scalar replacement for |
| 3818 | # aggregates enabling subsequent optimizations) leads to |
| 3819 | # invalid code generation when using the Android NDK's |
| 3820 | # compiler (r5-r7). This can be verified using |
[email protected] | b78f8f6 | 2013-04-24 01:35:43 | [diff] [blame] | 3821 | # webkit_unit_tests' WTF.Checked_int8_t test. |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3822 | '-fno-tree-sra', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3823 | # The following option is disabled to improve binary |
| 3824 | # size and performance in gcc 4.9. |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3825 | '-fno-caller-saves', |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3826 | '-Wno-psabi', |
| 3827 | ], |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3828 | # Android now supports .relro sections properly. |
| 3829 | # NOTE: While these flags enable the generation of .relro |
| 3830 | # sections, the generated libraries can still be loaded on |
| 3831 | # older Android platform versions. |
| 3832 | 'ldflags': [ |
| 3833 | '-Wl,-z,relro', |
| 3834 | '-Wl,-z,now', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3835 | '-fuse-ld=gold', |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3836 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3837 | 'conditions': [ |
fdegans | c16332e8 | 2014-09-09 13:55:29 | [diff] [blame] | 3838 | ['gcc_version==48 and clang==0', { |
| 3839 | 'cflags': [ |
| 3840 | # The following 5 options are disabled to save on |
| 3841 | # binary size in GCC 4.8. |
| 3842 | '-fno-partial-inlining', |
| 3843 | '-fno-early-inlining', |
| 3844 | '-fno-tree-copy-prop', |
| 3845 | '-fno-tree-loop-optimize', |
| 3846 | '-fno-move-loop-invariants', |
| 3847 | ], |
| 3848 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3849 | ['arm_thumb==1', { |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 3850 | 'cflags': [ '-mthumb-interwork' ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3851 | }], |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3852 | ['profiling==1', { |
| 3853 | 'cflags': [ |
[email protected] | a0e681cc | 2014-05-16 16:56:47 | [diff] [blame] | 3854 | # Thumb code with frame pointer makes chrome crash |
| 3855 | # early. |
| 3856 | '-marm', |
| 3857 | '-mapcs-frame', # Required by -fno-omit-frame-pointer. |
| 3858 | # The perf report sometimes incorrectly attributes |
| 3859 | # code from tail calls. |
| 3860 | '-fno-optimize-sibling-calls', |
| 3861 | ], |
| 3862 | 'cflags!': [ |
| 3863 | '-fomit-frame-pointer', |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3864 | ], |
| 3865 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3866 | ['clang==1', { |
| 3867 | 'cflags!': [ |
| 3868 | # Clang does not support the following options. |
| 3869 | '-mthumb-interwork', |
| 3870 | '-finline-limit=64', |
| 3871 | '-fno-tree-sra', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3872 | '-fno-caller-saves', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3873 | '-Wno-psabi', |
| 3874 | ], |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3875 | 'cflags': [ |
| 3876 | # TODO(hans) Enable integrated-as (crbug.com/124610). |
| 3877 | '-no-integrated-as', |
[email protected] | f4091d3 | 2014-01-23 23:16:35 | [diff] [blame] | 3878 | '-B<(android_toolchain)', # Else /usr/bin/as gets picked up. |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3879 | ], |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3880 | 'ldflags': [ |
[email protected] | 2a9c856 | 2014-08-11 18:01:21 | [diff] [blame] | 3881 | # Let clang find the ld.gold in the NDK. |
[email protected] | b728310a | 2014-08-08 20:53:34 | [diff] [blame] | 3882 | '--gcc-toolchain=<(android_toolchain)/..', |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3883 | ], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3884 | }], |
[email protected] | cdc001e | 2014-01-23 11:07:53 | [diff] [blame] | 3885 | ['asan==1', { |
| 3886 | 'cflags': [ |
| 3887 | '-marm', # Required for frame pointer based stack traces. |
| 3888 | ], |
| 3889 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3890 | ], |
| 3891 | }], |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 3892 | ['chromecast==1', { |
| 3893 | 'cflags': [ |
| 3894 | # We set arm_arch to "" so that -march compiler option |
| 3895 | # is not set. Otherwise a gcc bug that would complain |
| 3896 | # about it conflicting with '-mcpu=cortex-a9'. The flag |
| 3897 | # '-march=armv7-a' is actually redundant anyway because |
| 3898 | # it is enabled by default when we built the toolchain. |
| 3899 | # And using '-mcpu=cortex-a9' should be sufficient. |
| 3900 | '-mcpu=cortex-a9', |
| 3901 | '-funwind-tables', |
| 3902 | # Breakpad requires symbols with debugging information |
| 3903 | '-g', |
| 3904 | ], |
| 3905 | 'ldflags': [ |
| 3906 | # We want to statically link libstdc++/libgcc_s. |
| 3907 | '-static-libstdc++', |
| 3908 | '-static-libgcc', |
| 3909 | ], |
| 3910 | 'cflags!': [ |
| 3911 | # Some components in Chromium (e.g. v8, skia, ffmpeg) |
| 3912 | # define their own cflags for arm builds that could |
| 3913 | # conflict with the flags we set here (e.g. |
| 3914 | # '-mcpu=cortex-a9'). Remove these flags explicitly. |
| 3915 | '-march=armv7-a', |
| 3916 | '-mtune=cortex-a8', |
| 3917 | ], |
| 3918 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3919 | ], |
| 3920 | }], |
| 3921 | ], |
| 3922 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 3923 | ['target_arch=="arm64"', { |
| 3924 | 'target_conditions': [ |
| 3925 | ['_toolset=="target"', { |
| 3926 | 'conditions': [ |
| 3927 | ['OS=="android"', { |
| 3928 | 'cflags!': [ |
| 3929 | '-fstack-protector', # stack protector is always enabled on arm64. |
| 3930 | ], |
| 3931 | }], |
| 3932 | ], |
| 3933 | }], |
| 3934 | ], |
| 3935 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3936 | ['target_arch=="mipsel"', { |
| 3937 | 'target_conditions': [ |
| 3938 | ['_toolset=="target"', { |
| 3939 | 'conditions': [ |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 3940 | ['android_webview_build==0 and mips_arch_variant=="r6"', { |
| 3941 | 'cflags': ['-mips32r6', '-Wa,-mips32r6'], |
| 3942 | 'conditions': [ |
| 3943 | ['OS=="android"', { |
| 3944 | 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',], |
| 3945 | }], |
| 3946 | ], |
| 3947 | }], |
| 3948 | ['android_webview_build==0 and mips_arch_variant=="r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3949 | 'cflags': ['-mips32r2', '-Wa,-mips32r2'], |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3950 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 3951 | ['android_webview_build==0 and mips_arch_variant=="r1"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3952 | 'cflags': ['-mips32', '-Wa,-mips32'], |
| 3953 | }], |
| 3954 | ], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3955 | 'ldflags': [ |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3956 | '-Wl,--no-keep-memory' |
| 3957 | ], |
| 3958 | 'cflags_cc': [ |
| 3959 | '-Wno-uninitialized', |
| 3960 | ], |
| 3961 | }], |
| 3962 | ], |
| 3963 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 3964 | ['target_arch=="mips64el"', { |
| 3965 | 'target_conditions': [ |
| 3966 | ['_toolset=="target"', { |
| 3967 | 'conditions': [ |
| 3968 | ['android_webview_build==0 and mips_arch_variant=="r6"', { |
| 3969 | 'cflags': ['-mips64r6', '-Wa,-mips64r6'], |
| 3970 | 'ldflags': [ '-mips64r6' ], |
| 3971 | }], |
| 3972 | ['android_webview_build==0 and mips_arch_variant=="r2"', { |
| 3973 | 'cflags': ['-mips64r2', '-Wa,-mips64r2'], |
| 3974 | 'ldflags': [ '-mips64r2' ], |
| 3975 | }], |
| 3976 | ], |
| 3977 | 'cflags_cc': [ |
| 3978 | '-Wno-uninitialized', |
| 3979 | ], |
| 3980 | }], |
| 3981 | ], |
| 3982 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 3983 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3984 | 'cflags': [ |
| 3985 | '-fPIC', |
| 3986 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 3987 | 'ldflags': [ |
| 3988 | '-fPIC', |
| 3989 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3990 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3991 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3992 | 'target_conditions': [ |
| 3993 | ['_toolset=="target"', { |
| 3994 | 'cflags': [ |
| 3995 | '--sysroot=<(sysroot)', |
| 3996 | ], |
| 3997 | 'ldflags': [ |
| 3998 | '--sysroot=<(sysroot)', |
[email protected] | a7e10b9a | 2013-03-22 05:26:15 | [diff] [blame] | 3999 | '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 4000 | ], |
| 4001 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 4002 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 4003 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 4004 | 'cflags': [ |
[email protected] | 00c83cc | 2013-07-25 00:55:50 | [diff] [blame] | 4005 | # TODO(thakis): Remove, http://crbug.com/263960 |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 4006 | '-Wno-reserved-user-defined-literal', |
| 4007 | ], |
| 4008 | 'cflags_cc': [ |
| 4009 | # See the comment in the Mac section for what it takes to move |
| 4010 | # this to -std=c++11. |
| 4011 | '-std=gnu++11', |
| 4012 | ], |
| 4013 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 4014 | ['clang==0 and host_clang==1', { |
| 4015 | 'target_conditions': [ |
| 4016 | ['_toolset=="host"', { |
| 4017 | 'cflags_cc': [ '-std=gnu++11', ], |
| 4018 | }], |
| 4019 | ], |
| 4020 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4021 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4022 | 'cflags': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4023 | '<@(clang_chrome_plugins_flags)', |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4024 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4025 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4026 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4027 | 'cflags': [ |
| 4028 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4029 | ], |
| 4030 | }], |
| 4031 | ['clang==1 and clang_add_plugin!=""', { |
| 4032 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4033 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4034 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4035 | }], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 4036 | ['clang==1 and target_arch=="ia32"', { |
| 4037 | 'cflags': [ |
| 4038 | # Else building libyuv gives clang's register allocator issues, |
| 4039 | # see llvm.org/PR15798 / crbug.com/233709 |
| 4040 | '-momit-leaf-frame-pointer', |
| 4041 | ], |
| 4042 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4043 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4044 | 'cflags': [ |
| 4045 | # See http://crbug.com/110262 |
| 4046 | '-fcolor-diagnostics', |
| 4047 | ], |
| 4048 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4049 | # Common options for AddressSanitizer, LeakSanitizer, |
| 4050 | # ThreadSanitizer and MemorySanitizer. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4051 | ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1 or ubsan_vptr==1', { |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 4052 | 'target_conditions': [ |
| 4053 | ['_toolset=="target"', { |
| 4054 | 'cflags': [ |
| 4055 | '-fno-omit-frame-pointer', |
| 4056 | '-gline-tables-only', |
| 4057 | ], |
[email protected] | b772fce | 2014-01-22 09:27:52 | [diff] [blame] | 4058 | 'cflags!': [ |
| 4059 | '-fomit-frame-pointer', |
| 4060 | ], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4061 | }], |
| 4062 | ], |
| 4063 | }], |
| 4064 | ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
| 4065 | 'target_conditions': [ |
| 4066 | ['_toolset=="target"', { |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 4067 | 'ldflags!': [ |
| 4068 | # Functions interposed by the sanitizers can make ld think |
| 4069 | # that some libraries aren't needed when they actually are, |
| 4070 | # http://crbug.com/234010. As workaround, disable --as-needed. |
| 4071 | '-Wl,--as-needed', |
| 4072 | ], |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 4073 | 'defines': [ |
| 4074 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 7a16a1e | 2014-07-04 04:18:03 | [diff] [blame] | 4075 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 4076 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 4077 | }], |
| 4078 | ], |
[email protected] | 05b59c9 | 2014-04-15 18:39:20 | [diff] [blame] | 4079 | # TODO(glider): enable the default options on other systems. |
| 4080 | 'conditions': [ |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 4081 | ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', { |
[email protected] | 05b59c9 | 2014-04-15 18:39:20 | [diff] [blame] | 4082 | 'dependencies': [ |
[email protected] | 4c072d3 | 2014-08-21 20:34:46 | [diff] [blame] | 4083 | '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options', |
[email protected] | 05b59c9 | 2014-04-15 18:39:20 | [diff] [blame] | 4084 | ], |
| 4085 | }], |
| 4086 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 4087 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 4088 | ['asan==1', { |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 4089 | 'target_conditions': [ |
| 4090 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4091 | 'cflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4092 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4093 | ], |
| 4094 | 'ldflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4095 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4096 | ], |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 4097 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4098 | ], |
[email protected] | eec02d98 | 2014-03-21 18:51:17 | [diff] [blame] | 4099 | 'conditions': [ |
| 4100 | ['OS=="mac"', { |
| 4101 | 'cflags': [ |
| 4102 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 4103 | ], |
| 4104 | }], |
| 4105 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 4106 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4107 | ['ubsan==1', { |
| 4108 | 'target_conditions': [ |
| 4109 | ['_toolset=="target"', { |
| 4110 | 'cflags': [ |
| 4111 | '-fsanitize=undefined', |
| 4112 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4113 | '-fno-sanitize=vptr', |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4114 | ], |
| 4115 | 'ldflags': [ |
| 4116 | '-fsanitize=undefined', |
| 4117 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4118 | '-fno-sanitize=vptr', |
| 4119 | ], |
| 4120 | }], |
| 4121 | ], |
| 4122 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4123 | ['ubsan_vptr==1', { |
| 4124 | 'target_conditions': [ |
| 4125 | ['_toolset=="target"', { |
| 4126 | 'cflags': [ |
| 4127 | '-fsanitize=vptr', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4128 | '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4129 | ], |
| 4130 | 'cflags_cc!': [ |
| 4131 | '-fno-rtti', |
| 4132 | ], |
| 4133 | 'cflags!': [ |
| 4134 | '-fno-rtti', |
| 4135 | ], |
| 4136 | 'ldflags': [ |
[email protected] | 22e1554 | 2014-07-18 23:09:24 | [diff] [blame] | 4137 | '-fsanitize=vptr', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4138 | ], |
| 4139 | 'defines': [ |
| 4140 | 'UNDEFINED_SANITIZER', |
| 4141 | ], |
| 4142 | }], |
| 4143 | ], |
| 4144 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4145 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4146 | 'target_conditions': [ |
| 4147 | ['_toolset=="target"', { |
| 4148 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4149 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4150 | ], |
| 4151 | }], |
| 4152 | ], |
| 4153 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4154 | ['lsan==1', { |
| 4155 | 'target_conditions': [ |
| 4156 | ['_toolset=="target"', { |
| 4157 | 'cflags': [ |
| 4158 | '-fsanitize=leak', |
| 4159 | ], |
| 4160 | 'ldflags': [ |
| 4161 | '-fsanitize=leak', |
| 4162 | ], |
| 4163 | 'defines': [ |
| 4164 | 'LEAK_SANITIZER', |
[email protected] | f6f65a0 | 2013-09-06 05:40:52 | [diff] [blame] | 4165 | 'WTF_USE_LEAK_SANITIZER=1', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4166 | ], |
| 4167 | }], |
| 4168 | ], |
| 4169 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4170 | ['tsan==1', { |
| 4171 | 'target_conditions': [ |
| 4172 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4173 | 'cflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 4174 | '-fsanitize=thread', |
[email protected] | 9d46a57 | 2013-01-23 10:38:29 | [diff] [blame] | 4175 | '-fPIC', |
[email protected] | 3227d8f | 2014-04-26 00:49:32 | [diff] [blame] | 4176 | '-fsanitize-blacklist=<(tsan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4177 | ], |
| 4178 | 'ldflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 4179 | '-fsanitize=thread', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4180 | ], |
| 4181 | 'defines': [ |
| 4182 | 'THREAD_SANITIZER', |
| 4183 | 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 4184 | 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4185 | ], |
| 4186 | 'target_conditions': [ |
| 4187 | ['_type=="executable"', { |
| 4188 | 'ldflags': [ |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4189 | '-pie', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4190 | ], |
| 4191 | }], |
| 4192 | ], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4193 | }], |
| 4194 | ], |
| 4195 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4196 | ['msan==1', { |
| 4197 | 'target_conditions': [ |
| 4198 | ['_toolset=="target"', { |
| 4199 | 'cflags': [ |
| 4200 | '-fsanitize=memory', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 4201 | '-fsanitize-memory-track-origins=<(msan_track_origins)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4202 | '-fPIC', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 4203 | '-fsanitize-blacklist=<(msan_blacklist)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4204 | ], |
| 4205 | 'ldflags': [ |
| 4206 | '-fsanitize=memory', |
| 4207 | ], |
| 4208 | 'defines': [ |
| 4209 | 'MEMORY_SANITIZER', |
| 4210 | ], |
| 4211 | 'target_conditions': [ |
| 4212 | ['_type=="executable"', { |
| 4213 | 'ldflags': [ |
| 4214 | '-pie', |
| 4215 | ], |
| 4216 | }], |
| 4217 | ], |
| 4218 | }], |
| 4219 | ], |
| 4220 | }], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4221 | ['use_instrumented_libraries==1', { |
| 4222 | 'dependencies': [ |
| 4223 | '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', |
| 4224 | ], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4225 | }], |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4226 | ['use_custom_libcxx==1', { |
| 4227 | 'dependencies': [ |
[email protected] | 121cbf6e | 2014-05-05 13:30:42 | [diff] [blame] | 4228 | '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4229 | ], |
| 4230 | }], |
[email protected] | 8a48f3f | 2012-12-04 20:14:04 | [diff] [blame] | 4231 | ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4232 | 'target_conditions' : [ |
[email protected] | c45dbc5 | 2014-05-27 14:02:48 | [diff] [blame] | 4233 | # crazy_linker has an upstream gyp file we can't edit, and we |
| 4234 | # don't want to instrument it. |
| 4235 | ['_toolset=="target" and _target_name!="crazy_linker"', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4236 | 'cflags': [ |
| 4237 | '-finstrument-functions', |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4238 | # Allow mmx intrinsics to inline, so that the |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4239 | #0 compiler can expand the intrinsics. |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4240 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4241 | ], |
| 4242 | }], |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4243 | ['_toolset=="target" and OS=="android"', { |
| 4244 | 'cflags': [ |
| 4245 | # Avoids errors with current NDK: |
| 4246 | # "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" |
[email protected] | 037688fc | 2014-07-04 20:07:36 | [diff] [blame] | 4247 | '-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h', |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4248 | ], |
| 4249 | }], |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4250 | ], |
| 4251 | }], |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 4252 | ['linux_dump_symbols==1', { |
| 4253 | 'cflags': [ '-g' ], |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 4254 | 'conditions': [ |
| 4255 | ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', { |
| 4256 | 'target_conditions': [ |
| 4257 | ['_toolset=="target"', { |
| 4258 | 'ldflags': [ |
| 4259 | # Attempt to use less memory to prevent the linker from |
| 4260 | # running out of address space. Considering installing a |
| 4261 | # 64-bit kernel and switching to a 64-bit linker. |
| 4262 | '-Wl,--no-keep-memory', |
| 4263 | ], |
| 4264 | }], |
| 4265 | ], |
| 4266 | }], |
| 4267 | ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 4268 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 4269 | ['use_allocator!="tcmalloc"', { |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 4270 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 4271 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4272 | ['linux_use_gold_flags==1', { |
[email protected] | b728310a | 2014-08-08 20:53:34 | [diff] [blame] | 4273 | # Newer gccs and clangs support -fuse-ld, use the flag to force gold |
| 4274 | # selection. |
| 4275 | # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html |
| 4276 | 'ldflags': [ '-fuse-ld=gold', ], |
| 4277 | |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4278 | 'target_conditions': [ |
| 4279 | ['_toolset=="target"', { |
| 4280 | 'ldflags': [ |
| 4281 | # Experimentation found that using four linking threads |
| 4282 | # saved ~20% of link time. |
| 4283 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 4284 | # Only apply this to the target linker, since the host |
| 4285 | # linker might not be gold, but isn't used much anyway. |
[email protected] | 21ed97e | 2014-01-14 23:40:55 | [diff] [blame] | 4286 | # TODO(raymes): Disable threading because gold is frequently |
| 4287 | # crashing on the bots: crbug.com/161942. |
| 4288 | # '-Wl,--threads', |
| 4289 | # '-Wl,--thread-count=4', |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4290 | ], |
| 4291 | }], |
[email protected] | 68d01e8 | 2012-12-08 03:36:32 | [diff] [blame] | 4292 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4293 | 'conditions': [ |
| 4294 | ['release_valgrind_build==0', { |
| 4295 | 'target_conditions': [ |
| 4296 | ['_toolset=="target"', { |
| 4297 | 'ldflags': [ |
[email protected] | ffc4616 | 2014-01-16 12:19:49 | [diff] [blame] | 4298 | # There seems to be a conflict of --icf and -pie |
| 4299 | # in gold which can generate crashy binaries. As |
[email protected] | 3b09cec5 | 2014-05-15 00:33:41 | [diff] [blame] | 4300 | # a security measure, -pie takes precedence for |
[email protected] | ffc4616 | 2014-01-16 12:19:49 | [diff] [blame] | 4301 | # now. |
| 4302 | #'-Wl,--icf=safe', |
| 4303 | '-Wl,--icf=none', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4304 | ], |
| 4305 | }], |
| 4306 | ], |
| 4307 | }], |
| 4308 | ], |
| 4309 | }], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4310 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4311 | 'cflags': [ |
| 4312 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
| 4313 | ], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4314 | }], |
| 4315 | ['linux_use_bundled_gold==1', { |
| 4316 | # Put our binutils, which contains gold in the search path. We pass |
| 4317 | # the path to gold to the compiler. gyp leaves unspecified what the |
| 4318 | # cwd is when running the compiler, so the normal gyp path-munging |
| 4319 | # fails us. This hack gets the right path. |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4320 | 'ldflags': [ |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4321 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4322 | ], |
| 4323 | }], |
[email protected] | ebb701b7 | 2014-04-24 08:24:51 | [diff] [blame] | 4324 | # Some binutils 2.23 releases may or may not have new dtags enabled, |
| 4325 | # but they are all compatible with --disable-new-dtags, |
| 4326 | # because the new dynamic tags are not created by default. |
| 4327 | ['binutils_version>=223', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4328 | # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
| 4329 | # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
| 4330 | # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags |
| 4331 | # inside this file to allow usage of --no-as-needed and removal of |
| 4332 | # this flag. |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4333 | 'ldflags': [ |
| 4334 | '-Wl,--disable-new-dtags', |
| 4335 | ], |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4336 | }], |
[email protected] | 3d40fa2 | 2014-07-31 12:55:01 | [diff] [blame] | 4337 | ['gcc_version>=47 and clang==0', { |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4338 | 'target_conditions': [ |
| 4339 | ['_toolset=="target"', { |
| 4340 | 'cflags_cc': [ |
| 4341 | '-std=gnu++11', |
| 4342 | # See comment for -Wno-c++11-narrowing. |
| 4343 | '-Wno-narrowing', |
| 4344 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4345 | '-Wno-literal-suffix', |
| 4346 | ], |
| 4347 | }], |
| 4348 | ], |
| 4349 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 4350 | ['host_gcc_version>=47 and clang==0 and host_clang==0', { |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4351 | 'target_conditions': [ |
| 4352 | ['_toolset=="host"', { |
| 4353 | 'cflags_cc': [ |
| 4354 | '-std=gnu++11', |
| 4355 | # See comment for -Wno-c++11-narrowing. |
| 4356 | '-Wno-narrowing', |
| 4357 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4358 | '-Wno-literal-suffix', |
| 4359 | ], |
| 4360 | }], |
| 4361 | ], |
| 4362 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 4363 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 4364 | }, |
| 4365 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 4366 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 4367 | # with Linux. |
| 4368 | ['OS=="freebsd"', { |
| 4369 | 'target_defaults': { |
| 4370 | 'ldflags': [ |
| 4371 | '-Wl,--no-keep-memory', |
| 4372 | ], |
| 4373 | }, |
| 4374 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4375 | # Android-specific options; note that most are set above with Linux. |
| 4376 | ['OS=="android"', { |
| 4377 | 'variables': { |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4378 | # This is a unique identifier for a given build. It's used for |
| 4379 | # identifying various build artifacts corresponding to a particular |
| 4380 | # build of chrome (e.g. where to find archived symbols). |
| 4381 | 'chrome_build_id%': '', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4382 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4383 | # Use shared stlport library when system one used. |
| 4384 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 4385 | # has to be before that in the set of libraries. |
| 4386 | ['use_system_stlport==1', { |
| 4387 | 'android_stlport_library': 'stlport', |
| 4388 | }, { |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 4389 | 'conditions': [ |
| 4390 | ['component=="shared_library"', { |
| 4391 | 'android_stlport_library': 'stlport_shared', |
| 4392 | }, { |
| 4393 | 'android_stlport_library': 'stlport_static', |
| 4394 | }], |
| 4395 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4396 | }], |
| 4397 | ], |
| 4398 | |
| 4399 | # Placing this variable here prevents from forking libvpx, used |
| 4400 | # by remoting. Remoting is off, so it needn't built, |
| 4401 | # so forking it's deps seems like overkill. |
| 4402 | # But this variable need defined to properly run gyp. |
| 4403 | # A proper solution is to have an OS==android conditional |
| 4404 | # in third_party/libvpx/libvpx.gyp to define it. |
| 4405 | 'libvpx_path': 'lib/linux/arm', |
| 4406 | }, |
| 4407 | 'target_defaults': { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4408 | 'variables': { |
| 4409 | 'release_extra_cflags%': '', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4410 | 'conditions': [ |
| 4411 | # If we're using the components build, append "cr" to all shared |
| 4412 | # libraries to avoid naming collisions with android system library |
| 4413 | # versions with the same name (e.g. skia, icu). |
| 4414 | ['component=="shared_library"', { |
| 4415 | 'android_product_extension': 'cr.so', |
| 4416 | }, { |
| 4417 | 'android_product_extension': 'so', |
| 4418 | } ], |
| 4419 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 4420 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4421 | 'target_conditions': [ |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4422 | ['_type=="shared_library"', { |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 4423 | 'product_extension': '<(android_product_extension)', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4424 | }], |
| 4425 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4426 | # Settings for building device targets using Android's toolchain. |
| 4427 | # These are based on the setup.mk file from the Android NDK. |
| 4428 | # |
| 4429 | # The NDK Android executable link step looks as follows: |
| 4430 | # $LDFLAGS |
| 4431 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 4432 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4433 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4434 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4435 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4436 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4437 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 4438 | # |
| 4439 | # For now the above are approximated for executables by adding |
| 4440 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 4441 | # of 'libraries'. |
| 4442 | # |
| 4443 | # The NDK Android shared library link step looks as follows: |
| 4444 | # $LDFLAGS |
| 4445 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4446 | # -l,--whole-archive |
| 4447 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 4448 | # -l,--no-whole-archive |
| 4449 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4450 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4451 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4452 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4453 | # |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 4454 | # For now, assume that whole static libraries are not needed. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4455 | # |
| 4456 | # For both executables and shared libraries, add the proper |
| 4457 | # libgcc.a to the start of libraries which puts it in the |
| 4458 | # proper spot after .o and .a files get linked in. |
| 4459 | # |
| 4460 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 4461 | # support for a custom link command line. |
| 4462 | ['_toolset=="target"', { |
| 4463 | 'cflags!': [ |
| 4464 | '-pthread', # Not supported by Android toolchain. |
| 4465 | ], |
| 4466 | 'cflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4467 | '-ffunction-sections', |
| 4468 | '-funwind-tables', |
| 4469 | '-g', |
| 4470 | '-fstack-protector', |
| 4471 | '-fno-short-enums', |
| 4472 | '-finline-limit=64', |
| 4473 | '-Wa,--noexecstack', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4474 | '<@(release_extra_cflags)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4475 | ], |
| 4476 | 'defines': [ |
| 4477 | 'ANDROID', |
| 4478 | '__GNU_SOURCE=1', # Necessary for clone() |
| 4479 | 'USE_STLPORT=1', |
| 4480 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4481 | 'CHROME_BUILD_ID="<(chrome_build_id)"', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4482 | ], |
| 4483 | 'ldflags!': [ |
| 4484 | '-pthread', # Not supported by Android toolchain. |
| 4485 | ], |
| 4486 | 'ldflags': [ |
| 4487 | '-nostdlib', |
| 4488 | '-Wl,--no-undefined', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4489 | ], |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4490 | 'libraries': [ |
| 4491 | '-l<(android_stlport_library)', |
| 4492 | # Manually link the libgcc.a that the cross compiler uses. |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 4493 | '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4494 | '-lc', |
| 4495 | '-ldl', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4496 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4497 | ], |
| 4498 | 'conditions': [ |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 4499 | ['component=="static_library"', { |
| 4500 | 'ldflags': [ |
[email protected] | b419365 | 2014-06-09 11:33:38 | [diff] [blame] | 4501 | '-Wl,--exclude-libs=ALL', |
| 4502 | ], |
| 4503 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4504 | ['clang==1', { |
| 4505 | 'cflags': [ |
| 4506 | # Work around incompatibilities between bionic and clang |
| 4507 | # headers. |
| 4508 | '-D__compiler_offsetof=__builtin_offsetof', |
| 4509 | '-Dnan=__builtin_nan', |
| 4510 | ], |
| 4511 | 'conditions': [ |
| 4512 | ['target_arch=="arm"', { |
| 4513 | 'cflags': [ |
| 4514 | '-target arm-linux-androideabi', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4515 | ], |
| 4516 | 'ldflags': [ |
| 4517 | '-target arm-linux-androideabi', |
| 4518 | ], |
| 4519 | }], |
| 4520 | ['target_arch=="ia32"', { |
| 4521 | 'cflags': [ |
| 4522 | '-target x86-linux-androideabi', |
| 4523 | ], |
| 4524 | 'ldflags': [ |
| 4525 | '-target x86-linux-androideabi', |
| 4526 | ], |
| 4527 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 4528 | # Place holder for x64 support, not tested. |
| 4529 | # TODO: Enable clang support for Android x64. http://crbug.com/346626 |
| 4530 | ['target_arch=="x64"', { |
| 4531 | 'cflags': [ |
| 4532 | '-target x86_64-linux-androideabi', |
| 4533 | ], |
| 4534 | 'ldflags': [ |
| 4535 | '-target x86_64-linux-androideabi', |
| 4536 | ], |
| 4537 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4538 | ], |
| 4539 | }], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 4540 | ['asan==1', { |
| 4541 | 'cflags': [ |
| 4542 | # Android build relies on -Wl,--gc-sections removing |
| 4543 | # unreachable code. ASan instrumentation for globals inhibits |
| 4544 | # this and results in a library with unresolvable relocations. |
| 4545 | # TODO(eugenis): find a way to reenable this. |
| 4546 | '-mllvm -asan-globals=0', |
| 4547 | ], |
| 4548 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4549 | ['android_webview_build==0', { |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4550 | 'defines': [ |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4551 | # The NDK has these things, but doesn't define the constants |
| 4552 | # to say that it does. Define them here instead. |
| 4553 | 'HAVE_SYS_UIO_H', |
| 4554 | ], |
| 4555 | 'cflags': [ |
| 4556 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4557 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4558 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 4559 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4560 | ], |
| 4561 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4562 | ['android_webview_build==1', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4563 | 'include_dirs': [ |
| 4564 | # OpenAL headers from the Android tree. |
| 4565 | '<(android_src)/frameworks/wilhelm/include', |
| 4566 | ], |
| 4567 | 'cflags': [ |
[email protected] | 0488213 | 2012-11-21 12:40:45 | [diff] [blame] | 4568 | # Android predefines this as 1; undefine it here so Chromium |
| 4569 | # can redefine it later to be 2 for chromium code and unset |
| 4570 | # for third party code. This works because cflags are added |
| 4571 | # before defines. |
| 4572 | '-U_FORTIFY_SOURCE', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4573 | # Disable any additional warnings enabled by the Android build system but which |
| 4574 | # chromium does not build cleanly with (when treating warning as errors). |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4575 | # Things that are part of -Wextra: |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4576 | '-Wno-extra', # Enabled by -Wextra, but no specific flag |
| 4577 | '-Wno-ignored-qualifiers', |
| 4578 | '-Wno-type-limits', |
[email protected] | 6c55f124 | 2014-02-12 16:06:56 | [diff] [blame] | 4579 | '-Wno-unused-but-set-variable', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4580 | ], |
| 4581 | 'cflags_cc': [ |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 4582 | # Other things unrelated to -Wextra: |
| 4583 | '-Wno-non-virtual-dtor', |
| 4584 | '-Wno-sign-promo', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4585 | ], |
| 4586 | }], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 4587 | ['android_webview_build==1', { |
| 4588 | 'target_conditions': [ |
| 4589 | ['chromium_code==0', { |
| 4590 | 'cflags': [ |
| 4591 | # There is a class of warning which: |
| 4592 | # 1) Android always enables and also treats as errors |
| 4593 | # 2) Chromium ignores in third party code |
| 4594 | # So we re-enable those warnings when building Android. |
| 4595 | '-Wno-address', |
| 4596 | '-Wno-format-security', |
| 4597 | '-Wno-return-type', |
| 4598 | '-Wno-sequence-point', |
| 4599 | ], |
| 4600 | 'cflags_cc': [ |
| 4601 | '-Wno-non-virtual-dtor', |
| 4602 | ], |
| 4603 | }], |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4604 | ], |
| 4605 | }], |
[email protected] | febd357 | 2012-05-03 09:17:45 | [diff] [blame] | 4606 | ['target_arch == "arm"', { |
| 4607 | 'ldflags': [ |
| 4608 | # Enable identical code folding to reduce size. |
| 4609 | '-Wl,--icf=safe', |
| 4610 | ], |
| 4611 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4612 | # NOTE: The stlport header include paths below are specified in |
| 4613 | # cflags rather than include_dirs because they need to come |
| 4614 | # after include_dirs. Think of them like system headers, but |
| 4615 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 4616 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 4617 | # The include ordering here is important; change with caution. |
[email protected] | f91ba81 | 2012-07-11 00:00:51 | [diff] [blame] | 4618 | ['use_system_stlport==1', { |
| 4619 | 'cflags': [ |
| 4620 | # For libstdc++/include, which is used by stlport. |
| 4621 | '-I<(android_src)/bionic', |
| 4622 | '-I<(android_src)/external/stlport/stlport', |
| 4623 | ], |
| 4624 | }, { # else: use_system_stlport!=1 |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4625 | 'cflags': [ |
[email protected] | 843ca8c | 2014-07-09 15:50:32 | [diff] [blame] | 4626 | '-isystem<(android_stlport_include)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4627 | ], |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 4628 | 'ldflags': [ |
| 4629 | '-L<(android_stlport_libs_dir)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4630 | ], |
| 4631 | }], |
| 4632 | ['target_arch=="ia32"', { |
| 4633 | # The x86 toolchain currently has problems with stack-protector. |
| 4634 | 'cflags!': [ |
| 4635 | '-fstack-protector', |
| 4636 | ], |
| 4637 | 'cflags': [ |
| 4638 | '-fno-stack-protector', |
| 4639 | ], |
| 4640 | }], |
| 4641 | ], |
| 4642 | 'target_conditions': [ |
| 4643 | ['_type=="executable"', { |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4644 | # Force android tools to export the "main" symbol so they can be |
| 4645 | # loaded on ICS using the run_pie wrapper. See crbug.com/373219. |
| 4646 | # TODO(primiano): remove -fvisibility and -rdynamic flags below |
| 4647 | # when ICS support will be dropped. |
| 4648 | 'cflags': [ |
| 4649 | '-fPIE', |
| 4650 | '-fvisibility=default', |
| 4651 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4652 | 'ldflags': [ |
| 4653 | '-Bdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4654 | '-Wl,--gc-sections', |
| 4655 | '-Wl,-z,nocopyreloc', |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4656 | '-pie', |
| 4657 | '-rdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4658 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 4659 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 4660 | ], |
| 4661 | 'libraries': [ |
| 4662 | # crtend_android.o needs to be the last item in libraries. |
| 4663 | # Do not add any libraries after this! |
| 4664 | '<(android_ndk_lib)/crtend_android.o', |
| 4665 | ], |
| 4666 | }], |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4667 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | 7ab8b9be | 2014-06-12 17:20:42 | [diff] [blame] | 4668 | 'ldflags!': [ |
| 4669 | '-Wl,--exclude-libs=ALL', |
| 4670 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4671 | 'ldflags': [ |
| 4672 | '-Wl,-shared,-Bsymbolic', |
| 4673 | ], |
[email protected] | d093fe8b | 2013-04-30 18:00:23 | [diff] [blame] | 4674 | 'conditions': [ |
| 4675 | ['android_webview_build==0', { |
| 4676 | 'ldflags': [ |
| 4677 | # crtbegin_so.o should be the last item in ldflags. |
| 4678 | '<(android_ndk_lib)/crtbegin_so.o', |
| 4679 | ], |
| 4680 | 'libraries': [ |
| 4681 | # crtend_so.o needs to be the last item in libraries. |
| 4682 | # Do not add any libraries after this! |
| 4683 | '<(android_ndk_lib)/crtend_so.o', |
| 4684 | ], |
| 4685 | }], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 4686 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4687 | }], |
| 4688 | ], |
| 4689 | }], |
| 4690 | # Settings for building host targets using the system toolchain. |
| 4691 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4692 | 'cflags!': [ |
| 4693 | # Due to issues in Clang build system, using ASan on 32-bit |
| 4694 | # binaries on x86_64 host is problematic. |
| 4695 | # TODO(eugenis): re-enable. |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4696 | '-fsanitize=address', |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4697 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4698 | 'ldflags!': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4699 | '-fsanitize=address', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4700 | '-Wl,-z,noexecstack', |
| 4701 | '-Wl,--gc-sections', |
| 4702 | '-Wl,-O1', |
| 4703 | '-Wl,--as-needed', |
[email protected] | df24071 | 2013-09-02 23:17:22 | [diff] [blame] | 4704 | '-Wl,--warn-shared-textrel', |
| 4705 | '-Wl,--fatal-warnings', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4706 | ], |
| 4707 | }], |
[email protected] | 0ccf578f | 2013-03-13 11:13:39 | [diff] [blame] | 4708 | # Settings for building host targets on mac. |
| 4709 | ['_toolset=="host" and host_os=="mac"', { |
| 4710 | 'ldflags!': [ |
| 4711 | '-Wl,-z,now', |
| 4712 | '-Wl,-z,relro', |
| 4713 | ], |
| 4714 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4715 | ], |
| 4716 | }, |
| 4717 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 4718 | ['OS=="solaris"', { |
| 4719 | 'cflags!': ['-fvisibility=hidden'], |
| 4720 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 4721 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4722 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4723 | 'target_defaults': { |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 4724 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4725 | 'xcode_settings': { |
| 4726 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | 2429bb73 | 2012-10-19 00:24:24 | [diff] [blame] | 4727 | # Don't link in libarclite_macosx.a, see http://crbug.com/156530. |
| 4728 | 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime |
[email protected] | 47c3e85 | 2013-09-13 02:22:31 | [diff] [blame] | 4729 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4730 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 4731 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4732 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 4733 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 4734 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 4735 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 4736 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4737 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 4738 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 4739 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 4740 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4741 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4742 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4743 | 'USE_HEADERMAP': 'NO', |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 4744 | 'WARNING_CFLAGS': [ |
| 4745 | '-Wall', |
| 4746 | '-Wendif-labels', |
| 4747 | '-Wextra', |
| 4748 | # Don't warn about unused function parameters. |
| 4749 | '-Wno-unused-parameter', |
| 4750 | # Don't warn about the "struct foo f = {0};" initialization |
| 4751 | # pattern. |
| 4752 | '-Wno-missing-field-initializers', |
| 4753 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4754 | 'conditions': [ |
| 4755 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 4756 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 4757 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4758 | # Note that the prebuilt Clang binaries should not be used for iOS |
| 4759 | # development except for ASan builds. |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4760 | ['clang==1', { |
[email protected] | 9e0756c | 2013-09-01 01:37:02 | [diff] [blame] | 4761 | # gnu++11 instead of c++11 is needed because some code uses |
| 4762 | # typeof() (a GNU extension). |
| 4763 | # TODO(thakis): Eventually switch this to c++11 instead of |
| 4764 | # gnu++11 (once typeof can be removed, which is blocked on c++11 |
| 4765 | # being available everywhere). |
| 4766 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11 |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4767 | # Warn if automatic synthesis is triggered with |
| 4768 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4769 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4770 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4771 | 'WARNING_CFLAGS': [ |
[email protected] | bb14819 | 2014-04-02 03:37:33 | [diff] [blame] | 4772 | # This warns on selectors from Cocoa headers (-length, -set). |
| 4773 | # cfe-dev is currently discussing the merits of this warning. |
| 4774 | # TODO(thakis): Reevaluate what to do with this, based one |
| 4775 | # cfe-dev discussion. |
| 4776 | '-Wno-selector-type-mismatch', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4777 | ], |
[email protected] | d50aa6a | 2014-07-18 07:32:44 | [diff] [blame] | 4778 | 'OTHER_CFLAGS': [ |
| 4779 | # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed |
| 4780 | # and the fix is in chromium. |
| 4781 | '-fno-slp-vectorize', |
| 4782 | ], |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 4783 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4784 | 'conditions': [ |
| 4785 | ['clang_xcode==0', { |
| 4786 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 4787 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4788 | }], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4789 | ], |
| 4790 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4791 | ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4792 | 'OTHER_CFLAGS': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4793 | '<@(clang_chrome_plugins_flags)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4794 | ], |
| 4795 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4796 | ['clang==1 and clang_xcode==0 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4797 | 'OTHER_CFLAGS': [ |
| 4798 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4799 | ], |
| 4800 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4801 | ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4802 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4803 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4804 | ], |
| 4805 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4806 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4807 | 'OTHER_CFLAGS': [ |
| 4808 | # See http://crbug.com/110262 |
| 4809 | '-fcolor-diagnostics', |
| 4810 | ], |
| 4811 | }], |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4812 | ['OS=="ios" and target_subarch!="arm32" and \ |
[email protected] | 7e0fe491 | 2014-04-09 20:53:00 | [diff] [blame] | 4813 | "<(GENERATOR)"=="xcode"', { |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4814 | 'OTHER_CFLAGS': [ |
| 4815 | # TODO(ios): when building Chrome for iOS on 64-bit platform |
| 4816 | # with Xcode, the -Wshorted-64-to-32 warning is automatically |
| 4817 | # enabled. This cause failures when compiling protobuf code, |
| 4818 | # so disable the warning. http://crbug.com/359107 |
| 4819 | '-Wno-shorten-64-to-32', |
| 4820 | ], |
| 4821 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4822 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4823 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4824 | 'conditions': [ |
| 4825 | ['clang==1', { |
| 4826 | 'variables': { |
| 4827 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 4828 | }, |
| 4829 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4830 | ['asan==1', { |
| 4831 | 'xcode_settings': { |
| 4832 | 'OTHER_CFLAGS': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4833 | '-fsanitize=address', |
[email protected] | 22df2b2 | 2014-03-13 10:55:07 | [diff] [blame] | 4834 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
[email protected] | 14a3735 | 2014-05-16 11:39:55 | [diff] [blame] | 4835 | '-gline-tables-only', |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4836 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4837 | }, |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4838 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4839 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4840 | 'target_conditions': [ |
| 4841 | ['_toolset=="target"', { |
| 4842 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4843 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4844 | ], |
| 4845 | }], |
| 4846 | ], |
| 4847 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4848 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4849 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4850 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4851 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4852 | 'conditions': [ |
| 4853 | ['asan==1', { |
| 4854 | 'xcode_settings': { |
| 4855 | 'OTHER_LDFLAGS': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4856 | '-fsanitize=address', |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4857 | ], |
| 4858 | }, |
| 4859 | }], |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 4860 | ['mac_write_linker_maps==1', { |
| 4861 | 'xcode_settings': { |
| 4862 | 'OTHER_LDFLAGS': [ |
| 4863 | '-Wl,-map,>(_target_name).map', |
| 4864 | ], |
| 4865 | }, |
| 4866 | }], |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4867 | ], |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4868 | }], |
| 4869 | ['_mac_bundle', { |
| 4870 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 4871 | 'target_conditions': [ |
| 4872 | ['_type=="executable"', { |
| 4873 | 'conditions': [ |
| 4874 | ['asan==1', { |
| 4875 | 'postbuilds': [ |
| 4876 | { |
| 4877 | 'variables': { |
| 4878 | # Define copy_asan_dylib_path in a variable ending in |
| 4879 | # _path so that gyp understands it's a path and |
| 4880 | # performs proper relativization during dict merging. |
| 4881 | 'copy_asan_dylib_path': |
| 4882 | 'mac/copy_asan_runtime_dylib.sh', |
| 4883 | }, |
| 4884 | 'postbuild_name': 'Copy ASan runtime dylib', |
| 4885 | 'action': [ |
| 4886 | '<(copy_asan_dylib_path)', |
| 4887 | ], |
| 4888 | }, |
| 4889 | ], |
| 4890 | }], |
| 4891 | ], |
| 4892 | }], |
| 4893 | ], |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 4894 | }], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4895 | ], # target_conditions |
| 4896 | }, # target_defaults |
| 4897 | }], # OS=="mac" or OS=="ios" |
| 4898 | ['OS=="mac"', { |
| 4899 | 'target_defaults': { |
[email protected] | eea7d33 | 2014-05-16 11:43:08 | [diff] [blame] | 4900 | 'defines': [ |
| 4901 | # Prevent Mac OS X AssertMacros.h from defining macros that collide |
| 4902 | # with common names, like 'check', 'require', and 'verify'. |
| 4903 | # (Included by system header. Also exists on iOS but not included.) |
| 4904 | # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h |
| 4905 | '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', |
| 4906 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4907 | 'variables': { |
| 4908 | # These should end with %, but there seems to be a bug with % in |
| 4909 | # variables that are intended to be set to different values in |
| 4910 | # different targets, like these. |
| 4911 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4912 | # Strip debugging symbols from the target. |
| 4913 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4914 | 'conditions': [ |
| 4915 | ['asan==1', { |
| 4916 | 'conditions': [ |
| 4917 | ['mac_want_real_dsym=="default"', { |
[email protected] | 97ab1fa | 2012-12-24 10:50:35 | [diff] [blame] | 4918 | 'mac_real_dsym': 1, |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4919 | }, { |
| 4920 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4921 | }], |
| 4922 | ], |
| 4923 | }, { |
| 4924 | 'conditions': [ |
| 4925 | ['mac_want_real_dsym=="default"', { |
| 4926 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 4927 | }, { |
| 4928 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4929 | }], |
| 4930 | ], |
| 4931 | }], |
| 4932 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4933 | }, |
| 4934 | 'xcode_settings': { |
| 4935 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 4936 | # (Equivalent to -fPIC) |
| 4937 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 4938 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 4939 | # Keep pch files below xcodebuild/. |
| 4940 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
[email protected] | 6211f62 | 2013-07-29 23:35:39 | [diff] [blame] | 4941 | 'OTHER_CFLAGS': [ |
| 4942 | # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
| 4943 | # xcode_setting, but not until all downstream projects' mac bots are |
| 4944 | # using xcode >= 4.6, because that's when the default value of the |
| 4945 | # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
| 4946 | # setting is a no-op as far as xcode is concerned, but the compiler |
| 4947 | # behaves differently based on whether -fno-strict-aliasing is |
| 4948 | # specified or not. |
| 4949 | '-fno-strict-aliasing', # See http://crbug.com/32204. |
| 4950 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4951 | }, |
| 4952 | 'target_conditions': [ |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4953 | ['_type=="executable"', { |
| 4954 | 'postbuilds': [ |
| 4955 | { |
| 4956 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4957 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 4958 | # ensures that the position-independent executable (PIE) bit |
| 4959 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4960 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4961 | # Define change_mach_o_flags in a variable ending in _path |
| 4962 | # so that GYP understands it's a path and performs proper |
| 4963 | # relativization during dict merging. |
| 4964 | 'change_mach_o_flags_path': |
| 4965 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4966 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4967 | ], |
| 4968 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4969 | ['mac_pie==0 or release_valgrind_build==1', { |
| 4970 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 4971 | # the target specifies mac_pie=0 or if building for |
| 4972 | # Valgrind, because Valgrind doesn't understand slide. |
| 4973 | # See the similar mac_pie/release_valgrind_build check |
| 4974 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4975 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4976 | '--no-pie', |
| 4977 | ], |
| 4978 | }], |
| 4979 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4980 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4981 | 'postbuild_name': 'Change Mach-O Flags', |
| 4982 | 'action': [ |
| 4983 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4984 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4985 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4986 | }, |
| 4987 | ], |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 4988 | 'conditions': [ |
| 4989 | ['asan==1', { |
| 4990 | 'variables': { |
| 4991 | 'asan_saves_file': 'asan.saves', |
| 4992 | }, |
| 4993 | 'xcode_settings': { |
| 4994 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
| 4995 | }, |
| 4996 | }], |
| 4997 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4998 | 'target_conditions': [ |
| 4999 | ['mac_pie==1 and release_valgrind_build==0', { |
| 5000 | # Turn on position-independence (ASLR) for executables. When |
| 5001 | # PIE is on for the Chrome executables, the framework will |
| 5002 | # also be subject to ASLR. |
| 5003 | # Don't do this when building for Valgrind, because Valgrind |
| 5004 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 5005 | # understand slide, and get rid of the Valgrind check. |
| 5006 | 'xcode_settings': { |
| 5007 | 'OTHER_LDFLAGS': [ |
| 5008 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 5009 | ], |
| 5010 | }, |
| 5011 | }], |
| 5012 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 5013 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 5014 | ['(_type=="executable" or _type=="shared_library" or \ |
| 5015 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5016 | 'target_conditions': [ |
| 5017 | ['mac_real_dsym == 1', { |
| 5018 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 5019 | # debug information format to dwarf-with-dsym. Since |
| 5020 | # strip_from_xcode will not be used, set Xcode to do the |
| 5021 | # stripping as well. |
| 5022 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5023 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5024 | 'xcode_settings': { |
| 5025 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 5026 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 5027 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5028 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 5029 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5030 | # The Xcode default is to strip debugging symbols |
| 5031 | # only (-S). Local symbols should be stripped as |
| 5032 | # well, which will be handled by -x. Xcode will |
| 5033 | # continue to insert -S when stripping even when |
| 5034 | # additional flags are added with STRIPFLAGS. |
| 5035 | 'STRIPFLAGS': '-x', |
[email protected] | ed7e8369 | 2012-12-24 10:13:40 | [diff] [blame] | 5036 | }], # _type=="shared_library" or _type=="loadable_module" |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5037 | ['_type=="executable"', { |
| 5038 | 'conditions': [ |
| 5039 | ['asan==1', { |
| 5040 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
| 5041 | }] |
| 5042 | ], |
| 5043 | }], # _type=="executable" and asan==1 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5044 | ], # target_conditions |
| 5045 | }, # xcode_settings |
| 5046 | }, # configuration "Release" |
| 5047 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5048 | }, { # mac_real_dsym != 1 |
| 5049 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 5050 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 5051 | # only operates in the Release configuration. |
| 5052 | 'postbuilds': [ |
| 5053 | { |
| 5054 | 'variables': { |
| 5055 | # Define strip_from_xcode in a variable ending in _path |
| 5056 | # so that gyp understands it's a path and performs proper |
| 5057 | # relativization during dict merging. |
| 5058 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 5059 | }, |
| 5060 | 'postbuild_name': 'Strip If Needed', |
| 5061 | 'action': ['<(strip_from_xcode_path)'], |
| 5062 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5063 | ], # postbuilds |
| 5064 | }], # mac_real_dsym |
| 5065 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 5066 | }], # (_type=="executable" or _type=="shared_library" or |
| 5067 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5068 | ], # target_conditions |
| 5069 | }, # target_defaults |
| 5070 | }], # OS=="mac" |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5071 | ['OS=="ios"', { |
| 5072 | 'target_defaults': { |
| 5073 | 'xcode_settings' : { |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 5074 | # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang |
| 5075 | # section above). |
| 5076 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5077 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5078 | 'conditions': [ |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 5079 | # Older Xcodes do not support -Wno-deprecated-register, so pass an |
| 5080 | # additional flag to suppress the "unknown compiler option" error. |
| 5081 | # Restrict this flag to builds that are either compiling with Xcode |
| 5082 | # or compiling with Xcode's Clang. This will allow Ninja builds to |
| 5083 | # continue failing on unknown compiler options. |
| 5084 | # TODO(rohitrao): This flag is temporary and should be removed as |
| 5085 | # soon as the iOS bots are updated to use Xcode 5.1. |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 5086 | ['clang_xcode==1', { |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 5087 | 'WARNING_CFLAGS': [ |
| 5088 | '-Wno-unknown-warning-option', |
| 5089 | ], |
| 5090 | }], |
| 5091 | |
| 5092 | # Limit the valid architectures depending on "target_subarch". |
| 5093 | # This need to include the "arm" architectures but also the "x86" |
| 5094 | # ones (they are used when building for the simulator). |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5095 | ['target_subarch=="arm32"', { |
Stuart Morgan | 7c31daa | 2014-08-29 13:59:45 | [diff] [blame] | 5096 | 'VALID_ARCHS': ['armv7', 'i386'], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5097 | }], |
| 5098 | ['target_subarch=="arm64"', { |
| 5099 | 'VALID_ARCHS': ['arm64', 'x86_64'], |
| 5100 | }], |
| 5101 | ['target_subarch=="both"', { |
Stuart Morgan | 7c31daa | 2014-08-29 13:59:45 | [diff] [blame] | 5102 | 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5103 | }], |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5104 | ['use_system_libcxx==1', { |
| 5105 | 'target_conditions': [ |
| 5106 | # Only use libc++ when building target for iOS not when building |
| 5107 | # tools for the host (OS X) as Mac targets OS X SDK 10.6 which |
| 5108 | # does not support libc++. |
| 5109 | ['_toolset=="target"', { |
| 5110 | 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ |
| 5111 | }] |
| 5112 | ], |
[email protected] | 7c613ee9 | 2014-08-14 21:22:31 | [diff] [blame] | 5113 | }, { |
| 5114 | # The default for deployment target of 7.0+ is libc++, so force |
| 5115 | # the old behavior unless libc++ is enabled. |
| 5116 | 'CLANG_CXX_LIBRARY': 'libstdc++', # -stdlib=libstdc++ |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5117 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5118 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5119 | }, |
| 5120 | 'target_conditions': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5121 | ['_toolset=="host"', { |
| 5122 | 'xcode_settings': { |
| 5123 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 5124 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5125 | 'VALID_ARCHS': [ |
| 5126 | 'x86_64', |
| 5127 | ], |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5128 | 'ARCHS': [ |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5129 | 'x86_64', |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5130 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5131 | }, |
| 5132 | }], |
| 5133 | ['_toolset=="target"', { |
| 5134 | 'xcode_settings': { |
| 5135 | # This section should be for overriding host settings. But, |
| 5136 | # since we can't negate the iphone deployment target above, we |
| 5137 | # instead set it here for target only. |
| 5138 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5139 | 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5140 | }, |
| 5141 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5142 | ['_type=="executable"', { |
| 5143 | 'configurations': { |
| 5144 | 'Release_Base': { |
| 5145 | 'xcode_settings': { |
| 5146 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 5147 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 5148 | }, |
| 5149 | }, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 5150 | 'Debug_Base': { |
| 5151 | 'xcode_settings': { |
| 5152 | # Remove dSYM to reduce build time. |
| 5153 | 'DEBUG_INFORMATION_FORMAT': 'dwarf', |
| 5154 | }, |
| 5155 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5156 | }, |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5157 | 'xcode_settings': { |
| 5158 | 'conditions': [ |
| 5159 | ['chromium_ios_signing', { |
| 5160 | # iOS SDK wants everything for device signed. |
| 5161 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 5162 | }, { |
| 5163 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 5164 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 5165 | }], |
| 5166 | ], |
| 5167 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5168 | }], |
| 5169 | ], # target_conditions |
| 5170 | }, # target_defaults |
| 5171 | }], # OS=="ios" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5172 | ['OS=="win"', { |
| 5173 | 'target_defaults': { |
| 5174 | 'defines': [ |
[email protected] | 8e345da | 2012-07-01 22:10:30 | [diff] [blame] | 5175 | '_WIN32_WINNT=0x0602', |
| 5176 | 'WINVER=0x0602', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5177 | 'WIN32', |
| 5178 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5179 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 5180 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5181 | '_CRT_RAND_S', |
| 5182 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 5183 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 5184 | '_ATL_NO_OPENGL', |
[email protected] | 2b446550 | 2014-07-25 21:02:28 | [diff] [blame] | 5185 | # _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings. |
| 5186 | '_HAS_EXCEPTIONS=0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5187 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5188 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5189 | ['buildtype=="Official"', { |
| 5190 | # In official builds, targets can self-select an optimization |
| 5191 | # level by defining a variable named 'optimize', and setting it |
| 5192 | # to one of |
| 5193 | # - "size", optimizes for minimal code size - the default. |
| 5194 | # - "speed", optimizes for speed over code size. |
| 5195 | # - "max", whole program optimization and link-time code |
| 5196 | # generation. This is very expensive and should be used |
| 5197 | # sparingly. |
| 5198 | 'variables': { |
| 5199 | 'optimize%': 'size', |
| 5200 | }, |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 5201 | 'msvs_settings': { |
| 5202 | 'VCLinkerTool': { |
| 5203 | # Set /LTCG for the official builds. |
| 5204 | 'LinkTimeCodeGeneration': '1', |
| 5205 | }, |
| 5206 | }, |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5207 | 'target_conditions': [ |
| 5208 | ['optimize=="size"', { |
| 5209 | 'msvs_settings': { |
| 5210 | 'VCCLCompilerTool': { |
| 5211 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 5212 | 'Optimization': '1', |
| 5213 | # 2, favorSize - Favor small code (/Os) |
| 5214 | 'FavorSizeOrSpeed': '2', |
| 5215 | }, |
| 5216 | }, |
| 5217 | }, |
| 5218 | ], |
| 5219 | ['optimize=="speed"', { |
| 5220 | 'msvs_settings': { |
| 5221 | 'VCCLCompilerTool': { |
| 5222 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5223 | 'Optimization': '2', |
| 5224 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5225 | 'FavorSizeOrSpeed': '1', |
| 5226 | }, |
| 5227 | }, |
| 5228 | }, |
| 5229 | ], |
| 5230 | ['optimize=="max"', { |
[email protected] | cb875c0 | 2014-06-12 18:06:31 | [diff] [blame] | 5231 | # Disable Warning 4702 ("Unreachable code") for the WPO/PGO |
| 5232 | # builds. Probably anything that this would catch that |
| 5233 | # wouldn't be caught in a normal build isn't going to |
| 5234 | # actually be a bug, so the incremental value of C4702 for |
| 5235 | # PGO builds is likely very small. |
| 5236 | 'msvs_disabled_warnings': [ |
| 5237 | 4702 |
| 5238 | ], |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5239 | 'msvs_settings': { |
| 5240 | 'VCCLCompilerTool': { |
| 5241 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5242 | 'Optimization': '2', |
| 5243 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5244 | 'FavorSizeOrSpeed': '1', |
| 5245 | # This implies link time code generation. |
| 5246 | 'WholeProgramOptimization': 'true', |
| 5247 | }, |
| 5248 | }, |
| 5249 | }, |
| 5250 | ], |
| 5251 | ], |
| 5252 | }, |
| 5253 | ], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 5254 | ['secure_atl', { |
| 5255 | 'defines': [ |
| 5256 | '_SECURE_ATL', |
| 5257 | ], |
| 5258 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 5259 | ['msvs_express', { |
| 5260 | 'configurations': { |
| 5261 | 'x86_Base': { |
| 5262 | 'msvs_settings': { |
| 5263 | 'VCLinkerTool': { |
| 5264 | 'AdditionalLibraryDirectories': |
| 5265 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 5266 | }, |
| 5267 | 'VCLibrarianTool': { |
| 5268 | 'AdditionalLibraryDirectories': |
| 5269 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 5270 | }, |
| 5271 | }, |
| 5272 | }, |
| 5273 | 'x64_Base': { |
| 5274 | 'msvs_settings': { |
| 5275 | 'VCLibrarianTool': { |
| 5276 | 'AdditionalLibraryDirectories': |
| 5277 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 5278 | }, |
| 5279 | 'VCLinkerTool': { |
| 5280 | 'AdditionalLibraryDirectories': |
| 5281 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 5282 | }, |
| 5283 | }, |
| 5284 | }, |
| 5285 | }, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5286 | # https://code.google.com/p/chromium/issues/detail?id=372451#c20 |
| 5287 | # Warning 4702 ("Unreachable code") should be re-enabled once |
| 5288 | # Express users are updated to VS2013 Update 2. |
| 5289 | 'msvs_disabled_warnings': [ |
| 5290 | 4702 |
| 5291 | ], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 5292 | 'msvs_settings': { |
scottmg | 4f828c94 | 2014-08-29 04:11:07 | [diff] [blame] | 5293 | 'VCCLCompilerTool': { |
| 5294 | 'AdditionalOptions!': [ |
| 5295 | '/Zc:inline', # Not supported on non-updated Express. |
| 5296 | ], |
| 5297 | }, |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 5298 | 'VCLinkerTool': { |
| 5299 | # Explicitly required when using the ATL with express |
| 5300 | 'AdditionalDependencies': ['atlthunk.lib'], |
| 5301 | |
| 5302 | # ATL 8.0 included in WDK 7.1 makes the linker to generate |
| 5303 | # almost eight hundred LNK4254 and LNK4078 warnings: |
| 5304 | # - warning LNK4254: section 'ATL' (50000040) merged into |
| 5305 | # '.rdata' (40000040) with different attributes |
| 5306 | # - warning LNK4078: multiple 'ATL' sections found with |
| 5307 | # different attributes |
| 5308 | 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
| 5309 | }, |
| 5310 | }, |
| 5311 | 'msvs_system_include_dirs': [ |
| 5312 | '<(windows_driver_kit_path)/inc/atl71', |
| 5313 | '<(windows_driver_kit_path)/inc/mfc42', |
| 5314 | ], |
[email protected] | 3f3f45f | 2013-10-28 19:30:43 | [diff] [blame] | 5315 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5316 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 5317 | 'msvs_system_include_dirs': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5318 | '<(windows_sdk_path)/Include/shared', |
| 5319 | '<(windows_sdk_path)/Include/um', |
| 5320 | '<(windows_sdk_path)/Include/winrt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5321 | '$(VSInstallDir)/VC/atlmfc/include', |
| 5322 | ], |
[email protected] | bab6e23 | 2013-11-27 22:52:39 | [diff] [blame] | 5323 | 'msvs_cygwin_shell': 0, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5324 | 'msvs_disabled_warnings': [ |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5325 | # C4127: conditional expression is constant |
| 5326 | # This warning can in theory catch dead code and other problems, but |
| 5327 | # triggers in far too many desirable cases where the conditional |
| 5328 | # expression is either set by macros or corresponds some legitimate |
| 5329 | # compile-time constant expression (due to constant template args, |
| 5330 | # conditionals comparing the sizes of different types, etc.). Some of |
| 5331 | # these can be worked around, but it's not worth it. |
| 5332 | 4127, |
| 5333 | |
| 5334 | # C4351: new behavior: elements of array 'array' will be default |
| 5335 | # initialized |
| 5336 | # This is a silly "warning" that basically just alerts you that the |
| 5337 | # compiler is going to actually follow the language spec like it's |
| 5338 | # supposed to, instead of not following it like old buggy versions |
| 5339 | # did. There's absolutely no reason to turn this on. |
| 5340 | 4351, |
| 5341 | |
| 5342 | # C4355: 'this': used in base member initializer list |
| 5343 | # It's commonly useful to pass |this| to objects in a class' |
| 5344 | # initializer list. While this warning can catch real bugs, most of |
| 5345 | # the time the constructors in question don't attempt to call methods |
| 5346 | # on the passed-in pointer (until later), and annotating every legit |
| 5347 | # usage of this is simply more hassle than the warning is worth. |
| 5348 | 4355, |
| 5349 | |
| 5350 | # C4503: 'identifier': decorated name length exceeded, name was |
| 5351 | # truncated |
| 5352 | # This only means that some long error messages might have truncated |
| 5353 | # identifiers in the presence of lots of templates. It has no effect |
| 5354 | # on program correctness and there's no real reason to waste time |
| 5355 | # trying to prevent it. |
| 5356 | 4503, |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5357 | |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5358 | # C4611: interaction between 'function' and C++ object destruction is |
| 5359 | # non-portable |
| 5360 | # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN |
| 5361 | # suggests using exceptions instead of setjmp/longjmp for C++, but |
| 5362 | # Chromium code compiles without exception support. We therefore have |
| 5363 | # to use setjmp/longjmp for e.g. JPEG decode error handling, which |
| 5364 | # means we have to turn off this warning (and be careful about how |
| 5365 | # object destruction happens in such cases). |
| 5366 | 4611, |
| 5367 | |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5368 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 5369 | # removed as code is fixed. |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5370 | 4100, # Unreferenced formal parameter |
| 5371 | 4121, # Alignment of a member was sensitive to packing |
| 5372 | 4189, # Local variable is initialized but not referenced |
| 5373 | 4244, # Conversion from 'type1' to 'type2', possible loss of data |
| 5374 | 4481, # Nonstandard extension used: override specifier 'keyword' |
| 5375 | 4505, # Unreferenced local function has been removed |
| 5376 | 4510, # Default constructor could not be generated |
| 5377 | 4512, # Assignment operator could not be generated |
| 5378 | 4610, # Object can never be instantiated |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5379 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5380 | 'msvs_settings': { |
| 5381 | 'VCCLCompilerTool': { |
[email protected] | e9b96bb | 2012-09-07 01:10:44 | [diff] [blame] | 5382 | 'AdditionalOptions': ['/MP'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5383 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5384 | 'BufferSecurityCheck': 'true', |
| 5385 | 'EnableFunctionLevelLinking': 'true', |
| 5386 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5387 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5388 | 'WarnAsError': 'true', |
| 5389 | 'DebugInformationFormat': '3', |
[email protected] | 2b446550 | 2014-07-25 21:02:28 | [diff] [blame] | 5390 | # ExceptionHandling must match _HAS_EXCEPTIONS above. |
| 5391 | 'ExceptionHandling': '0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5392 | }, |
| 5393 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5394 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5395 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5396 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5397 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5398 | }, |
| 5399 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5400 | 'AdditionalDependencies': [ |
| 5401 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 5402 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5403 | 'version.lib', |
| 5404 | 'msimg32.lib', |
| 5405 | 'ws2_32.lib', |
| 5406 | 'usp10.lib', |
| 5407 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 5408 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 5409 | 'winmm.lib', |
| 5410 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5411 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5412 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5413 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5414 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5415 | 'GenerateDebugInformation': 'true', |
| 5416 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 5417 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5418 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 5419 | # SubSystem values: |
| 5420 | # 0 == not set |
| 5421 | # 1 == /SUBSYSTEM:CONSOLE |
| 5422 | # 2 == /SUBSYSTEM:WINDOWS |
| 5423 | # Most of the executables we'll ever create are tests |
| 5424 | # and utilities with console output. |
| 5425 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5426 | }, |
| 5427 | 'VCMIDLTool': { |
| 5428 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5429 | 'TypeLibraryName': '$(InputName).tlb', |
| 5430 | 'OutputDirectory': '$(IntDir)', |
| 5431 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 5432 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5433 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 5434 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5435 | }, |
| 5436 | 'VCResourceCompilerTool': { |
| 5437 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 5438 | 'AdditionalIncludeDirectories': [ |
| 5439 | '<(DEPTH)', |
| 5440 | '<(SHARED_INTERMEDIATE_DIR)', |
| 5441 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5442 | }, |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5443 | 'target_conditions': [ |
[email protected] | 2b52f99 | 2014-02-26 19:09:47 | [diff] [blame] | 5444 | ['_type=="executable"', { |
| 5445 | 'VCManifestTool': { |
| 5446 | 'EmbedManifest': 'true', |
| 5447 | }, |
| 5448 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5449 | ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', { |
| 5450 | 'VCManifestTool': { |
| 5451 | 'AdditionalManifestFiles': [ |
| 5452 | '>(win_exe_compatibility_manifest)', |
| 5453 | ], |
| 5454 | }, |
| 5455 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5456 | ], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5457 | 'conditions': [ |
| 5458 | ['clang==1', { |
| 5459 | # Building with Clang on Windows is a work in progress and very |
| 5460 | # experimental. See crbug.com/82385. |
| 5461 | 'VCCLCompilerTool': { |
| 5462 | 'WarnAsError': 'false', |
| 5463 | 'RuntimeTypeInfo': 'false', |
| 5464 | 'AdditionalOptions': [ |
[email protected] | 49ee7ef | 2014-04-12 03:07:46 | [diff] [blame] | 5465 | '-fmsc-version=1800', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5466 | '/fallback', |
| 5467 | |
| 5468 | # Many files use intrinsics without including this header. |
| 5469 | # TODO(hans): Fix those files, or move this to sub-GYPs. |
| 5470 | '/FIIntrin.h', |
| 5471 | |
| 5472 | # TODO(hans): Make this list shorter eventually. |
| 5473 | '-Qunused-arguments', |
| 5474 | '-Wno-c++11-compat-deprecated-writable-strings', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5475 | '-Wno-deprecated-declarations', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5476 | '-Wno-empty-body', |
| 5477 | '-Wno-enum-conversion', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5478 | '-Wno-extra-tokens', |
| 5479 | '-Wno-ignored-attributes', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5480 | '-Wno-incompatible-pointer-types', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5481 | '-Wno-int-to-void-pointer-cast', |
| 5482 | '-Wno-invalid-noreturn', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5483 | '-Wno-logical-op-parentheses', |
| 5484 | '-Wno-microsoft', |
| 5485 | '-Wno-missing-braces', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5486 | '-Wno-missing-declarations', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5487 | '-Wno-msvc-include', |
| 5488 | '-Wno-null-dereference', |
| 5489 | '-Wno-overloaded-virtual', |
| 5490 | '-Wno-parentheses', |
| 5491 | '-Wno-pointer-sign', |
| 5492 | '-Wno-reorder', |
| 5493 | '-Wno-return-type-c-linkage', |
| 5494 | '-Wno-self-assign', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5495 | '-Wno-sometimes-uninitialized', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5496 | '-Wno-switch', |
| 5497 | '-Wno-tautological-compare', |
| 5498 | '-Wno-unknown-pragmas', |
| 5499 | '-Wno-unsequenced', |
| 5500 | '-Wno-unused-function', |
| 5501 | '-Wno-unused-private-field', |
| 5502 | '-Wno-unused-value', |
| 5503 | '-Wno-unused-variable', |
Nico Weber | 5897272 | 2014-09-06 20:53:19 | [diff] [blame] | 5504 | '-Wno-unused-local-typedef', # http://crbug.com/411648 |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5505 | ], |
| 5506 | }, |
| 5507 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5508 | ['asan==1', { |
| 5509 | # ASan on Windows is a work in progress and very experimental. |
| 5510 | # See crbug.com/345874. |
| 5511 | 'VCCLCompilerTool': { |
| 5512 | 'AdditionalOptions': [ |
| 5513 | '-fsanitize=address', |
| 5514 | ], |
[email protected] | 4c1abdb | 2014-05-16 17:03:57 | [diff] [blame] | 5515 | 'AdditionalIncludeDirectories': [ |
| 5516 | # MSVC needs to be able to find the sanitizer headers when |
| 5517 | # invoked via /fallback. This is critical for using macros |
| 5518 | # like ASAN_UNPOISON_MEMORY_REGION in files where we fall |
| 5519 | # back. |
[email protected] | e7a1cba | 2014-08-04 15:58:29 | [diff] [blame] | 5520 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer', |
[email protected] | 4c1abdb | 2014-05-16 17:03:57 | [diff] [blame] | 5521 | ], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5522 | }, |
| 5523 | 'VCLinkerTool': { |
| 5524 | 'AdditionalLibraryDirectories': [ |
| 5525 | # TODO(hans): If make_clang_dir is absolute, this breaks. |
[email protected] | e7a1cba | 2014-08-04 15:58:29 | [diff] [blame] | 5526 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows', |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5527 | ], |
| 5528 | }, |
| 5529 | 'target_conditions': [ |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 5530 | ['component=="shared_library"', { |
| 5531 | 'VCLinkerTool': { |
| 5532 | 'AdditionalDependencies': [ |
| 5533 | 'clang_rt.asan_dynamic-i386.lib', |
| 5534 | 'clang_rt.asan_uar_thunk-i386.lib', |
| 5535 | ], |
| 5536 | }, |
| 5537 | }], |
| 5538 | ['_type=="executable" and component=="static_library"', { |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5539 | 'VCLinkerTool': { |
| 5540 | 'AdditionalDependencies': [ |
| 5541 | 'clang_rt.asan-i386.lib', |
| 5542 | ], |
| 5543 | }, |
| 5544 | }], |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 5545 | ['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', { |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5546 | 'VCLinkerTool': { |
| 5547 | 'AdditionalDependencies': [ |
| 5548 | 'clang_rt.asan_dll_thunk-i386.lib', |
| 5549 | ], |
| 5550 | }, |
| 5551 | }], |
| 5552 | ], |
| 5553 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5554 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5555 | }, |
| 5556 | }, |
| 5557 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 5558 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 5559 | 'target_defaults': { |
| 5560 | 'defines': [ |
| 5561 | 'DISABLE_NACL', |
| 5562 | ], |
| 5563 | }, |
| 5564 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 5565 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5566 | 'target_defaults': { |
| 5567 | 'msvs_settings': { |
| 5568 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5569 | 'DelayLoadDLLs': [ |
| 5570 | 'dbghelp.dll', |
| 5571 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 5572 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5573 | 'uxtheme.dll', |
| 5574 | ], |
| 5575 | }, |
| 5576 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5577 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5578 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5579 | 'msvs_settings': { |
| 5580 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5581 | 'AdditionalOptions': [ |
| 5582 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5583 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5584 | '/ignore:4199', |
| 5585 | '/ignore:4221', |
| 5586 | '/nxcompat', |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5587 | ], |
| 5588 | 'conditions': [ |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 5589 | ['syzyasan==0', { |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5590 | 'AdditionalOptions': ['/largeaddressaware'], |
| 5591 | }], |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5592 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5593 | }, |
| 5594 | }, |
| 5595 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5596 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5597 | 'msvs_settings': { |
| 5598 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5599 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5600 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5601 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5602 | '/ignore:4199', |
| 5603 | '/ignore:4221', |
| 5604 | '/nxcompat', |
| 5605 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5606 | }, |
| 5607 | }, |
| 5608 | }, |
| 5609 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5610 | }, |
| 5611 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 5612 | ['enable_new_npdevice_api==1', { |
| 5613 | 'target_defaults': { |
| 5614 | 'defines': [ |
| 5615 | 'ENABLE_NEW_NPDEVICE_API', |
| 5616 | ], |
| 5617 | }, |
| 5618 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5619 | # Don't warn about the "typedef 'foo' locally defined but not used" |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 5620 | # for gcc 4.8 and higher. |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5621 | # TODO: remove this flag once all builds work. See crbug.com/227506 |
[email protected] | 33668ca6 | 2014-07-10 18:01:57 | [diff] [blame] | 5622 | ['gcc_version>=48 and clang==0', { |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5623 | 'target_defaults': { |
| 5624 | 'cflags': [ |
| 5625 | '-Wno-unused-local-typedefs', |
| 5626 | ], |
| 5627 | }, |
| 5628 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5629 | ['gcc_version>=48 and clang==0 and host_clang==1', { |
| 5630 | 'target_defaults': { |
| 5631 | 'target_conditions': [ |
| 5632 | ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], |
| 5633 | ], |
| 5634 | }, |
| 5635 | }], |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5636 | # We need a special case to handle the android webview build on mac because |
| 5637 | # the host gcc there doesn't accept this flag, but the target gcc may |
| 5638 | # require it. |
| 5639 | ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { |
| 5640 | 'target_defaults': { |
| 5641 | 'target_conditions': [ |
[email protected] | f2cef30 | 2014-05-23 13:34:58 | [diff] [blame] | 5642 | ['_toolset=="host"', { |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5643 | 'cflags!': [ |
| 5644 | '-Wno-unused-local-typedefs', |
| 5645 | ], |
| 5646 | }], |
| 5647 | ], |
| 5648 | }, |
| 5649 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5650 | ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' |
| 5651 | 'and OS!="win"', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5652 | 'make_global_settings': [ |
| 5653 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 5654 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
| 5655 | ['CC.host', '$(CC)'], |
| 5656 | ['CXX.host', '$(CXX)'], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 5657 | ], |
| 5658 | }], |
[email protected] | 6e354d4 | 2014-01-29 01:59:21 | [diff] [blame] | 5659 | ['clang==1 and OS=="win"', { |
| 5660 | 'make_global_settings': [ |
| 5661 | # On Windows, gyp's ninja generator only looks at CC. |
| 5662 | ['CC', '<(make_clang_dir)/bin/clang-cl'], |
| 5663 | ], |
| 5664 | }], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 5665 | ['OS=="android" and clang==0', { |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5666 | # Hardcode the compiler names in the Makefile so that |
| 5667 | # it won't depend on the environment at make time. |
[email protected] | 7fc96c8 | 2012-07-24 18:15:11 | [diff] [blame] | 5668 | 'make_global_settings': [ |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5669 | ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| 5670 | ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5671 | ['CC.host', '<(host_cc)'], |
| 5672 | ['CXX.host', '<(host_cxx)'], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5673 | ], |
| 5674 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 5675 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5676 | 'make_global_settings': [ |
| 5677 | ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], |
| 5678 | ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5679 | ['CC.host', '<(host_cc)'], |
| 5680 | ['CXX.host', '<(host_cxx)'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5681 | ], |
| 5682 | }], |
[email protected] | d69a73b | 2014-07-29 16:50:44 | [diff] [blame] | 5683 | ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', { |
| 5684 | # Set default ARM cross compiling on linux. These can be overridden |
| 5685 | # using CC/CXX/etc environment variables. |
| 5686 | 'make_global_settings': [ |
| 5687 | ['CC', '<!(which arm-linux-gnueabihf-gcc)'], |
| 5688 | ['CXX', '<!(which arm-linux-gnueabihf-g++)'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5689 | ['CC.host', '<(host_cc)'], |
| 5690 | ['CXX.host', '<(host_cxx)'], |
[email protected] | d69a73b | 2014-07-29 16:50:44 | [diff] [blame] | 5691 | ], |
| 5692 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5693 | |
| 5694 | # TODO(yyanagisawa): supports GENERATOR==make |
| 5695 | # make generator doesn't support CC_wrapper without CC |
| 5696 | # in make_global_settings yet. |
[email protected] | c8007541 | 2014-02-27 18:46:26 | [diff] [blame] | 5697 | ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5698 | 'make_global_settings': [ |
| 5699 | ['CC_wrapper', '<(gomadir)/gomacc'], |
| 5700 | ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 5701 | ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 5702 | ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 5703 | ], |
| 5704 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5705 | ], |
| 5706 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5707 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 5708 | # This block adds *project-wide* configuration settings to each project |
| 5709 | # file. It's almost always wrong to put things here. Specify your |
| 5710 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 5711 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5712 | 'conditions': [ |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5713 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 5714 | # setting sets the SDK on a project-wide basis. In order to get the |
| 5715 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 5716 | # here at the project level. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5717 | ['OS=="mac"', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5718 | 'conditions': [ |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5719 | ['mac_sdk_path==""', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5720 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5721 | }, { |
| 5722 | 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5723 | }], |
| 5724 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5725 | }], |
| 5726 | ['OS=="ios"', { |
| 5727 | 'conditions': [ |
| 5728 | ['ios_sdk_path==""', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5729 | 'conditions': [ |
| 5730 | # TODO(justincohen): Ninja only supports simulator for now. |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5731 | ['"<(GENERATOR)"=="xcode"', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5732 | 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
[email protected] | 187e0e3 | 2013-07-18 21:49:38 | [diff] [blame] | 5733 | }, { |
| 5734 | 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5735 | }], |
| 5736 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5737 | }, { |
| 5738 | 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
| 5739 | }], |
| 5740 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5741 | }], |
| 5742 | ['OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5743 | # Target both iPhone and iPad. |
| 5744 | 'TARGETED_DEVICE_FAMILY': '1,2', |
[email protected] | 72c0d365 | 2013-11-05 19:11:42 | [diff] [blame] | 5745 | }, { # OS!="ios" |
| 5746 | 'conditions': [ |
| 5747 | ['target_arch=="x64"', { |
| 5748 | 'ARCHS': [ |
| 5749 | 'x86_64' |
| 5750 | ], |
| 5751 | }], |
| 5752 | ['target_arch=="ia32"', { |
| 5753 | 'ARCHS': [ |
| 5754 | 'i386' |
| 5755 | ], |
| 5756 | }], |
| 5757 | ], |
[email protected] | d6455401 | 2013-10-31 18:40:00 | [diff] [blame] | 5758 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5759 | ], |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5760 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5761 | # The Xcode generator will look for an xcode_settings section at the root |
| 5762 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 5763 | # settings should not be here, they should be in target-specific |
| 5764 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 5765 | # settings in target dicts. SYMROOT is a special case, because many other |
| 5766 | # Xcode variables depend on it, including variables such as |
| 5767 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 5768 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 5769 | # files to appear (when present) in the UI as actual files and not red |
| 5770 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 5771 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 5772 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5773 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 5774 | } |