[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. |
Robert Sesek | 602b4bf | 2014-11-20 18:37:00 | [diff] [blame] | 44 | ['OS=="win" or OS=="ios"', { |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 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 | |
bedupont | 65ce5acc | 2014-11-04 16:30:41 | [diff] [blame] | 64 | # Use the PCI lib to collect GPU information. |
| 65 | 'use_libpci%': 1, |
| 66 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 67 | # Use OpenSSL instead of NSS as the underlying SSL and crypto |
| 68 | # implementation. Certificate verification will in most cases be |
| 69 | # handled by the OS. If OpenSSL's struct X509 is used to represent |
| 70 | # certificates, use_openssl_certs must be set. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 71 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 72 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 73 | # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*. |
| 74 | 'use_openssl_certs%': 0, |
| 75 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 76 | # Disable viewport meta tag by default. |
| 77 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 78 | |
| 79 | # Enable HiDPI support. |
| 80 | 'enable_hidpi%': 0, |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 81 | |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 82 | # Override buildtype to select the desired build flavor. |
| 83 | # Dev - everyday build for development/testing |
| 84 | # Official - release build (generally implies additional processing) |
| 85 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 86 | # conversion is done), some of the things which are now controlled by |
| 87 | # 'branding', such as symbol generation, will need to be refactored |
| 88 | # based on 'buildtype' (i.e. we don't care about saving symbols for |
| 89 | # non-Official # builds). |
| 90 | 'buildtype%': 'Dev', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 91 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 92 | # Override branding to select the desired branding flavor. |
| 93 | 'branding%': 'Chromium', |
| 94 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 95 | 'conditions': [ |
[email protected] | 2d050520 | 2013-09-16 00:22:52 | [diff] [blame] | 96 | # ChromeOS and Windows use Aura and Ash. |
[email protected] | 1511930 | 2014-05-20 19:23:58 | [diff] [blame] | 97 | ['chromeos==1 or OS=="win" or OS=="linux"', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 98 | 'use_ash%': 1, |
[email protected] | 978a2ae | 2013-09-13 04:28:01 | [diff] [blame] | 99 | 'use_aura%': 1, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 100 | }], |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 101 | |
gunsch | 407189f | 2014-09-11 22:03:41 | [diff] [blame] | 102 | ['chromecast==1 and OS!="android"', { |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 103 | 'embedded%': 1, |
| 104 | 'use_ozone%': 1, |
| 105 | }], |
| 106 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 107 | # Ozone uses Aura. |
| 108 | ['use_ozone==1', { |
| 109 | 'use_aura%': 1, |
| 110 | }], |
| 111 | |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 112 | # Whether we're a traditional desktop unix. |
| 113 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', { |
| 114 | 'desktop_linux%': 1, |
| 115 | }, { |
| 116 | 'desktop_linux%': 0, |
| 117 | }], |
| 118 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 119 | # Embedded implies ozone. |
| 120 | ['embedded==1', { |
| 121 | 'use_ozone%': 1, |
| 122 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 123 | |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 124 | ['OS=="android"', { |
| 125 | 'target_arch%': 'arm', |
| 126 | }, { |
| 127 | # Default architecture we're building for is the architecture we're |
| 128 | # building on, and possibly sub-architecture (for iOS builds). |
| 129 | 'target_arch%': '<(host_arch)', |
| 130 | }], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 131 | ], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 132 | }, |
| 133 | # Copy conditionally-set variables out one scope. |
| 134 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 135 | 'chromecast%': '<(chromecast)', |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 136 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 137 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 138 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 139 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 140 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 141 | 'embedded%': '<(embedded)', |
bedupont | 65ce5acc | 2014-11-04 16:30:41 | [diff] [blame] | 142 | 'use_libpci%': '<(use_libpci)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 143 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 144 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 145 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 146 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 147 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 148 | 'branding%': '<(branding)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 149 | 'host_arch%': '<(host_arch)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 150 | 'target_arch%': '<(target_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 151 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 152 | 'target_subarch%': '', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 153 | |
newt | d5366cb | 2014-10-21 03:27:16 | [diff] [blame] | 154 | # The channel to build on Android: stable, beta, dev, canary, or |
| 155 | # default. "default" should be used on non-official builds. |
| 156 | 'android_channel%': 'default', |
| 157 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 158 | # This is set when building the Android WebView inside the Android |
| 159 | # build system, using the 'android' gyp backend. The WebView code is |
| 160 | # still built when this is unset, but builds using the normal chromium |
| 161 | # build system. |
| 162 | 'android_webview_build%': 0, |
[email protected] | 0115f04 | 2012-07-27 20:36:53 | [diff] [blame] | 163 | |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 164 | # This is set when building the Android WebView in ninja for the |
| 165 | # telemetry bot. |
| 166 | 'android_webview_telemetry_build%': 0, |
| 167 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 168 | # Set ARM architecture version. |
| 169 | 'arm_version%': 7, |
| 170 | |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 171 | # Use aurax11 for clipboard implementation. This is true on linux_aura. |
| 172 | 'use_clipboard_aurax11%': 0, |
| 173 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 174 | # goma settings. |
| 175 | # 1 to use goma. |
| 176 | # If no gomadir is set, it uses the default gomadir. |
| 177 | 'use_goma%': 0, |
| 178 | 'gomadir%': '', |
| 179 | |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 180 | # The system root for cross-compiles. Default: none. |
| 181 | 'sysroot%': '', |
| 182 | 'chroot_cmd%': '', |
| 183 | |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 184 | # The system libdir used for this ABI. |
| 185 | 'system_libdir%': 'lib', |
| 186 | |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 187 | # Default MIPS arch variant. This is set in the conditions block |
| 188 | # below for MIPS targets. |
| 189 | 'mips_arch_variant%': '', |
| 190 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 191 | 'conditions': [ |
[email protected] | 2c858a8 | 2013-10-05 01:01:32 | [diff] [blame] | 192 | # Ash needs Aura. |
| 193 | ['use_aura==0', { |
| 194 | 'use_ash%': 0, |
| 195 | }], |
| 196 | |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 197 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 198 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 199 | 'toolkit_views%': 1, |
| 200 | }, { |
| 201 | 'toolkit_views%': 0, |
| 202 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 203 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 204 | # Embedded builds use aura without ash or views. |
| 205 | ['embedded==1', { |
| 206 | 'use_aura%': 1, |
| 207 | 'use_ash%': 0, |
| 208 | 'toolkit_views%': 0, |
| 209 | }], |
| 210 | |
[email protected] | d2b16e3 | 2014-03-06 22:10:49 | [diff] [blame] | 211 | # Enable HiDPI on Mac OS, Chrome OS and Windows. |
| 212 | ['OS=="mac" or chromeos==1 or OS=="win"', { |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 213 | 'enable_hidpi%': 1, |
| 214 | }], |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 215 | |
davidben | 71c13e6 | 2014-09-12 15:11:09 | [diff] [blame] | 216 | # Enable the OpenSSL backend on Mac OS. |
| 217 | ['OS=="mac"', { |
| 218 | 'use_openssl%': 1, |
| 219 | }], |
| 220 | |
[email protected] | b11c0cc0 | 2014-06-28 05:36:50 | [diff] [blame] | 221 | # Enable App Launcher everywhere but mobile. |
| 222 | ['OS!="ios" and OS!="android"', { |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 223 | 'enable_app_list%': 1, |
| 224 | }, { |
| 225 | 'enable_app_list%': 0, |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 226 | }], |
| 227 | |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 228 | ['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] | 229 | 'use_default_render_theme%': 1, |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 230 | }, { |
| 231 | 'use_default_render_theme%': 0, |
| 232 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 233 | |
| 234 | ['use_ozone==1', { |
| 235 | 'use_ozone_evdev%': 1, |
| 236 | }, { |
| 237 | 'use_ozone_evdev%': 0, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 238 | }], |
| 239 | |
| 240 | # Set default gomadir. |
| 241 | ['OS=="win"', { |
| 242 | 'gomadir': 'c:\\goma\\goma-win', |
[email protected] | 91b9129 | 2014-01-18 23:54:41 | [diff] [blame] | 243 | }, { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 244 | 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 245 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 246 | |
| 247 | # Set the default "target_subarch" on iOS. Valid values are "arm32", |
| 248 | # "arm64" and "both" (meaning a fat binary). |
| 249 | # |
| 250 | # TODO(sdefresne): change the default from "arm32" to "both" for |
| 251 | # "target_subarch" once http://crbug.com/339477 is fixed. |
| 252 | # |
| 253 | # TODO(sdefresne): set the "target_arch" to "arm" once compilation |
| 254 | # of skia has been fixed for simulator. http://crbug.com/342377 |
| 255 | ['OS=="ios"', { |
| 256 | 'target_subarch%': 'arm32', |
| 257 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 258 | |
| 259 | # Set arch variants for MIPS platforms. |
| 260 | ['target_arch=="mips64el"', { |
| 261 | 'conditions': [ |
| 262 | ['OS=="android"', { |
| 263 | 'mips_arch_variant%': 'r6', |
| 264 | }, { |
| 265 | 'mips_arch_variant%': 'r2', |
| 266 | }], |
| 267 | ], |
| 268 | }], |
| 269 | |
| 270 | ['target_arch=="mipsel"', { |
| 271 | 'mips_arch_variant%': 'r1', |
| 272 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 273 | ], |
| 274 | }, |
| 275 | |
| 276 | # Copy conditionally-set variables out one scope. |
| 277 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 278 | 'chromecast%': '<(chromecast)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 279 | 'host_arch%': '<(host_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 280 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 281 | 'target_subarch%': '<(target_subarch)', |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 282 | 'mips_arch_variant%': '<(mips_arch_variant)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 283 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 284 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 285 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 286 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 287 | 'use_cras%': '<(use_cras)', |
bedupont | 65ce5acc | 2014-11-04 16:30:41 | [diff] [blame] | 288 | 'use_libpci%': '<(use_libpci)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 289 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 290 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 291 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 292 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 293 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 294 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 295 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 296 | 'enable_hidpi%': '<(enable_hidpi)', |
newt | d5366cb | 2014-10-21 03:27:16 | [diff] [blame] | 297 | 'android_channel%': '<(android_channel)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 298 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 299 | 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 300 | 'use_goma%': '<(use_goma)', |
| 301 | 'gomadir%': '<(gomadir)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 302 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 303 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 304 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 305 | 'branding%': '<(branding)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 306 | 'arm_version%': '<(arm_version)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 307 | 'sysroot%': '<(sysroot)', |
| 308 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 309 | 'system_libdir%': '<(system_libdir)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 310 | |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 311 | # Set to 1 to enable fast builds. Set to 2 for even faster builds |
| 312 | # (it disables debug info for fastest compilation - only for use |
| 313 | # on compile-only bots). |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 314 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 315 | |
sebmarchand | 153e1b8 | 2014-10-31 20:25:52 | [diff] [blame] | 316 | # Set to 1 to not store any build metadata, e.g. ifdef out all __DATE__ |
| 317 | # and __TIME__. Set to 0 to reenable the use of these macros in the code |
| 318 | # base. See http://crbug.com/314403. |
| 319 | 'dont_embed_build_metadata%': 1, |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 320 | |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 321 | # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
| 322 | # This is useful for parallel compilation tools which can't support /Zi. |
| 323 | # Only used on Windows. |
| 324 | 'win_z7%' : 0, |
| 325 | |
[email protected] | 1a150551 | 2014-03-10 18:23:38 | [diff] [blame] | 326 | # Set to 1 to enable dcheck in release. |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 327 | 'dcheck_always_on%': 0, |
| 328 | |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 329 | # Set to 1 to make a build that disables unshipped tracing events. |
| 330 | # Note: this setting is ignored if buildtype=="Official". |
| 331 | 'tracing_like_official_build%': 0, |
| 332 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 333 | # Disable image loader component extension by default. |
| 334 | 'image_loader_extension%': 0, |
| 335 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 336 | # Set NEON compilation flags. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 337 | 'arm_neon%': 1, |
| 338 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 339 | # Detect NEON support at run-time. |
| 340 | 'arm_neon_optional%': 0, |
| 341 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 342 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 343 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 344 | |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 345 | # Use system libjpeg. Note that the system's libjepg will be used even if |
| 346 | # use_libjpeg_turbo is set. |
| 347 | 'use_system_libjpeg%': 0, |
| 348 | |
[email protected] | aa5e01fc | 2013-03-06 14:06:17 | [diff] [blame] | 349 | # By default, component is set to static_library and it can be overriden |
| 350 | # by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 351 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 352 | |
brucedawson | 4b6961d | 2014-10-28 22:18:04 | [diff] [blame] | 353 | # /analyze is off by default on Windows because it is very slow and noisy. |
| 354 | # Enable with GYP_DEFINES=win_analyze=1 |
| 355 | 'win_analyze%': 0, |
| 356 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 357 | # Set to select the Title Case versions of strings in GRD files. |
joleksy | a91e868 | 2014-09-10 13:48:41 | [diff] [blame] | 358 | 'use_titlecase_in_grd%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 359 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 360 | # Use translations provided by volunteers at launchpad.net. This |
| 361 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 362 | 'use_third_party_translations%': 0, |
| 363 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 364 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 365 | 'remoting%': 1, |
| 366 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 367 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 368 | 'configuration_policy%': 1, |
| 369 | |
[email protected] | 6c521fed | 2012-11-29 17:00:03 | [diff] [blame] | 370 | # Variable safe_browsing is used to control the build time configuration |
| 371 | # for safe browsing feature. Safe browsing can be compiled in 3 different |
| 372 | # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and |
| 373 | # reporting features without enabling phishing and malware detection. This |
| 374 | # is useful to integrate a third party phishing/malware detection to |
| 375 | # existing safe browsing logic. |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 376 | 'safe_browsing%': 1, |
| 377 | |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 378 | # Web speech is enabled by default. Set to 0 to disable. |
| 379 | 'enable_web_speech%': 1, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 380 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 381 | # Notifications are compiled in by default. Set to 0 to disable. |
| 382 | 'notifications%' : 1, |
| 383 | |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 384 | # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for |
| 385 | # regular builds and 1 for ASan builds. |
| 386 | 'mac_want_real_dsym%': 'default', |
| 387 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 388 | # If this is set, the clang plugins used on the buildbot will be used. |
| 389 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 390 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 391 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 392 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 393 | |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 394 | # Enable building with ASAN (Clang's -fsanitize=address option). |
| 395 | # -fsanitize=address only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 396 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 397 | 'asan%': 0, |
fdegans | 96244bb7 | 2014-10-27 16:57:44 | [diff] [blame] | 398 | 'asan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/asan/blacklist.txt', |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 399 | # Enable coverage gathering instrumentation in ASan. This flag also |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 400 | # controls coverage granularity (1 for function-level coverage, 2 for |
| 401 | # block-level coverage). |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 402 | 'asan_coverage%': 0, |
earthdok | 78507b9 | 2014-10-23 14:00:13 | [diff] [blame] | 403 | # Enable intra-object-overflow detection in ASan (experimental). |
| 404 | 'asan_field_padding%': 0, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 405 | |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 406 | # Enable Chromium overrides of the default configurations for various |
| 407 | # dynamic tools (like ASan). |
glider | 7dbed157 | 2014-09-23 16:38:11 | [diff] [blame] | 408 | 'use_sanitizer_options%': 0, |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 409 | |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 410 | # Enable building with SyzyAsan. |
| 411 | # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo |
| 412 | 'syzyasan%': 0, |
| 413 | |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 414 | # Enable building with LSan (Clang's -fsanitize=leak option). |
| 415 | # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
| 416 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer |
| 417 | 'lsan%': 0, |
| 418 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 419 | # Enable building with TSan (Clang's -fsanitize=thread option). |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 420 | # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 421 | # See http://clang.llvm.org/docs/ThreadSanitizer.html |
| 422 | 'tsan%': 0, |
fdegans | 96244bb7 | 2014-10-27 16:57:44 | [diff] [blame] | 423 | 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 424 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 425 | # Enable building with MSan (Clang's -fsanitize=memory option). |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 426 | # MemorySanitizer only works with clang, but msan=1 implies clang=1 |
| 427 | # See http://clang.llvm.org/docs/MemorySanitizer.html |
| 428 | 'msan%': 0, |
fdegans | 96244bb7 | 2014-10-27 16:57:44 | [diff] [blame] | 429 | 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 430 | # Track where uninitialized memory originates from. From fastest to |
| 431 | # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 |
| 432 | # - track the chain of stores leading from allocation site to use site. |
| 433 | 'msan_track_origins%': 1, |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 434 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 435 | # Enable building with UBSan (Clang's -fsanitize=undefined option). |
| 436 | # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1 |
| 437 | # See http://clang.llvm.org/docs/UsersManual.html |
| 438 | 'ubsan%': 0, |
| 439 | |
[email protected] | 22e1554 | 2014-07-18 23:09:24 | [diff] [blame] | 440 | # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option). |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 441 | # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1 |
| 442 | 'ubsan_vptr%': 0, |
fdegans | 96244bb7 | 2014-10-27 16:57:44 | [diff] [blame] | 443 | 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 444 | |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 445 | # Use the dynamic libraries instrumented by one of the sanitizers |
| 446 | # instead of the standard system libraries. |
| 447 | 'use_instrumented_libraries%': 0, |
| 448 | |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 449 | # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
| 450 | # stdlibc++ as standard library. This is intended to use for instrumented |
| 451 | # builds. |
| 452 | 'use_custom_libcxx%': 0, |
| 453 | |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 454 | # Use system libc++ instead of the default C++ library, usually libstdc++. |
| 455 | # This is intended for iOS builds only. |
| 456 | 'use_system_libcxx%': 0, |
| 457 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 458 | # Use a modified version of Clang to intercept allocated types and sizes |
| 459 | # for allocated objects. clang_type_profiler=1 implies clang=1. |
| 460 | # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
| 461 | # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
| 462 | 'clang_type_profiler%': 0, |
| 463 | |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 464 | # Set to true to instrument the code with function call logger. |
| 465 | # See src/third_party/cygprofile/cyg-profile.cc for details. |
| 466 | 'order_profiling%': 0, |
| 467 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 468 | # Use the provided profiled order file to link Chrome image with it. |
| 469 | # This makes Chrome faster by better using CPU cache when executing code. |
| 470 | # This is known as PGO (profile guided optimization). |
| 471 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 472 | 'order_text_section%' : "", |
| 473 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 474 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 475 | # libraries on linux x86-64 and arm, plus ASLR. |
| 476 | 'linux_fpic%': 1, |
| 477 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 478 | # Whether one-click signin is enabled or not. |
| 479 | 'enable_one_click_signin%': 0, |
| 480 | |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 481 | # Whether to back up data before sync. |
| 482 | 'enable_pre_sync_backup%': 0, |
| 483 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 484 | # Enable Chrome browser extensions |
| 485 | 'enable_extensions%': 1, |
| 486 | |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 487 | # Enable Google Now. |
[email protected] | 9a5bb05 | 2014-04-17 16:50:56 | [diff] [blame] | 488 | 'enable_google_now%': 1, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 489 | |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 490 | # Enable basic printing support and UI. |
| 491 | 'enable_basic_printing%': 1, |
| 492 | |
| 493 | # Enable printing with print preview. It does not imply |
| 494 | # enable_basic_printing. It's possible to build Chrome with preview only. |
| 495 | 'enable_print_preview%': 1, |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 496 | |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 497 | # Set the version of CLD. |
| 498 | # 0: Don't specify the version. This option is for the Finch testing. |
| 499 | # 1: Use only CLD1. |
| 500 | # 2: Use only CLD2. |
[email protected] | d8ef236 | 2013-10-22 02:10:00 | [diff] [blame] | 501 | 'cld_version%': 2, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 502 | |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 503 | # 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] | 504 | # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data |
| 505 | # tool explicitly. |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 506 | # See third_party/cld_2/cld_2.gyp for more information. |
| 507 | # 0: Small tables, lower accuracy |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 508 | # 2: Large tables, high accuracy |
| 509 | 'cld2_table_size%': 2, |
| 510 | |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 511 | # Enable spell checker. |
| 512 | 'enable_spellcheck%': 1, |
| 513 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 514 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 515 | 'enable_webrtc%': 1, |
| 516 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 517 | # Enables use of the session service, which is enabled by default. |
| 518 | # Support for disabling depends on the platform. |
| 519 | 'enable_session_service%': 1, |
| 520 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 521 | # Enables theme support, which is enabled by default. Support for |
| 522 | # disabling depends on the platform. |
| 523 | 'enable_themes%': 1, |
| 524 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 525 | # Enables autofill dialog and associated features; disabled by default. |
| 526 | 'enable_autofill_dialog%' : 0, |
| 527 | |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 528 | # Defaults Wallet integration in Autofill dialog to use production |
| 529 | # servers. Unofficial builds won't have the proper API keys. |
| 530 | 'enable_prod_wallet_service%': 0, |
| 531 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 532 | # Enables support for background apps. |
| 533 | 'enable_background%': 1, |
| 534 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 535 | # Enable the task manager by default. |
| 536 | 'enable_task_manager%': 1, |
[email protected] | e1de87f | 2012-05-02 17:20:45 | [diff] [blame] | 537 | |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 538 | # Enables used resource whitelist generation; disabled by default. |
| 539 | 'enable_resource_whitelist_generation%': 0, |
| 540 | |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 541 | # Enable FILE support by default. |
| 542 | 'disable_file_support%': 0, |
| 543 | |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 544 | # Enable FTP support by default. |
| 545 | 'disable_ftp_support%': 0, |
| 546 | |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 547 | # Use native android functions in place of ICU. Not supported by most |
| 548 | # components. |
| 549 | 'use_icu_alternatives_on_android%': 0, |
| 550 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 551 | # Use of precompiled headers on Windows. |
| 552 | # |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 553 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 554 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 555 | # This setting will override the default. |
| 556 | # |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 557 | # See |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 558 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 559 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 560 | 'chromium_win_pch%': 0, |
| 561 | |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 562 | # Clang stuff. |
| 563 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 564 | # Set this to true when building with Clang. |
| 565 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 566 | # If this is set, clang is used as both host and target compiler in |
| 567 | # cross-compile builds. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 568 | 'clang%': 0, |
| 569 | |
Nico Weber | d4daea0 | 2014-11-25 01:55:21 | [diff] [blame] | 570 | # Use experimental lld linker instead of the platform's default linker. |
| 571 | 'use_lld%': 0, |
| 572 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 573 | # Enable plug-in installation by default. |
| 574 | 'enable_plugin_installation%': 1, |
| 575 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 576 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 577 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 578 | # Chrome UI. |
| 579 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 580 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 581 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 582 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 583 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 584 | # with one of those tools. |
| 585 | 'build_for_tool%': '', |
| 586 | |
[email protected] | 3713813 | 2013-01-17 23:08:52 | [diff] [blame] | 587 | # If no directory is specified then a temporary directory will be used. |
| 588 | 'test_isolation_outdir%': '', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 589 | # True if isolate should fail if the isolate files refer to files |
| 590 | # that are missing. |
jam | 6d2b3cd0 | 2014-09-18 19:08:48 | [diff] [blame] | 591 | 'test_isolation_fail_on_missing': 1, |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 592 | |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 593 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 594 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 595 | # Managed users are enabled by default. |
| 596 | 'enable_managed_users%': 1, |
| 597 | |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 598 | # Platform natively supports discardable memory. |
| 599 | 'native_discardable_memory%': 0, |
| 600 | |
| 601 | # Platform sends memory pressure signals natively. |
| 602 | 'native_memory_pressure_signals%': 0, |
| 603 | |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 604 | 'spdy_proxy_auth_property%' : '', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 605 | 'spdy_proxy_auth_value%' : '', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 606 | 'enable_mdns%' : 0, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 607 | 'enable_service_discovery%': 0, |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 608 | 'enable_wifi_bootstrapping%': 0, |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 609 | 'enable_hangout_services_extension%': 0, |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 610 | |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 611 | # Enable the Syzygy optimization step. |
| 612 | 'syzygy_optimize%': 0, |
| 613 | |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 614 | # Enable hole punching for the protected video. |
| 615 | 'video_hole%': 0, |
| 616 | |
japhet | 46789a8 | 2014-09-10 03:06:46 | [diff] [blame] | 617 | # Temporary hack to allow us to unify blink's definitions of load |
| 618 | # completion. blink uses a crazy set of constraints to determine load |
| 619 | # completion, but only actually requires them for layout tests. However, |
| 620 | # we need to maintain all the old behaviors while the plumbing is put in |
| 621 | # place on both sides of the repo boundary. |
| 622 | 'enable_load_completion_hacks%': 1, |
| 623 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 624 | # Automatically select platforms under ozone. Turn this off to |
| 625 | # build only explicitly selected platforms. |
| 626 | 'ozone_auto_platforms%': 1, |
| 627 | |
torne | ed51a58 | 2014-08-28 18:28:17 | [diff] [blame] | 628 | # If this is set clang is used as host compiler, but not as target |
| 629 | # compiler. Always do this by default. |
| 630 | 'host_clang%': 1, |
| 631 | |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 632 | # Variables to control Link-Time Optimizations (LTO). |
| 633 | # Note: the variables must *not* be enabled at the same time. |
| 634 | # In this case LTO would 'merge' the optimization flags |
| 635 | # at link-time which would lead to all code be optimized with -O2. |
| 636 | # Enable LTO on the code compiled with -Os. |
| 637 | # See crbug.com/407544 |
| 638 | 'use_lto%': 0, |
| 639 | # Enable LTO on code compiled with -O2. |
| 640 | 'use_lto_o2%': 0, |
| 641 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 642 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 643 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 644 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 645 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 646 | }, { |
| 647 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 648 | }], |
| 649 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 650 | # A flag for BSD platforms |
| 651 | ['OS=="freebsd" or OS=="openbsd"', { |
| 652 | 'os_bsd%': 1, |
| 653 | }, { |
| 654 | 'os_bsd%': 0, |
| 655 | }], |
| 656 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 657 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 658 | ['(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] | 659 | 'use_nss%': 1, |
| 660 | }, { |
| 661 | 'use_nss%': 0, |
| 662 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 663 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 664 | # When OpenSSL is used for SSL and crypto on Unix-like systems, use |
| 665 | # OpenSSL's certificate definition. |
| 666 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', { |
| 667 | 'use_openssl_certs%': 1, |
| 668 | }, { |
| 669 | 'use_openssl_certs%': 0, |
| 670 | }], |
| 671 | |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 672 | # libudev usage. This currently only affects the content layer. |
[email protected] | 048ab5f | 2013-11-22 01:42:47 | [diff] [blame] | 673 | ['OS=="linux" and embedded==0', { |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 674 | 'use_udev%': 1, |
| 675 | }, { |
| 676 | 'use_udev%': 0, |
| 677 | }], |
| 678 | |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 679 | # Flags to use X11 on non-Mac POSIX platforms. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 680 | ['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] | 681 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 682 | }, { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 683 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 684 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 685 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 686 | # Flags to use glib. |
[email protected] | 559d8f4f | 2014-04-23 18:28:51 | [diff] [blame] | 687 | ['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] | 688 | 'use_glib%': 0, |
| 689 | }, { |
| 690 | 'use_glib%': 1, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 691 | }], |
| 692 | |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 693 | # Flags to use pango and cairo. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 694 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { |
| 695 | 'use_pango%': 0, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 696 | 'use_cairo%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 697 | }, { |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 698 | 'use_pango%': 1, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 699 | 'use_cairo%': 1, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 700 | }], |
| 701 | |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 702 | # DBus usage. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 703 | ['OS=="linux" and embedded==0', { |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 704 | 'use_dbus%': 1, |
| 705 | }, { |
| 706 | 'use_dbus%': 0, |
| 707 | }], |
| 708 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 709 | # We always use skia text rendering in Aura on Windows, since GDI |
| 710 | # doesn't agree with our BackingStore. |
| 711 | # TODO(beng): remove once skia text rendering is on by default. |
| 712 | ['use_aura==1 and OS=="win"', { |
| 713 | 'enable_skia_text%': 1, |
| 714 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 715 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 716 | # A flag to enable or disable our compile-time dependency |
| 717 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 718 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 719 | # for Linux distributions and for Aura. |
[email protected] | 8370a62 | 2014-02-19 08:12:29 | [diff] [blame] | 720 | ['OS!="linux" or chromeos==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 721 | 'use_gnome_keyring%': 0, |
| 722 | }, { |
| 723 | 'use_gnome_keyring%': 1, |
| 724 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 725 | |
[email protected] | ce67da1b6 | 2014-04-17 19:20:23 | [diff] [blame] | 726 | ['OS=="mac" or OS=="ios"', { |
| 727 | # Mac and iOS want Title Case strings |
joleksy | a91e868 | 2014-09-10 13:48:41 | [diff] [blame] | 728 | 'use_titlecase_in_grd%': 1, |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 729 | }], |
| 730 | |
[email protected] | ff930087 | 2014-01-22 11:09:32 | [diff] [blame] | 731 | # Enable loader extensions on Chrome OS. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 732 | ['chromeos==1', { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 733 | 'image_loader_extension%': 1, |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 734 | }, { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 735 | 'image_loader_extension%': 0, |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 736 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 737 | |
[email protected] | c79d197 | 2013-02-06 18:47:29 | [diff] [blame] | 738 | ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { |
[email protected] | f032fe9 | 2012-06-12 19:20:01 | [diff] [blame] | 739 | 'enable_one_click_signin%': 1, |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 740 | 'enable_pre_sync_backup%': 1, |
[email protected] | e4b66bf | 2012-05-29 20:39:51 | [diff] [blame] | 741 | }], |
| 742 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 743 | ['OS=="android"', { |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 744 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 745 | 'enable_google_now%': 0, |
andrewhayden | fe3b616 | 2014-11-11 20:24:46 | [diff] [blame] | 746 | 'cld_version%': 1, |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 747 | 'enable_spellcheck%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 748 | 'enable_themes%': 0, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 749 | 'remoting%': 0, |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 750 | 'arm_neon%': 0, |
| 751 | 'arm_neon_optional%': 1, |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 752 | 'native_discardable_memory%': 1, |
| 753 | 'native_memory_pressure_signals%': 1, |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 754 | 'enable_basic_printing%': 1, |
| 755 | 'enable_print_preview%': 0, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 756 | 'enable_task_manager%':0, |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 757 | 'video_hole%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 758 | }], |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 759 | |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 760 | # Android OS includes support for proprietary codecs regardless of |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 761 | # building Chromium or Google Chrome. We also ship Google Chrome and |
| 762 | # Chromecast with proprietary codecs. |
| 763 | ['OS=="android" or branding=="Chrome" or chromecast==1', { |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 764 | 'proprietary_codecs%': 1, |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 765 | }, { |
| 766 | 'proprietary_codecs%': 0, |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 767 | }], |
| 768 | |
[email protected] | 85f2958 | 2013-12-16 18:02:04 | [diff] [blame] | 769 | ['OS=="mac" or OS=="ios"', { |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 770 | 'native_discardable_memory%': 1, |
| 771 | 'native_memory_pressure_signals%': 1, |
| 772 | }], |
| 773 | |
[email protected] | 8f5999e | 2013-08-10 18:27:05 | [diff] [blame] | 774 | # Enable autofill dialog for Android, Mac and Views-enabled platforms. |
| 775 | ['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] | 776 | 'enable_autofill_dialog%': 1, |
| 777 | |
| 778 | 'conditions': [ |
| 779 | ['buildtype=="Official"', { |
| 780 | 'enable_prod_wallet_service%': 1, |
| 781 | }], |
| 782 | ] |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 783 | }], |
| 784 | |
[email protected] | f96d63b | 2014-04-01 19:22:44 | [diff] [blame] | 785 | ['OS=="android"', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 786 | 'enable_webrtc%': 1, |
| 787 | }], |
| 788 | |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 789 | ['OS=="ios"', { |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 790 | 'disable_ftp_support%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 791 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 792 | 'enable_google_now%': 0, |
droger | 83d7940 | 2014-11-18 21:15:48 | [diff] [blame] | 793 | 'cld_version%': 2, |
| 794 | 'cld2_table_size%': 0, |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 795 | 'enable_basic_printing%': 0, |
| 796 | 'enable_print_preview%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 797 | 'enable_session_service%': 0, |
oshima | 66a9f96 | 2014-11-07 20:01:16 | [diff] [blame] | 798 | 'enable_spellcheck%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 799 | 'enable_themes%': 0, |
| 800 | 'enable_webrtc%': 0, |
| 801 | 'notifications%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 802 | 'remoting%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 803 | 'safe_browsing%': 0, |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 804 | 'enable_managed_users%': 0, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 805 | 'enable_task_manager%': 0, |
sdefresne | 7da3d88 | 2014-09-19 15:59:23 | [diff] [blame] | 806 | 'use_system_libcxx%': 1, |
the_jk | ffdda02 | 2014-10-03 11:36:19 | [diff] [blame] | 807 | 'support_pre_M6_history_database%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 808 | }], |
| 809 | |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 810 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 811 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 812 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 813 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 814 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 815 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 816 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 817 | |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 818 | # Turn precompiled headers on by default. |
| 819 | ['OS=="win" and buildtype!="Official"', { |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 820 | 'chromium_win_pch%': 1 |
| 821 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 822 | |
[email protected] | 321dd1b | 2014-06-02 21:51:04 | [diff] [blame] | 823 | ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 824 | 'enable_plugin_installation%': 0, |
| 825 | }, { |
| 826 | 'enable_plugin_installation%': 1, |
| 827 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 828 | |
[email protected] | 50d3c4a4 | 2014-04-22 08:29:14 | [diff] [blame] | 829 | # Whether PPAPI is enabled. |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 830 | ['OS=="android" or OS=="ios" or embedded==1', { |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 831 | 'enable_plugins%': 0, |
| 832 | }, { |
| 833 | 'enable_plugins%': 1, |
| 834 | }], |
| 835 | |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 836 | # linux_use_bundled_gold: whether to use the gold linker binary checked |
| 837 | # into third_party/binutils. Force this off via GYP_DEFINES when you |
| 838 | # are using a custom toolchain and need to control -B in ldflags. |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 839 | # Do not use 32-bit gold on 32-bit hosts as it runs out address space |
| 840 | # for component=static_library builds. |
| 841 | ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 842 | 'linux_use_bundled_gold%': 1, |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 843 | }, { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 844 | 'linux_use_bundled_gold%': 0, |
| 845 | }], |
| 846 | |
| 847 | # linux_use_bundled_binutils: whether to use the binary binutils |
| 848 | # checked into third_party/binutils. These are not multi-arch so cannot |
| 849 | # be used except on x86 and x86-64 (the only two architectures which |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 850 | # are currently checke in). Force this off via GYP_DEFINES when you |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 851 | # are using a custom toolchain and need to control -B in cflags. |
| 852 | ['OS=="linux" and (target_arch=="x64")', { |
| 853 | 'linux_use_bundled_binutils%': 1, |
| 854 | }, { |
| 855 | 'linux_use_bundled_binutils%': 0, |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 856 | }], |
| 857 | |
| 858 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
[email protected] | fd6d17c | 2014-04-29 22:01:49 | [diff] [blame] | 859 | # On by default for x64 Linux. |
| 860 | ['OS=="linux" and target_arch=="x64"', { |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 861 | 'linux_use_gold_flags%': 1, |
| 862 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 863 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 864 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 865 | |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 866 | # linux_use_debug_fission: whether to use split DWARF debug info |
| 867 | # files. This can reduce link time significantly, but is incompatible |
| 868 | # with some utilities such as icecc and ccache. Requires gold and |
| 869 | # gcc >= 4.8 or clang. |
| 870 | # http://gcc.gnu.org/wiki/DebugFission |
| 871 | ['OS=="linux" and target_arch=="x64"', { |
| 872 | 'linux_use_debug_fission%': 1, |
| 873 | }, { |
| 874 | 'linux_use_debug_fission%': 0, |
| 875 | }], |
| 876 | |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 877 | ['OS=="android" or OS=="ios"', { |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 878 | 'enable_captive_portal_detection%': 0, |
| 879 | }, { |
| 880 | 'enable_captive_portal_detection%': 1, |
| 881 | }], |
| 882 | |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 883 | # Enable Skia UI text drawing incrementally on different platforms. |
| 884 | # http://crbug.com/105550 |
| 885 | # |
| 886 | # On Aura, this allows per-tile painting to be used in the browser |
| 887 | # compositor. |
[email protected] | 04b67b6 | 2013-09-14 01:32:17 | [diff] [blame] | 888 | ['OS!="android"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 889 | 'use_canvas_skia%': 1, |
| 890 | }], |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 891 | |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 892 | ['chromeos==1', { |
vitalybuka | e6f4a71 | 2014-11-06 04:02:29 | [diff] [blame] | 893 | 'enable_basic_printing%': 0, |
| 894 | 'enable_print_preview%': 1, |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 895 | # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
| 896 | 'use_libjpeg_turbo%': 0, |
| 897 | }], |
| 898 | |
[email protected] | 5be161f | 2013-06-18 11:09:33 | [diff] [blame] | 899 | # Do not enable the Settings App on ChromeOS. |
| 900 | ['enable_app_list==1 and chromeos==0', { |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 901 | 'enable_settings_app%': 1, |
| 902 | }, { |
| 903 | 'enable_settings_app%': 0, |
| 904 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 905 | |
| 906 | ['OS=="linux" and target_arch=="arm" and chromeos==0', { |
| 907 | # Set some defaults for arm/linux chrome builds |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 908 | 'use_allocator%': 'none', |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 909 | # sysroot needs to be an absolute path otherwise it generates |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 910 | # incorrect results when passed to pkg-config |
sbc | 41d0e08 | 2014-10-22 20:39:29 | [diff] [blame] | 911 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_arm-sysroot', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 912 | }], # OS=="linux" and target_arch=="arm" and chromeos==0 |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 913 | |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 914 | ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 915 | 'conditions': [ |
| 916 | ['target_arch=="x64"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 917 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 918 | }], |
| 919 | ['target_arch=="ia32"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 920 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 921 | }], |
| 922 | ], |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 923 | }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 924 | |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 925 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | f147893 | 2013-03-05 20:50:07 | [diff] [blame] | 926 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 927 | 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 928 | }], |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 929 | |
| 930 | # Whether tests targets should be run, archived or just have the |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 931 | # dependencies verified. All the tests targets have the '_run' suffix, |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 932 | # e.g. base_unittests_run runs the target base_unittests. The test |
[email protected] | 10d8ac3 | 2013-10-31 13:34:31 | [diff] [blame] | 933 | # target always calls tools/swarming_client/isolate.py. See the script's |
maruel | 8214754 | 2014-10-01 13:21:42 | [diff] [blame] | 934 | # --help for more information. Meant to be overriden with GYP_DEFINES. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 935 | # TODO(maruel): Remove the conditions as more configurations are |
| 936 | # supported. |
[email protected] | e51e3565 | 2013-12-19 02:39:08 | [diff] [blame] | 937 | ['OS!="ios" and OS!="android" and chromeos==0', { |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 938 | 'test_isolation_mode%': 'check', |
| 939 | }, { |
| 940 | 'test_isolation_mode%': 'noop', |
| 941 | }], |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 942 | # Whether Android build uses OpenMAX DL FFT. |
| 943 | ['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")', { |
| 944 | # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel. |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 945 | # When enabled, this will also enable WebAudio support on |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 946 | # Android for these architectures. Default is enabled. Whether |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 947 | # WebAudio is actually available depends on runtime settings |
| 948 | # and flags. |
[email protected] | 330f3a3 | 2013-04-23 05:47:58 | [diff] [blame] | 949 | 'use_openmax_dl_fft%': 1, |
[email protected] | d29d61b | 2013-04-17 04:00:53 | [diff] [blame] | 950 | }, { |
| 951 | 'use_openmax_dl_fft%': 0, |
| 952 | }], |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 953 | ['OS=="win" or OS=="linux"', { |
| 954 | 'enable_mdns%' : 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 955 | }], |
| 956 | |
| 957 | # Turns on compiler optimizations in V8 in Debug build, except |
| 958 | # on android_clang, where we're hitting a weird linker error. |
| 959 | # TODO(dpranke): http://crbug.com/266155 . |
| 960 | ['OS=="android"', { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 961 | 'v8_optimized_debug%': 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 962 | }, { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 963 | 'v8_optimized_debug%': 2, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 964 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 965 | |
| 966 | # Disable various features by default on embedded. |
| 967 | ['embedded==1', { |
| 968 | 'remoting%': 0, |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 969 | 'enable_basic_printing%': 0, |
| 970 | 'enable_print_preview%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 971 | }], |
[email protected] | b390dd7d | 2014-03-20 14:49:41 | [diff] [blame] | 972 | |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 973 | # By default, use ICU data file (icudtl.dat) on all platforms |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 974 | # except when building Android WebView or Chromecast. |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 975 | # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium). |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 976 | # Set the data reduction proxy origin for Android Webview. |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 977 | ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', { |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 978 | 'icu_use_data_file_flag%' : 1, |
| 979 | }, { |
| 980 | 'icu_use_data_file_flag%' : 0, |
| 981 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 982 | ['OS=="win" or OS=="mac"', { |
| 983 | 'enable_wifi_bootstrapping%' : 1, |
| 984 | }], |
[email protected] | 91464ea | 2014-07-18 05:32:11 | [diff] [blame] | 985 | |
| 986 | # Path to sas.dll, which provides the SendSAS function. |
| 987 | # http://msdn.microsoft.com/en-us/library/windows/desktop/dd979761(v=vs.85).aspx |
| 988 | ['target_arch=="x64"', { |
| 989 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/amd64', |
| 990 | }, { |
| 991 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
| 992 | }], |
mlamouri | 2366875 | 2014-08-28 20:56:45 | [diff] [blame] | 993 | |
| 994 | # Turn on JNI generation optimizations on non-WebView builds. |
| 995 | ['OS=="android" and android_webview_build==0', { |
| 996 | 'optimize_jni_generation%': 1, |
| 997 | }, { |
| 998 | 'optimize_jni_generation%': 0, |
| 999 | }], |
baixo | 3a3c88a | 2014-10-28 11:52:21 | [diff] [blame] | 1000 | |
| 1001 | # TODO(baixo): Enable v8_use_external_startup_data |
| 1002 | # http://crbug.com/421063 |
baixo | 6f00b0f4 | 2014-11-28 19:19:29 | [diff] [blame] | 1003 | ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0 and chromeos==0 and (OS=="android" or OS=="linux" or OS=="mac")', { |
baixo | ad3eeae | 2014-11-19 12:56:40 | [diff] [blame] | 1004 | 'v8_use_external_startup_data': 1, |
baixo | 3a3c88a | 2014-10-28 11:52:21 | [diff] [blame] | 1005 | }, { |
| 1006 | 'v8_use_external_startup_data': 0, |
| 1007 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 1008 | ], |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1009 | |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 1010 | # Set this to 1 to enable use of concatenated impulse responses |
| 1011 | # for the HRTF panner in WebAudio. |
[email protected] | 508afb7 | 2013-05-02 22:37:26 | [diff] [blame] | 1012 | 'use_concatenated_impulse_responses': 1, |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 1013 | |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1014 | # You can set the variable 'use_official_google_api_keys' to 1 |
| 1015 | # to use the Google-internal file containing official API keys |
| 1016 | # for Google Chrome even in a developer build. Setting this |
| 1017 | # variable explicitly to 1 will cause your build to fail if the |
| 1018 | # internal file is missing. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1019 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1020 | # The variable is documented here, but not handled in this file; |
| 1021 | # see //google_apis/determine_use_official_keys.gypi for the |
| 1022 | # implementation. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1023 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1024 | # Set the variable to 0 to not use the internal file, even when |
| 1025 | # it exists in your checkout. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1026 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1027 | # Leave it unset in your include.gypi to have the variable |
| 1028 | # implicitly set to 1 if you have |
| 1029 | # src/google_apis/internal/google_chrome_api_keys.h in your |
| 1030 | # checkout, and implicitly set to 0 if not. |
| 1031 | # |
| 1032 | # Note that official builds always behave as if the variable |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1033 | # was explicitly set to 1, i.e. they always use official keys, |
| 1034 | # and will fail to build if the internal file is missing. |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 1035 | # |
| 1036 | # NOTE: You MUST NOT explicitly set the variable to 2 in your |
| 1037 | # include.gypi or by other means. Due to subtleties of GYP, this |
| 1038 | # is not the same as leaving the variable unset, even though its |
| 1039 | # default value in |
| 1040 | # //google_apis/determine_use_official_keys.gypi is 2. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1041 | |
| 1042 | # Set these to bake the specified API keys and OAuth client |
| 1043 | # IDs/secrets into your build. |
| 1044 | # |
| 1045 | # If you create a build without values baked in, you can instead |
| 1046 | # set environment variables to provide the keys at runtime (see |
| 1047 | # src/google_apis/google_api_keys.h for details). Features that |
| 1048 | # require server-side APIs may fail to work if no keys are |
| 1049 | # provided. |
| 1050 | # |
| 1051 | # Note that if you are building an official build or if |
| 1052 | # use_official_google_api_keys has been set to 1 (explicitly or |
| 1053 | # implicitly), these values will be ignored and the official |
| 1054 | # keys will be used instead. |
| 1055 | 'google_api_key%': '', |
| 1056 | 'google_default_client_id%': '', |
| 1057 | 'google_default_client_secret%': '', |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1058 | # Native Client is enabled by default. |
| 1059 | 'disable_nacl%': '0', |
the_jk | ffdda02 | 2014-10-03 11:36:19 | [diff] [blame] | 1060 | |
| 1061 | # Set to 1 to support old history files |
| 1062 | 'support_pre_M6_history_database%': '1', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1063 | }, |
| 1064 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1065 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1066 | 'branding%': '<(branding)', |
| 1067 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 1068 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1069 | 'target_subarch%': '<(target_subarch)', |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1070 | 'mips_arch_variant%': '<(mips_arch_variant)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 1071 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1072 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 1073 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 1074 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1075 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 1076 | 'use_cras%': '<(use_cras)', |
bedupont | 65ce5acc | 2014-11-04 16:30:41 | [diff] [blame] | 1077 | 'use_libpci%': '<(use_libpci)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 1078 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1079 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1080 | 'use_nss%': '<(use_nss)', |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 1081 | 'use_udev%': '<(use_udev)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 1082 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1083 | 'os_posix%': '<(os_posix)', |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 1084 | 'use_dbus%': '<(use_dbus)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 1085 | 'use_glib%': '<(use_glib)', |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 1086 | 'use_pango%': '<(use_pango)', |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 1087 | 'use_cairo%': '<(use_cairo)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1088 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 1089 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 1090 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 1091 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1092 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 1093 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 1094 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1095 | 'chromeos%': '<(chromeos)', |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1096 | 'chromecast%': '<(chromecast)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 1097 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 1098 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1099 | 'image_loader_extension%': '<(image_loader_extension)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1100 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 1101 | 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)', |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 1102 | 'win_z7%': '<(win_z7)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 1103 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 1104 | 'tracing_like_official_build%': '<(tracing_like_official_build)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1105 | 'arm_version%': '<(arm_version)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 1106 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1107 | 'arm_neon_optional%': '<(arm_neon_optional)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 1108 | 'sysroot%': '<(sysroot)', |
[email protected] | a23d714 | 2014-02-14 16:58:45 | [diff] [blame] | 1109 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 1110 | 'system_libdir%': '<(system_libdir)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1111 | 'component%': '<(component)', |
brucedawson | 4b6961d | 2014-10-28 22:18:04 | [diff] [blame] | 1112 | 'win_analyze%': '<(win_analyze)', |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 1113 | 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', |
joleksy | a91e868 | 2014-09-10 13:48:41 | [diff] [blame] | 1114 | 'use_titlecase_in_grd%': '<(use_titlecase_in_grd)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 1115 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1116 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 1117 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 1118 | 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 1119 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 1120 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 1121 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 1122 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1123 | 'enable_web_speech%': '<(enable_web_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1124 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1125 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 1126 | 'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1127 | 'asan%': '<(asan)', |
earthdok | 78507b9 | 2014-10-23 14:00:13 | [diff] [blame] | 1128 | 'asan_blacklist%': '<(asan_blacklist)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 1129 | 'asan_coverage%': '<(asan_coverage)', |
earthdok | 78507b9 | 2014-10-23 14:00:13 | [diff] [blame] | 1130 | 'asan_field_padding%': '<(asan_field_padding)', |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 1131 | 'use_sanitizer_options%': '<(use_sanitizer_options)', |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 1132 | 'syzyasan%': '<(syzyasan)', |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1133 | 'syzygy_optimize%': '<(syzygy_optimize)', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1134 | 'lsan%': '<(lsan)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 1135 | 'msan%': '<(msan)', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 1136 | 'msan_blacklist%': '<(msan_blacklist)', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 1137 | 'msan_track_origins%': '<(msan_track_origins)', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1138 | 'tsan%': '<(tsan)', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 1139 | 'tsan_blacklist%': '<(tsan_blacklist)', |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 1140 | 'ubsan%': '<(ubsan)', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1141 | 'ubsan_vptr%': '<(ubsan_vptr)', |
| 1142 | 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)', |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 1143 | 'use_instrumented_libraries%': '<(use_instrumented_libraries)', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 1144 | 'use_custom_libcxx%': '<(use_custom_libcxx)', |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 1145 | 'use_system_libcxx%': '<(use_system_libcxx)', |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1146 | 'clang_type_profiler%': '<(clang_type_profiler)', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 1147 | 'order_profiling%': '<(order_profiling)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 1148 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1149 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 1150 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 1151 | 'enable_plugins%': '<(enable_plugins)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1152 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 1153 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 1154 | 'enable_autofill_dialog%': '<(enable_autofill_dialog)', |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 1155 | 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1156 | 'enable_background%': '<(enable_background)', |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1157 | 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', |
| 1158 | 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1159 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 1160 | 'linux_use_debug_fission%': '<(linux_use_debug_fission)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 1161 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0ef3a52 | 2012-05-15 14:56:33 | [diff] [blame] | 1162 | 'test_isolation_mode%': '<(test_isolation_mode)', |
| 1163 | 'test_isolation_outdir%': '<(test_isolation_outdir)', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 1164 | 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 1165 | 'enable_basic_printing%': '<(enable_basic_printing)', |
| 1166 | 'enable_print_preview%': '<(enable_print_preview)', |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 1167 | 'enable_spellcheck%': '<(enable_spellcheck)', |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 1168 | 'enable_google_now%': '<(enable_google_now)', |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 1169 | 'cld_version%': '<(cld_version)', |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 1170 | 'cld2_table_size%': '<(cld2_table_size)', |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 1171 | 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 1172 | 'disable_file_support%': '<(disable_file_support)', |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 1173 | 'disable_ftp_support%': '<(disable_ftp_support)', |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 1174 | 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1175 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 1176 | 'sas_dll_path%': '<(sas_dll_path)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1177 | 'wix_path%': '<(wix_path)', |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 1178 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1179 | 'use_system_libjpeg%': '<(use_system_libjpeg)', |
newt | d5366cb | 2014-10-21 03:27:16 | [diff] [blame] | 1180 | 'android_channel%': '<(android_channel)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1181 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 967767d | 2014-07-16 05:46:24 | [diff] [blame] | 1182 | 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1183 | 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)', |
[email protected] | 5660f19 | 2013-04-02 16:55:46 | [diff] [blame] | 1184 | 'gyp_managed_install%': 0, |
[email protected] | 97d63ec | 2013-06-25 18:42:07 | [diff] [blame] | 1185 | 'create_standalone_apk%': 1, |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1186 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 1187 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1188 | 'enable_settings_app%': '<(enable_settings_app)', |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1189 | 'google_api_key%': '<(google_api_key)', |
| 1190 | 'google_default_client_id%': '<(google_default_client_id)', |
| 1191 | 'google_default_client_secret%': '<(google_default_client_secret)', |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 1192 | 'enable_managed_users%': '<(enable_managed_users)', |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 1193 | 'native_discardable_memory%': '<(native_discardable_memory)', |
| 1194 | 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 1195 | 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 1196 | 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 1197 | 'enable_mdns%' : '<(enable_mdns)', |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1198 | 'enable_service_discovery%' : '<(enable_service_discovery)', |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 1199 | 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 1200 | 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)', |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 1201 | 'v8_optimized_debug%': '<(v8_optimized_debug)', |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 1202 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 1203 | 'use_goma%': '<(use_goma)', |
| 1204 | 'gomadir%': '<(gomadir)', |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 1205 | 'use_lto%': '<(use_lto)', |
| 1206 | 'use_lto_o2%': '<(use_lto_o2)', |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 1207 | 'video_hole%': '<(video_hole)', |
japhet | 46789a8 | 2014-09-10 03:06:46 | [diff] [blame] | 1208 | 'enable_load_completion_hacks%': '<(enable_load_completion_hacks)', |
the_jk | ffdda02 | 2014-10-03 11:36:19 | [diff] [blame] | 1209 | 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)', |
baixo | 3a3c88a | 2014-10-28 11:52:21 | [diff] [blame] | 1210 | 'v8_use_external_startup_data': '<(v8_use_external_startup_data)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 1211 | |
Sadrul Habib Chowdhury | ec96ebf | 2014-09-05 19:13:34 | [diff] [blame] | 1212 | # Whether or not we are building the Athena shell. |
| 1213 | 'use_athena%': '0', |
| 1214 | |
[email protected] | 2f32567 | 2012-10-31 23:29:37 | [diff] [blame] | 1215 | # Use system protobuf instead of bundled one. |
| 1216 | 'use_system_protobuf%': 0, |
| 1217 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 1218 | # Use system yasm instead of bundled one. |
| 1219 | 'use_system_yasm%': 0, |
| 1220 | |
[email protected] | ea02e96 | 2013-04-26 11:18:16 | [diff] [blame] | 1221 | # Use system ICU instead of bundled one. |
| 1222 | 'use_system_icu%' : 0, |
| 1223 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 1224 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 1225 | # able to turn it off for various reasons. |
| 1226 | 'linux_disable_pie%': 0, |
| 1227 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 1228 | # The release channel that this build targets. This is used to restrict |
| 1229 | # channel-specific build options, like which installer packages to create. |
| 1230 | # The default is 'all', which does no channel-specific filtering. |
| 1231 | 'channel%': 'all', |
| 1232 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1233 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 1234 | # precompiled headers on the Mac. Prefix header injection may still be |
| 1235 | # used, but prefix headers will not be precompiled. This is useful when |
| 1236 | # using distcc to distribute a build to compile slaves that don't |
| 1237 | # share the same compiler executable as the system driving the compilation, |
| 1238 | # because precompiled headers rely on pointers into a specific compiler |
| 1239 | # executable's image. Setting this to 0 is needed to use an experimental |
| 1240 | # Linux-Mac cross compiler distcc farm. |
| 1241 | 'chromium_mac_pch%': 1, |
| 1242 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1243 | # The default value for mac_strip in target_defaults. This cannot be |
| 1244 | # set there, per the comment about variable% in a target_defaults. |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1245 | 'mac_strip_release%': 0, |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1246 | |
[email protected] | c0a1277 | 2013-08-22 00:08:31 | [diff] [blame] | 1247 | # Set to 1 to enable java code coverage. Instruments classes during build |
| 1248 | # to produce .ec files during runtime. |
| 1249 | 'emma_coverage%': 0, |
| 1250 | |
[email protected] | 9662d92 | 2013-10-04 22:02:44 | [diff] [blame] | 1251 | # EMMA filter string consisting of a list of inclusion/exclusion patterns |
| 1252 | # separated with whitespace and/or comma. Only has effect if |
| 1253 | # 'emma_coverage=1'. |
| 1254 | 'emma_filter%': '', |
| 1255 | |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1256 | # Set to 1 to enable running Android lint on java/class files. |
[email protected] | 2faf2bf | 2014-08-06 19:12:24 | [diff] [blame] | 1257 | 'android_lint%': 1, |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1258 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 1259 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1260 | # environment variable, the libcmt shim it uses sometimes gets in |
| 1261 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 1262 | # 'win_use_allocator_shim': 0, |
| 1263 | # 'win_release_RuntimeLibrary': 2 |
| 1264 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
cpu | 962a141 | 2014-11-25 02:25:17 | [diff] [blame] | 1265 | 'win_use_allocator_shim%': 0, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 1266 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 1267 | # TODO(bradnelson): eliminate this when possible. |
| 1268 | # To allow local gyp files to prevent release.vsprops from being included. |
| 1269 | # Yes(1) means include release.vsprops. |
| 1270 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 1271 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1272 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1273 | # TODO(bradnelson): eliminate this when possible. |
| 1274 | # To allow local gyp files to override additional linker options for msvs. |
| 1275 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1276 | 'msvs_use_common_linker_extras%': 1, |
| 1277 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 1278 | # TODO(sgk): eliminate this if possible. |
| 1279 | # It would be nicer to support this via a setting in 'target_defaults' |
| 1280 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 1281 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 1282 | # but that doesn't work as we'd like. |
| 1283 | 'msvs_debug_link_incremental%': '2', |
| 1284 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 1285 | # Needed for some of the largest modules. |
| 1286 | 'msvs_debug_link_nonincremental%': '1', |
| 1287 | |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1288 | # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1289 | # to get incremental linking to be faster in debug builds. |
[email protected] | 8f1da83d | 2012-08-06 21:49:26 | [diff] [blame] | 1290 | 'incremental_chrome_dll%': '0', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1291 | |
[email protected] | 1ff6429 | 2013-07-18 20:37:15 | [diff] [blame] | 1292 | # Experimental setting to break chrome.dll into multiple pieces based on |
| 1293 | # process type. |
| 1294 | 'chrome_multiple_dll%': '0', |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1295 | |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 1296 | # Experimental setting to optimize Chrome's DLLs with PGO. |
| 1297 | 'chrome_pgo_phase%': '0', |
| 1298 | |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 1299 | # Whether the VS xtree header has been patched to disable warning 4702. If |
| 1300 | # it has, then we don't need to disable 4702 (unreachable code warning). |
| 1301 | # The patch is preapplied to the internal toolchain and hence all bots. |
| 1302 | 'msvs_xtree_patched%': '<!pymod_do_main(win_is_xtree_patched)', |
| 1303 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1304 | # Clang stuff. |
| 1305 | 'clang%': '<(clang)', |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 1306 | 'host_clang%': '<(host_clang)', |
| 1307 | 'make_clang_dir%': '<(make_clang_dir)', |
Nico Weber | d4daea0 | 2014-11-25 01:55:21 | [diff] [blame] | 1308 | 'use_lld%': '<(use_lld)', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1309 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1310 | # Control which version of clang to use when building for iOS. If set to |
| 1311 | # '1', uses the version of clang that ships with Xcode. If set to '0', uses |
| 1312 | # the version of clang that ships with the Chromium source. This variable |
| 1313 | # is automatically set to '1' when using the Xcode generator. |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1314 | 'clang_xcode%': 0, |
| 1315 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1316 | # These two variables can be set in GYP_DEFINES while running |
| 1317 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 1318 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 1319 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 1320 | # 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] | 1321 | |
| 1322 | 'clang_load%': '', |
| 1323 | 'clang_add_plugin%': '', |
| 1324 | |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 1325 | # Tell ld64 to write map files describing binary layout. Useful |
| 1326 | # for looking at what contributes to binary size, e.g. with |
| 1327 | # https://github.com/nico/bloat |
| 1328 | 'mac_write_linker_maps%': 0, |
| 1329 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1330 | # The default type of gtest. |
| 1331 | 'gtest_target_type%': 'executable', |
| 1332 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1333 | # Enable sampling based profiler. |
| 1334 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 1335 | 'profiling%': '0', |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 1336 | # Profile without optimizing out stack frames when profiling==1. |
| 1337 | 'profiling_full_stack_frames%': '0', |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1338 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1339 | # And if we want to dump symbols for Breakpad-enabled builds. |
[email protected] | 8ebfecb | 2013-11-14 05:30:31 | [diff] [blame] | 1340 | 'linux_dump_symbols%': 0, |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1341 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1342 | 'linux_strip_binary%': 0, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1343 | # If we want stack unwind support for backtrace(). |
| 1344 | 'debug_unwind_tables%': 1, |
| 1345 | 'release_unwind_tables%': 1, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1346 | |
[email protected] | 8d949f1a0 | 2014-04-10 14:01:57 | [diff] [blame] | 1347 | # Override where to find binutils |
| 1348 | 'binutils_version%': 0, |
| 1349 | 'binutils_dir%': '', |
| 1350 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 1351 | # Enable TCMalloc. |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1352 | # Default of 'use_allocator' is set to 'none' if OS=='android' later. |
| 1353 | 'use_allocator%': 'tcmalloc', |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 1354 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1355 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 1356 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1357 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 1358 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1359 | |
[email protected] | a63e8d2 | 2013-03-23 16:17:08 | [diff] [blame] | 1360 | # Enable use of OpenMAX DL FFT routines. |
| 1361 | 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 1362 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1363 | # Enable new NPDevice API. |
| 1364 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1365 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1366 | # .gyp files or targets should set chromium_code to 1 if they build |
| 1367 | # Chromium-specific code, as opposed to external code. This variable is |
| 1368 | # used to control such things as the set of warnings to enable, and |
| 1369 | # whether warnings are treated as errors. |
| 1370 | 'chromium_code%': 0, |
| 1371 | |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 1372 | # Disable fatal linker warnings, similarly to how we make it possible |
| 1373 | # to disable -Werror (e.g. for different toolchain versions). |
| 1374 | 'disable_fatal_linker_warnings%': 0, |
| 1375 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1376 | 'release_valgrind_build%': 0, |
| 1377 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1378 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1379 | 'enable_wexit_time_destructors%': 0, |
| 1380 | |
[email protected] | d69acbc | 2014-02-10 21:14:46 | [diff] [blame] | 1381 | # Build libpeerconnection as a static library by default. |
| 1382 | 'libpeer_target_type%': 'static_library', |
| 1383 | |
[email protected] | 9e1149d7 | 2012-07-24 01:27:17 | [diff] [blame] | 1384 | # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
| 1385 | 'internal_gles2_conform_tests%': 0, |
| 1386 | |
ullysses.a.eoff | ffbb37e | 2014-10-01 01:07:59 | [diff] [blame] | 1387 | # Set to 1 to compile with the Khronos GL-CTS conformance tests. |
| 1388 | 'internal_khronos_glcts_tests%': 0, |
| 1389 | |
[email protected] | 5c18edd | 2013-11-19 22:04:11 | [diff] [blame] | 1390 | # Set to 1 to compile the filter fuzzer. |
| 1391 | 'internal_filter_fuzzer%': 0, |
| 1392 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1393 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 1394 | # so Cocoa is happy (http://crbug.com/20441). |
| 1395 | 'locales': [ |
| 1396 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 1397 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 1398 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1399 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1400 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 1401 | 'vi', 'zh-CN', 'zh-TW', |
| 1402 | ], |
| 1403 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 1404 | # Pseudo locales are special locales which are used for testing and |
| 1405 | # debugging. They don't get copied to the final app. For more info, |
| 1406 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 1407 | 'pseudo_locales': [ |
| 1408 | 'fake-bidi', |
| 1409 | ], |
| 1410 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1411 | 'grit_defines': [], |
| 1412 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 1413 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 1414 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 1415 | # is stored in resources.pak. It is still possible to load JS files |
| 1416 | # from disk by passing --debug-devtools cmdline switch. |
| 1417 | 'debug_devtools%': 0, |
| 1418 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1419 | # The Java Bridge is not compiled in by default. |
| 1420 | 'java_bridge%': 0, |
| 1421 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1422 | # Code signing for iOS binaries. The bots need to be able to disable this. |
| 1423 | 'chromium_ios_signing%': 1, |
| 1424 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 1425 | # This flag is only used when disable_nacl==0 and disables all those |
| 1426 | # subcomponents which would require the installation of a native_client |
| 1427 | # untrusted toolchain. |
| 1428 | 'disable_nacl_untrusted%': 0, |
| 1429 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1430 | # Disable Dart by default. |
| 1431 | 'enable_dart%': 0, |
| 1432 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1433 | # Copy out the setting of disable_nacl. |
| 1434 | 'disable_nacl%': '<(disable_nacl)', |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 1435 | |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 1436 | # Portable Native Client is enabled by default. |
| 1437 | 'disable_pnacl%': 0, |
| 1438 | |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 1439 | # Whether to build full debug version for Debug configuration on Android. |
| 1440 | # Compared to full debug version, the default Debug configuration on Android |
| 1441 | # has no full v8 debug, has size optimization and linker gc section, so that |
| 1442 | # we can build a debug version with acceptable size and performance. |
| 1443 | 'android_full_debug%': 0, |
| 1444 | |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1445 | # Sets the default version name and code for Android app, by default we |
| 1446 | # do a developer build. |
| 1447 | 'android_app_version_name%': 'Developer Build', |
aruslan | ad608226 | 2014-10-13 18:53:12 | [diff] [blame] | 1448 | 'android_app_version_code%': 1, |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1449 | |
[email protected] | 014d1ff1 | 2013-07-02 01:52:33 | [diff] [blame] | 1450 | # Contains data about the attached devices for gyp_managed_install. |
| 1451 | 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', |
| 1452 | |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1453 | 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")', |
| 1454 | 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1455 | |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1456 | 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
| 1457 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 1458 | |
[email protected] | fd6d882 | 2012-12-08 06:56:11 | [diff] [blame] | 1459 | # Whether we are using the rlz library or not. Platforms like Android send |
| 1460 | # rlz codes for searches but do not use the library. |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1461 | 'enable_rlz%': 0, |
| 1462 | |
[email protected] | 3b4038e | 2013-07-28 08:59:54 | [diff] [blame] | 1463 | # Turns on the i18n support in V8. |
| 1464 | 'v8_enable_i18n_support': 1, |
| 1465 | |
[email protected] | 6a69491 | 2014-01-17 14:17:40 | [diff] [blame] | 1466 | # Compile d8 for the host toolset. |
| 1467 | 'v8_toolset_for_d8': 'host', |
| 1468 | |
[email protected] | 2c14260f | 2013-09-11 11:48:22 | [diff] [blame] | 1469 | # Use brlapi from brltty for braille display support. |
| 1470 | 'use_brlapi%': 0, |
| 1471 | |
[email protected] | c66b5aa | 2013-09-12 13:29:41 | [diff] [blame] | 1472 | # Relative path to icu.gyp from this file. |
| 1473 | 'icu_gyp_path': '../third_party/icu/icu.gyp', |
| 1474 | |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 1475 | # IPC fuzzer is disabled by default. |
| 1476 | 'enable_ipc_fuzzer%': 0, |
| 1477 | |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 1478 | # Force disable libstdc++ debug mode. |
| 1479 | 'disable_glibcxx_debug%': 0, |
| 1480 | |
[email protected] | 8063669f | 2014-04-01 01:50:29 | [diff] [blame] | 1481 | # Set to 1 to compile with MSE support for MPEG2 TS |
| 1482 | 'enable_mpeg2ts_stream_parser%': 0, |
| 1483 | |
[email protected] | ec13bd7 | 2014-04-16 19:04:30 | [diff] [blame] | 1484 | # Support ChromeOS touchpad gestures with ozone. |
| 1485 | 'use_evdev_gestures%': 0, |
| 1486 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1487 | # Default ozone platform (if no --ozone-platform flag). |
| 1488 | 'ozone_platform%': "", |
| 1489 | |
| 1490 | # Ozone platforms to include in the build. |
| 1491 | 'ozone_platform_caca%': 0, |
| 1492 | 'ozone_platform_dri%': 0, |
| 1493 | 'ozone_platform_egltest%': 0, |
[email protected] | 26ce20d5 | 2014-05-29 17:22:50 | [diff] [blame] | 1494 | 'ozone_platform_gbm%': 0, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1495 | 'ozone_platform_ozonex%': 0, |
| 1496 | 'ozone_platform_test%': 0, |
| 1497 | |
andresantoso | f1501341 | 2014-11-13 02:14:56 | [diff] [blame] | 1498 | # Whether the browser is non-native (using Views Toolkit) on Mac. |
| 1499 | 'mac_views_browser%': 0, |
| 1500 | |
derat | 77f15bd | 2014-11-13 00:04:16 | [diff] [blame] | 1501 | # Experiment: http://crbug.com/426914 |
| 1502 | 'envoy%': 0, |
| 1503 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1504 | 'conditions': [ |
sebmarchand | 153e1b8 | 2014-10-31 20:25:52 | [diff] [blame] | 1505 | ['buildtype=="Official"', { |
| 1506 | # Continue to embed build meta data in Official builds, basically the |
| 1507 | # time it was built. |
| 1508 | # TODO(maruel): This decision should be revisited because having an |
| 1509 | # official deterministic build has high value too but MSVC toolset can't |
| 1510 | # generate anything deterministic with WPO enabled AFAIK. |
| 1511 | 'dont_embed_build_metadata%': 0, |
| 1512 | }], |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1513 | # Enable the Syzygy optimization step for the official builds. |
| 1514 | ['OS=="win" and buildtype=="Official" and syzyasan!=1', { |
| 1515 | 'syzygy_optimize%': 1, |
| 1516 | }, { |
| 1517 | 'syzygy_optimize%': 0, |
| 1518 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1519 | # Get binutils version so we can enable debug fission if we can. |
| 1520 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
| 1521 | 'conditions': [ |
| 1522 | # compiler_version doesn't work with clang |
| 1523 | # TODO(mithro): Land https://codereview.chromium.org/199793014/ so |
| 1524 | # compiler_version works with clang. |
| 1525 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so |
| 1526 | # that it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1527 | ['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] | 1528 | 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)', |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1529 | }], |
| 1530 | # On Android we know the binutils version in the toolchain. |
| 1531 | ['OS=="android"', { |
| 1532 | 'binutils_version%': 222, |
| 1533 | }], |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 1534 | ['host_arch=="x64"', { |
| 1535 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1536 | }], |
| 1537 | ['host_arch=="ia32"', { |
| 1538 | 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', |
| 1539 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1540 | # Our version of binutils in third_party/binutils |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1541 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1542 | 'binutils_version%': 224, |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1543 | }], |
| 1544 | ], |
| 1545 | }, { |
| 1546 | 'binutils_version%': 0, |
| 1547 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1548 | # The version of GCC in use, set later in platforms that use GCC and have |
| 1549 | # not explicitly chosen to build with clang. Currently, this means all |
| 1550 | # platforms except Windows, Mac and iOS. |
| 1551 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| 1552 | # it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1553 | ['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] | 1554 | 'conditions': [ |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1555 | ['OS=="android" and android_webview_build==0', { |
| 1556 | 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
| 1557 | # We directly set the gcc version since we know what we use. |
| 1558 | 'gcc_version%': 49, |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1559 | }], |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1560 | ['OS=="android" and android_webview_build==1', { |
torne | ed51a58 | 2014-08-28 18:28:17 | [diff] [blame] | 1561 | # Android WebView uses a hermetic clang toolchain for host builds. |
| 1562 | 'host_gcc_version%': 0, |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1563 | # Android WebView uses the GCC toolchain from the Android build. |
| 1564 | 'gcc_version%': 48, |
| 1565 | }], |
| 1566 | ['OS!="android"', { |
[email protected] | 313fcf63 | 2014-05-27 13:58:59 | [diff] [blame] | 1567 | 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1568 | 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
[email protected] | 313fcf63 | 2014-05-27 13:58:59 | [diff] [blame] | 1569 | }], |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1570 | ], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1571 | }, { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1572 | 'host_gcc_version%': 0, |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1573 | 'gcc_version%': 0, |
| 1574 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1575 | ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1576 | 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| 1577 | }, { |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 1578 | 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.1', |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1579 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1580 | ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1581 | 'directx_sdk_path%': '<(directx_sdk_default_path)', |
| 1582 | }, { |
| 1583 | 'directx_sdk_path%': '$(DXSDK_DIR)', |
| 1584 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1585 | ['OS=="win"', { |
| 1586 | 'windows_driver_kit_path%': '$(WDK_DIR)', |
| 1587 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1588 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1589 | 'conditions': [ |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1590 | ['target_arch=="mipsel" or target_arch=="mips64el"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1591 | 'werror%': '', |
| 1592 | 'disable_nacl%': 1, |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1593 | 'nacl_untrusted_build%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1594 | 'use_allocator%': 'none', |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 1595 | }], |
| 1596 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1597 | 'sysroot%': '<(sysroot)', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 1598 | 'CXX%': '<(CXX)', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1599 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1600 | # All Chrome builds have breakpad symbols, but only process the |
| 1601 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 1602 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1603 | 'linux_dump_symbols%': 1, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1604 | |
| 1605 | # Omit unwind support in official release builds to save space. We |
| 1606 | # can use breakpad for these builds. |
| 1607 | 'release_unwind_tables%': 0, |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 1608 | |
| 1609 | 'conditions': [ |
| 1610 | # For official builds, use a 64-bit linker to avoid running out |
| 1611 | # of address space. The buildbots should have a 64-bit kernel |
| 1612 | # and a 64-bit libc installed. |
| 1613 | ['host_arch=="ia32" and target_arch=="ia32"', { |
| 1614 | 'linux_use_bundled_gold%': '1', |
| 1615 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1616 | }], |
| 1617 | ], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1618 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1619 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1620 | }], # os_posix==1 and OS!="mac" and OS!="ios" |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 1621 | ['OS=="ios"', { |
| 1622 | 'disable_nacl%': 1, |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 1623 | 'enable_background%': 0, |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1624 | 'icu_use_data_file_flag%': 1, |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1625 | 'enable_web_speech%': 0, |
[email protected] | 4e3996f9 | 2012-07-17 10:41:13 | [diff] [blame] | 1626 | 'use_system_libxml%': 1, |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 1627 | 'use_system_sqlite%': 1, |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1628 | 'locales==': [ |
[email protected] | 47cf7a3 | 2013-09-03 22:16:39 | [diff] [blame] | 1629 | 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX', |
[email protected] | 27a1d6b | 2014-07-23 17:14:53 | [diff] [blame] | 1630 | 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', |
| 1631 | 'nb', 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', |
| 1632 | 'uk', 'vi', 'zh-CN', 'zh-TW', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1633 | ], |
[email protected] | 57871bc | 2012-08-20 16:28:12 | [diff] [blame] | 1634 | |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1635 | # iOS SDK and deployment target support. The |ios_sdk| value is left |
| 1636 | # blank so that when it is set in the project files it will be the |
| 1637 | # "current" iOS SDK. Forcing a specific SDK even if it is "current" |
| 1638 | # causes Xcode to spit out a warning for every single project file for |
| 1639 | # not using the "current" SDK. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1640 | 'ios_sdk%': '', |
| 1641 | 'ios_sdk_path%': '', |
[email protected] | 7c613ee9 | 2014-08-14 21:22:31 | [diff] [blame] | 1642 | 'ios_deployment_target%': '7.0', |
[email protected] | fcd63418 | 2012-10-09 10:50:32 | [diff] [blame] | 1643 | |
| 1644 | 'conditions': [ |
| 1645 | # ios_product_name is set to the name of the .app bundle as it should |
| 1646 | # appear on disk. |
| 1647 | ['branding=="Chrome"', { |
| 1648 | 'ios_product_name%': 'Chrome', |
| 1649 | }, { # else: branding!="Chrome" |
| 1650 | 'ios_product_name%': 'Chromium', |
| 1651 | }], |
| 1652 | ['branding=="Chrome" and buildtype=="Official"', { |
| 1653 | 'ios_breakpad%': 1, |
| 1654 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 1655 | 'ios_breakpad%': 0, |
| 1656 | }], |
| 1657 | ], |
| 1658 | }], # OS=="ios" |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1659 | ['OS=="android"', { |
| 1660 | # Location of Android NDK. |
| 1661 | 'variables': { |
| 1662 | 'variables': { |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1663 | # Unfortunately we have to use absolute paths to the SDK/NDK because |
| 1664 | # they're passed to ant which uses a different relative path from |
| 1665 | # gyp. |
| 1666 | 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', |
| 1667 | 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', |
| 1668 | 'android_host_arch%': '<!(uname -m)', |
| 1669 | # Android API-level of the SDK used for compilation. |
aurimas | 1030b8f | 2014-10-18 01:11:49 | [diff] [blame] | 1670 | 'android_sdk_version%': '21', |
fdegans | 27660a3 | 2014-10-24 13:00:18 | [diff] [blame] | 1671 | 'android_sdk_build_tools_version%': '21.0.1', |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1672 | 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1673 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1674 | # Copy conditionally-set variables out one scope. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1675 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1676 | 'android_sdk_root%': '<(android_sdk_root)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1677 | 'android_sdk_version%': '<(android_sdk_version)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1678 | 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1679 | 'host_os%': '<(host_os)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1680 | |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1681 | 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', |
[email protected] | aeaf0121 | 2014-02-19 00:52:52 | [diff] [blame] | 1682 | # Android SDK build tools (e.g. dx, aapt, aidl) |
| 1683 | 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1684 | |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1685 | # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1686 | # platform requirement for Chrome on Android, we use it for native |
| 1687 | # code compilation. |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1688 | 'conditions': [ |
| 1689 | ['target_arch == "ia32"', { |
| 1690 | 'android_app_abi%': 'x86', |
| 1691 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1692 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1693 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1694 | '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] | 1695 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 1696 | ['target_arch == "x64"', { |
| 1697 | 'android_app_abi%': 'x86_64', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1698 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver', |
fdegans | 27660a3 | 2014-10-24 13:00:18 | [diff] [blame] | 1699 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-x86_64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1700 | 'android_ndk_lib_dir%': 'usr/lib64', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1701 | '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] | 1702 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1703 | ['target_arch=="arm"', { |
| 1704 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1705 | ['arm_version<7', { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1706 | 'android_app_abi%': 'armeabi', |
| 1707 | }, { |
| 1708 | 'android_app_abi%': 'armeabi-v7a', |
| 1709 | }], |
| 1710 | ], |
| 1711 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1712 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1713 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1714 | '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] | 1715 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 1716 | ['target_arch == "arm64"', { |
[email protected] | fa84609 | 2014-03-25 04:01:00 | [diff] [blame] | 1717 | 'android_app_abi%': 'arm64-v8a', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1718 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver', |
fdegans | 27660a3 | 2014-10-24 13:00:18 | [diff] [blame] | 1719 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-arm64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1720 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 84b50a58 | 2014-07-17 23:45:37 | [diff] [blame] | 1721 | '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] | 1722 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1723 | ['target_arch == "mipsel"', { |
| 1724 | 'android_app_abi%': 'mips', |
| 1725 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', |
| 1726 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1727 | 'android_ndk_lib_dir%': 'usr/lib', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 1728 | '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] | 1729 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1730 | ['target_arch == "mips64el"', { |
| 1731 | 'android_app_abi%': 'mips64', |
| 1732 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips64/gdbserver/gdbserver', |
fdegans | 27660a3 | 2014-10-24 13:00:18 | [diff] [blame] | 1733 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-21/arch-mips64', |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1734 | 'android_ndk_lib_dir%': 'usr/lib64', |
| 1735 | 'android_toolchain%': '<(android_ndk_root)/toolchains/mips64el-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1736 | 'gcc_version%': 49, |
| 1737 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1738 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1739 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1740 | # Copy conditionally-set variables out one scope. |
| 1741 | 'android_app_abi%': '<(android_app_abi)', |
| 1742 | 'android_gdbserver%': '<(android_gdbserver)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1743 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 941c6ab | 2014-03-24 04:07:34 | [diff] [blame] | 1744 | 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1745 | 'android_sdk_root%': '<(android_sdk_root)', |
| 1746 | 'android_sdk_version%': '<(android_sdk_version)', |
| 1747 | 'android_toolchain%': '<(android_toolchain)', |
| 1748 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1749 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1750 | 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1751 | 'android_sdk_tools%': '<(android_sdk_tools)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1752 | 'android_sdk%': '<(android_sdk)', |
| 1753 | 'android_sdk_jar%': '<(android_sdk)/android.jar', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1754 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1755 | 'android_stlport_root': '<(android_stlport_root)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1756 | 'android_stlport_include': '<(android_stlport_root)/stlport', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1757 | 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1758 | 'host_os%': '<(host_os)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1759 | |
[email protected] | 8ecd30e | 2014-07-04 19:58:34 | [diff] [blame] | 1760 | # Location of the "objcopy" binary, used by both gyp and scripts. |
| 1761 | 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', |
| 1762 | |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 1763 | # Location of the "strip" binary, used by both gyp and scripts. |
| 1764 | 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1765 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1766 | # Location of the "readelf" binary. |
| 1767 | 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| 1768 | |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1769 | # Determines whether we should optimize JNI generation at the cost of |
| 1770 | # breaking assumptions in the build system that when inputs have changed |
| 1771 | # the outputs should always change as well. This is meant purely for |
| 1772 | # developer builds, to avoid spurious re-linking of native files. |
mlamouri | 2366875 | 2014-08-28 20:56:45 | [diff] [blame] | 1773 | 'optimize_jni_generation%': '<(optimize_jni_generation)', |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1774 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1775 | # Always uses openssl. |
| 1776 | 'use_openssl%': 1, |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1777 | 'use_openssl_certs%': 1, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1778 | |
| 1779 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 9c8eb98 | 2014-07-09 07:51:50 | [diff] [blame] | 1780 | 'safe_browsing%': 1, |
[email protected] | 418653fdf | 2014-07-02 07:38:21 | [diff] [blame] | 1781 | 'enable_web_speech%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1782 | 'java_bridge%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1783 | 'build_ffmpegsumo%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1784 | 'use_allocator%': 'none', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1785 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1786 | # Disable Native Client. |
| 1787 | 'disable_nacl%': 1, |
| 1788 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1789 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1790 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1791 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1792 | # Sessions are store separately in the Java side. |
| 1793 | 'enable_session_service%': 0, |
| 1794 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1795 | 'p2p_apis%' : 0, |
| 1796 | |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1797 | 'gtest_target_type%': 'shared_library', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1798 | |
| 1799 | # Uses system APIs for decoding audio and video. |
| 1800 | 'use_libffmpeg%': '0', |
| 1801 | |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 1802 | # TODO(torne): Remove this unsupported option once all the places that |
| 1803 | # test it have been updated. |
| 1804 | 'use_system_stlport%': 0, |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1805 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1806 | # Copy it out one scope. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1807 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 1808 | |
| 1809 | # Default android linker script for shared library exports. |
| 1810 | 'android_linker_script%': '<(SHARED_INTERMEDIATE_DIR)/android_exports.lst', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1811 | }], # OS=="android" |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1812 | ['embedded==1', { |
| 1813 | 'use_system_fontconfig%': 0, |
| 1814 | }, { |
| 1815 | 'use_system_fontconfig%': 1, |
| 1816 | }], |
| 1817 | ['chromecast==1', { |
[email protected] | bef14159 | 2014-08-15 04:28:01 | [diff] [blame] | 1818 | 'enable_mpeg2ts_stream_parser%': 1, |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1819 | 'ffmpeg_branding%': 'Chrome', |
| 1820 | 'ozone_platform_ozonex%': 1, |
gunsch | b50a4e3f | 2014-09-17 04:05:28 | [diff] [blame] | 1821 | 'use_playready%': 0, |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1822 | 'conditions': [ |
| 1823 | ['target_arch=="arm"', { |
| 1824 | 'arm_arch%': '', |
| 1825 | 'arm_tune%': 'cortex-a9', |
| 1826 | 'arm_thumb%': 1, |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1827 | 'video_hole%': 1, |
| 1828 | }], |
| 1829 | ], |
| 1830 | }], |
hjd | 46eac8f | 2014-09-09 15:42:31 | [diff] [blame] | 1831 | ['android_webview_build==1', { |
[email protected] | b313955 | 2013-05-30 14:16:12 | [diff] [blame] | 1832 | # When building the WebView in the Android tree, jarjar will remap all |
| 1833 | # the class names, so the JNI generator needs to know this. |
| 1834 | 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
| 1835 | }], |
[email protected] | b9b8f9cf | 2014-07-17 04:42:26 | [diff] [blame] | 1836 | ['OS=="linux" and target_arch!="mipsel"', { |
[email protected] | 5b61a7b | 2014-07-10 07:36:38 | [diff] [blame] | 1837 | # TODO(thakis): This is here to measure perf for a while. |
| 1838 | 'clang%': 1, |
| 1839 | }], # OS=="mac" |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1840 | ['OS=="mac"', { |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1841 | 'conditions': [ |
| 1842 | # All Chrome builds have breakpad symbols, but only process the |
| 1843 | # symbols from official builds. |
| 1844 | ['(branding=="Chrome" and buildtype=="Official")', { |
| 1845 | 'mac_strip_release%': 1, |
| 1846 | }], |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1847 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1848 | }], # OS=="mac" |
| 1849 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1850 | 'clang%': 1, |
| 1851 | |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1852 | 'variables': { |
| 1853 | # Mac OS X SDK and deployment target support. The SDK identifies |
| 1854 | # the version of the system headers that will be used, and |
| 1855 | # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
| 1856 | # macro. "Maximum allowed" refers to the operating system version |
| 1857 | # whose APIs are available in the headers. The deployment target |
| 1858 | # identifies the minimum system version that the built products are |
| 1859 | # expected to function on. It corresponds to the |
| 1860 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
| 1861 | # macros are available, #include <AvailabilityMacros.h>. Additional |
| 1862 | # documentation on these macros is available at |
| 1863 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 1864 | # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
| 1865 | # deployment target to 10.6. Other projects, such as O3D, may |
| 1866 | # override these defaults. |
| 1867 | |
| 1868 | # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
| 1869 | # about that is at least the specified version. In official builds, |
| 1870 | # the SDK must match mac_sdk_min exactly. If the SDK is installed |
| 1871 | # someplace that Xcode doesn't know about, set mac_sdk_path to the |
| 1872 | # path to the SDK; when set to a non-empty string, SDK detection |
| 1873 | # based on mac_sdk_min will be bypassed entirely. |
lliabraa | 3a721cde | 2014-10-16 16:46:48 | [diff] [blame] | 1874 | 'conditions': [ |
| 1875 | ['OS=="ios"', { |
| 1876 | 'mac_sdk_min%': '10.8', |
| 1877 | }, { # else OS!="ios" |
| 1878 | 'mac_sdk_min%': '10.6', |
| 1879 | }], |
| 1880 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1881 | 'mac_sdk_path%': '', |
| 1882 | |
| 1883 | 'mac_deployment_target%': '10.6', |
| 1884 | }, |
| 1885 | |
| 1886 | 'mac_sdk_min': '<(mac_sdk_min)', |
| 1887 | 'mac_sdk_path': '<(mac_sdk_path)', |
| 1888 | 'mac_deployment_target': '<(mac_deployment_target)', |
| 1889 | |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1890 | # Compile in Breakpad support by default so that it can be |
| 1891 | # tested, even if it is not enabled by default at runtime. |
| 1892 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1893 | 'conditions': [ |
| 1894 | # mac_product_name is set to the name of the .app bundle as it should |
| 1895 | # appear on disk. This duplicates data from |
| 1896 | # chrome/app/theme/chromium/BRANDING and |
| 1897 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 1898 | # these names into the build system. |
| 1899 | ['branding=="Chrome"', { |
| 1900 | 'mac_product_name%': 'Google Chrome', |
| 1901 | }, { # else: branding!="Chrome" |
| 1902 | 'mac_product_name%': 'Chromium', |
| 1903 | }], |
lliabraa | 3a721cde | 2014-10-16 16:46:48 | [diff] [blame] | 1904 | # Official mac builds require a specific OS X SDK, but iOS and |
| 1905 | # non-official mac builds do not. |
lliabraa | 0c127e9 | 2014-10-16 17:16:31 | [diff] [blame] | 1906 | ['branding=="Chrome" and buildtype=="Official" and OS=="mac"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1907 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', |
lliabraa | 3a721cde | 2014-10-16 16:46:48 | [diff] [blame] | 1908 | }, { |
| 1909 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
| 1910 | }], |
| 1911 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1912 | # Enable uploading crash dumps. |
| 1913 | 'mac_breakpad_uploads%': 1, |
| 1914 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1915 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1916 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1917 | 'mac_keystone%': 1, |
| 1918 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1919 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1920 | 'mac_breakpad%': 0, |
| 1921 | 'mac_keystone%': 0, |
| 1922 | }], |
| 1923 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1924 | }], # OS=="mac" or OS=="ios" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1925 | ['OS=="win"', { |
| 1926 | 'conditions': [ |
[email protected] | a7a15f3 | 2013-08-06 06:09:43 | [diff] [blame] | 1927 | # This is the architecture convention used in WinSDK paths. |
| 1928 | ['target_arch=="ia32"', { |
| 1929 | 'winsdk_arch%': 'x86', |
| 1930 | },{ |
| 1931 | 'winsdk_arch%': '<(target_arch)', |
| 1932 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1933 | ['component=="shared_library"', { |
| 1934 | 'win_use_allocator_shim%': 0, |
[email protected] | 45b7c52 | 2013-08-21 06:58:22 | [diff] [blame] | 1935 | },{ |
| 1936 | # Turn on multiple dll by default on Windows when in static_library. |
| 1937 | 'chrome_multiple_dll%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1938 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 1939 | ['asan==1', { |
| 1940 | 'win_use_allocator_shim%': 0, |
| 1941 | }], |
scottmg | f01a9ae | 2014-09-19 23:49:50 | [diff] [blame] | 1942 | ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
| 1943 | # Only enabled by default for ninja because it's buggy in VS. |
| 1944 | # Not enabled for component=static_library because some targets |
| 1945 | # are too large and the toolchain fails due to the size of the |
| 1946 | # .obj files. |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1947 | 'incremental_chrome_dll%': 1, |
| 1948 | }], |
[email protected] | a96cf142 | 2013-11-08 08:55:41 | [diff] [blame] | 1949 | # Don't do incremental linking for large modules on 32-bit or when |
| 1950 | # component=static_library as the toolchain fails due to the size of |
| 1951 | # the .ilk files. |
| 1952 | ['MSVS_OS_BITS==32 or component=="static_library"', { |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1953 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 1954 | },{ |
| 1955 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 1956 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1957 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1958 | 'nacl_win64_defines': [ |
| 1959 | # This flag is used to minimize dependencies when building |
| 1960 | # Native Client loader for 64-bit Windows. |
| 1961 | 'NACL_WIN64', |
| 1962 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1963 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1964 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 1965 | ['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] | 1966 | 'use_cups%': 1, |
| 1967 | }, { |
| 1968 | 'use_cups%': 0, |
| 1969 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1970 | |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 1971 | ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', { |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1972 | 'enable_pepper_cdms%': 1, |
| 1973 | }, { |
| 1974 | 'enable_pepper_cdms%': 0, |
| 1975 | }], |
| 1976 | |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 1977 | ['OS=="android"', { |
| 1978 | 'enable_browser_cdms%': 1, |
| 1979 | }, { |
| 1980 | 'enable_browser_cdms%': 0, |
| 1981 | }], |
| 1982 | |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1983 | # Native Client glibc toolchain is enabled |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 1984 | # by default except on arm, mips and mips64. |
| 1985 | ['target_arch=="arm" or target_arch=="mipsel" or target_arch=="mips64el"', { |
[email protected] | 2f7da67 | 2012-06-21 08:38:32 | [diff] [blame] | 1986 | 'disable_glibc%': 1, |
| 1987 | }, { |
| 1988 | 'disable_glibc%': 0, |
| 1989 | }], |
| 1990 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1991 | # Set the relative path from this file to the GYP file of the JPEG |
| 1992 | # library used by Chromium. |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1993 | ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
| 1994 | # Configuration for using the system libjeg is here. |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1995 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1996 | }, { |
| 1997 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 1998 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1999 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 2000 | # Options controlling the use of GConf (the classic GNOME configuration |
| 2001 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 2002 | ['chromeos==1 or embedded==1', { |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 2003 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 2004 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 2005 | }, { |
| 2006 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 2007 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 2008 | }], |
| 2009 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 2010 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 2011 | ['branding=="Chrome"', { |
| 2012 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 2013 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 2014 | 'grit_defines': ['-D', '_google_chrome', |
| 2015 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 2016 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 2017 | 'grit_defines': ['-D', '_chromium', |
| 2018 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 2019 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2020 | ['chromeos==1', { |
[email protected] | d4d81e9 | 2012-06-04 20:10:13 | [diff] [blame] | 2021 | 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2022 | }], |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 2023 | ['desktop_linux==1', { |
| 2024 | 'grit_defines': ['-D', 'desktop_linux'], |
| 2025 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2026 | ['toolkit_views==1', { |
| 2027 | 'grit_defines': ['-D', 'toolkit_views'], |
| 2028 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 2029 | ['use_aura==1', { |
| 2030 | 'grit_defines': ['-D', 'use_aura'], |
| 2031 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2032 | ['use_ash==1', { |
| 2033 | 'grit_defines': ['-D', 'use_ash'], |
| 2034 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 2035 | ['use_nss==1', { |
| 2036 | 'grit_defines': ['-D', 'use_nss'], |
| 2037 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2038 | ['use_ozone==1', { |
| 2039 | 'grit_defines': ['-D', 'use_ozone'], |
| 2040 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2041 | ['image_loader_extension==1', { |
| 2042 | 'grit_defines': ['-D', 'image_loader_extension'], |
| 2043 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 2044 | ['remoting==1', { |
| 2045 | 'grit_defines': ['-D', 'remoting'], |
| 2046 | }], |
joleksy | a91e868 | 2014-09-10 13:48:41 | [diff] [blame] | 2047 | ['use_titlecase_in_grd==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 2048 | 'grit_defines': ['-D', 'use_titlecase'], |
| 2049 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 2050 | ['use_third_party_translations==1', { |
| 2051 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 2052 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 2053 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 2054 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 2055 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 2056 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2057 | ['OS=="android"', { |
newt | 0548dfae | 2014-11-07 03:39:09 | [diff] [blame] | 2058 | 'grit_defines': [ |
| 2059 | '-t', 'android', |
| 2060 | '-E', 'ANDROID_JAVA_TAGGED_ONLY=true', |
| 2061 | '--no-output-all-resource-defines', |
| 2062 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2063 | }], |
[email protected] | cc1f057 | 2013-07-31 05:41:03 | [diff] [blame] | 2064 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d39e386 | 2012-06-26 22:38:23 | [diff] [blame] | 2065 | 'grit_defines': ['-D', 'scale_factors=2x'], |
| 2066 | }], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2067 | ['OS == "ios"', { |
| 2068 | 'grit_defines': [ |
[email protected] | 03334690 | 2013-08-20 01:01:12 | [diff] [blame] | 2069 | '-t', 'ios', |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2070 | # iOS uses a whitelist to filter resources. |
lliabraa | 59d7c37 | 2014-11-07 16:28:27 | [diff] [blame] | 2071 | '-w', '<(DEPTH)/build/ios/grit_whitelist.txt', |
| 2072 | '--no-output-all-resource-defines', |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2073 | ], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2074 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 2075 | # Enable host builds when generating with ninja-ios. |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2076 | 'conditions': [ |
| 2077 | ['"<(GENERATOR)"=="ninja"', { |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2078 | 'host_os%': "mac", |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 2079 | }], |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 2080 | |
| 2081 | # TODO(sdefresne): Remove the target_subarch check once Apple has |
| 2082 | # upstreamed the support for "arm64". http://crbug.com/341453 |
| 2083 | ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', { |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 2084 | 'clang_xcode%': 1, |
| 2085 | }], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 2086 | ], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2087 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2088 | ['enable_extensions==1', { |
| 2089 | 'grit_defines': ['-D', 'enable_extensions'], |
| 2090 | }], |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2091 | ['enable_plugins!=0', { |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2092 | 'grit_defines': ['-D', 'enable_plugins'], |
| 2093 | }], |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 2094 | ['enable_basic_printing==1 or enable_print_preview==1', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2095 | 'grit_defines': ['-D', 'enable_printing'], |
| 2096 | }], |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 2097 | ['enable_print_preview==1', { |
vitalybuka | e29991c | 2014-11-05 21:15:12 | [diff] [blame] | 2098 | 'grit_defines': ['-D', 'enable_print_preview'], |
[email protected] | b429eb19b | 2014-01-27 21:07:50 | [diff] [blame] | 2099 | }], |
[email protected] | c2aad54 | 2012-07-31 20:40:33 | [diff] [blame] | 2100 | ['enable_themes==1', { |
| 2101 | 'grit_defines': ['-D', 'enable_themes'], |
| 2102 | }], |
[email protected] | ef1dd506 | 2012-12-17 06:41:33 | [diff] [blame] | 2103 | ['enable_app_list==1', { |
| 2104 | 'grit_defines': ['-D', 'enable_app_list'], |
| 2105 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2106 | ['enable_settings_app==1', { |
| 2107 | 'grit_defines': ['-D', 'enable_settings_app'], |
| 2108 | }], |
[email protected] | 5411d820 | 2013-01-30 01:32:15 | [diff] [blame] | 2109 | ['enable_google_now==1', { |
| 2110 | 'grit_defines': ['-D', 'enable_google_now'], |
| 2111 | }], |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 2112 | ['use_concatenated_impulse_responses==1', { |
| 2113 | 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], |
| 2114 | }], |
[email protected] | f66ddbd | 2013-06-27 14:17:04 | [diff] [blame] | 2115 | ['enable_webrtc==1', { |
| 2116 | 'grit_defines': ['-D', 'enable_webrtc'], |
| 2117 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2118 | ['enable_hangout_services_extension==1', { |
| 2119 | 'grit_defines': ['-D', 'enable_hangout_services_extension'], |
| 2120 | }], |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 2121 | ['enable_task_manager==1', { |
| 2122 | 'grit_defines': ['-D', 'enable_task_manager'], |
| 2123 | }], |
[email protected] | 335b687 | 2014-02-13 20:14:13 | [diff] [blame] | 2124 | ['notifications==1', { |
| 2125 | 'grit_defines': ['-D', 'enable_notifications'], |
| 2126 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2127 | ['enable_wifi_bootstrapping==1', { |
| 2128 | 'grit_defines': ['-D', 'enable_wifi_bootstrapping'], |
| 2129 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2130 | ['enable_resource_whitelist_generation==1 and OS!="win"', { |
[email protected] | e4fdab9 | 2014-04-04 00:52:22 | [diff] [blame] | 2131 | '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] | 2132 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2133 | ['enable_resource_whitelist_generation==1 and OS=="win"', { |
| 2134 | 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'], |
| 2135 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2136 | ['enable_mdns==1 or OS=="mac"', { |
| 2137 | 'grit_defines': ['-D', 'enable_service_discovery'], |
| 2138 | 'enable_service_discovery%': 1 |
| 2139 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 2140 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 7d389e2 | 2013-05-15 00:45:07 | [diff] [blame] | 2141 | 'clang_chrome_plugins_flags': [ |
| 2142 | '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 2143 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2144 | }], |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2145 | ['asan==1 or msan==1 or lsan==1 or tsan==1', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2146 | 'clang%': 1, |
[email protected] | 3a0278b1 | 2014-05-20 15:37:58 | [diff] [blame] | 2147 | 'use_allocator%': 'none', |
glider | 7dbed157 | 2014-09-23 16:38:11 | [diff] [blame] | 2148 | 'use_sanitizer_options%': 1, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2149 | }], |
[email protected] | 17b15a16 | 2014-07-24 15:41:42 | [diff] [blame] | 2150 | ['asan==1 and OS=="linux" and chromeos==0', { |
[email protected] | 49d75ae | 2014-07-22 13:28:08 | [diff] [blame] | 2151 | 'use_custom_libcxx%': 1, |
| 2152 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 2153 | ['ubsan==1', { |
| 2154 | 'clang%': 1, |
| 2155 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2156 | ['ubsan_vptr==1', { |
| 2157 | 'clang%': 1, |
| 2158 | }], |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2159 | ['asan==1 and OS=="mac"', { |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 2160 | # TODO(glider): we do not strip ASan binaries until the dynamic ASan |
| 2161 | # runtime is fully adopted. See http://crbug.com/242503. |
jiayl | 55c7faa | 2014-09-24 16:25:18 | [diff] [blame] | 2162 | 'mac_strip_release': 0, |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2163 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2164 | ['tsan==1', { |
[email protected] | 193149c | 2014-04-08 23:56:09 | [diff] [blame] | 2165 | 'use_custom_libcxx%': 1, |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2166 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2167 | ['msan==1', { |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2168 | # Use a just-built, MSan-instrumented libc++ instead of the system-wide |
| 2169 | # libstdc++. This is required to avoid false positive reports whenever |
| 2170 | # the C++ standard library is used. |
| 2171 | 'use_custom_libcxx%': 1, |
| 2172 | # Running the V8-generated code on an ARM simulator is a powerful hack |
| 2173 | # that allows the tool to see the memory accesses from JITted code. |
| 2174 | # Without this flag, JS code causes false positive reports from MSan. |
| 2175 | 'v8_target_arch': 'arm64', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2176 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2177 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2178 | ['OS=="linux" and clang_type_profiler==1', { |
| 2179 | 'clang%': 1, |
| 2180 | 'clang_use_chrome_plugins%': 0, |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 2181 | 'conditions': [ |
| 2182 | ['host_arch=="x64"', { |
| 2183 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 2184 | }], |
| 2185 | ['host_arch=="ia32"', { |
| 2186 | # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 2187 | # Clang in this directory at your own risk if needed for some |
| 2188 | # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 2189 | # usage). Any failure by this compiler should not close the tree. |
| 2190 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 2191 | }], |
| 2192 | ], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2193 | }], |
| 2194 | |
[email protected] | 85a75e57 | 2014-05-06 20:13:38 | [diff] [blame] | 2195 | ['OS=="win"', { |
| 2196 | # The Clang plugins don't currently work on Windows. |
| 2197 | # TODO(hans): One day, this will work. (crbug.com/82385) |
| 2198 | 'clang_use_chrome_plugins%': 0, |
| 2199 | }], |
| 2200 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2201 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 2202 | # much and make the stacks harder to figure out. |
| 2203 | # |
| 2204 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 2205 | # them under a build_for_tool== condition. |
| 2206 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 2207 | # gcc flags |
| 2208 | 'mac_debug_optimization': '1', |
| 2209 | 'mac_release_optimization': '1', |
| 2210 | 'release_optimize': '1', |
| 2211 | 'no_gc_sections': 1, |
| 2212 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2213 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2214 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2215 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2216 | |
| 2217 | # MSVS flags for TSan on Pin and Windows. |
| 2218 | 'win_debug_RuntimeChecks': '0', |
| 2219 | 'win_debug_disable_iterator_debugging': '1', |
| 2220 | 'win_debug_Optimization': '1', |
| 2221 | 'win_debug_InlineFunctionExpansion': '0', |
| 2222 | 'win_release_InlineFunctionExpansion': '0', |
| 2223 | 'win_release_OmitFramePointers': '0', |
| 2224 | |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2225 | 'use_allocator': 'tcmalloc', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2226 | 'release_valgrind_build': 1, |
| 2227 | 'werror': '', |
| 2228 | 'component': 'static_library', |
| 2229 | 'use_system_zlib': 0, |
| 2230 | }], |
| 2231 | |
| 2232 | # Build tweaks for DrMemory. |
| 2233 | # TODO(rnk): Combine with tsan config to share the builder. |
| 2234 | # http://crbug.com/108155 |
| 2235 | ['build_for_tool=="drmemory"', { |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2236 | # These runtime checks force initialization of stack vars which blocks |
| 2237 | # DrMemory's uninit detection. |
| 2238 | 'win_debug_RuntimeChecks': '0', |
[email protected] | 49605d4 | 2013-10-18 13:58:17 | [diff] [blame] | 2239 | # Iterator debugging is slow. |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2240 | 'win_debug_disable_iterator_debugging': '1', |
| 2241 | # Try to disable optimizations that mess up stacks in a release build. |
[email protected] | c13d0030 | 2012-10-18 15:45:16 | [diff] [blame] | 2242 | # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) |
| 2243 | # /O2 and /Ob0 (disable inline) cannot be used together because of a |
| 2244 | # compiler bug, so we use /Ob1 instead. |
| 2245 | 'win_release_InlineFunctionExpansion': '1', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2246 | 'win_release_OmitFramePointers': '0', |
[email protected] | 6bf3373d | 2012-08-15 22:27:50 | [diff] [blame] | 2247 | # Ditto for debug, to support bumping win_debug_Optimization. |
| 2248 | 'win_debug_InlineFunctionExpansion': 0, |
| 2249 | 'win_debug_OmitFramePointers': 0, |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2250 | # Keep the code under #ifndef NVALGRIND. |
| 2251 | 'release_valgrind_build': 1, |
| 2252 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2253 | |
[email protected] | fcc89bf | 2013-10-30 17:37:21 | [diff] [blame] | 2254 | # Enable RLZ on Win, Mac, iOS and ChromeOS. |
| 2255 | ['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] | 2256 | 'enable_rlz%': 1, |
| 2257 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2258 | |
| 2259 | # Set default compiler flags depending on ARM version. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2260 | ['arm_version==6 and android_webview_build==0', { |
| 2261 | 'arm_arch%': 'armv6', |
| 2262 | 'arm_tune%': '', |
[email protected] | 70f970d | 2013-12-16 14:11:38 | [diff] [blame] | 2263 | 'arm_fpu%': 'vfp', |
| 2264 | 'arm_float_abi%': 'softfp', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2265 | 'arm_thumb%': 0, |
| 2266 | }], |
| 2267 | ['arm_version==7 and android_webview_build==0', { |
| 2268 | 'arm_arch%': 'armv7-a', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 2269 | 'arm_tune%': 'generic-armv7-a', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2270 | 'conditions': [ |
| 2271 | ['arm_neon==1', { |
| 2272 | 'arm_fpu%': 'neon', |
| 2273 | }, { |
| 2274 | 'arm_fpu%': 'vfpv3-d16', |
| 2275 | }], |
| 2276 | ], |
[email protected] | 3f85dac3 | 2013-10-29 02:38:46 | [diff] [blame] | 2277 | # Change the default to hard once the armhf transition is complete. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2278 | 'arm_float_abi%': 'softfp', |
| 2279 | 'arm_thumb%': 1, |
| 2280 | }], |
| 2281 | |
Gordana.Cmiljanovic | aaea927 | 2014-11-20 19:12:58 | [diff] [blame] | 2282 | # Set default compiler flags depending on MIPS architecture variant. |
| 2283 | ['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_build==0', { |
| 2284 | 'mips_fpu_mode%': 'fp32', |
| 2285 | }], |
| 2286 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2287 | ['android_webview_build==1', { |
| 2288 | # The WebView build gets its cpu-specific flags from the Android build system. |
| 2289 | 'arm_arch%': '', |
| 2290 | 'arm_tune%': '', |
| 2291 | 'arm_fpu%': '', |
| 2292 | 'arm_float_abi%': '', |
| 2293 | 'arm_thumb%': 0, |
Gordana.Cmiljanovic | aaea927 | 2014-11-20 19:12:58 | [diff] [blame] | 2294 | 'mips_fpu_mode%': '', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2295 | }], |
[email protected] | 5ac4b90 | 2013-10-22 17:21:29 | [diff] [blame] | 2296 | |
| 2297 | # Enable brlapi by default for chromeos. |
| 2298 | [ 'chromeos==1', { |
| 2299 | 'use_brlapi%': 1, |
| 2300 | }], |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 2301 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2302 | ['use_ozone==1 and ozone_auto_platforms==1', { |
| 2303 | # Use test as the default platform. |
| 2304 | 'ozone_platform%': 'test', |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2305 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2306 | # Build all platforms whose deps are in install-build-deps.sh. |
| 2307 | # Only these platforms will be compile tested by buildbots. |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2308 | 'ozone_platform_dri%': 1, |
| 2309 | 'ozone_platform_test%': 1, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2310 | 'ozone_platform_egltest%': 1, |
| 2311 | }], |
| 2312 | |
[email protected] | da7aed4 | 2013-12-17 22:28:31 | [diff] [blame] | 2313 | ['desktop_linux==1 and use_aura==1 and use_x11==1', { |
| 2314 | 'use_clipboard_aurax11%': 1, |
| 2315 | }], |
| 2316 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2317 | ['OS=="win" and use_goma==1', { |
| 2318 | # goma doesn't support pch yet. |
| 2319 | 'chromium_win_pch': 0, |
| 2320 | # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| 2321 | 'conditions': [ |
scottmg | e14e79b | 2014-09-15 23:10:17 | [diff] [blame] | 2322 | ['win_z7==0 and fastbuild==0', { |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 2323 | 'fastbuild': 1, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2324 | }], |
| 2325 | ], |
| 2326 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2327 | |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 2328 | ['OS=="win" and (clang==1 or asan==1)', { |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2329 | 'chromium_win_pch': 0, |
| 2330 | }], |
| 2331 | |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 2332 | ['host_clang==1', { |
| 2333 | 'host_cc': '<(make_clang_dir)/bin/clang', |
| 2334 | 'host_cxx': '<(make_clang_dir)/bin/clang++', |
| 2335 | }, { |
| 2336 | 'host_cc': '<!(which gcc)', |
| 2337 | 'host_cxx': '<!(which g++)', |
| 2338 | }], |
| 2339 | |
leecam | e6f6b73 | 2014-08-24 23:38:09 | [diff] [blame] | 2340 | # The seccomp-bpf sandbox is only supported on five architectures |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 2341 | # currently. |
| 2342 | # Do not disable seccomp_bpf anywhere without talking to |
| 2343 | # [email protected]! |
| 2344 | ['((OS=="linux" or OS=="android") and ' |
| 2345 | '(target_arch=="ia32" or target_arch=="x64" or ' |
leecam | e6f6b73 | 2014-08-24 23:38:09 | [diff] [blame] | 2346 | 'target_arch=="arm" or target_arch=="mipsel" or ' |
| 2347 | 'target_arch=="arm64"))', { |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 2348 | 'use_seccomp_bpf%': 1, |
| 2349 | }, { |
| 2350 | 'use_seccomp_bpf%': 0, |
| 2351 | }], |
fdegans | 3572927c | 2014-11-06 12:28:02 | [diff] [blame] | 2352 | |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 2353 | # Set component build with LTO until all tests pass. |
| 2354 | # This also reduces link time. |
| 2355 | ['use_lto==1', { |
| 2356 | 'component%': "shared_library", |
| 2357 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 2358 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2359 | |
the_jk | ffdda02 | 2014-10-03 11:36:19 | [diff] [blame] | 2360 | # older history files use fts2 instead of fts3 |
| 2361 | 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)', |
| 2362 | |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 2363 | # The path to the ANGLE library. |
| 2364 | 'angle_path': '<(DEPTH)/third_party/angle', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2365 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2366 | # List of default apps to install in new profiles. The first list contains |
| 2367 | # 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] | 2368 | # contains the destination location for each of the files. When a crx |
| 2369 | # is added or removed from the list, the chrome/browser/resources/ |
| 2370 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2371 | 'default_apps_list': [ |
| 2372 | 'browser/resources/default_apps/external_extensions.json', |
| 2373 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2374 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2375 | 'browser/resources/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2376 | 'browser/resources/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2377 | 'browser/resources/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2378 | ], |
| 2379 | 'default_apps_list_linux_dest': [ |
| 2380 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 2381 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2382 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2383 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2384 | '<(PRODUCT_DIR)/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2385 | '<(PRODUCT_DIR)/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2386 | ], |
[email protected] | 27572d1 | 2014-08-11 20:36:04 | [diff] [blame] | 2387 | |
| 2388 | # Whether to allow building of the GPU-related isolates. |
| 2389 | 'archive_gpu_tests%': 0, |
leilei | 4003c4f | 2014-09-23 21:33:16 | [diff] [blame] | 2390 | |
fdegans | 3572927c | 2014-11-06 12:28:02 | [diff] [blame] | 2391 | # Whether to allow building of chromoting related isolates. |
leilei | 4003c4f | 2014-09-23 21:33:16 | [diff] [blame] | 2392 | 'archive_chromoting_tests%': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2393 | }, |
| 2394 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2395 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2396 | # The condition that operates on chromium_code is in a target_conditions |
| 2397 | # section, and will not have access to the default fallback value of |
| 2398 | # chromium_code at the top of this file, or to the chromium_code |
| 2399 | # variable placed at the root variables scope of .gyp files, because |
| 2400 | # those variables are not set at target scope. As a workaround, |
| 2401 | # if chromium_code is not set at target scope, define it in target scope |
| 2402 | # to contain whatever value it has during early variable expansion. |
| 2403 | # That's enough to make it available during target conditional |
| 2404 | # processing. |
| 2405 | 'chromium_code%': '<(chromium_code)', |
| 2406 | |
[email protected] | 7cd58be | 2014-03-21 12:39:56 | [diff] [blame] | 2407 | 'component%': '<(component)', |
| 2408 | |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 2409 | 'chromecast%': '<(chromecast)', |
| 2410 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2411 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 2412 | 'win_release_Optimization%': '2', # 2 = /Os |
| 2413 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2414 | |
| 2415 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2416 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 65d61e6 | 2012-06-01 21:52:11 | [diff] [blame] | 2417 | 'win_release_OmitFramePointers%': '0', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2418 | # Tri-state: blank is default, 1 on, 0 off |
| 2419 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2420 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2421 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 2422 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2423 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2424 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2425 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 2426 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2427 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2428 | # VS inserts quite a lot of extra checks to algorithms like |
| 2429 | # std::partial_sort in Debug build which make them O(N^2) |
| 2430 | # instead of O(N*logN). This is particularly slow under memory |
| 2431 | # tools like ThreadSanitizer so we want it to be disablable. |
| 2432 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
[email protected] | 907cb98d | 2014-02-23 07:19:55 | [diff] [blame] | 2433 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2434 | |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 2435 | # An application manifest fragment to declare compatibility settings for |
| 2436 | # 'executable' targets. Ignored in other target type. |
| 2437 | 'win_exe_compatibility_manifest%': |
| 2438 | '<(DEPTH)\\build\\win\\compatibility.manifest', |
| 2439 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2440 | 'release_extra_cflags%': '', |
| 2441 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2442 | |
| 2443 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2444 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2445 | # the non-qualified versions are widely assumed to be *nix-only |
| 2446 | 'win_release_extra_cflags%': '', |
| 2447 | 'win_debug_extra_cflags%': '', |
| 2448 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2449 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 2450 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 2451 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 2452 | # Only used by Windows build for now. Can be used to build into a |
| 2453 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 2454 | # output files in src/build/VS2010_{Debug,Release}. |
| 2455 | 'build_dir_prefix%': '', |
| 2456 | |
[email protected] | 9ac2db69 | 2012-06-08 01:01:57 | [diff] [blame] | 2457 | # Targets are by default not nacl untrusted code. |
| 2458 | 'nacl_untrusted_build%': 0, |
| 2459 | |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2460 | 'pnacl_compile_flags': [ |
[email protected] | 7dcd93c | 2013-11-02 02:05:53 | [diff] [blame] | 2461 | # pnacl uses the clang compiler so we need to suppress all the |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2462 | # same warnings as we do for clang. |
| 2463 | # TODO(sbc): Remove these if/when they are removed from the clang |
| 2464 | # build. |
| 2465 | '-Wno-unused-function', |
| 2466 | '-Wno-char-subscripts', |
| 2467 | '-Wno-c++11-extensions', |
| 2468 | '-Wno-unnamed-type-template-args', |
| 2469 | ], |
| 2470 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2471 | 'conditions': [ |
| 2472 | ['OS=="win" and component=="shared_library"', { |
| 2473 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 2474 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 2475 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2476 | }, { |
| 2477 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 2478 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 2479 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 2480 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2481 | ['OS=="ios"', { |
| 2482 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2483 | 'mac_release_optimization%': 's', # Use -Os unless overridden |
| 2484 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2485 | }, { |
| 2486 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
thakis | 9ce1b75 | 2014-11-10 16:19:39 | [diff] [blame] | 2487 | 'mac_release_optimization%': '2', # Use -O2 unless overridden |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2488 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2489 | }], |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 2490 | ['OS=="android"', { |
| 2491 | 'host_os%': '<(host_os)', # See comment above chromium_code. |
| 2492 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2493 | ], |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 2494 | 'clang_warning_flags': [ |
| 2495 | '-Wheader-hygiene', |
| 2496 | |
| 2497 | # Don't die on dtoa code that uses a char as an array index. |
| 2498 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 2499 | '-Wno-char-subscripts', |
| 2500 | |
| 2501 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 2502 | # which we no longer use. Check if it makes sense to remove |
| 2503 | # this as well. http://crbug.com/316352 |
| 2504 | '-Wno-unneeded-internal-declaration', |
| 2505 | |
| 2506 | # Warns on switches on enums that cover all enum values but |
| 2507 | # also contain a default: branch. Chrome is full of that. |
| 2508 | '-Wno-covered-switch-default', |
| 2509 | |
| 2510 | # Warns when a const char[] is converted to bool. |
| 2511 | '-Wstring-conversion', |
| 2512 | |
| 2513 | # C++11-related flags: |
| 2514 | |
| 2515 | # This warns on using ints as initializers for floats in |
| 2516 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 2517 | # which happens in several places in chrome code. Not sure if |
| 2518 | # this is worth fixing. |
| 2519 | '-Wno-c++11-narrowing', |
| 2520 | |
| 2521 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 2522 | # code generated by flex (used in angle) contains that keyword. |
| 2523 | # http://crbug.com/255186 |
| 2524 | '-Wno-deprecated-register', |
| 2525 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2526 | }, |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 2527 | 'includes': [ 'set_clang_warning_flags.gypi', ], |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2528 | 'defines': [ |
[email protected] | 6d84e0b | 2013-12-05 12:16:13 | [diff] [blame] | 2529 | # Don't use deprecated V8 APIs anywhere. |
| 2530 | 'V8_DEPRECATION_WARNINGS', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2531 | ], |
[email protected] | 9786502 | 2014-06-13 23:18:04 | [diff] [blame] | 2532 | 'include_dirs': [ |
| 2533 | '<(SHARED_INTERMEDIATE_DIR)', |
| 2534 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2535 | 'conditions': [ |
[email protected] | d808e21 | 2013-03-12 14:06:16 | [diff] [blame] | 2536 | ['(OS=="mac" or OS=="ios") and asan==1', { |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 2537 | 'dependencies': [ |
| 2538 | '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 2539 | ], |
| 2540 | }], |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 2541 | ['OS=="win" and asan==1 and component=="shared_library"', { |
| 2542 | 'dependencies': [ |
| 2543 | '<(DEPTH)/build/win/asan.gyp:asan_dynamic_runtime', |
| 2544 | ], |
| 2545 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2546 | ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', { |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2547 | 'cflags_cc!': ['-fno-rtti'], |
| 2548 | 'cflags_cc+': [ |
| 2549 | '-frtti', |
| 2550 | '-gline-tables-only', |
| 2551 | '-fintercept-allocation-functions', |
| 2552 | ], |
| 2553 | 'defines': ['TYPE_PROFILING'], |
| 2554 | 'dependencies': [ |
| 2555 | '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
| 2556 | ], |
| 2557 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2558 | ['branding=="Chrome"', { |
| 2559 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 2560 | }, { # else: branding!="Chrome" |
| 2561 | 'defines': ['CHROMIUM_BUILD'], |
| 2562 | }], |
[email protected] | 286d9a1 | 2012-05-30 16:20:38 | [diff] [blame] | 2563 | ['OS=="mac" and component=="shared_library"', { |
| 2564 | 'xcode_settings': { |
| 2565 | 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 2566 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 2567 | # For unbundled binaries. |
| 2568 | '@loader_path/.', |
| 2569 | # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
| 2570 | '@loader_path/../../..', |
| 2571 | ], |
| 2572 | }, |
| 2573 | }], |
[email protected] | 6fcbf9d | 2014-05-09 22:01:28 | [diff] [blame] | 2574 | ['clang==1 and OS!="win"', { |
| 2575 | # This is here so that all files get recompiled after a clang roll and |
| 2576 | # when turning clang on or off. |
| 2577 | # (defines are passed via the command line, and build systems rebuild |
| 2578 | # things when their commandline changes). Nothing should ever read this |
| 2579 | # define. |
| 2580 | 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], |
| 2581 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2582 | ['enable_rlz==1', { |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 2583 | 'defines': ['ENABLE_RLZ'], |
| 2584 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2585 | ['component=="shared_library"', { |
| 2586 | 'defines': ['COMPONENT_BUILD'], |
| 2587 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 2588 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 2589 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 2590 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 2591 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 2592 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 2593 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 2594 | ['use_aura==1', { |
| 2595 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 2596 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2597 | ['use_ash==1', { |
| 2598 | 'defines': ['USE_ASH=1'], |
| 2599 | }], |
[email protected] | 91e273a10 | 2014-07-22 19:50:47 | [diff] [blame] | 2600 | ['use_pango==1', { |
| 2601 | 'defines': ['USE_PANGO=1'], |
| 2602 | }], |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 2603 | ['use_cairo==1', { |
| 2604 | 'defines': ['USE_CAIRO=1'], |
| 2605 | }], |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 2606 | ['use_cras==1', { |
| 2607 | 'defines': ['USE_CRAS=1'], |
| 2608 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2609 | ['use_ozone==1', { |
| 2610 | 'defines': ['USE_OZONE=1'], |
| 2611 | }], |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 2612 | ['use_default_render_theme==1', { |
| 2613 | 'defines': ['USE_DEFAULT_RENDER_THEME=1'], |
| 2614 | }], |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 2615 | ['use_libjpeg_turbo==1', { |
| 2616 | 'defines': ['USE_LIBJPEG_TURBO=1'], |
| 2617 | }], |
[email protected] | 2fa2f2d8 | 2013-04-29 18:13:12 | [diff] [blame] | 2618 | ['use_x11==1', { |
| 2619 | 'defines': ['USE_X11=1'], |
| 2620 | }], |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 2621 | ['use_clipboard_aurax11==1', { |
| 2622 | 'defines': ['USE_CLIPBOARD_AURAX11=1'], |
| 2623 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 2624 | ['enable_one_click_signin==1', { |
| 2625 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 2626 | }], |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 2627 | ['enable_pre_sync_backup==1', { |
| 2628 | 'defines': ['ENABLE_PRE_SYNC_BACKUP'], |
| 2629 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2630 | ['image_loader_extension==1', { |
| 2631 | 'defines': ['IMAGE_LOADER_EXTENSION=1'], |
| 2632 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2633 | ['profiling==1', { |
| 2634 | 'defines': ['ENABLE_PROFILING=1'], |
| 2635 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 2636 | ['remoting==1', { |
| 2637 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 2638 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 2639 | ['enable_webrtc==1', { |
| 2640 | 'defines': ['ENABLE_WEBRTC=1'], |
| 2641 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2642 | ['proprietary_codecs==1', { |
| 2643 | 'defines': ['USE_PROPRIETARY_CODECS'], |
damienv | a6c9763 | 2014-08-27 01:47:58 | [diff] [blame] | 2644 | 'conditions': [ |
| 2645 | ['enable_mpeg2ts_stream_parser==1', { |
| 2646 | 'defines': ['ENABLE_MPEG2TS_STREAM_PARSER'], |
| 2647 | }], |
| 2648 | ], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2649 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 2650 | ['enable_viewport==1', { |
| 2651 | 'defines': ['ENABLE_VIEWPORT'], |
| 2652 | }], |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 2653 | ['enable_pepper_cdms==1', { |
| 2654 | 'defines': ['ENABLE_PEPPER_CDMS'], |
| 2655 | }], |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 2656 | ['enable_browser_cdms==1', { |
| 2657 | 'defines': ['ENABLE_BROWSER_CDMS'], |
| 2658 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 2659 | ['configuration_policy==1', { |
| 2660 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 2661 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 2662 | ['notifications==1', { |
| 2663 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 2664 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 2665 | ['enable_hidpi==1', { |
| 2666 | 'defines': ['ENABLE_HIDPI=1'], |
| 2667 | }], |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 2668 | ['native_discardable_memory==1', { |
| 2669 | 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'], |
| 2670 | }], |
| 2671 | ['native_memory_pressure_signals==1', { |
| 2672 | 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'], |
| 2673 | }], |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 2674 | ['use_udev==1', { |
| 2675 | 'defines': ['USE_UDEV'], |
| 2676 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2677 | ['fastbuild!=0', { |
[email protected] | 3b0bc5e | 2013-04-24 11:42:31 | [diff] [blame] | 2678 | 'xcode_settings': { |
| 2679 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 2680 | }, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2681 | 'conditions': [ |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2682 | ['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] | 2683 | # Clang creates chubby debug information, which makes linking very |
| 2684 | # slow. For now, don't create debug information with clang. See |
| 2685 | # http://crbug.com/70000 |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2686 | 'conditions': [ |
| 2687 | ['OS=="linux"', { |
| 2688 | 'variables': { |
| 2689 | 'debug_extra_cflags': '-g0', |
| 2690 | }, |
| 2691 | }], |
| 2692 | # Android builds symbols on release by default, disable them. |
| 2693 | ['OS=="android"', { |
| 2694 | 'variables': { |
| 2695 | 'debug_extra_cflags': '-g0', |
| 2696 | 'release_extra_cflags': '-g0', |
| 2697 | }, |
| 2698 | }], |
| 2699 | ], |
| 2700 | }, { # else clang!=1 |
| 2701 | 'conditions': [ |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2702 | ['OS=="win" and fastbuild==2', { |
| 2703 | # Completely disable debug information. |
| 2704 | 'msvs_settings': { |
| 2705 | 'VCLinkerTool': { |
| 2706 | 'GenerateDebugInformation': 'false', |
| 2707 | }, |
| 2708 | 'VCCLCompilerTool': { |
| 2709 | 'DebugInformationFormat': '0', |
| 2710 | }, |
| 2711 | }, |
| 2712 | }], |
| 2713 | ['OS=="win" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2714 | 'msvs_settings': { |
| 2715 | 'VCLinkerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2716 | # This tells the linker to generate .pdbs, so that |
| 2717 | # we can get meaningful stack traces. |
| 2718 | 'GenerateDebugInformation': 'true', |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2719 | }, |
| 2720 | 'VCCLCompilerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2721 | # No debug info to be generated by compiler. |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2722 | 'DebugInformationFormat': '0', |
| 2723 | }, |
| 2724 | }, |
| 2725 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2726 | ['OS=="linux" and fastbuild==2', { |
| 2727 | 'variables': { |
| 2728 | 'debug_extra_cflags': '-g0', |
| 2729 | }, |
| 2730 | }], |
| 2731 | ['OS=="linux" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2732 | 'variables': { |
| 2733 | 'debug_extra_cflags': '-g1', |
| 2734 | }, |
| 2735 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2736 | ['OS=="android" and fastbuild==2', { |
| 2737 | 'variables': { |
| 2738 | 'debug_extra_cflags': '-g0', |
| 2739 | 'release_extra_cflags': '-g0', |
| 2740 | }, |
| 2741 | }], |
| 2742 | ['OS=="android" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2743 | 'variables': { |
| 2744 | 'debug_extra_cflags': '-g1', |
| 2745 | 'release_extra_cflags': '-g1', |
| 2746 | }, |
| 2747 | }], |
| 2748 | ], |
| 2749 | }], # clang!=1 |
| 2750 | ], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2751 | }], # fastbuild!=0 |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2752 | ['dont_embed_build_metadata==1', { |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2753 | 'defines': [ |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2754 | 'DONT_EMBED_BUILD_METADATA', |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2755 | ], |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2756 | }], # dont_embed_build_metadata==1 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 2757 | ['dcheck_always_on!=0', { |
| 2758 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 2759 | }], # dcheck_always_on!=0 |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 2760 | ['tracing_like_official_build!=0', { |
| 2761 | 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'], |
| 2762 | }], # tracing_like_official_build!=0 |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2763 | ['win_use_allocator_shim==0', { |
| 2764 | 'conditions': [ |
| 2765 | ['OS=="win"', { |
| 2766 | 'defines': ['NO_TCMALLOC'], |
| 2767 | }], |
| 2768 | ], |
| 2769 | }], |
[email protected] | 6c65f2b | 2014-05-07 08:57:46 | [diff] [blame] | 2770 | ['asan==1', { |
| 2771 | 'defines': [ |
| 2772 | 'ADDRESS_SANITIZER', |
| 2773 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 2774 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 6c65f2b | 2014-05-07 08:57:46 | [diff] [blame] | 2775 | ], |
| 2776 | }], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2777 | ['syzyasan==1', { |
| 2778 | # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2779 | 'msvs_settings': { |
| 2780 | 'VCLinkerTool': { |
| 2781 | 'Profile': 'true', |
| 2782 | }, |
| 2783 | }, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2784 | 'defines': [ |
[email protected] | aee2f33 | 2014-03-27 15:08:04 | [diff] [blame] | 2785 | 'SYZYASAN', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2786 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 2787 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2788 | ], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2789 | }], |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2790 | ['OS=="win"', { |
| 2791 | 'defines': [ |
| 2792 | '__STD_C', |
| 2793 | '_CRT_SECURE_NO_DEPRECATE', |
| 2794 | '_SCL_SECURE_NO_DEPRECATE', |
[email protected] | 2d0aa324 | 2012-10-22 16:23:10 | [diff] [blame] | 2795 | # This define is required to pull in the new Win8 interfaces from |
| 2796 | # system headers like ShObjIdl.h. |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 2797 | 'NTDDI_VERSION=0x06030000', |
[email protected] | 3741674 | 2013-11-12 07:13:33 | [diff] [blame] | 2798 | # This is required for ATL to use XP-safe versions of its functions. |
| 2799 | '_USING_V110_SDK71_', |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2800 | ], |
| 2801 | 'include_dirs': [ |
| 2802 | '<(DEPTH)/third_party/wtl/include', |
| 2803 | ], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2804 | 'conditions': [ |
| 2805 | ['win_z7!=0', { |
| 2806 | 'msvs_settings': { |
[email protected] | 5146e0b | 2012-08-23 05:49:09 | [diff] [blame] | 2807 | # Generates debug info when win_z7=1 |
| 2808 | # even if fastbuild=1 (that makes GenerateDebugInformation false). |
| 2809 | 'VCLinkerTool': { |
| 2810 | 'GenerateDebugInformation': 'true', |
| 2811 | }, |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2812 | 'VCCLCompilerTool': { |
| 2813 | 'DebugInformationFormat': '1', |
| 2814 | } |
| 2815 | } |
brucedawson | 4b6961d | 2014-10-28 22:18:04 | [diff] [blame] | 2816 | }], # win_z7!=0 |
| 2817 | ['win_analyze', { |
| 2818 | 'defines!': [ |
| 2819 | # This is prohibited when running /analyze. |
| 2820 | '_USING_V110_SDK71_', |
| 2821 | ], |
| 2822 | 'msvs_settings': { |
| 2823 | 'VCCLCompilerTool': { |
| 2824 | # Set WarnAsError to false to disable this setting for most |
| 2825 | # projects so that compilation continues. |
| 2826 | 'WarnAsError': 'false', |
| 2827 | # When win_analyze is specified add the /analyze switch. |
| 2828 | # Also add /WX- to force-disable WarnAsError for projects that |
| 2829 | # override WarnAsError. |
| 2830 | # Also, disable various noisy warnings that have low value. |
| 2831 | 'AdditionalOptions': [ |
| 2832 | '/analyze', |
| 2833 | '/WX-', |
| 2834 | '/wd6011', # Dereferencing NULL pointer |
| 2835 | '/wd6312', # Possible infinite loop: use of the constant |
| 2836 | # EXCEPTION_CONTINUE_EXECUTION in the exception-filter |
| 2837 | '/wd6326', # Potential comparison of constant with constant |
| 2838 | '/wd28159', # Consider using 'GetTickCount64' |
| 2839 | '/wd28204', # Inconsistent SAL annotations |
| 2840 | '/wd28251', # Inconsistent SAL annotations |
| 2841 | '/wd28252', # Inconsistent SAL annotations |
| 2842 | '/wd28253', # Inconsistent SAL annotations |
| 2843 | '/wd28196', # The precondition is not satisfied |
| 2844 | '/wd28301', # Inconsistent SAL annotations |
| 2845 | '/wd6340', # Sign mismatch in function parameter |
| 2846 | '/wd28182', # Dereferencing NULL pointer |
| 2847 | ], |
| 2848 | }, |
| 2849 | }, |
| 2850 | }], # win_analyze |
| 2851 | ], |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2852 | }], # OS==win |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 2853 | ['chromecast==1', { |
| 2854 | 'defines': [ |
| 2855 | 'LOG_DISABLED=0', |
| 2856 | ], |
| 2857 | 'conditions': [ |
| 2858 | ['target_arch=="arm"', { |
| 2859 | 'defines': [ |
| 2860 | # TODO(lcwu): Work around an error when building Chromium |
| 2861 | # with gcc-4.5.3 (e.g. v8/src/platform-linux.cc). Remove |
| 2862 | # this define once the toolchain is updated. |
| 2863 | # See crbug.com/388933. |
| 2864 | '__SOFTFP', |
| 2865 | ], |
| 2866 | }], |
gunsch | b50a4e3f | 2014-09-17 04:05:28 | [diff] [blame] | 2867 | ['use_playready==1', { |
| 2868 | 'defines': [ |
| 2869 | 'PLAYREADY_CDM_AVAILABLE', |
| 2870 | ], |
| 2871 | }], |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 2872 | ], |
| 2873 | }], |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 2874 | ['enable_task_manager==1', { |
| 2875 | 'defines': [ |
| 2876 | 'ENABLE_TASK_MANAGER=1', |
| 2877 | ], |
| 2878 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2879 | ['enable_extensions==1', { |
| 2880 | 'defines': [ |
| 2881 | 'ENABLE_EXTENSIONS=1', |
| 2882 | ], |
| 2883 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 2884 | ['OS=="win" and branding=="Chrome"', { |
| 2885 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 2886 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 2887 | ['enable_dart==1', { |
| 2888 | 'defines': ['WEBKIT_USING_DART=1'], |
| 2889 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 2890 | ['enable_plugin_installation==1', { |
| 2891 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 2892 | }], |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 2893 | ['enable_plugins==1', { |
| 2894 | 'defines': ['ENABLE_PLUGINS=1'], |
| 2895 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 2896 | ['enable_session_service==1', { |
| 2897 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 2898 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 2899 | ['enable_themes==1', { |
| 2900 | 'defines': ['ENABLE_THEMES=1'], |
| 2901 | }], |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 2902 | ['enable_autofill_dialog==1', { |
| 2903 | 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], |
| 2904 | }], |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 2905 | ['enable_prod_wallet_service==1', { |
| 2906 | 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'], |
| 2907 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 2908 | ['enable_background==1', { |
| 2909 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 2910 | }], |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 2911 | ['enable_google_now==1', { |
| 2912 | 'defines': ['ENABLE_GOOGLE_NOW=1'], |
| 2913 | }], |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 2914 | ['cld_version!=0', { |
| 2915 | 'defines': ['CLD_VERSION=<(cld_version)'], |
| 2916 | }], |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 2917 | ['enable_basic_printing==1 or enable_print_preview==1', { |
| 2918 | # Convenience define for ENABLE_BASIC_PRINTING || ENABLE_PRINT_PREVIEW. |
| 2919 | 'defines': ['ENABLE_PRINTING=1'], |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2920 | }], |
vitalybuka | 93eea40 | 2014-11-05 23:47:15 | [diff] [blame] | 2921 | ['enable_basic_printing==1', { |
| 2922 | # Enable basic printing support and UI. |
| 2923 | 'defines': ['ENABLE_BASIC_PRINTING=1'], |
| 2924 | }], |
| 2925 | ['enable_print_preview==1', { |
| 2926 | # Enable printing with print preview. |
| 2927 | # Can be defined without ENABLE_BASIC_PRINTING. |
vitalybuka | e29991c | 2014-11-05 21:15:12 | [diff] [blame] | 2928 | 'defines': ['ENABLE_PRINT_PREVIEW=1'], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2929 | }], |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 2930 | ['enable_spellcheck==1', { |
| 2931 | 'defines': ['ENABLE_SPELLCHECK=1'], |
| 2932 | }], |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 2933 | ['enable_captive_portal_detection==1', { |
| 2934 | 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
| 2935 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2936 | ['enable_app_list==1', { |
| 2937 | 'defines': ['ENABLE_APP_LIST=1'], |
| 2938 | }], |
| 2939 | ['enable_settings_app==1', { |
| 2940 | 'defines': ['ENABLE_SETTINGS_APP=1'], |
| 2941 | }], |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 2942 | ['disable_file_support==1', { |
| 2943 | 'defines': ['DISABLE_FILE_SUPPORT=1'], |
| 2944 | }], |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 2945 | ['disable_ftp_support==1', { |
| 2946 | 'defines': ['DISABLE_FTP_SUPPORT=1'], |
| 2947 | }], |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 2948 | ['use_icu_alternatives_on_android==1', { |
| 2949 | 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'], |
| 2950 | }], |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 2951 | ['enable_managed_users==1', { |
| 2952 | 'defines': ['ENABLE_MANAGED_USERS=1'], |
| 2953 | }], |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 2954 | ['spdy_proxy_auth_property != ""', { |
| 2955 | 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], |
| 2956 | }], |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 2957 | ['spdy_proxy_auth_value != ""', { |
| 2958 | 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], |
| 2959 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 2960 | ['enable_mdns==1', { |
| 2961 | 'defines': ['ENABLE_MDNS=1'], |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 2962 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2963 | ['enable_service_discovery==1', { |
| 2964 | 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ], |
| 2965 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2966 | ['enable_wifi_bootstrapping==1', { |
| 2967 | 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ], |
| 2968 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2969 | ['enable_hangout_services_extension==1', { |
| 2970 | 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'], |
| 2971 | }], |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 2972 | ['enable_ipc_fuzzer==1', { |
| 2973 | 'defines': ['ENABLE_IPC_FUZZER=1'], |
| 2974 | }], |
[email protected] | 8b4efe9 | 2014-02-21 16:08:20 | [diff] [blame] | 2975 | ['video_hole==1', { |
| 2976 | 'defines': ['VIDEO_HOLE=1'], |
| 2977 | }], |
japhet | 46789a8 | 2014-09-10 03:06:46 | [diff] [blame] | 2978 | ['enable_load_completion_hacks==1', { |
| 2979 | 'defines': ['ENABLE_LOAD_COMPLETION_HACKS=1'], |
| 2980 | }], |
baixo | 3a3c88a | 2014-10-28 11:52:21 | [diff] [blame] | 2981 | ['v8_use_external_startup_data==1', { |
| 2982 | 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'], |
| 2983 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2984 | ], # conditions for 'target_defaults' |
| 2985 | 'target_conditions': [ |
bedupont | 65ce5acc | 2014-11-04 16:30:41 | [diff] [blame] | 2986 | ['<(use_libpci)==1', { |
| 2987 | 'defines': ['USE_LIBPCI=1'], |
| 2988 | }], |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2989 | ['<(use_openssl)==1', { |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 2990 | 'defines': ['USE_OPENSSL=1'], |
| 2991 | }], |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2992 | ['<(use_openssl_certs)==1', { |
| 2993 | 'defines': ['USE_OPENSSL_CERTS=1'], |
| 2994 | }], |
| 2995 | ['>(nacl_untrusted_build)==1', { |
| 2996 | 'defines': [ |
| 2997 | 'USE_OPENSSL=1', |
| 2998 | 'USE_OPENSSL_CERTS=1', |
| 2999 | ], |
| 3000 | }], |
hidehiko | 2b720d2 | 2014-10-17 06:40:30 | [diff] [blame] | 3001 | ['<(use_glib)==1 and >(nacl_untrusted_build)==0', { |
| 3002 | 'defines': ['USE_GLIB=1'], |
| 3003 | }], |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 3004 | ['<(use_nss)==1 and >(nacl_untrusted_build)==0', { |
| 3005 | 'defines': ['USE_NSS=1'], |
| 3006 | }], |
[email protected] | 0251701 | 2014-06-13 09:28:41 | [diff] [blame] | 3007 | ['<(chromeos)==1 and >(nacl_untrusted_build)==0', { |
| 3008 | 'defines': ['OS_CHROMEOS=1'], |
| 3009 | }], |
[email protected] | e59443e | 2014-08-18 14:13:33 | [diff] [blame] | 3010 | ['enable_wexit_time_destructors==1 and OS!="win"', { |
| 3011 | # TODO: Enable on Windows too, http://crbug.com/404525 |
[email protected] | dcbc32cc | 2014-08-01 21:48:20 | [diff] [blame] | 3012 | 'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']}, |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 3013 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3014 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3015 | 'conditions': [ |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3016 | [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 3017 | # We don't want to get warnings from third-party code, |
| 3018 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3019 | 'cflags!': [ |
| 3020 | '-Wall', |
| 3021 | '-Wextra', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3022 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 3023 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 3024 | # Don't warn about hash_map in third-party code. |
| 3025 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 3026 | ], |
| 3027 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 3028 | # Don't warn about printf format problems. |
| 3029 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 3030 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 3031 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 3032 | 'cflags_cc!': [ |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 3033 | # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 3034 | '-Wsign-compare', |
| 3035 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3036 | }], |
[email protected] | 82dd5eb3 | 2012-08-18 04:24:32 | [diff] [blame] | 3037 | # TODO: Fix all warnings on chromeos too. |
| 3038 | [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
| 3039 | 'cflags!': [ |
| 3040 | '-Werror', |
| 3041 | ], |
| 3042 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 3043 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 3044 | 'cflags': [ |
| 3045 | # Don't warn about ignoring the return value from e.g. close(). |
| 3046 | # 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] | 3047 | # BSD systems do not support this option, since they are usually |
| 3048 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 3049 | '-Wno-unused-result', |
| 3050 | ], |
| 3051 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3052 | [ 'OS=="win"', { |
| 3053 | 'defines': [ |
| 3054 | '_CRT_SECURE_NO_DEPRECATE', |
| 3055 | '_CRT_NONSTDC_NO_WARNINGS', |
| 3056 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 3057 | '_SCL_SECURE_NO_DEPRECATE', |
| 3058 | ], |
| 3059 | 'msvs_disabled_warnings': [4800], |
| 3060 | 'msvs_settings': { |
| 3061 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 3062 | 'WarningLevel': '3', |
[email protected] | 86caa405 | 2014-07-18 07:22:09 | [diff] [blame] | 3063 | 'WarnAsError': 'true', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3064 | 'Detect64BitPortabilityProblems': 'false', |
| 3065 | }, |
| 3066 | }, |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 3067 | 'conditions': [ |
| 3068 | ['buildtype=="Official"', { |
| 3069 | 'msvs_settings': { |
| 3070 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 3071 | } |
| 3072 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 3073 | ['clang==1', { |
| 3074 | 'msvs_settings': { |
| 3075 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 3076 | } |
| 3077 | }], |
kulkarni.a | 9af92a1 | 2014-09-19 18:47:21 | [diff] [blame] | 3078 | [ 'component=="shared_library"', { |
| 3079 | # TODO(darin): Unfortunately, some third_party code depends on base. |
| 3080 | 'msvs_disabled_warnings': [ |
| 3081 | 4251, # class 'std::xx' needs to have dll-interface. |
| 3082 | ], |
| 3083 | }], |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 3084 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3085 | }], |
kulkarni.a | 9af92a1 | 2014-09-19 18:47:21 | [diff] [blame] | 3086 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3087 | [ 'OS=="mac" or OS=="ios"', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3088 | 'xcode_settings': { |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 3089 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3090 | }, |
[email protected] | 3a352c36 | 2012-05-08 19:45:49 | [diff] [blame] | 3091 | 'conditions': [ |
| 3092 | ['buildtype=="Official"', { |
| 3093 | 'xcode_settings': { |
| 3094 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 3095 | }, |
| 3096 | }], |
| 3097 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 3098 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3099 | [ 'OS=="ios"', { |
| 3100 | 'xcode_settings': { |
[email protected] | 7afca86 | 2012-07-11 15:11:22 | [diff] [blame] | 3101 | # TODO(ios): Fix remaining warnings in third-party code, then |
| 3102 | # remove this; the Mac cleanup didn't get everything that's |
| 3103 | # flagged in an iOS build. |
| 3104 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3105 | 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
[email protected] | 5a2637d0 | 2013-11-12 17:01:17 | [diff] [blame] | 3106 | # Several internal ios directories generate numerous warnings for |
| 3107 | # -Wobjc-missing-property-synthesis. |
| 3108 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3109 | }, |
| 3110 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3111 | ], |
| 3112 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 3113 | 'includes': [ |
| 3114 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 3115 | 'filename_rules.gypi', |
| 3116 | ], |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 3117 | # In Chromium code, we define __STDC_foo_MACROS in order to get the |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3118 | # C99 macros on Mac and Linux. |
| 3119 | 'defines': [ |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 3120 | '__STDC_CONSTANT_MACROS', |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3121 | '__STDC_FORMAT_MACROS', |
| 3122 | ], |
| 3123 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3124 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 3125 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 3126 | 'msvs_settings': { |
| 3127 | 'VCCLCompilerTool': { |
| 3128 | 'AdditionalOptions': ['/we4389'], |
| 3129 | }, |
| 3130 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3131 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 3132 | ['OS=="win" and component=="shared_library"', { |
| 3133 | 'msvs_disabled_warnings': [ |
| 3134 | 4251, # class 'std::xx' needs to have dll-interface. |
| 3135 | ], |
| 3136 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 3137 | ], |
| 3138 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 3139 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3140 | 'default_configuration': 'Debug', |
| 3141 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3142 | # VCLinkerTool LinkIncremental values below: |
| 3143 | # 0 == default |
| 3144 | # 1 == /INCREMENTAL:NO |
| 3145 | # 2 == /INCREMENTAL |
| 3146 | # Debug links incremental, Release does not. |
| 3147 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 3148 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3149 | # |
| 3150 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3151 | 'abstract': 1, |
| 3152 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 3153 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3154 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 3155 | 'CharacterSet': '1', |
| 3156 | }, |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3157 | # Add the default import libs. |
| 3158 | 'msvs_settings':{ |
| 3159 | 'VCLinkerTool': { |
| 3160 | 'AdditionalDependencies': [ |
| 3161 | 'kernel32.lib', |
| 3162 | 'gdi32.lib', |
| 3163 | 'winspool.lib', |
| 3164 | 'comdlg32.lib', |
| 3165 | 'advapi32.lib', |
| 3166 | 'shell32.lib', |
| 3167 | 'ole32.lib', |
| 3168 | 'oleaut32.lib', |
| 3169 | 'user32.lib', |
| 3170 | 'uuid.lib', |
| 3171 | 'odbc32.lib', |
| 3172 | 'odbccp32.lib', |
[email protected] | 36bb739c | 2013-02-25 22:10:39 | [diff] [blame] | 3173 | 'delayimp.lib', |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 3174 | 'credui.lib', |
| 3175 | 'netapi32.lib', |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3176 | ], |
scottmg | 567a3fd | 2014-11-19 01:47:21 | [diff] [blame] | 3177 | 'AdditionalOptions': [ |
| 3178 | # Suggested by Microsoft Devrel to avoid |
| 3179 | # LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000) |
| 3180 | # which started happening more regularly after VS2013 Update 4. |
| 3181 | '/maxilksize:2147483647', |
| 3182 | ], |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3183 | }, |
| 3184 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3185 | }, |
| 3186 | 'x86_Base': { |
| 3187 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3188 | 'msvs_settings': { |
| 3189 | 'VCLinkerTool': { |
[email protected] | 388484f0 | 2014-02-06 09:49:21 | [diff] [blame] | 3190 | 'MinimumRequiredVersion': '5.01', # XP. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3191 | 'TargetMachine': '1', |
| 3192 | }, |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3193 | 'VCLibrarianTool': { |
| 3194 | 'TargetMachine': '1', |
| 3195 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3196 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 3197 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3198 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3199 | 'x64_Base': { |
| 3200 | 'abstract': 1, |
| 3201 | 'msvs_configuration_platform': 'x64', |
| 3202 | 'msvs_settings': { |
| 3203 | 'VCLinkerTool': { |
[email protected] | 68c88b0 | 2014-06-04 17:16:04 | [diff] [blame] | 3204 | # Make sure to understand http://crbug.com/361720 if you want to |
| 3205 | # increase this. |
| 3206 | 'MinimumRequiredVersion': '5.02', # Server 2003. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3207 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3208 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3209 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3210 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3211 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 50f9966 | 2013-03-04 20:58:36 | [diff] [blame] | 3212 | # Doesn't exist x64 SDK. Should use oleaut32 in any case. |
| 3213 | 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3214 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 3215 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3216 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3217 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3218 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3219 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3220 | 'TargetMachine': '17', # x64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3221 | }, |
| 3222 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3223 | }, |
| 3224 | 'Debug_Base': { |
| 3225 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3226 | 'defines': [ |
| 3227 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3228 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3229 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3230 | 'xcode_settings': { |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 3231 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3232 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3233 | '<@(debug_extra_cflags)', |
| 3234 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3235 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3236 | 'msvs_settings': { |
| 3237 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3238 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3239 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 3240 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3241 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3242 | 'conditions': [ |
| 3243 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3244 | # "default inlining", not "/Ob0". |
| 3245 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3246 | ['win_debug_InlineFunctionExpansion==0', { |
| 3247 | 'AdditionalOptions': ['/Ob0'], |
| 3248 | }], |
| 3249 | ['win_debug_InlineFunctionExpansion!=""', { |
| 3250 | 'InlineFunctionExpansion': |
| 3251 | '<(win_debug_InlineFunctionExpansion)', |
| 3252 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 3253 | ['win_debug_disable_iterator_debugging==1', { |
| 3254 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 3255 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3256 | |
| 3257 | # if win_debug_OmitFramePointers is blank, leave as default |
| 3258 | ['win_debug_OmitFramePointers==1', { |
| 3259 | 'OmitFramePointers': 'true', |
| 3260 | }], |
| 3261 | ['win_debug_OmitFramePointers==0', { |
| 3262 | 'OmitFramePointers': 'false', |
| 3263 | # The above is not sufficient (http://crbug.com/106711): it |
| 3264 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3265 | # perform FPO regardless, so we must explicitly disable. |
| 3266 | # We still want the false setting above to avoid having |
| 3267 | # "/Oy /Oy-" and warnings about overriding. |
| 3268 | 'AdditionalOptions': ['/Oy-'], |
| 3269 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3270 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3271 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3272 | }, |
| 3273 | 'VCLinkerTool': { |
| 3274 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 3275 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 3276 | # Chrome.dll share the same base name. As result, windbg will |
| 3277 | # name the Chrome.dll module like chrome_<base address>, where |
| 3278 | # <base address> typically changes with each launch. This in turn |
| 3279 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 3280 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 3281 | # Note that this is a three-way bool, where 0 means to pick up |
| 3282 | # the default setting, 1 is off and 2 is on. |
| 3283 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3284 | }, |
| 3285 | 'VCResourceCompilerTool': { |
| 3286 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 3287 | }, |
| 3288 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3289 | 'conditions': [ |
[email protected] | 78204c9 | 2012-09-14 04:42:55 | [diff] [blame] | 3290 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3291 | 'target_conditions': [ |
| 3292 | ['_toolset=="target"', { |
| 3293 | 'cflags': [ |
| 3294 | '<@(debug_extra_cflags)', |
| 3295 | ], |
| 3296 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3297 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3298 | }], |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 3299 | ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', { |
[email protected] | a8d94b4 | 2013-12-10 18:52:22 | [diff] [blame] | 3300 | # Enable libstdc++ debugging facilities to help catch problems |
| 3301 | # early, see http://crbug.com/65151 . |
| 3302 | # TODO(phajdan.jr): Should we enable this for all of POSIX? |
| 3303 | 'defines': ['_GLIBCXX_DEBUG=1',], |
| 3304 | }], |
[email protected] | 330ba6d | 2014-03-06 05:41:36 | [diff] [blame] | 3305 | ['release_valgrind_build==0', { |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 3306 | 'xcode_settings': { |
| 3307 | 'OTHER_CFLAGS': [ |
| 3308 | '-fstack-protector-all', # Implies -fstack-protector |
| 3309 | ], |
| 3310 | }, |
| 3311 | }], |
[email protected] | e86432a | 2014-08-18 21:01:08 | [diff] [blame] | 3312 | ['clang==1', { |
| 3313 | 'cflags': [ |
| 3314 | # Allow comparing the address of references and 'this' against 0 |
| 3315 | # in debug builds. Technically, these can never be null in |
| 3316 | # well-defined C/C++ and Clang can optimize such checks away in |
| 3317 | # release builds, but they may be used in asserts in debug builds. |
| 3318 | '-Wno-undefined-bool-conversion', |
| 3319 | '-Wno-tautological-undefined-compare', |
| 3320 | ], |
| 3321 | 'xcode_settings': { |
| 3322 | 'OTHER_CFLAGS': [ |
| 3323 | '-Wno-undefined-bool-conversion', |
| 3324 | '-Wno-tautological-undefined-compare', |
| 3325 | ], |
| 3326 | }, |
| 3327 | 'msvs_settings': { |
| 3328 | 'VCCLCompilerTool': { |
| 3329 | 'AdditionalOptions': [ |
| 3330 | '-Wno-undefined-bool-conversion', |
| 3331 | '-Wno-tautological-undefined-compare', |
| 3332 | ], |
| 3333 | }, |
| 3334 | }, |
| 3335 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3336 | ], |
| 3337 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3338 | 'Release_Base': { |
| 3339 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3340 | 'defines': [ |
| 3341 | 'NDEBUG', |
| 3342 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3343 | 'xcode_settings': { |
| 3344 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 3345 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 3346 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3347 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3348 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3349 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3350 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3351 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 3352 | # In official builds, each target will self-select |
| 3353 | # an optimization level. |
| 3354 | ['buildtype!="Official"', { |
| 3355 | 'Optimization': '<(win_release_Optimization)', |
| 3356 | }, |
| 3357 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3358 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3359 | # "default inlining", not "/Ob0". |
| 3360 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3361 | ['win_release_InlineFunctionExpansion==0', { |
| 3362 | 'AdditionalOptions': ['/Ob0'], |
| 3363 | }], |
| 3364 | ['win_release_InlineFunctionExpansion!=""', { |
| 3365 | 'InlineFunctionExpansion': |
| 3366 | '<(win_release_InlineFunctionExpansion)', |
| 3367 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3368 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3369 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3370 | ['win_release_OmitFramePointers==1', { |
| 3371 | 'OmitFramePointers': 'true', |
| 3372 | }], |
| 3373 | ['win_release_OmitFramePointers==0', { |
| 3374 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3375 | # The above is not sufficient (http://crbug.com/106711): it |
| 3376 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3377 | # perform FPO regardless, so we must explicitly disable. |
| 3378 | # We still want the false setting above to avoid having |
| 3379 | # "/Oy /Oy-" and warnings about overriding. |
| 3380 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3381 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3382 | ], |
[email protected] | 21fac24 | 2014-07-18 09:30:33 | [diff] [blame] | 3383 | 'AdditionalOptions': [ |
| 3384 | '/d2Zi+', # Improve debugging of Release builds. |
scottmg | 4f828c94 | 2014-08-29 04:11:07 | [diff] [blame] | 3385 | '/Zc:inline', # Remove unreferenced COMDAT (faster links). |
[email protected] | 21fac24 | 2014-07-18 09:30:33 | [diff] [blame] | 3386 | '<@(win_release_extra_cflags)', |
| 3387 | ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3388 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3389 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3390 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 3391 | # (i.e., inherit from parent solution), 1 means false, and |
| 3392 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3393 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3394 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 3395 | # file contains FIXUP information (growing the PDB file by about |
| 3396 | # 5%) but does not otherwise alter the output binary. This |
| 3397 | # information is used by the Syzygy optimization tool when |
| 3398 | # decomposing the release image. |
| 3399 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3400 | }, |
| 3401 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3402 | 'conditions': [ |
[email protected] | fd3fb3bf | 2012-05-23 22:15:16 | [diff] [blame] | 3403 | ['msvs_use_common_release', { |
| 3404 | 'includes': ['release.gypi'], |
| 3405 | }], |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3406 | ['release_valgrind_build==0 and tsan==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3407 | 'defines': [ |
| 3408 | 'NVALGRIND', |
| 3409 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 3410 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 3411 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3412 | 'defines': [ |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3413 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | be766bb | 2014-07-01 19:22:12 | [diff] [blame] | 3414 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3415 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3416 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3417 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 3418 | }], |
cpu | 962a141 | 2014-11-25 02:25:17 | [diff] [blame] | 3419 | ['OS=="win" and win_use_allocator_shim==0', { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3420 | 'defines': ['NO_TCMALLOC'], |
| 3421 | }], |
[email protected] | 8b22522 | 2014-02-18 22:54:44 | [diff] [blame] | 3422 | # _FORTIFY_SOURCE isn't really supported by Clang now, see |
| 3423 | # http://llvm.org/bugs/show_bug.cgi?id=16821. |
[email protected] | ed472ad | 2014-07-10 00:50:52 | [diff] [blame] | 3424 | # It seems to work fine with Ubuntu 12 headers though, so use it |
| 3425 | # in official builds. |
| 3426 | ['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] | 3427 | 'target_conditions': [ |
| 3428 | ['chromium_code==1', { |
| 3429 | # Non-chromium code is not guaranteed to compile cleanly |
| 3430 | # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 3431 | # when optimizations are disabled, so only do that for Release |
| 3432 | # build. |
| 3433 | 'defines': [ |
| 3434 | '_FORTIFY_SOURCE=2', |
| 3435 | ], |
| 3436 | }], |
[email protected] | 37305ae | 2012-12-11 01:54:58 | [diff] [blame] | 3437 | ], |
| 3438 | }], |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 3439 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3440 | 'target_conditions': [ |
| 3441 | ['_toolset=="target"', { |
| 3442 | 'cflags': [ |
| 3443 | '<@(release_extra_cflags)', |
| 3444 | ], |
[email protected] | 9082bba | 2014-05-20 06:50:21 | [diff] [blame] | 3445 | 'conditions': [ |
| 3446 | ['enable_resource_whitelist_generation==1', { |
| 3447 | 'cflags': [ |
| 3448 | '-Wunknown-pragmas -Wno-error=unknown-pragmas', |
| 3449 | ], |
| 3450 | }], |
| 3451 | ], |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3452 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3453 | ], |
| 3454 | }], |
[email protected] | b64ec82 | 2013-05-23 12:57:41 | [diff] [blame] | 3455 | ['OS=="ios"', { |
| 3456 | 'defines': [ |
| 3457 | 'NS_BLOCK_ASSERTIONS=1', |
| 3458 | ], |
| 3459 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3460 | ], |
| 3461 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3462 | # |
| 3463 | # Concrete configurations |
| 3464 | # |
| 3465 | 'Debug': { |
| 3466 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 3467 | }, |
| 3468 | 'Release': { |
| 3469 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3470 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3471 | 'conditions': [ |
[email protected] | 8125fba7 | 2014-02-26 14:32:58 | [diff] [blame] | 3472 | [ 'OS=="ios"', { |
| 3473 | 'Profile': { |
| 3474 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 3475 | 'target_conditions': [ |
| 3476 | [ '_type=="executable"', { |
| 3477 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 3478 | # debug information format to dwarf-with-dsym. Since |
| 3479 | # strip_from_xcode will not be used, set Xcode to do the |
| 3480 | # stripping as well. |
| 3481 | 'xcode_settings': { |
| 3482 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 3483 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 3484 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 3485 | }, |
| 3486 | }], |
| 3487 | ], |
| 3488 | }, |
| 3489 | }], |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3490 | [ 'OS=="win"', { |
| 3491 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3492 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3493 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3494 | }, |
| 3495 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3496 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3497 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3498 | }], |
| 3499 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3500 | }, |
| 3501 | }, |
| 3502 | 'conditions': [ |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 3503 | ['os_posix==1', { |
| 3504 | 'target_defaults': { |
| 3505 | 'ldflags': [ |
| 3506 | '-Wl,-z,now', |
| 3507 | '-Wl,-z,relro', |
| 3508 | ], |
glider | 7dbed157 | 2014-09-23 16:38:11 | [diff] [blame] | 3509 | # TODO(glider): enable the default options on other systems. |
| 3510 | 'conditions': [ |
| 3511 | ['use_sanitizer_options==1 and ((OS=="linux" and (chromeos==0 or target_arch!="ia32")) or OS=="mac")', { |
| 3512 | 'dependencies': [ |
| 3513 | '<(DEPTH)/build/sanitizers/sanitizers.gyp:sanitizer_options', |
| 3514 | ], |
| 3515 | }], |
| 3516 | ], |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 3517 | }, |
| 3518 | }], |
[email protected] | 713d6e4a | 2014-03-28 18:18:20 | [diff] [blame] | 3519 | # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
[email protected] | 453a8ad3 | 2014-05-20 17:32:49 | [diff] [blame] | 3520 | ['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] | 3521 | 'target_defaults': { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3522 | 'ldflags': [ |
[email protected] | a89c460c | 2014-03-17 13:42:13 | [diff] [blame] | 3523 | '-Wl,--fatal-warnings', |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3524 | ], |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3525 | }, |
| 3526 | }], |
[email protected] | d2ca75c | 2013-02-01 05:47:17 | [diff] [blame] | 3527 | ['os_posix==1 and chromeos==0', { |
| 3528 | # Chrome OS enables -fstack-protector-strong via its build wrapper, |
| 3529 | # and we want to avoid overriding this, so stack-protector is only |
| 3530 | # enabled when not building on Chrome OS. |
| 3531 | # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc |
| 3532 | # supports it. |
| 3533 | 'target_defaults': { |
| 3534 | 'cflags': [ |
| 3535 | '-fstack-protector', |
| 3536 | '--param=ssp-buffer-size=4', |
| 3537 | ], |
| 3538 | }, |
| 3539 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3540 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3541 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3542 | # Enable -Werror by default, but put it in a variable so it can |
| 3543 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 3544 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 3545 | 'werror%': '-Werror', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3546 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3547 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 3548 | 'defines': [ |
| 3549 | '_FILE_OFFSET_BITS=64', |
| 3550 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3551 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3552 | '<(werror)', # See note above about the werror variable. |
| 3553 | '-pthread', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 3554 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3555 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 3556 | # TODO(evan): turn this back on once all the builds work. |
| 3557 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 3558 | # Don't warn about unused function params. We use those everywhere. |
| 3559 | '-Wno-unused-parameter', |
| 3560 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 3561 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 3562 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 3563 | # Note: this is *required* to make some plugins work. |
| 3564 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 3565 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3566 | ], |
| 3567 | 'cflags_cc': [ |
Scott Graham | 9ebc1b9 | 2014-09-11 17:04:27 | [diff] [blame] | 3568 | '-fno-exceptions', |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 3569 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3570 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 3571 | # Make inline functions have hidden visiblity by default. |
| 3572 | # Surprisingly, not covered by -fvisibility=hidden. |
| 3573 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3574 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 3575 | # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3576 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3577 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 3578 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 3579 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3580 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3581 | 'libraries' : [ |
| 3582 | '<(libraries_for_target)', |
| 3583 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3584 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3585 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 3586 | 'variables': { |
| 3587 | 'debug_optimize%': '0', |
| 3588 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3589 | 'defines': [ |
| 3590 | '_DEBUG', |
| 3591 | ], |
| 3592 | 'cflags': [ |
[email protected] | 95ad203 | 2012-08-24 00:49:25 | [diff] [blame] | 3593 | '-O>(debug_optimize)', |
[email protected] | 230023c | 2014-07-02 09:31:33 | [diff] [blame] | 3594 | '-g', |
mithro | fb34b34 | 2014-09-22 07:26:44 | [diff] [blame] | 3595 | '-gdwarf-4', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3596 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3597 | 'conditions' : [ |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3598 | ['OS=="android"', { |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3599 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3600 | # Warn in case of text relocations. |
| 3601 | '-Wl,--warn-shared-textrel', |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3602 | ], |
| 3603 | }], |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 3604 | ['OS=="android" and android_full_debug==0', { |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3605 | # Some configurations are copied from Release_Base to reduce |
| 3606 | # the binary size. |
| 3607 | 'variables': { |
| 3608 | 'debug_optimize%': 's', |
| 3609 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3610 | 'cflags': [ |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3611 | '-fdata-sections', |
| 3612 | '-ffunction-sections', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3613 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3614 | 'ldflags': [ |
| 3615 | '-Wl,-O1', |
| 3616 | '-Wl,--as-needed', |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3617 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3618 | }], |
[email protected] | 264868d2 | 2014-07-10 17:37:37 | [diff] [blame] | 3619 | ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', { |
| 3620 | # We don't omit frame pointers on arm64 since they are required |
| 3621 | # to correctly unwind stackframes which contain system library |
| 3622 | # function frames (crbug.com/391706). |
| 3623 | 'cflags': [ |
| 3624 | '-fomit-frame-pointer', |
| 3625 | ], |
| 3626 | }], |
[email protected] | d4c0ec5b | 2013-03-10 03:07:45 | [diff] [blame] | 3627 | ['OS=="linux" and target_arch=="ia32"', { |
| 3628 | 'ldflags': [ |
| 3629 | '-Wl,--no-as-needed', |
| 3630 | ], |
| 3631 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3632 | ['debug_unwind_tables==1', { |
| 3633 | 'cflags': ['-funwind-tables'], |
| 3634 | }, { |
| 3635 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
primiano | a45221601 | 2014-11-25 12:34:09 | [diff] [blame] | 3636 | 'defines': ['NO_UNWIND_TABLES'], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3637 | }], |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 3638 | # TODO(mostynb): shuffle clang/gcc_version/binutils_version |
| 3639 | # definitions in to the right scope to use them when setting |
| 3640 | # linux_use_debug_fission, so it can be used here alone. |
| 3641 | ['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] | 3642 | 'cflags': ['-gsplit-dwarf'], |
[email protected] | 1c26c6a | 2014-03-17 14:11:21 | [diff] [blame] | 3643 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3644 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3645 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3646 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3647 | 'variables': { |
| 3648 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3649 | # Binaries become big and gold is unable to perform GC |
| 3650 | # and remove unused sections for some of test targets |
| 3651 | # on 32 bit platform. |
| 3652 | # (This is currently observed only in chromeos valgrind bots) |
| 3653 | # The following flag is to disable --gc-sections linker |
| 3654 | # option for these bots. |
| 3655 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 3656 | |
| 3657 | # TODO(bradnelson): reexamine how this is done if we change the |
| 3658 | # expansion of configurations |
| 3659 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3660 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3661 | 'cflags': [ |
[email protected] | 4c33a9b | 2014-06-23 22:20:19 | [diff] [blame] | 3662 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 3663 | # Don't emit the GCC version ident directives, they just end up |
| 3664 | # in the .comment section taking up binary size. |
| 3665 | '-fno-ident', |
| 3666 | # Put data and code in their own sections, so that unused symbols |
| 3667 | # can be removed at link time with --gc-sections. |
| 3668 | '-fdata-sections', |
| 3669 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3670 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3671 | 'ldflags': [ |
| 3672 | # Specifically tell the linker to perform optimizations. |
| 3673 | # See http://lwn.net/Articles/192624/ . |
| 3674 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 3675 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3676 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3677 | 'conditions' : [ |
| 3678 | ['no_gc_sections==0', { |
| 3679 | 'ldflags': [ |
| 3680 | '-Wl,--gc-sections', |
| 3681 | ], |
| 3682 | }], |
[email protected] | 264868d2 | 2014-07-10 17:37:37 | [diff] [blame] | 3683 | ['OS=="android" and target_arch!="arm64"', { |
| 3684 | # We don't omit frame pointers on arm64 since they are required |
| 3685 | # to correctly unwind stackframes which contain system library |
| 3686 | # function frames (crbug.com/391706). |
| 3687 | 'cflags': [ |
| 3688 | '-fomit-frame-pointer', |
| 3689 | ] |
| 3690 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3691 | ['OS=="android"', { |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 3692 | 'variables': { |
| 3693 | 'release_optimize%': 's', |
| 3694 | }, |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3695 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3696 | # Warn in case of text relocations. |
| 3697 | '-Wl,--warn-shared-textrel', |
| 3698 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3699 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3700 | ['profiling==1', { |
| 3701 | 'cflags': [ |
| 3702 | '-fno-omit-frame-pointer', |
| 3703 | '-g', |
| 3704 | ], |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 3705 | 'conditions' : [ |
| 3706 | ['profiling_full_stack_frames==1', { |
| 3707 | 'cflags': [ |
| 3708 | '-fno-inline', |
| 3709 | '-fno-optimize-sibling-calls', |
| 3710 | ], |
| 3711 | }], |
| 3712 | ], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3713 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3714 | ['release_unwind_tables==1', { |
| 3715 | 'cflags': ['-funwind-tables'], |
| 3716 | }, { |
| 3717 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
primiano | a45221601 | 2014-11-25 12:34:09 | [diff] [blame] | 3718 | 'defines': ['NO_UNWIND_TABLES'], |
[email protected] | a637d438 | 2014-01-11 03:12:05 | [diff] [blame] | 3719 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3720 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3721 | }, |
| 3722 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3723 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3724 | ['target_arch=="ia32"', { |
| 3725 | 'target_conditions': [ |
| 3726 | ['_toolset=="target"', { |
| 3727 | 'asflags': [ |
| 3728 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 3729 | # are compatible with the general 32-bit-ness. |
| 3730 | '-32', |
| 3731 | ], |
| 3732 | # All floating-point computations on x87 happens in 80-bit |
| 3733 | # precision. Because the C and C++ language standards allow |
| 3734 | # the compiler to keep the floating-point values in higher |
| 3735 | # precision than what's specified in the source and doing so |
| 3736 | # is more efficient than constantly rounding up to 64-bit or |
| 3737 | # 32-bit precision as specified in the source, the compiler, |
| 3738 | # especially in the optimized mode, tries very hard to keep |
| 3739 | # values in x87 floating-point stack (in 80-bit precision) |
| 3740 | # as long as possible. This has important side effects, that |
| 3741 | # the real value used in computation may change depending on |
| 3742 | # how the compiler did the optimization - that is, the value |
| 3743 | # kept in 80-bit is different than the value rounded down to |
| 3744 | # 64-bit or 32-bit. There are possible compiler options to |
| 3745 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 3746 | # all floating-values in the memory, thus force them to be |
| 3747 | # rounded to its original precision) but they have significant |
| 3748 | # runtime performance penalty. |
| 3749 | # |
| 3750 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 3751 | # which keep floating-point values in SSE registers in its |
| 3752 | # native precision (32-bit for single precision, and 64-bit |
| 3753 | # for double precision values). This means the floating-point |
| 3754 | # value used during computation does not change depending on |
| 3755 | # how the compiler optimized the code, since the value is |
| 3756 | # always kept in its specified precision. |
[email protected] | 6c0d3067 | 2014-03-12 00:31:30 | [diff] [blame] | 3757 | # |
| 3758 | # Refer to http://crbug.com/348761 for rationale behind SSE2 |
| 3759 | # being a minimum requirement for 32-bit Linux builds and |
| 3760 | # http://crbug.com/313032 for an example where this has "bit" |
| 3761 | # us in the past. |
| 3762 | 'cflags': [ |
| 3763 | '-msse2', |
| 3764 | '-mfpmath=sse', |
| 3765 | '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
| 3766 | '-m32', |
| 3767 | ], |
| 3768 | 'ldflags': [ |
| 3769 | '-m32', |
| 3770 | ], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3771 | 'conditions': [ |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3772 | # Use gold linker for Android ia32 target. |
| 3773 | ['OS=="android"', { |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3774 | 'ldflags': [ |
| 3775 | '-fuse-ld=gold', |
| 3776 | ], |
| 3777 | }], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3778 | # Install packages have started cropping up with |
| 3779 | # different headers between the 32-bit and 64-bit |
| 3780 | # versions, so we have to shadow those differences off |
| 3781 | # and make sure a 32-bit-on-64-bit build picks up the |
| 3782 | # right files. |
[email protected] | 3259402 | 2012-05-10 03:22:28 | [diff] [blame] | 3783 | # For android build, use NDK headers instead of host headers |
| 3784 | ['host_arch!="ia32" and OS!="android"', { |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3785 | 'include_dirs+': [ |
| 3786 | '/usr/include32', |
| 3787 | ], |
| 3788 | }], |
| 3789 | ], |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 3790 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3791 | ], |
| 3792 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3793 | ['target_arch=="x64"', { |
| 3794 | 'target_conditions': [ |
| 3795 | ['_toolset=="target"', { |
| 3796 | 'conditions': [ |
| 3797 | # Use gold linker for Android x64 target. |
| 3798 | ['OS=="android"', { |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3799 | 'ldflags': [ |
| 3800 | '-fuse-ld=gold', |
| 3801 | ], |
| 3802 | }], |
| 3803 | ], |
| 3804 | 'cflags': [ |
| 3805 | '-m64', |
| 3806 | '-march=x86-64', |
| 3807 | ], |
| 3808 | 'ldflags': [ |
| 3809 | '-m64', |
| 3810 | ], |
| 3811 | }], |
| 3812 | ], |
| 3813 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3814 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3815 | 'target_conditions': [ |
| 3816 | ['_toolset=="target"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3817 | 'conditions': [ |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3818 | ['clang==0', { |
| 3819 | 'cflags_cc': [ |
| 3820 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 3821 | # has changed whenever it encounters a varargs function. This |
| 3822 | # silences those warnings, as they are not helpful and |
| 3823 | # clutter legitimate warnings. |
| 3824 | '-Wno-abi', |
| 3825 | ], |
| 3826 | }], |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3827 | ['clang==1 and arm_arch!="" and OS!="android"', { |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3828 | 'cflags': [ |
| 3829 | '-target arm-linux-gnueabihf', |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3830 | ], |
| 3831 | 'ldflags': [ |
| 3832 | '-target arm-linux-gnueabihf', |
| 3833 | ], |
| 3834 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3835 | ['arm_arch!=""', { |
| 3836 | 'cflags': [ |
| 3837 | '-march=<(arm_arch)', |
| 3838 | ], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 3839 | 'conditions': [ |
| 3840 | ['use_lto==1 or use_lto_o2==1', { |
| 3841 | 'ldflags': [ |
| 3842 | '-march=<(arm_arch)', |
| 3843 | ], |
| 3844 | }], |
| 3845 | ], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3846 | }], |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3847 | ['clang==1 and OS!="android"', { |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3848 | 'cflags': [ |
[email protected] | 0c2072e | 2014-08-18 18:21:18 | [diff] [blame] | 3849 | # We need to disable clang's builtin assembler as it can't |
| 3850 | # handle several asm files, crbug.com/124610 |
[email protected] | d759586 | 2014-08-18 15:41:07 | [diff] [blame] | 3851 | '-no-integrated-as', |
| 3852 | ], |
| 3853 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3854 | ['arm_tune!=""', { |
| 3855 | 'cflags': [ |
| 3856 | '-mtune=<(arm_tune)', |
| 3857 | ], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 3858 | 'conditions': [ |
| 3859 | ['use_lto==1 or use_lto_o2==1', { |
| 3860 | 'ldflags': [ |
| 3861 | '-mtune=<(arm_tune)', |
| 3862 | ], |
| 3863 | }], |
| 3864 | ], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3865 | }], |
| 3866 | ['arm_fpu!=""', { |
| 3867 | 'cflags': [ |
| 3868 | '-mfpu=<(arm_fpu)', |
| 3869 | ], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 3870 | 'conditions': [ |
| 3871 | ['use_lto==1 or use_lto_o2==1', { |
| 3872 | 'ldflags': [ |
| 3873 | '-mfpu=<(arm_fpu)', |
| 3874 | ], |
| 3875 | }], |
| 3876 | ], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3877 | }], |
| 3878 | ['arm_float_abi!=""', { |
| 3879 | 'cflags': [ |
| 3880 | '-mfloat-abi=<(arm_float_abi)', |
| 3881 | ], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 3882 | 'conditions': [ |
| 3883 | ['use_lto==1 or use_lto_o2==1', { |
| 3884 | 'ldflags': [ |
| 3885 | '-mfloat-abi=<(arm_float_abi)', |
| 3886 | ], |
| 3887 | }], |
| 3888 | ], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3889 | }], |
| 3890 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3891 | 'cflags': [ |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3892 | '-mthumb', |
| 3893 | ], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 3894 | 'conditions': [ |
| 3895 | ['use_lto==1 or use_lto_o2==1', { |
| 3896 | 'ldflags': [ |
| 3897 | '-mthumb', |
| 3898 | ], |
| 3899 | }], |
| 3900 | ], |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3901 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3902 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3903 | # Most of the following flags are derived from what Android |
| 3904 | # uses by default when building for arm, reference for which |
| 3905 | # can be found in the following file in the Android NDK: |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3906 | # toolchains/arm-linux-androideabi-4.9/setup.mk |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3907 | 'cflags': [ |
| 3908 | # The tree-sra optimization (scalar replacement for |
| 3909 | # aggregates enabling subsequent optimizations) leads to |
| 3910 | # invalid code generation when using the Android NDK's |
| 3911 | # compiler (r5-r7). This can be verified using |
[email protected] | b78f8f6 | 2013-04-24 01:35:43 | [diff] [blame] | 3912 | # webkit_unit_tests' WTF.Checked_int8_t test. |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3913 | '-fno-tree-sra', |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 3914 | # The following option is disabled to improve binary |
| 3915 | # size and performance in gcc 4.9. |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3916 | '-fno-caller-saves', |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3917 | '-Wno-psabi', |
| 3918 | ], |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3919 | # Android now supports .relro sections properly. |
| 3920 | # NOTE: While these flags enable the generation of .relro |
| 3921 | # sections, the generated libraries can still be loaded on |
| 3922 | # older Android platform versions. |
| 3923 | 'ldflags': [ |
| 3924 | '-Wl,-z,relro', |
| 3925 | '-Wl,-z,now', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3926 | '-fuse-ld=gold', |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3927 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3928 | 'conditions': [ |
fdegans | c16332e8 | 2014-09-09 13:55:29 | [diff] [blame] | 3929 | ['gcc_version==48 and clang==0', { |
| 3930 | 'cflags': [ |
| 3931 | # The following 5 options are disabled to save on |
| 3932 | # binary size in GCC 4.8. |
| 3933 | '-fno-partial-inlining', |
| 3934 | '-fno-early-inlining', |
| 3935 | '-fno-tree-copy-prop', |
| 3936 | '-fno-tree-loop-optimize', |
| 3937 | '-fno-move-loop-invariants', |
| 3938 | ], |
| 3939 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3940 | ['arm_thumb==1', { |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 3941 | 'cflags': [ '-mthumb-interwork' ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3942 | }], |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3943 | ['profiling==1', { |
| 3944 | 'cflags': [ |
[email protected] | a0e681cc | 2014-05-16 16:56:47 | [diff] [blame] | 3945 | # Thumb code with frame pointer makes chrome crash |
| 3946 | # early. |
| 3947 | '-marm', |
| 3948 | '-mapcs-frame', # Required by -fno-omit-frame-pointer. |
| 3949 | # The perf report sometimes incorrectly attributes |
| 3950 | # code from tail calls. |
| 3951 | '-fno-optimize-sibling-calls', |
| 3952 | ], |
| 3953 | 'cflags!': [ |
| 3954 | '-fomit-frame-pointer', |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3955 | ], |
| 3956 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3957 | ['clang==1', { |
| 3958 | 'cflags!': [ |
| 3959 | # Clang does not support the following options. |
| 3960 | '-mthumb-interwork', |
| 3961 | '-finline-limit=64', |
| 3962 | '-fno-tree-sra', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3963 | '-fno-caller-saves', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3964 | '-Wno-psabi', |
| 3965 | ], |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3966 | 'cflags': [ |
| 3967 | # TODO(hans) Enable integrated-as (crbug.com/124610). |
| 3968 | '-no-integrated-as', |
[email protected] | f4091d3 | 2014-01-23 23:16:35 | [diff] [blame] | 3969 | '-B<(android_toolchain)', # Else /usr/bin/as gets picked up. |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3970 | ], |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3971 | 'ldflags': [ |
[email protected] | 2a9c856 | 2014-08-11 18:01:21 | [diff] [blame] | 3972 | # Let clang find the ld.gold in the NDK. |
[email protected] | b728310a | 2014-08-08 20:53:34 | [diff] [blame] | 3973 | '--gcc-toolchain=<(android_toolchain)/..', |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3974 | ], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3975 | }], |
[email protected] | cdc001e | 2014-01-23 11:07:53 | [diff] [blame] | 3976 | ['asan==1', { |
| 3977 | 'cflags': [ |
| 3978 | '-marm', # Required for frame pointer based stack traces. |
| 3979 | ], |
| 3980 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3981 | ], |
| 3982 | }], |
[email protected] | 2464170 | 2014-07-03 17:20:15 | [diff] [blame] | 3983 | ['chromecast==1', { |
| 3984 | 'cflags': [ |
| 3985 | # We set arm_arch to "" so that -march compiler option |
| 3986 | # is not set. Otherwise a gcc bug that would complain |
| 3987 | # about it conflicting with '-mcpu=cortex-a9'. The flag |
| 3988 | # '-march=armv7-a' is actually redundant anyway because |
| 3989 | # it is enabled by default when we built the toolchain. |
| 3990 | # And using '-mcpu=cortex-a9' should be sufficient. |
| 3991 | '-mcpu=cortex-a9', |
| 3992 | '-funwind-tables', |
| 3993 | # Breakpad requires symbols with debugging information |
| 3994 | '-g', |
| 3995 | ], |
| 3996 | 'ldflags': [ |
| 3997 | # We want to statically link libstdc++/libgcc_s. |
| 3998 | '-static-libstdc++', |
| 3999 | '-static-libgcc', |
| 4000 | ], |
| 4001 | 'cflags!': [ |
| 4002 | # Some components in Chromium (e.g. v8, skia, ffmpeg) |
| 4003 | # define their own cflags for arm builds that could |
| 4004 | # conflict with the flags we set here (e.g. |
| 4005 | # '-mcpu=cortex-a9'). Remove these flags explicitly. |
| 4006 | '-march=armv7-a', |
| 4007 | '-mtune=cortex-a8', |
| 4008 | ], |
| 4009 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 4010 | ], |
| 4011 | }], |
| 4012 | ], |
| 4013 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 4014 | ['target_arch=="arm64"', { |
| 4015 | 'target_conditions': [ |
| 4016 | ['_toolset=="target"', { |
| 4017 | 'conditions': [ |
| 4018 | ['OS=="android"', { |
| 4019 | 'cflags!': [ |
| 4020 | '-fstack-protector', # stack protector is always enabled on arm64. |
| 4021 | ], |
| 4022 | }], |
| 4023 | ], |
| 4024 | }], |
| 4025 | ], |
| 4026 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4027 | ['target_arch=="mipsel"', { |
| 4028 | 'target_conditions': [ |
| 4029 | ['_toolset=="target"', { |
| 4030 | 'conditions': [ |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 4031 | ['android_webview_build==0 and mips_arch_variant=="r6"', { |
| 4032 | 'cflags': ['-mips32r6', '-Wa,-mips32r6'], |
| 4033 | 'conditions': [ |
| 4034 | ['OS=="android"', { |
| 4035 | 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',], |
| 4036 | }], |
| 4037 | ], |
| 4038 | }], |
| 4039 | ['android_webview_build==0 and mips_arch_variant=="r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4040 | 'cflags': ['-mips32r2', '-Wa,-mips32r2'], |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 4041 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 4042 | ['android_webview_build==0 and mips_arch_variant=="r1"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4043 | 'cflags': ['-mips32', '-Wa,-mips32'], |
| 4044 | }], |
| 4045 | ], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4046 | 'ldflags': [ |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 4047 | '-Wl,--no-keep-memory' |
| 4048 | ], |
| 4049 | 'cflags_cc': [ |
| 4050 | '-Wno-uninitialized', |
| 4051 | ], |
| 4052 | }], |
| 4053 | ], |
| 4054 | }], |
petarj | c8a5da74 | 2014-08-27 14:33:36 | [diff] [blame] | 4055 | ['target_arch=="mips64el"', { |
| 4056 | 'target_conditions': [ |
| 4057 | ['_toolset=="target"', { |
| 4058 | 'conditions': [ |
| 4059 | ['android_webview_build==0 and mips_arch_variant=="r6"', { |
| 4060 | 'cflags': ['-mips64r6', '-Wa,-mips64r6'], |
| 4061 | 'ldflags': [ '-mips64r6' ], |
| 4062 | }], |
| 4063 | ['android_webview_build==0 and mips_arch_variant=="r2"', { |
| 4064 | 'cflags': ['-mips64r2', '-Wa,-mips64r2'], |
| 4065 | 'ldflags': [ '-mips64r2' ], |
| 4066 | }], |
| 4067 | ], |
| 4068 | 'cflags_cc': [ |
| 4069 | '-Wno-uninitialized', |
| 4070 | ], |
| 4071 | }], |
| 4072 | ], |
| 4073 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 4074 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 4075 | 'cflags': [ |
| 4076 | '-fPIC', |
| 4077 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 4078 | 'ldflags': [ |
| 4079 | '-fPIC', |
| 4080 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 4081 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 4082 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 4083 | 'target_conditions': [ |
| 4084 | ['_toolset=="target"', { |
| 4085 | 'cflags': [ |
| 4086 | '--sysroot=<(sysroot)', |
| 4087 | ], |
| 4088 | 'ldflags': [ |
| 4089 | '--sysroot=<(sysroot)', |
[email protected] | a7e10b9a | 2013-03-22 05:26:15 | [diff] [blame] | 4090 | '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 4091 | ], |
| 4092 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 4093 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 4094 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 4095 | 'cflags': [ |
[email protected] | 00c83cc | 2013-07-25 00:55:50 | [diff] [blame] | 4096 | # TODO(thakis): Remove, http://crbug.com/263960 |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 4097 | '-Wno-reserved-user-defined-literal', |
| 4098 | ], |
| 4099 | 'cflags_cc': [ |
thakis | 7d98251 | 2014-10-31 19:40:27 | [diff] [blame] | 4100 | # gnu++11 instead of c++11 is needed because some code uses |
| 4101 | # typeof() (a GNU extension). |
| 4102 | # TODO(thakis): Eventually switch this to c++11 instead, |
| 4103 | # http://crbug.com/427584 |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 4104 | '-std=gnu++11', |
| 4105 | ], |
| 4106 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 4107 | ['clang==0 and host_clang==1', { |
| 4108 | 'target_conditions': [ |
| 4109 | ['_toolset=="host"', { |
| 4110 | 'cflags_cc': [ '-std=gnu++11', ], |
| 4111 | }], |
| 4112 | ], |
| 4113 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4114 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4115 | 'cflags': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4116 | '<@(clang_chrome_plugins_flags)', |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4117 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4118 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4119 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4120 | 'cflags': [ |
| 4121 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4122 | ], |
| 4123 | }], |
| 4124 | ['clang==1 and clang_add_plugin!=""', { |
| 4125 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 4126 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4127 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4128 | }], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 4129 | ['clang==1 and target_arch=="ia32"', { |
| 4130 | 'cflags': [ |
| 4131 | # Else building libyuv gives clang's register allocator issues, |
| 4132 | # see llvm.org/PR15798 / crbug.com/233709 |
| 4133 | '-momit-leaf-frame-pointer', |
hans | 9df460f | 2014-10-09 16:08:50 | [diff] [blame] | 4134 | # Align the stack on 16-byte boundaries, http://crbug.com/418554. |
| 4135 | '-mstack-alignment=16', |
| 4136 | '-mstackrealign', |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 4137 | ], |
| 4138 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4139 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4140 | 'cflags': [ |
| 4141 | # See http://crbug.com/110262 |
| 4142 | '-fcolor-diagnostics', |
| 4143 | ], |
| 4144 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4145 | # Common options for AddressSanitizer, LeakSanitizer, |
| 4146 | # ThreadSanitizer and MemorySanitizer. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4147 | ['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] | 4148 | 'target_conditions': [ |
| 4149 | ['_toolset=="target"', { |
| 4150 | 'cflags': [ |
| 4151 | '-fno-omit-frame-pointer', |
| 4152 | '-gline-tables-only', |
| 4153 | ], |
[email protected] | b772fce | 2014-01-22 09:27:52 | [diff] [blame] | 4154 | 'cflags!': [ |
| 4155 | '-fomit-frame-pointer', |
| 4156 | ], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4157 | }], |
| 4158 | ], |
| 4159 | }], |
| 4160 | ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
| 4161 | 'target_conditions': [ |
| 4162 | ['_toolset=="target"', { |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 4163 | 'ldflags!': [ |
| 4164 | # Functions interposed by the sanitizers can make ld think |
| 4165 | # that some libraries aren't needed when they actually are, |
| 4166 | # http://crbug.com/234010. As workaround, disable --as-needed. |
| 4167 | '-Wl,--as-needed', |
| 4168 | ], |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 4169 | 'defines': [ |
| 4170 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 7a16a1e | 2014-07-04 04:18:03 | [diff] [blame] | 4171 | 'MEMORY_SANITIZER_INITIAL_SIZE', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 4172 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 4173 | }], |
| 4174 | ], |
| 4175 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 4176 | ['asan==1', { |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 4177 | 'target_conditions': [ |
| 4178 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4179 | 'cflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4180 | '-fsanitize=address', |
earthdok | 29838233 | 2014-10-29 21:35:15 | [diff] [blame] | 4181 | # TODO(earthdok): Re-enable. http://crbug.com/427202 |
| 4182 | #'-fsanitize-blacklist=<(asan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4183 | ], |
| 4184 | 'ldflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4185 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4186 | ], |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 4187 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4188 | ], |
[email protected] | eec02d98 | 2014-03-21 18:51:17 | [diff] [blame] | 4189 | 'conditions': [ |
| 4190 | ['OS=="mac"', { |
| 4191 | 'cflags': [ |
| 4192 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 4193 | ], |
| 4194 | }], |
| 4195 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 4196 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4197 | ['ubsan==1', { |
| 4198 | 'target_conditions': [ |
| 4199 | ['_toolset=="target"', { |
| 4200 | 'cflags': [ |
| 4201 | '-fsanitize=undefined', |
| 4202 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4203 | '-fno-sanitize=vptr', |
glider | dfb61d8 | 2014-11-11 16:28:05 | [diff] [blame] | 4204 | # Employ the experimental PBQP register allocator to avoid |
| 4205 | # slow compilation on files with too many basic blocks. |
| 4206 | # See http://crbug.com/426271. |
| 4207 | '-mllvm -regalloc=pbqp', |
| 4208 | # Speculatively use coalescing to slightly improve the code |
| 4209 | # generated by PBQP regallocator. May increase compile time. |
| 4210 | '-mllvm -pbqp-coalescing', |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 4211 | ], |
| 4212 | 'ldflags': [ |
| 4213 | '-fsanitize=undefined', |
| 4214 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4215 | '-fno-sanitize=vptr', |
| 4216 | ], |
| 4217 | }], |
| 4218 | ], |
| 4219 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4220 | ['ubsan_vptr==1', { |
| 4221 | 'target_conditions': [ |
| 4222 | ['_toolset=="target"', { |
| 4223 | 'cflags': [ |
| 4224 | '-fsanitize=vptr', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4225 | '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4226 | ], |
| 4227 | 'cflags_cc!': [ |
| 4228 | '-fno-rtti', |
| 4229 | ], |
| 4230 | 'cflags!': [ |
| 4231 | '-fno-rtti', |
| 4232 | ], |
| 4233 | 'ldflags': [ |
[email protected] | 22e1554 | 2014-07-18 23:09:24 | [diff] [blame] | 4234 | '-fsanitize=vptr', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 4235 | ], |
| 4236 | 'defines': [ |
| 4237 | 'UNDEFINED_SANITIZER', |
| 4238 | ], |
| 4239 | }], |
| 4240 | ], |
| 4241 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4242 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4243 | 'target_conditions': [ |
| 4244 | ['_toolset=="target"', { |
| 4245 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4246 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4247 | ], |
| 4248 | }], |
| 4249 | ], |
| 4250 | }], |
earthdok | 78507b9 | 2014-10-23 14:00:13 | [diff] [blame] | 4251 | ['asan_field_padding!=0', { |
| 4252 | 'target_conditions': [ |
| 4253 | ['_toolset=="target"', { |
| 4254 | 'cflags': [ |
| 4255 | '-fsanitize-address-field-padding=<(asan_field_padding)', |
| 4256 | ], |
| 4257 | }], |
| 4258 | ], |
| 4259 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4260 | ['lsan==1', { |
| 4261 | 'target_conditions': [ |
| 4262 | ['_toolset=="target"', { |
| 4263 | 'cflags': [ |
| 4264 | '-fsanitize=leak', |
| 4265 | ], |
| 4266 | 'ldflags': [ |
| 4267 | '-fsanitize=leak', |
| 4268 | ], |
| 4269 | 'defines': [ |
| 4270 | 'LEAK_SANITIZER', |
[email protected] | f6f65a0 | 2013-09-06 05:40:52 | [diff] [blame] | 4271 | 'WTF_USE_LEAK_SANITIZER=1', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 4272 | ], |
| 4273 | }], |
| 4274 | ], |
| 4275 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4276 | ['tsan==1', { |
| 4277 | 'target_conditions': [ |
| 4278 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4279 | 'cflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 4280 | '-fsanitize=thread', |
[email protected] | 3227d8f | 2014-04-26 00:49:32 | [diff] [blame] | 4281 | '-fsanitize-blacklist=<(tsan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4282 | ], |
| 4283 | 'ldflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 4284 | '-fsanitize=thread', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4285 | ], |
| 4286 | 'defines': [ |
| 4287 | 'THREAD_SANITIZER', |
| 4288 | 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 4289 | 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 4290 | ], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4291 | }], |
| 4292 | ], |
| 4293 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4294 | ['msan==1', { |
| 4295 | 'target_conditions': [ |
| 4296 | ['_toolset=="target"', { |
| 4297 | 'cflags': [ |
| 4298 | '-fsanitize=memory', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 4299 | '-fsanitize-memory-track-origins=<(msan_track_origins)', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 4300 | '-fsanitize-blacklist=<(msan_blacklist)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4301 | ], |
| 4302 | 'ldflags': [ |
| 4303 | '-fsanitize=memory', |
| 4304 | ], |
| 4305 | 'defines': [ |
| 4306 | 'MEMORY_SANITIZER', |
| 4307 | ], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4308 | }], |
| 4309 | ], |
| 4310 | }], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4311 | ['use_instrumented_libraries==1', { |
| 4312 | 'dependencies': [ |
| 4313 | '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', |
| 4314 | ], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4315 | }], |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4316 | ['use_custom_libcxx==1', { |
| 4317 | 'dependencies': [ |
[email protected] | 121cbf6e | 2014-05-05 13:30:42 | [diff] [blame] | 4318 | '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4319 | ], |
| 4320 | }], |
[email protected] | 8a48f3f | 2012-12-04 20:14:04 | [diff] [blame] | 4321 | ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4322 | 'target_conditions' : [ |
[email protected] | c45dbc5 | 2014-05-27 14:02:48 | [diff] [blame] | 4323 | # crazy_linker has an upstream gyp file we can't edit, and we |
| 4324 | # don't want to instrument it. |
| 4325 | ['_toolset=="target" and _target_name!="crazy_linker"', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4326 | 'cflags': [ |
| 4327 | '-finstrument-functions', |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4328 | # Allow mmx intrinsics to inline, so that the |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4329 | #0 compiler can expand the intrinsics. |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4330 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4331 | ], |
| 4332 | }], |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4333 | ['_toolset=="target" and OS=="android"', { |
| 4334 | 'cflags': [ |
| 4335 | # Avoids errors with current NDK: |
| 4336 | # "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] | 4337 | '-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h', |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4338 | ], |
| 4339 | }], |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4340 | ], |
| 4341 | }], |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 4342 | ['linux_dump_symbols==1', { |
| 4343 | 'cflags': [ '-g' ], |
noms | 27772016 | 2014-08-26 15:21:08 | [diff] [blame] | 4344 | 'conditions': [ |
| 4345 | ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', { |
| 4346 | 'target_conditions': [ |
| 4347 | ['_toolset=="target"', { |
| 4348 | 'ldflags': [ |
| 4349 | # Attempt to use less memory to prevent the linker from |
| 4350 | # running out of address space. Considering installing a |
| 4351 | # 64-bit kernel and switching to a 64-bit linker. |
| 4352 | '-Wl,--no-keep-memory', |
| 4353 | ], |
| 4354 | }], |
| 4355 | ], |
| 4356 | }], |
| 4357 | ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 4358 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 4359 | ['use_allocator!="tcmalloc"', { |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 4360 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 4361 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4362 | ['linux_use_gold_flags==1', { |
[email protected] | b728310a | 2014-08-08 20:53:34 | [diff] [blame] | 4363 | # Newer gccs and clangs support -fuse-ld, use the flag to force gold |
| 4364 | # selection. |
| 4365 | # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html |
| 4366 | 'ldflags': [ '-fuse-ld=gold', ], |
| 4367 | |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4368 | 'target_conditions': [ |
| 4369 | ['_toolset=="target"', { |
| 4370 | 'ldflags': [ |
| 4371 | # Experimentation found that using four linking threads |
| 4372 | # saved ~20% of link time. |
| 4373 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 4374 | # Only apply this to the target linker, since the host |
| 4375 | # linker might not be gold, but isn't used much anyway. |
[email protected] | 21ed97e | 2014-01-14 23:40:55 | [diff] [blame] | 4376 | # TODO(raymes): Disable threading because gold is frequently |
| 4377 | # crashing on the bots: crbug.com/161942. |
| 4378 | # '-Wl,--threads', |
| 4379 | # '-Wl,--thread-count=4', |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4380 | ], |
| 4381 | }], |
[email protected] | 68d01e8 | 2012-12-08 03:36:32 | [diff] [blame] | 4382 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4383 | 'conditions': [ |
| 4384 | ['release_valgrind_build==0', { |
| 4385 | 'target_conditions': [ |
| 4386 | ['_toolset=="target"', { |
| 4387 | 'ldflags': [ |
Lei Zhang | d99e73cf | 2014-09-24 08:04:49 | [diff] [blame] | 4388 | '-Wl,--icf=safe', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4389 | ], |
| 4390 | }], |
| 4391 | ], |
| 4392 | }], |
| 4393 | ], |
| 4394 | }], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4395 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4396 | 'cflags': [ |
| 4397 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
| 4398 | ], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4399 | }], |
| 4400 | ['linux_use_bundled_gold==1', { |
| 4401 | # Put our binutils, which contains gold in the search path. We pass |
| 4402 | # the path to gold to the compiler. gyp leaves unspecified what the |
| 4403 | # cwd is when running the compiler, so the normal gyp path-munging |
| 4404 | # fails us. This hack gets the right path. |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4405 | 'ldflags': [ |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4406 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4407 | ], |
| 4408 | }], |
[email protected] | ebb701b7 | 2014-04-24 08:24:51 | [diff] [blame] | 4409 | # Some binutils 2.23 releases may or may not have new dtags enabled, |
| 4410 | # but they are all compatible with --disable-new-dtags, |
| 4411 | # because the new dynamic tags are not created by default. |
| 4412 | ['binutils_version>=223', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4413 | # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
| 4414 | # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
| 4415 | # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags |
| 4416 | # inside this file to allow usage of --no-as-needed and removal of |
| 4417 | # this flag. |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4418 | 'ldflags': [ |
| 4419 | '-Wl,--disable-new-dtags', |
| 4420 | ], |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4421 | }], |
[email protected] | 3d40fa2 | 2014-07-31 12:55:01 | [diff] [blame] | 4422 | ['gcc_version>=47 and clang==0', { |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4423 | 'target_conditions': [ |
| 4424 | ['_toolset=="target"', { |
| 4425 | 'cflags_cc': [ |
| 4426 | '-std=gnu++11', |
| 4427 | # See comment for -Wno-c++11-narrowing. |
| 4428 | '-Wno-narrowing', |
| 4429 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4430 | '-Wno-literal-suffix', |
| 4431 | ], |
| 4432 | }], |
| 4433 | ], |
| 4434 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 4435 | ['host_gcc_version>=47 and clang==0 and host_clang==0', { |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4436 | 'target_conditions': [ |
| 4437 | ['_toolset=="host"', { |
| 4438 | 'cflags_cc': [ |
| 4439 | '-std=gnu++11', |
| 4440 | # See comment for -Wno-c++11-narrowing. |
| 4441 | '-Wno-narrowing', |
| 4442 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4443 | '-Wno-literal-suffix', |
| 4444 | ], |
| 4445 | }], |
| 4446 | ], |
| 4447 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 4448 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 4449 | }, |
| 4450 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 4451 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 4452 | # with Linux. |
| 4453 | ['OS=="freebsd"', { |
| 4454 | 'target_defaults': { |
| 4455 | 'ldflags': [ |
| 4456 | '-Wl,--no-keep-memory', |
| 4457 | ], |
| 4458 | }, |
| 4459 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4460 | # Android-specific options; note that most are set above with Linux. |
| 4461 | ['OS=="android"', { |
| 4462 | 'variables': { |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4463 | # This is a unique identifier for a given build. It's used for |
| 4464 | # identifying various build artifacts corresponding to a particular |
| 4465 | # build of chrome (e.g. where to find archived symbols). |
| 4466 | 'chrome_build_id%': '', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4467 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4468 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 4469 | # has to be before that in the set of libraries. |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4470 | ['component=="shared_library"', { |
| 4471 | 'android_stlport_library': 'stlport_shared', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4472 | }, { |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4473 | 'android_stlport_library': 'stlport_static', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4474 | }], |
| 4475 | ], |
| 4476 | |
| 4477 | # Placing this variable here prevents from forking libvpx, used |
| 4478 | # by remoting. Remoting is off, so it needn't built, |
| 4479 | # so forking it's deps seems like overkill. |
| 4480 | # But this variable need defined to properly run gyp. |
| 4481 | # A proper solution is to have an OS==android conditional |
| 4482 | # in third_party/libvpx/libvpx.gyp to define it. |
| 4483 | 'libvpx_path': 'lib/linux/arm', |
| 4484 | }, |
| 4485 | 'target_defaults': { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4486 | 'variables': { |
| 4487 | 'release_extra_cflags%': '', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4488 | 'conditions': [ |
| 4489 | # If we're using the components build, append "cr" to all shared |
| 4490 | # libraries to avoid naming collisions with android system library |
| 4491 | # versions with the same name (e.g. skia, icu). |
| 4492 | ['component=="shared_library"', { |
| 4493 | 'android_product_extension': 'cr.so', |
| 4494 | }, { |
| 4495 | 'android_product_extension': 'so', |
| 4496 | } ], |
| 4497 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 4498 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4499 | 'target_conditions': [ |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4500 | ['_type=="shared_library"', { |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 4501 | 'product_extension': '<(android_product_extension)', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4502 | }], |
| 4503 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4504 | # Settings for building device targets using Android's toolchain. |
| 4505 | # These are based on the setup.mk file from the Android NDK. |
| 4506 | # |
| 4507 | # The NDK Android executable link step looks as follows: |
| 4508 | # $LDFLAGS |
| 4509 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 4510 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4511 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4512 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4513 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4514 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4515 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 4516 | # |
| 4517 | # For now the above are approximated for executables by adding |
| 4518 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 4519 | # of 'libraries'. |
| 4520 | # |
| 4521 | # The NDK Android shared library link step looks as follows: |
| 4522 | # $LDFLAGS |
| 4523 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4524 | # -l,--whole-archive |
| 4525 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 4526 | # -l,--no-whole-archive |
| 4527 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4528 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4529 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4530 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4531 | # |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 4532 | # For now, assume that whole static libraries are not needed. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4533 | # |
| 4534 | # For both executables and shared libraries, add the proper |
| 4535 | # libgcc.a to the start of libraries which puts it in the |
| 4536 | # proper spot after .o and .a files get linked in. |
| 4537 | # |
| 4538 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 4539 | # support for a custom link command line. |
| 4540 | ['_toolset=="target"', { |
| 4541 | 'cflags!': [ |
| 4542 | '-pthread', # Not supported by Android toolchain. |
| 4543 | ], |
| 4544 | 'cflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4545 | '-ffunction-sections', |
| 4546 | '-funwind-tables', |
| 4547 | '-g', |
| 4548 | '-fstack-protector', |
| 4549 | '-fno-short-enums', |
| 4550 | '-finline-limit=64', |
| 4551 | '-Wa,--noexecstack', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4552 | '<@(release_extra_cflags)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4553 | ], |
| 4554 | 'defines': [ |
| 4555 | 'ANDROID', |
| 4556 | '__GNU_SOURCE=1', # Necessary for clone() |
| 4557 | 'USE_STLPORT=1', |
| 4558 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4559 | 'CHROME_BUILD_ID="<(chrome_build_id)"', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4560 | ], |
| 4561 | 'ldflags!': [ |
| 4562 | '-pthread', # Not supported by Android toolchain. |
| 4563 | ], |
| 4564 | 'ldflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4565 | '-Wl,--no-undefined', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4566 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4567 | 'conditions': [ |
[email protected] | 71b4fc3 | 2014-08-11 11:27:12 | [diff] [blame] | 4568 | ['component=="static_library"', { |
| 4569 | 'ldflags': [ |
[email protected] | b419365 | 2014-06-09 11:33:38 | [diff] [blame] | 4570 | '-Wl,--exclude-libs=ALL', |
| 4571 | ], |
| 4572 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4573 | ['clang==1', { |
| 4574 | 'cflags': [ |
| 4575 | # Work around incompatibilities between bionic and clang |
| 4576 | # headers. |
| 4577 | '-D__compiler_offsetof=__builtin_offsetof', |
| 4578 | '-Dnan=__builtin_nan', |
| 4579 | ], |
| 4580 | 'conditions': [ |
| 4581 | ['target_arch=="arm"', { |
| 4582 | 'cflags': [ |
| 4583 | '-target arm-linux-androideabi', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4584 | ], |
| 4585 | 'ldflags': [ |
| 4586 | '-target arm-linux-androideabi', |
| 4587 | ], |
| 4588 | }], |
| 4589 | ['target_arch=="ia32"', { |
| 4590 | 'cflags': [ |
| 4591 | '-target x86-linux-androideabi', |
| 4592 | ], |
| 4593 | 'ldflags': [ |
| 4594 | '-target x86-linux-androideabi', |
| 4595 | ], |
| 4596 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 4597 | # Place holder for x64 support, not tested. |
| 4598 | # TODO: Enable clang support for Android x64. http://crbug.com/346626 |
| 4599 | ['target_arch=="x64"', { |
| 4600 | 'cflags': [ |
| 4601 | '-target x86_64-linux-androideabi', |
| 4602 | ], |
| 4603 | 'ldflags': [ |
| 4604 | '-target x86_64-linux-androideabi', |
| 4605 | ], |
| 4606 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4607 | ], |
| 4608 | }], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 4609 | ['asan==1', { |
| 4610 | 'cflags': [ |
| 4611 | # Android build relies on -Wl,--gc-sections removing |
| 4612 | # unreachable code. ASan instrumentation for globals inhibits |
| 4613 | # this and results in a library with unresolvable relocations. |
| 4614 | # TODO(eugenis): find a way to reenable this. |
| 4615 | '-mllvm -asan-globals=0', |
| 4616 | ], |
hans | 51709a2 | 2014-10-15 21:20:13 | [diff] [blame] | 4617 | 'conditions': [ |
| 4618 | ['target_arch=="arm"', { |
| 4619 | 'ldflags': [ |
| 4620 | # TODO(hans): The ASan runtime is no longer automatically |
| 4621 | # added to the link line when using -nostdlib. Can we |
| 4622 | # stop adding -nostdlib? (crbug.com/423429) |
| 4623 | '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/lib/clang/3.6.0/lib/linux/libclang_rt.asan-arm-android.so', |
| 4624 | ], |
| 4625 | }], |
| 4626 | ], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 4627 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4628 | ['android_webview_build==0', { |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4629 | 'defines': [ |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4630 | # The NDK has these things, but doesn't define the constants |
| 4631 | # to say that it does. Define them here instead. |
| 4632 | 'HAVE_SYS_UIO_H', |
| 4633 | ], |
| 4634 | 'cflags': [ |
| 4635 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4636 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4637 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 4638 | '--sysroot=<(android_ndk_sysroot)', |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4639 | '-nostdlib', |
| 4640 | ], |
fdegans | 3572927c | 2014-11-06 12:28:02 | [diff] [blame] | 4641 | 'variables': { |
| 4642 | 'conditions': [ |
| 4643 | ['target_arch=="arm" and arm_thumb==1', { |
| 4644 | 'thumb_option%': '-mthumb', |
| 4645 | }, { |
| 4646 | 'thumb_option%': '', |
| 4647 | }], |
| 4648 | ], |
| 4649 | }, |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4650 | 'libraries': [ |
| 4651 | '-l<(android_stlport_library)', |
| 4652 | # Manually link the libgcc.a that the cross compiler uses. |
fdegans | 3572927c | 2014-11-06 12:28:02 | [diff] [blame] | 4653 | '<!(<(android_toolchain)/*-gcc <(thumb_option) -print-libgcc-file-name)', |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4654 | '-lc', |
| 4655 | '-ldl', |
| 4656 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4657 | ], |
| 4658 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4659 | ['android_webview_build==1', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4660 | 'cflags': [ |
[email protected] | 0488213 | 2012-11-21 12:40:45 | [diff] [blame] | 4661 | # Android predefines this as 1; undefine it here so Chromium |
| 4662 | # can redefine it later to be 2 for chromium code and unset |
| 4663 | # for third party code. This works because cflags are added |
| 4664 | # before defines. |
| 4665 | '-U_FORTIFY_SOURCE', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4666 | # Disable any additional warnings enabled by the Android build system but which |
| 4667 | # chromium does not build cleanly with (when treating warning as errors). |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4668 | # Things that are part of -Wextra: |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4669 | '-Wno-extra', # Enabled by -Wextra, but no specific flag |
| 4670 | '-Wno-ignored-qualifiers', |
| 4671 | '-Wno-type-limits', |
[email protected] | 6c55f124 | 2014-02-12 16:06:56 | [diff] [blame] | 4672 | '-Wno-unused-but-set-variable', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4673 | ], |
| 4674 | 'cflags_cc': [ |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 4675 | # Other things unrelated to -Wextra: |
| 4676 | '-Wno-non-virtual-dtor', |
| 4677 | '-Wno-sign-promo', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4678 | ], |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4679 | 'libraries': [ |
| 4680 | '-ldl', |
| 4681 | ], |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4682 | }], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 4683 | ['android_webview_build==1', { |
| 4684 | 'target_conditions': [ |
| 4685 | ['chromium_code==0', { |
| 4686 | 'cflags': [ |
| 4687 | # There is a class of warning which: |
| 4688 | # 1) Android always enables and also treats as errors |
| 4689 | # 2) Chromium ignores in third party code |
| 4690 | # So we re-enable those warnings when building Android. |
| 4691 | '-Wno-address', |
| 4692 | '-Wno-format-security', |
| 4693 | '-Wno-return-type', |
| 4694 | '-Wno-sequence-point', |
| 4695 | ], |
| 4696 | 'cflags_cc': [ |
| 4697 | '-Wno-non-virtual-dtor', |
| 4698 | ], |
| 4699 | }], |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4700 | ], |
| 4701 | }], |
[email protected] | febd357 | 2012-05-03 09:17:45 | [diff] [blame] | 4702 | ['target_arch == "arm"', { |
| 4703 | 'ldflags': [ |
| 4704 | # Enable identical code folding to reduce size. |
| 4705 | '-Wl,--icf=safe', |
| 4706 | ], |
| 4707 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4708 | # NOTE: The stlport header include paths below are specified in |
| 4709 | # cflags rather than include_dirs because they need to come |
| 4710 | # after include_dirs. Think of them like system headers, but |
| 4711 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 4712 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 4713 | # The include ordering here is important; change with caution. |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4714 | ['android_webview_build==0', { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4715 | 'cflags': [ |
[email protected] | 843ca8c | 2014-07-09 15:50:32 | [diff] [blame] | 4716 | '-isystem<(android_stlport_include)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4717 | ], |
fdegans | 3572927c | 2014-11-06 12:28:02 | [diff] [blame] | 4718 | 'conditions': [ |
| 4719 | ['target_arch=="arm" and arm_thumb==1', { |
| 4720 | 'ldflags': [ '-L<(android_stlport_libs_dir)/thumb' ] |
| 4721 | }, { |
| 4722 | 'ldflags': [ '-L<(android_stlport_libs_dir)' ] |
| 4723 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4724 | ], |
torne | 3bc122f | 2014-10-18 11:10:17 | [diff] [blame] | 4725 | }, { # else: android_webview_build!=0 |
| 4726 | 'aosp_build_settings': { |
| 4727 | # Specify that we want to statically link stlport from the |
| 4728 | # NDK. This will provide all the include and library paths |
| 4729 | # automatically at build time, and link the right library. |
| 4730 | 'LOCAL_NDK_STL_VARIANT': 'stlport_static', |
| 4731 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4732 | }], |
| 4733 | ['target_arch=="ia32"', { |
| 4734 | # The x86 toolchain currently has problems with stack-protector. |
| 4735 | 'cflags!': [ |
| 4736 | '-fstack-protector', |
| 4737 | ], |
| 4738 | 'cflags': [ |
| 4739 | '-fno-stack-protector', |
| 4740 | ], |
| 4741 | }], |
| 4742 | ], |
| 4743 | 'target_conditions': [ |
| 4744 | ['_type=="executable"', { |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4745 | # Force android tools to export the "main" symbol so they can be |
| 4746 | # loaded on ICS using the run_pie wrapper. See crbug.com/373219. |
| 4747 | # TODO(primiano): remove -fvisibility and -rdynamic flags below |
| 4748 | # when ICS support will be dropped. |
| 4749 | 'cflags': [ |
| 4750 | '-fPIE', |
| 4751 | '-fvisibility=default', |
| 4752 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4753 | 'ldflags': [ |
| 4754 | '-Bdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4755 | '-Wl,--gc-sections', |
| 4756 | '-Wl,-z,nocopyreloc', |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4757 | '-pie', |
| 4758 | '-rdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4759 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 4760 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 4761 | ], |
| 4762 | 'libraries': [ |
| 4763 | # crtend_android.o needs to be the last item in libraries. |
| 4764 | # Do not add any libraries after this! |
| 4765 | '<(android_ndk_lib)/crtend_android.o', |
| 4766 | ], |
| 4767 | }], |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4768 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | 7ab8b9be | 2014-06-12 17:20:42 | [diff] [blame] | 4769 | 'ldflags!': [ |
| 4770 | '-Wl,--exclude-libs=ALL', |
| 4771 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4772 | 'ldflags': [ |
| 4773 | '-Wl,-shared,-Bsymbolic', |
| 4774 | ], |
[email protected] | d093fe8b | 2013-04-30 18:00:23 | [diff] [blame] | 4775 | 'conditions': [ |
| 4776 | ['android_webview_build==0', { |
| 4777 | 'ldflags': [ |
| 4778 | # crtbegin_so.o should be the last item in ldflags. |
| 4779 | '<(android_ndk_lib)/crtbegin_so.o', |
| 4780 | ], |
| 4781 | 'libraries': [ |
| 4782 | # crtend_so.o needs to be the last item in libraries. |
| 4783 | # Do not add any libraries after this! |
| 4784 | '<(android_ndk_lib)/crtend_so.o', |
| 4785 | ], |
| 4786 | }], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 4787 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4788 | }], |
| 4789 | ], |
| 4790 | }], |
| 4791 | # Settings for building host targets using the system toolchain. |
| 4792 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4793 | 'cflags!': [ |
| 4794 | # Due to issues in Clang build system, using ASan on 32-bit |
| 4795 | # binaries on x86_64 host is problematic. |
| 4796 | # TODO(eugenis): re-enable. |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4797 | '-fsanitize=address', |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4798 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4799 | 'ldflags!': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4800 | '-fsanitize=address', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4801 | '-Wl,-z,noexecstack', |
| 4802 | '-Wl,--gc-sections', |
| 4803 | '-Wl,-O1', |
| 4804 | '-Wl,--as-needed', |
[email protected] | df24071 | 2013-09-02 23:17:22 | [diff] [blame] | 4805 | '-Wl,--warn-shared-textrel', |
| 4806 | '-Wl,--fatal-warnings', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4807 | ], |
| 4808 | }], |
[email protected] | 0ccf578f | 2013-03-13 11:13:39 | [diff] [blame] | 4809 | # Settings for building host targets on mac. |
| 4810 | ['_toolset=="host" and host_os=="mac"', { |
| 4811 | 'ldflags!': [ |
| 4812 | '-Wl,-z,now', |
| 4813 | '-Wl,-z,relro', |
| 4814 | ], |
| 4815 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4816 | ], |
| 4817 | }, |
| 4818 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 4819 | ['OS=="solaris"', { |
| 4820 | 'cflags!': ['-fvisibility=hidden'], |
| 4821 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 4822 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4823 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4824 | 'target_defaults': { |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 4825 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4826 | 'xcode_settings': { |
| 4827 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | 2429bb73 | 2012-10-19 00:24:24 | [diff] [blame] | 4828 | # Don't link in libarclite_macosx.a, see http://crbug.com/156530. |
| 4829 | 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime |
[email protected] | 47c3e85 | 2013-09-13 02:22:31 | [diff] [blame] | 4830 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4831 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 4832 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4833 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 4834 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 4835 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 4836 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 4837 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4838 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 4839 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 4840 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 4841 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4842 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4843 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4844 | 'USE_HEADERMAP': 'NO', |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 4845 | 'WARNING_CFLAGS': [ |
| 4846 | '-Wall', |
| 4847 | '-Wendif-labels', |
| 4848 | '-Wextra', |
| 4849 | # Don't warn about unused function parameters. |
| 4850 | '-Wno-unused-parameter', |
| 4851 | # Don't warn about the "struct foo f = {0};" initialization |
| 4852 | # pattern. |
| 4853 | '-Wno-missing-field-initializers', |
| 4854 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4855 | 'conditions': [ |
| 4856 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 4857 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 4858 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4859 | # Note that the prebuilt Clang binaries should not be used for iOS |
| 4860 | # development except for ASan builds. |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4861 | ['clang==1', { |
thakis | 7d98251 | 2014-10-31 19:40:27 | [diff] [blame] | 4862 | 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11 |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4863 | # Warn if automatic synthesis is triggered with |
| 4864 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4865 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4866 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4867 | 'WARNING_CFLAGS': [ |
[email protected] | bb14819 | 2014-04-02 03:37:33 | [diff] [blame] | 4868 | # This warns on selectors from Cocoa headers (-length, -set). |
| 4869 | # cfe-dev is currently discussing the merits of this warning. |
| 4870 | # TODO(thakis): Reevaluate what to do with this, based one |
| 4871 | # cfe-dev discussion. |
| 4872 | '-Wno-selector-type-mismatch', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4873 | ], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4874 | 'conditions': [ |
| 4875 | ['clang_xcode==0', { |
| 4876 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 4877 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4878 | }], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4879 | ], |
| 4880 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4881 | ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4882 | 'OTHER_CFLAGS': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4883 | '<@(clang_chrome_plugins_flags)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4884 | ], |
| 4885 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4886 | ['clang==1 and clang_xcode==0 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4887 | 'OTHER_CFLAGS': [ |
| 4888 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4889 | ], |
| 4890 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4891 | ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4892 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4893 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4894 | ], |
| 4895 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4896 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4897 | 'OTHER_CFLAGS': [ |
| 4898 | # See http://crbug.com/110262 |
| 4899 | '-fcolor-diagnostics', |
| 4900 | ], |
| 4901 | }], |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4902 | ['OS=="ios" and target_subarch!="arm32" and \ |
[email protected] | 7e0fe491 | 2014-04-09 20:53:00 | [diff] [blame] | 4903 | "<(GENERATOR)"=="xcode"', { |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4904 | 'OTHER_CFLAGS': [ |
| 4905 | # TODO(ios): when building Chrome for iOS on 64-bit platform |
| 4906 | # with Xcode, the -Wshorted-64-to-32 warning is automatically |
| 4907 | # enabled. This cause failures when compiling protobuf code, |
| 4908 | # so disable the warning. http://crbug.com/359107 |
| 4909 | '-Wno-shorten-64-to-32', |
| 4910 | ], |
| 4911 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4912 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4913 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4914 | 'conditions': [ |
| 4915 | ['clang==1', { |
| 4916 | 'variables': { |
| 4917 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 4918 | }, |
| 4919 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4920 | ['asan==1', { |
| 4921 | 'xcode_settings': { |
| 4922 | 'OTHER_CFLAGS': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4923 | '-fsanitize=address', |
[email protected] | 22df2b2 | 2014-03-13 10:55:07 | [diff] [blame] | 4924 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
[email protected] | 14a3735 | 2014-05-16 11:39:55 | [diff] [blame] | 4925 | '-gline-tables-only', |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4926 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4927 | }, |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4928 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4929 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4930 | 'target_conditions': [ |
| 4931 | ['_toolset=="target"', { |
| 4932 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4933 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4934 | ], |
| 4935 | }], |
| 4936 | ], |
| 4937 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4938 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4939 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4940 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4941 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4942 | 'conditions': [ |
| 4943 | ['asan==1', { |
| 4944 | 'xcode_settings': { |
| 4945 | 'OTHER_LDFLAGS': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4946 | '-fsanitize=address', |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4947 | ], |
| 4948 | }, |
| 4949 | }], |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 4950 | ['mac_write_linker_maps==1', { |
| 4951 | 'xcode_settings': { |
| 4952 | 'OTHER_LDFLAGS': [ |
| 4953 | '-Wl,-map,>(_target_name).map', |
| 4954 | ], |
| 4955 | }, |
| 4956 | }], |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4957 | ], |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4958 | }], |
| 4959 | ['_mac_bundle', { |
| 4960 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 4961 | 'target_conditions': [ |
| 4962 | ['_type=="executable"', { |
| 4963 | 'conditions': [ |
| 4964 | ['asan==1', { |
| 4965 | 'postbuilds': [ |
| 4966 | { |
| 4967 | 'variables': { |
| 4968 | # Define copy_asan_dylib_path in a variable ending in |
| 4969 | # _path so that gyp understands it's a path and |
| 4970 | # performs proper relativization during dict merging. |
| 4971 | 'copy_asan_dylib_path': |
| 4972 | 'mac/copy_asan_runtime_dylib.sh', |
| 4973 | }, |
| 4974 | 'postbuild_name': 'Copy ASan runtime dylib', |
| 4975 | 'action': [ |
| 4976 | '<(copy_asan_dylib_path)', |
| 4977 | ], |
| 4978 | }, |
| 4979 | ], |
| 4980 | }], |
| 4981 | ], |
| 4982 | }], |
| 4983 | ], |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 4984 | }], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4985 | ], # target_conditions |
| 4986 | }, # target_defaults |
| 4987 | }], # OS=="mac" or OS=="ios" |
| 4988 | ['OS=="mac"', { |
| 4989 | 'target_defaults': { |
[email protected] | eea7d33 | 2014-05-16 11:43:08 | [diff] [blame] | 4990 | 'defines': [ |
| 4991 | # Prevent Mac OS X AssertMacros.h from defining macros that collide |
| 4992 | # with common names, like 'check', 'require', and 'verify'. |
| 4993 | # (Included by system header. Also exists on iOS but not included.) |
| 4994 | # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h |
| 4995 | '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', |
| 4996 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4997 | 'variables': { |
| 4998 | # These should end with %, but there seems to be a bug with % in |
| 4999 | # variables that are intended to be set to different values in |
| 5000 | # different targets, like these. |
| 5001 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 5002 | # Strip debugging symbols from the target. |
| 5003 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 5004 | 'conditions': [ |
| 5005 | ['asan==1', { |
| 5006 | 'conditions': [ |
| 5007 | ['mac_want_real_dsym=="default"', { |
[email protected] | 97ab1fa | 2012-12-24 10:50:35 | [diff] [blame] | 5008 | 'mac_real_dsym': 1, |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 5009 | }, { |
| 5010 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 5011 | }], |
| 5012 | ], |
| 5013 | }, { |
| 5014 | 'conditions': [ |
| 5015 | ['mac_want_real_dsym=="default"', { |
| 5016 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 5017 | }, { |
| 5018 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 5019 | }], |
| 5020 | ], |
| 5021 | }], |
| 5022 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 5023 | }, |
| 5024 | 'xcode_settings': { |
| 5025 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 5026 | # (Equivalent to -fPIC) |
| 5027 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 5028 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 5029 | # Keep pch files below xcodebuild/. |
| 5030 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
[email protected] | 6211f62 | 2013-07-29 23:35:39 | [diff] [blame] | 5031 | 'OTHER_CFLAGS': [ |
| 5032 | # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
| 5033 | # xcode_setting, but not until all downstream projects' mac bots are |
| 5034 | # using xcode >= 4.6, because that's when the default value of the |
| 5035 | # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
| 5036 | # setting is a no-op as far as xcode is concerned, but the compiler |
| 5037 | # behaves differently based on whether -fno-strict-aliasing is |
| 5038 | # specified or not. |
| 5039 | '-fno-strict-aliasing', # See http://crbug.com/32204. |
| 5040 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 5041 | }, |
| 5042 | 'target_conditions': [ |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 5043 | ['_type=="executable"', { |
| 5044 | 'postbuilds': [ |
| 5045 | { |
| 5046 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 5047 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 5048 | # ensures that the position-independent executable (PIE) bit |
| 5049 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 5050 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 5051 | # Define change_mach_o_flags in a variable ending in _path |
| 5052 | # so that GYP understands it's a path and performs proper |
| 5053 | # relativization during dict merging. |
| 5054 | 'change_mach_o_flags_path': |
| 5055 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 5056 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 5057 | ], |
| 5058 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 5059 | ['mac_pie==0 or release_valgrind_build==1', { |
| 5060 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 5061 | # the target specifies mac_pie=0 or if building for |
| 5062 | # Valgrind, because Valgrind doesn't understand slide. |
| 5063 | # See the similar mac_pie/release_valgrind_build check |
| 5064 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 5065 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 5066 | '--no-pie', |
| 5067 | ], |
| 5068 | }], |
| 5069 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 5070 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 5071 | 'postbuild_name': 'Change Mach-O Flags', |
| 5072 | 'action': [ |
| 5073 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 5074 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 5075 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 5076 | }, |
| 5077 | ], |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5078 | 'conditions': [ |
| 5079 | ['asan==1', { |
| 5080 | 'variables': { |
jiayl | 55c7faa | 2014-09-24 16:25:18 | [diff] [blame] | 5081 | 'asan_saves_file': 'asan.saves', |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5082 | }, |
| 5083 | 'xcode_settings': { |
jiayl | 55c7faa | 2014-09-24 16:25:18 | [diff] [blame] | 5084 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5085 | }, |
| 5086 | }], |
| 5087 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 5088 | 'target_conditions': [ |
| 5089 | ['mac_pie==1 and release_valgrind_build==0', { |
| 5090 | # Turn on position-independence (ASLR) for executables. When |
| 5091 | # PIE is on for the Chrome executables, the framework will |
| 5092 | # also be subject to ASLR. |
| 5093 | # Don't do this when building for Valgrind, because Valgrind |
| 5094 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 5095 | # understand slide, and get rid of the Valgrind check. |
| 5096 | 'xcode_settings': { |
| 5097 | 'OTHER_LDFLAGS': [ |
| 5098 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 5099 | ], |
| 5100 | }, |
| 5101 | }], |
| 5102 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 5103 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 5104 | ['(_type=="executable" or _type=="shared_library" or \ |
| 5105 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5106 | 'target_conditions': [ |
| 5107 | ['mac_real_dsym == 1', { |
| 5108 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 5109 | # debug information format to dwarf-with-dsym. Since |
| 5110 | # strip_from_xcode will not be used, set Xcode to do the |
| 5111 | # stripping as well. |
| 5112 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5113 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5114 | 'xcode_settings': { |
| 5115 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 5116 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 5117 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5118 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 5119 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5120 | # The Xcode default is to strip debugging symbols |
| 5121 | # only (-S). Local symbols should be stripped as |
| 5122 | # well, which will be handled by -x. Xcode will |
| 5123 | # continue to insert -S when stripping even when |
| 5124 | # additional flags are added with STRIPFLAGS. |
| 5125 | 'STRIPFLAGS': '-x', |
[email protected] | ed7e8369 | 2012-12-24 10:13:40 | [diff] [blame] | 5126 | }], # _type=="shared_library" or _type=="loadable_module" |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5127 | ['_type=="executable"', { |
| 5128 | 'conditions': [ |
| 5129 | ['asan==1', { |
| 5130 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
jiayl | 55c7faa | 2014-09-24 16:25:18 | [diff] [blame] | 5131 | }] |
treib | 0b804d0 | 2014-09-01 17:06:48 | [diff] [blame] | 5132 | ], |
| 5133 | }], # _type=="executable" and asan==1 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5134 | ], # target_conditions |
| 5135 | }, # xcode_settings |
| 5136 | }, # configuration "Release" |
| 5137 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 5138 | }, { # mac_real_dsym != 1 |
| 5139 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 5140 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 5141 | # only operates in the Release configuration. |
| 5142 | 'postbuilds': [ |
| 5143 | { |
| 5144 | 'variables': { |
| 5145 | # Define strip_from_xcode in a variable ending in _path |
| 5146 | # so that gyp understands it's a path and performs proper |
| 5147 | # relativization during dict merging. |
| 5148 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 5149 | }, |
| 5150 | 'postbuild_name': 'Strip If Needed', |
| 5151 | 'action': ['<(strip_from_xcode_path)'], |
| 5152 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5153 | ], # postbuilds |
| 5154 | }], # mac_real_dsym |
| 5155 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 5156 | }], # (_type=="executable" or _type=="shared_library" or |
| 5157 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 5158 | ], # target_conditions |
| 5159 | }, # target_defaults |
| 5160 | }], # OS=="mac" |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5161 | ['OS=="ios"', { |
| 5162 | 'target_defaults': { |
| 5163 | 'xcode_settings' : { |
thakis | a90810d | 2014-11-04 19:41:54 | [diff] [blame] | 5164 | 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5165 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5166 | 'conditions': [ |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 5167 | # Older Xcodes do not support -Wno-deprecated-register, so pass an |
| 5168 | # additional flag to suppress the "unknown compiler option" error. |
| 5169 | # Restrict this flag to builds that are either compiling with Xcode |
| 5170 | # or compiling with Xcode's Clang. This will allow Ninja builds to |
| 5171 | # continue failing on unknown compiler options. |
| 5172 | # TODO(rohitrao): This flag is temporary and should be removed as |
| 5173 | # soon as the iOS bots are updated to use Xcode 5.1. |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 5174 | ['clang_xcode==1', { |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 5175 | 'WARNING_CFLAGS': [ |
| 5176 | '-Wno-unknown-warning-option', |
| 5177 | ], |
| 5178 | }], |
| 5179 | |
| 5180 | # Limit the valid architectures depending on "target_subarch". |
| 5181 | # This need to include the "arm" architectures but also the "x86" |
| 5182 | # ones (they are used when building for the simulator). |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5183 | ['target_subarch=="arm32"', { |
Stuart Morgan | 7c31daa | 2014-08-29 13:59:45 | [diff] [blame] | 5184 | 'VALID_ARCHS': ['armv7', 'i386'], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5185 | }], |
| 5186 | ['target_subarch=="arm64"', { |
| 5187 | 'VALID_ARCHS': ['arm64', 'x86_64'], |
| 5188 | }], |
| 5189 | ['target_subarch=="both"', { |
Stuart Morgan | 7c31daa | 2014-08-29 13:59:45 | [diff] [blame] | 5190 | 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5191 | }], |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5192 | ['use_system_libcxx==1', { |
| 5193 | 'target_conditions': [ |
| 5194 | # Only use libc++ when building target for iOS not when building |
| 5195 | # tools for the host (OS X) as Mac targets OS X SDK 10.6 which |
| 5196 | # does not support libc++. |
| 5197 | ['_toolset=="target"', { |
| 5198 | 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ |
| 5199 | }] |
| 5200 | ], |
[email protected] | 7c613ee9 | 2014-08-14 21:22:31 | [diff] [blame] | 5201 | }, { |
| 5202 | # The default for deployment target of 7.0+ is libc++, so force |
| 5203 | # the old behavior unless libc++ is enabled. |
| 5204 | 'CLANG_CXX_LIBRARY': 'libstdc++', # -stdlib=libstdc++ |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5205 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5206 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5207 | }, |
| 5208 | 'target_conditions': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5209 | ['_toolset=="host"', { |
| 5210 | 'xcode_settings': { |
| 5211 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 5212 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5213 | 'VALID_ARCHS': [ |
| 5214 | 'x86_64', |
| 5215 | ], |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5216 | 'ARCHS': [ |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5217 | 'x86_64', |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5218 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5219 | }, |
| 5220 | }], |
| 5221 | ['_toolset=="target"', { |
| 5222 | 'xcode_settings': { |
| 5223 | # This section should be for overriding host settings. But, |
| 5224 | # since we can't negate the iphone deployment target above, we |
| 5225 | # instead set it here for target only. |
| 5226 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5227 | 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 5228 | }, |
| 5229 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5230 | ['_type=="executable"', { |
| 5231 | 'configurations': { |
| 5232 | 'Release_Base': { |
| 5233 | 'xcode_settings': { |
| 5234 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 5235 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 5236 | }, |
| 5237 | }, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 5238 | 'Debug_Base': { |
| 5239 | 'xcode_settings': { |
| 5240 | # Remove dSYM to reduce build time. |
| 5241 | 'DEBUG_INFORMATION_FORMAT': 'dwarf', |
| 5242 | }, |
| 5243 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5244 | }, |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5245 | 'xcode_settings': { |
| 5246 | 'conditions': [ |
| 5247 | ['chromium_ios_signing', { |
| 5248 | # iOS SDK wants everything for device signed. |
| 5249 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 5250 | }, { |
| 5251 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 5252 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 5253 | }], |
| 5254 | ], |
| 5255 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5256 | }], |
| 5257 | ], # target_conditions |
| 5258 | }, # target_defaults |
| 5259 | }], # OS=="ios" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5260 | ['OS=="win"', { |
| 5261 | 'target_defaults': { |
| 5262 | 'defines': [ |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 5263 | '_WIN32_WINNT=0x0603', |
| 5264 | 'WINVER=0x0603', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5265 | 'WIN32', |
| 5266 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5267 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 5268 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5269 | '_CRT_RAND_S', |
| 5270 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 5271 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 5272 | '_ATL_NO_OPENGL', |
scottmg | 467d049 | 2014-11-17 23:08:30 | [diff] [blame] | 5273 | '_SECURE_ATL', |
[email protected] | 2b446550 | 2014-07-25 21:02:28 | [diff] [blame] | 5274 | # _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings. |
| 5275 | '_HAS_EXCEPTIONS=0', |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 5276 | # Silence some warnings; we can't switch the the 'recommended' |
| 5277 | # versions as they're not available on old OSs. |
| 5278 | '_WINSOCK_DEPRECATED_NO_WARNINGS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5279 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5280 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5281 | ['buildtype=="Official"', { |
| 5282 | # In official builds, targets can self-select an optimization |
| 5283 | # level by defining a variable named 'optimize', and setting it |
| 5284 | # to one of |
| 5285 | # - "size", optimizes for minimal code size - the default. |
| 5286 | # - "speed", optimizes for speed over code size. |
| 5287 | # - "max", whole program optimization and link-time code |
| 5288 | # generation. This is very expensive and should be used |
| 5289 | # sparingly. |
| 5290 | 'variables': { |
| 5291 | 'optimize%': 'size', |
| 5292 | }, |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 5293 | 'msvs_settings': { |
| 5294 | 'VCLinkerTool': { |
| 5295 | # Set /LTCG for the official builds. |
| 5296 | 'LinkTimeCodeGeneration': '1', |
| 5297 | }, |
| 5298 | }, |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5299 | 'target_conditions': [ |
| 5300 | ['optimize=="size"', { |
| 5301 | 'msvs_settings': { |
| 5302 | 'VCCLCompilerTool': { |
| 5303 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 5304 | 'Optimization': '1', |
| 5305 | # 2, favorSize - Favor small code (/Os) |
| 5306 | 'FavorSizeOrSpeed': '2', |
| 5307 | }, |
| 5308 | }, |
| 5309 | }, |
| 5310 | ], |
| 5311 | ['optimize=="speed"', { |
| 5312 | 'msvs_settings': { |
| 5313 | 'VCCLCompilerTool': { |
| 5314 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5315 | 'Optimization': '2', |
| 5316 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5317 | 'FavorSizeOrSpeed': '1', |
| 5318 | }, |
| 5319 | }, |
| 5320 | }, |
| 5321 | ], |
| 5322 | ['optimize=="max"', { |
[email protected] | cb875c0 | 2014-06-12 18:06:31 | [diff] [blame] | 5323 | # Disable Warning 4702 ("Unreachable code") for the WPO/PGO |
| 5324 | # builds. Probably anything that this would catch that |
| 5325 | # wouldn't be caught in a normal build isn't going to |
| 5326 | # actually be a bug, so the incremental value of C4702 for |
| 5327 | # PGO builds is likely very small. |
| 5328 | 'msvs_disabled_warnings': [ |
| 5329 | 4702 |
| 5330 | ], |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5331 | 'msvs_settings': { |
| 5332 | 'VCCLCompilerTool': { |
| 5333 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5334 | 'Optimization': '2', |
| 5335 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5336 | 'FavorSizeOrSpeed': '1', |
| 5337 | # This implies link time code generation. |
| 5338 | 'WholeProgramOptimization': 'true', |
| 5339 | }, |
| 5340 | }, |
| 5341 | }, |
| 5342 | ], |
| 5343 | ], |
| 5344 | }, |
| 5345 | ], |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 5346 | ['msvs_xtree_patched!=1', { |
| 5347 | # If xtree hasn't been patched, then we disable C4702. Otherwise, |
| 5348 | # it's enabled. This will generally only be true for system-level |
| 5349 | # installed Express users. |
| 5350 | 'msvs_disabled_warnings': [ |
| 5351 | 4702, |
| 5352 | ], |
| 5353 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5354 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 5355 | 'msvs_system_include_dirs': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5356 | '<(windows_sdk_path)/Include/shared', |
| 5357 | '<(windows_sdk_path)/Include/um', |
| 5358 | '<(windows_sdk_path)/Include/winrt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5359 | '$(VSInstallDir)/VC/atlmfc/include', |
| 5360 | ], |
[email protected] | bab6e23 | 2013-11-27 22:52:39 | [diff] [blame] | 5361 | 'msvs_cygwin_shell': 0, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5362 | 'msvs_disabled_warnings': [ |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5363 | # C4127: conditional expression is constant |
| 5364 | # This warning can in theory catch dead code and other problems, but |
| 5365 | # triggers in far too many desirable cases where the conditional |
| 5366 | # expression is either set by macros or corresponds some legitimate |
| 5367 | # compile-time constant expression (due to constant template args, |
| 5368 | # conditionals comparing the sizes of different types, etc.). Some of |
| 5369 | # these can be worked around, but it's not worth it. |
| 5370 | 4127, |
| 5371 | |
| 5372 | # C4351: new behavior: elements of array 'array' will be default |
| 5373 | # initialized |
| 5374 | # This is a silly "warning" that basically just alerts you that the |
| 5375 | # compiler is going to actually follow the language spec like it's |
| 5376 | # supposed to, instead of not following it like old buggy versions |
| 5377 | # did. There's absolutely no reason to turn this on. |
| 5378 | 4351, |
| 5379 | |
| 5380 | # C4355: 'this': used in base member initializer list |
| 5381 | # It's commonly useful to pass |this| to objects in a class' |
| 5382 | # initializer list. While this warning can catch real bugs, most of |
| 5383 | # the time the constructors in question don't attempt to call methods |
| 5384 | # on the passed-in pointer (until later), and annotating every legit |
| 5385 | # usage of this is simply more hassle than the warning is worth. |
| 5386 | 4355, |
| 5387 | |
| 5388 | # C4503: 'identifier': decorated name length exceeded, name was |
| 5389 | # truncated |
| 5390 | # This only means that some long error messages might have truncated |
| 5391 | # identifiers in the presence of lots of templates. It has no effect |
| 5392 | # on program correctness and there's no real reason to waste time |
| 5393 | # trying to prevent it. |
| 5394 | 4503, |
[email protected] | 480c667 | 2014-08-04 11:28:06 | [diff] [blame] | 5395 | |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5396 | # C4611: interaction between 'function' and C++ object destruction is |
| 5397 | # non-portable |
| 5398 | # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN |
| 5399 | # suggests using exceptions instead of setjmp/longjmp for C++, but |
| 5400 | # Chromium code compiles without exception support. We therefore have |
| 5401 | # to use setjmp/longjmp for e.g. JPEG decode error handling, which |
| 5402 | # means we have to turn off this warning (and be careful about how |
| 5403 | # object destruction happens in such cases). |
| 5404 | 4611, |
| 5405 | |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5406 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 5407 | # removed as code is fixed. |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5408 | 4100, # Unreferenced formal parameter |
| 5409 | 4121, # Alignment of a member was sensitive to packing |
[email protected] | 5a3c1f06 | 2014-07-26 00:01:53 | [diff] [blame] | 5410 | 4244, # Conversion from 'type1' to 'type2', possible loss of data |
| 5411 | 4481, # Nonstandard extension used: override specifier 'keyword' |
| 5412 | 4505, # Unreferenced local function has been removed |
| 5413 | 4510, # Default constructor could not be generated |
| 5414 | 4512, # Assignment operator could not be generated |
| 5415 | 4610, # Object can never be instantiated |
scottmg | a6675a5f | 2014-11-15 01:37:47 | [diff] [blame] | 5416 | 4996, # 'X': was declared deprecated (for GetVersionEx). |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5417 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5418 | 'msvs_settings': { |
| 5419 | 'VCCLCompilerTool': { |
[email protected] | e9b96bb | 2012-09-07 01:10:44 | [diff] [blame] | 5420 | 'AdditionalOptions': ['/MP'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5421 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5422 | 'BufferSecurityCheck': 'true', |
| 5423 | 'EnableFunctionLevelLinking': 'true', |
| 5424 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5425 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5426 | 'WarnAsError': 'true', |
| 5427 | 'DebugInformationFormat': '3', |
[email protected] | 2b446550 | 2014-07-25 21:02:28 | [diff] [blame] | 5428 | # ExceptionHandling must match _HAS_EXCEPTIONS above. |
| 5429 | 'ExceptionHandling': '0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5430 | }, |
| 5431 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5432 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5433 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5434 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5435 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5436 | }, |
| 5437 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5438 | 'AdditionalDependencies': [ |
| 5439 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 5440 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5441 | 'version.lib', |
| 5442 | 'msimg32.lib', |
| 5443 | 'ws2_32.lib', |
| 5444 | 'usp10.lib', |
| 5445 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 5446 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 5447 | 'winmm.lib', |
| 5448 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5449 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5450 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5451 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5452 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5453 | 'GenerateDebugInformation': 'true', |
| 5454 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 5455 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5456 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 5457 | # SubSystem values: |
| 5458 | # 0 == not set |
| 5459 | # 1 == /SUBSYSTEM:CONSOLE |
| 5460 | # 2 == /SUBSYSTEM:WINDOWS |
| 5461 | # Most of the executables we'll ever create are tests |
| 5462 | # and utilities with console output. |
| 5463 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5464 | }, |
| 5465 | 'VCMIDLTool': { |
| 5466 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5467 | 'TypeLibraryName': '$(InputName).tlb', |
| 5468 | 'OutputDirectory': '$(IntDir)', |
| 5469 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 5470 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5471 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 5472 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5473 | }, |
| 5474 | 'VCResourceCompilerTool': { |
| 5475 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 5476 | 'AdditionalIncludeDirectories': [ |
| 5477 | '<(DEPTH)', |
| 5478 | '<(SHARED_INTERMEDIATE_DIR)', |
| 5479 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5480 | }, |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5481 | 'target_conditions': [ |
[email protected] | 2b52f99 | 2014-02-26 19:09:47 | [diff] [blame] | 5482 | ['_type=="executable"', { |
| 5483 | 'VCManifestTool': { |
| 5484 | 'EmbedManifest': 'true', |
| 5485 | }, |
| 5486 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5487 | ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', { |
| 5488 | 'VCManifestTool': { |
| 5489 | 'AdditionalManifestFiles': [ |
| 5490 | '>(win_exe_compatibility_manifest)', |
| 5491 | ], |
| 5492 | }, |
| 5493 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5494 | ], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5495 | 'conditions': [ |
| 5496 | ['clang==1', { |
| 5497 | # Building with Clang on Windows is a work in progress and very |
| 5498 | # experimental. See crbug.com/82385. |
| 5499 | 'VCCLCompilerTool': { |
| 5500 | 'WarnAsError': 'false', |
| 5501 | 'RuntimeTypeInfo': 'false', |
| 5502 | 'AdditionalOptions': [ |
[email protected] | 49ee7ef | 2014-04-12 03:07:46 | [diff] [blame] | 5503 | '-fmsc-version=1800', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5504 | '/fallback', |
| 5505 | |
| 5506 | # Many files use intrinsics without including this header. |
| 5507 | # TODO(hans): Fix those files, or move this to sub-GYPs. |
| 5508 | '/FIIntrin.h', |
| 5509 | |
| 5510 | # TODO(hans): Make this list shorter eventually. |
| 5511 | '-Qunused-arguments', |
| 5512 | '-Wno-c++11-compat-deprecated-writable-strings', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5513 | '-Wno-deprecated-declarations', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5514 | '-Wno-empty-body', |
| 5515 | '-Wno-enum-conversion', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5516 | '-Wno-extra-tokens', |
| 5517 | '-Wno-ignored-attributes', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5518 | '-Wno-incompatible-pointer-types', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5519 | '-Wno-int-to-void-pointer-cast', |
| 5520 | '-Wno-invalid-noreturn', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5521 | '-Wno-logical-op-parentheses', |
| 5522 | '-Wno-microsoft', |
| 5523 | '-Wno-missing-braces', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5524 | '-Wno-missing-declarations', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5525 | '-Wno-msvc-include', |
| 5526 | '-Wno-null-dereference', |
| 5527 | '-Wno-overloaded-virtual', |
| 5528 | '-Wno-parentheses', |
| 5529 | '-Wno-pointer-sign', |
| 5530 | '-Wno-reorder', |
| 5531 | '-Wno-return-type-c-linkage', |
| 5532 | '-Wno-self-assign', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5533 | '-Wno-sometimes-uninitialized', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5534 | '-Wno-switch', |
| 5535 | '-Wno-tautological-compare', |
| 5536 | '-Wno-unknown-pragmas', |
| 5537 | '-Wno-unsequenced', |
| 5538 | '-Wno-unused-function', |
| 5539 | '-Wno-unused-private-field', |
| 5540 | '-Wno-unused-value', |
| 5541 | '-Wno-unused-variable', |
Nico Weber | 5897272 | 2014-09-06 20:53:19 | [diff] [blame] | 5542 | '-Wno-unused-local-typedef', # http://crbug.com/411648 |
thakis | 42c0307 | 2014-10-31 23:52:28 | [diff] [blame] | 5543 | '-Wno-inconsistent-missing-override', #http://crbug.com/428099 |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5544 | ], |
| 5545 | }, |
| 5546 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5547 | ['asan==1', { |
| 5548 | # ASan on Windows is a work in progress and very experimental. |
| 5549 | # See crbug.com/345874. |
| 5550 | 'VCCLCompilerTool': { |
| 5551 | 'AdditionalOptions': [ |
| 5552 | '-fsanitize=address', |
| 5553 | ], |
[email protected] | 4c1abdb | 2014-05-16 17:03:57 | [diff] [blame] | 5554 | 'AdditionalIncludeDirectories': [ |
| 5555 | # MSVC needs to be able to find the sanitizer headers when |
| 5556 | # invoked via /fallback. This is critical for using macros |
| 5557 | # like ASAN_UNPOISON_MEMORY_REGION in files where we fall |
| 5558 | # back. |
[email protected] | e7a1cba | 2014-08-04 15:58:29 | [diff] [blame] | 5559 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer', |
[email protected] | 4c1abdb | 2014-05-16 17:03:57 | [diff] [blame] | 5560 | ], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5561 | }, |
| 5562 | 'VCLinkerTool': { |
| 5563 | 'AdditionalLibraryDirectories': [ |
| 5564 | # TODO(hans): If make_clang_dir is absolute, this breaks. |
[email protected] | e7a1cba | 2014-08-04 15:58:29 | [diff] [blame] | 5565 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows', |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5566 | ], |
| 5567 | }, |
| 5568 | 'target_conditions': [ |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 5569 | ['component=="shared_library"', { |
| 5570 | 'VCLinkerTool': { |
| 5571 | 'AdditionalDependencies': [ |
| 5572 | 'clang_rt.asan_dynamic-i386.lib', |
timurrrr | 1d8adb2 | 2014-09-15 18:48:34 | [diff] [blame] | 5573 | 'clang_rt.asan_dynamic_runtime_thunk-i386.lib', |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 5574 | ], |
| 5575 | }, |
| 5576 | }], |
| 5577 | ['_type=="executable" and component=="static_library"', { |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5578 | 'VCLinkerTool': { |
| 5579 | 'AdditionalDependencies': [ |
| 5580 | 'clang_rt.asan-i386.lib', |
| 5581 | ], |
| 5582 | }, |
| 5583 | }], |
timurrrr | 6e2f3e26 | 2014-08-29 16:51:52 | [diff] [blame] | 5584 | ['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', { |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5585 | 'VCLinkerTool': { |
| 5586 | 'AdditionalDependencies': [ |
| 5587 | 'clang_rt.asan_dll_thunk-i386.lib', |
| 5588 | ], |
| 5589 | }, |
| 5590 | }], |
| 5591 | ], |
| 5592 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5593 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5594 | }, |
| 5595 | }, |
| 5596 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 5597 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 5598 | 'target_defaults': { |
| 5599 | 'defines': [ |
| 5600 | 'DISABLE_NACL', |
| 5601 | ], |
| 5602 | }, |
| 5603 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 5604 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5605 | 'target_defaults': { |
| 5606 | 'msvs_settings': { |
| 5607 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5608 | 'DelayLoadDLLs': [ |
| 5609 | 'dbghelp.dll', |
| 5610 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 5611 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5612 | 'uxtheme.dll', |
| 5613 | ], |
| 5614 | }, |
| 5615 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5616 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5617 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5618 | 'msvs_settings': { |
| 5619 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5620 | 'AdditionalOptions': [ |
| 5621 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5622 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5623 | '/ignore:4199', |
| 5624 | '/ignore:4221', |
| 5625 | '/nxcompat', |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5626 | ], |
| 5627 | 'conditions': [ |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 5628 | ['syzyasan==0', { |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5629 | 'AdditionalOptions': ['/largeaddressaware'], |
| 5630 | }], |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5631 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5632 | }, |
| 5633 | }, |
| 5634 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5635 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5636 | 'msvs_settings': { |
| 5637 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5638 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5639 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5640 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5641 | '/ignore:4199', |
| 5642 | '/ignore:4221', |
| 5643 | '/nxcompat', |
| 5644 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5645 | }, |
| 5646 | }, |
| 5647 | }, |
| 5648 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5649 | }, |
| 5650 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 5651 | ['enable_new_npdevice_api==1', { |
| 5652 | 'target_defaults': { |
| 5653 | 'defines': [ |
| 5654 | 'ENABLE_NEW_NPDEVICE_API', |
| 5655 | ], |
| 5656 | }, |
| 5657 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5658 | # Don't warn about the "typedef 'foo' locally defined but not used" |
fdegans | 6b76713 | 2014-09-09 10:09:29 | [diff] [blame] | 5659 | # for gcc 4.8 and higher. |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5660 | # TODO: remove this flag once all builds work. See crbug.com/227506 |
[email protected] | 33668ca6 | 2014-07-10 18:01:57 | [diff] [blame] | 5661 | ['gcc_version>=48 and clang==0', { |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5662 | 'target_defaults': { |
| 5663 | 'cflags': [ |
| 5664 | '-Wno-unused-local-typedefs', |
| 5665 | ], |
| 5666 | }, |
| 5667 | }], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5668 | ['gcc_version>=48 and clang==0 and host_clang==1', { |
| 5669 | 'target_defaults': { |
| 5670 | 'target_conditions': [ |
| 5671 | ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], |
| 5672 | ], |
| 5673 | }, |
| 5674 | }], |
torne | 981f132f | 2014-10-09 18:37:20 | [diff] [blame] | 5675 | # In the android webview build, force host targets to be compiled with clang |
| 5676 | # as the hermetic host gcc is very old on some platforms. This is already |
| 5677 | # the default on the current development version of AOSP but we force it |
torne | 6c1c446 | 2014-10-15 15:55:58 | [diff] [blame] | 5678 | # here in case we need to compile against an older release version. We also |
| 5679 | # explicitly set it to false for target binaries to avoid causing problems |
torne | 8beb670 | 2014-11-05 12:16:40 | [diff] [blame] | 5680 | # for the work to enable clang by default in AOSP. We also force the use of |
| 5681 | # libstdc++ on host as peculiarities of the android gyp backend mean that |
| 5682 | # using libc++ doesn't work, and Chromium doesn't yet require a more modern |
| 5683 | # C++ library. |
torne | 981f132f | 2014-10-09 18:37:20 | [diff] [blame] | 5684 | ['android_webview_build==1', { |
| 5685 | 'target_defaults': { |
| 5686 | 'target_conditions': [ |
| 5687 | ['_toolset=="host"', { |
| 5688 | 'aosp_build_settings': { |
| 5689 | 'LOCAL_CLANG': 'true', |
torne | 8beb670 | 2014-11-05 12:16:40 | [diff] [blame] | 5690 | 'LOCAL_CXX_STL': 'libstdc++', |
torne | 981f132f | 2014-10-09 18:37:20 | [diff] [blame] | 5691 | }, |
torne | 6c1c446 | 2014-10-15 15:55:58 | [diff] [blame] | 5692 | }, { # else: _toolset != "host" |
| 5693 | 'aosp_build_settings': { |
| 5694 | 'LOCAL_CLANG': 'false', |
| 5695 | }, |
torne | 981f132f | 2014-10-09 18:37:20 | [diff] [blame] | 5696 | }], |
| 5697 | ], |
| 5698 | }, |
| 5699 | }], |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5700 | # We need a special case to handle the android webview build on mac because |
| 5701 | # the host gcc there doesn't accept this flag, but the target gcc may |
| 5702 | # require it. |
| 5703 | ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { |
| 5704 | 'target_defaults': { |
| 5705 | 'target_conditions': [ |
[email protected] | f2cef30 | 2014-05-23 13:34:58 | [diff] [blame] | 5706 | ['_toolset=="host"', { |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5707 | 'cflags!': [ |
| 5708 | '-Wno-unused-local-typedefs', |
| 5709 | ], |
| 5710 | }], |
| 5711 | ], |
| 5712 | }, |
| 5713 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5714 | ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' |
| 5715 | 'and OS!="win"', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5716 | 'make_global_settings': [ |
| 5717 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 5718 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
| 5719 | ['CC.host', '$(CC)'], |
| 5720 | ['CXX.host', '$(CXX)'], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 5721 | ], |
| 5722 | }], |
[email protected] | 6e354d4 | 2014-01-29 01:59:21 | [diff] [blame] | 5723 | ['clang==1 and OS=="win"', { |
| 5724 | 'make_global_settings': [ |
| 5725 | # On Windows, gyp's ninja generator only looks at CC. |
| 5726 | ['CC', '<(make_clang_dir)/bin/clang-cl'], |
| 5727 | ], |
| 5728 | }], |
Nico Weber | d4daea0 | 2014-11-25 01:55:21 | [diff] [blame] | 5729 | ['use_lld==1 and OS=="win"', { |
| 5730 | 'make_global_settings': [ |
| 5731 | # Limited to Windows because lld-link is the driver that is compatible |
| 5732 | # to link.exe. |
| 5733 | ['LD', '<(make_clang_dir)/bin/lld-link'], |
| 5734 | ], |
| 5735 | }], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 5736 | ['OS=="android" and clang==0', { |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5737 | # Hardcode the compiler names in the Makefile so that |
| 5738 | # it won't depend on the environment at make time. |
[email protected] | 7fc96c8 | 2012-07-24 18:15:11 | [diff] [blame] | 5739 | 'make_global_settings': [ |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5740 | ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| 5741 | ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5742 | ['CC.host', '<(host_cc)'], |
| 5743 | ['CXX.host', '<(host_cxx)'], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5744 | ], |
| 5745 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 5746 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5747 | 'make_global_settings': [ |
| 5748 | ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], |
| 5749 | ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5750 | ['CC.host', '<(host_cc)'], |
| 5751 | ['CXX.host', '<(host_cxx)'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5752 | ], |
| 5753 | }], |
[email protected] | d69a73b | 2014-07-29 16:50:44 | [diff] [blame] | 5754 | ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', { |
| 5755 | # Set default ARM cross compiling on linux. These can be overridden |
| 5756 | # using CC/CXX/etc environment variables. |
| 5757 | 'make_global_settings': [ |
| 5758 | ['CC', '<!(which arm-linux-gnueabihf-gcc)'], |
| 5759 | ['CXX', '<!(which arm-linux-gnueabihf-g++)'], |
[email protected] | acad496 | 2014-08-04 19:05:02 | [diff] [blame] | 5760 | ['CC.host', '<(host_cc)'], |
| 5761 | ['CXX.host', '<(host_cxx)'], |
[email protected] | d69a73b | 2014-07-29 16:50:44 | [diff] [blame] | 5762 | ], |
| 5763 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5764 | |
| 5765 | # TODO(yyanagisawa): supports GENERATOR==make |
| 5766 | # make generator doesn't support CC_wrapper without CC |
| 5767 | # in make_global_settings yet. |
[email protected] | c8007541 | 2014-02-27 18:46:26 | [diff] [blame] | 5768 | ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5769 | 'make_global_settings': [ |
| 5770 | ['CC_wrapper', '<(gomadir)/gomacc'], |
| 5771 | ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 5772 | ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 5773 | ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 5774 | ], |
| 5775 | }], |
fdegans | d7a59f9 | 2014-10-23 11:49:54 | [diff] [blame] | 5776 | ['use_lto==1', { |
| 5777 | 'target_defaults': { |
| 5778 | 'target_conditions': [ |
| 5779 | ['_toolset=="target"', { |
| 5780 | 'cflags': [ |
| 5781 | '-flto', |
| 5782 | '-ffat-lto-objects', |
| 5783 | ], |
| 5784 | }], |
| 5785 | ], |
| 5786 | }, |
| 5787 | }], |
| 5788 | ['use_lto==1 or use_lto_o2==1', { |
| 5789 | 'target_defaults': { |
| 5790 | 'target_conditions': [ |
| 5791 | ['_toolset=="target"', { |
| 5792 | 'ldflags': [ |
| 5793 | '-flto=32', |
| 5794 | ], |
| 5795 | }], |
| 5796 | ], |
| 5797 | }, |
| 5798 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5799 | ], |
| 5800 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5801 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 5802 | # This block adds *project-wide* configuration settings to each project |
| 5803 | # file. It's almost always wrong to put things here. Specify your |
| 5804 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 5805 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5806 | 'conditions': [ |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5807 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 5808 | # setting sets the SDK on a project-wide basis. In order to get the |
| 5809 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 5810 | # here at the project level. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5811 | ['OS=="mac"', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5812 | 'conditions': [ |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5813 | ['mac_sdk_path==""', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5814 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5815 | }, { |
| 5816 | 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5817 | }], |
| 5818 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5819 | }], |
| 5820 | ['OS=="ios"', { |
| 5821 | 'conditions': [ |
| 5822 | ['ios_sdk_path==""', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5823 | 'conditions': [ |
| 5824 | # TODO(justincohen): Ninja only supports simulator for now. |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5825 | ['"<(GENERATOR)"=="xcode"', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5826 | 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
[email protected] | 187e0e3 | 2013-07-18 21:49:38 | [diff] [blame] | 5827 | }, { |
| 5828 | 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5829 | }], |
| 5830 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5831 | }, { |
| 5832 | 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
| 5833 | }], |
| 5834 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5835 | }], |
| 5836 | ['OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5837 | # Target both iPhone and iPad. |
| 5838 | 'TARGETED_DEVICE_FAMILY': '1,2', |
[email protected] | 72c0d365 | 2013-11-05 19:11:42 | [diff] [blame] | 5839 | }, { # OS!="ios" |
| 5840 | 'conditions': [ |
| 5841 | ['target_arch=="x64"', { |
| 5842 | 'ARCHS': [ |
| 5843 | 'x86_64' |
| 5844 | ], |
| 5845 | }], |
| 5846 | ['target_arch=="ia32"', { |
| 5847 | 'ARCHS': [ |
| 5848 | 'i386' |
| 5849 | ], |
| 5850 | }], |
| 5851 | ], |
[email protected] | d6455401 | 2013-10-31 18:40:00 | [diff] [blame] | 5852 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5853 | ], |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5854 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5855 | # The Xcode generator will look for an xcode_settings section at the root |
| 5856 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 5857 | # settings should not be here, they should be in target-specific |
| 5858 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 5859 | # settings in target dicts. SYMROOT is a special case, because many other |
| 5860 | # Xcode variables depend on it, including variables such as |
| 5861 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 5862 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 5863 | # files to appear (when present) in the UI as actual files and not red |
| 5864 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 5865 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 5866 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5867 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 5868 | } |