[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
[email protected] | 21642ab | 2009-09-15 23:52:14 | [diff] [blame] | 5 | # IMPORTANT: |
| 6 | # Please don't directly include this file if you are building via gyp_chromium, |
| 7 | # since gyp_chromium is automatically forcing its inclusion. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 8 | { |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 9 | # Variables expected to be overriden on the GYP command line (-D) or by |
| 10 | # ~/.gyp/include.gypi. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 11 | 'variables': { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 12 | # Putting a variables dict inside another variables dict looks kind of |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 13 | # weird. This is done so that 'host_arch', 'chromeos', etc are defined as |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 14 | # variables within the outer variables dict here. This is necessary |
| 15 | # to get these variables defined for the conditions within this variables |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 16 | # dict that operate on these variables. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 17 | 'variables': { |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 18 | 'variables': { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 19 | 'variables': { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 20 | 'variables': { |
| 21 | # Whether we're building a ChromeOS build. |
| 22 | 'chromeos%': 0, |
| 23 | |
| 24 | # Whether or not we are using the Aura windowing framework. |
| 25 | 'use_aura%': 0, |
| 26 | |
| 27 | # Whether or not we are building the Ash shell. |
| 28 | 'use_ash%': 0, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 29 | |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 30 | # Whether or not we are using CRAS, the ChromeOS Audio Server. |
| 31 | 'use_cras%': 0, |
| 32 | |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 33 | # Use a raw surface abstraction. |
| 34 | 'use_ozone%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 35 | |
| 36 | # Configure the build for small devices. See crbug.com/318413 |
| 37 | 'embedded%': 0, |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 38 | |
| 39 | 'conditions': [ |
| 40 | # Compute the architecture that we're building on. |
| 41 | ['OS=="win" or OS=="mac" or OS=="ios"', { |
| 42 | 'host_arch%': 'ia32', |
| 43 | }, { |
[email protected] | d2f38924 | 2014-06-06 09:56:44 | [diff] [blame] | 44 | 'host_arch%': '<!pymod_do_main(detect_host_arch)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 45 | }], |
| 46 | ], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 47 | }, |
| 48 | # Copy conditionally-set variables out one scope. |
| 49 | 'chromeos%': '<(chromeos)', |
| 50 | 'use_aura%': '<(use_aura)', |
| 51 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 52 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 53 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 54 | 'embedded%': '<(embedded)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 55 | 'host_arch%': '<(host_arch)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 56 | |
[email protected] | 3fa441d | 2011-09-18 17:28:50 | [diff] [blame] | 57 | # Whether we are using Views Toolkit |
| 58 | 'toolkit_views%': 0, |
| 59 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 60 | # Use OpenSSL instead of NSS as the underlying SSL and crypto |
| 61 | # implementation. Certificate verification will in most cases be |
| 62 | # handled by the OS. If OpenSSL's struct X509 is used to represent |
| 63 | # certificates, use_openssl_certs must be set. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 64 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 65 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 66 | # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*. |
| 67 | 'use_openssl_certs%': 0, |
| 68 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 69 | # Disable viewport meta tag by default. |
| 70 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 71 | |
| 72 | # Enable HiDPI support. |
| 73 | 'enable_hidpi%': 0, |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 74 | |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 75 | # Override buildtype to select the desired build flavor. |
| 76 | # Dev - everyday build for development/testing |
| 77 | # Official - release build (generally implies additional processing) |
| 78 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 79 | # conversion is done), some of the things which are now controlled by |
| 80 | # 'branding', such as symbol generation, will need to be refactored |
| 81 | # based on 'buildtype' (i.e. we don't care about saving symbols for |
| 82 | # non-Official # builds). |
| 83 | 'buildtype%': 'Dev', |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 84 | |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 85 | # Override branding to select the desired branding flavor. |
| 86 | 'branding%': 'Chromium', |
| 87 | |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 88 | 'conditions': [ |
[email protected] | 2d050520 | 2013-09-16 00:22:52 | [diff] [blame] | 89 | # ChromeOS and Windows use Aura and Ash. |
[email protected] | 1511930 | 2014-05-20 19:23:58 | [diff] [blame] | 90 | ['chromeos==1 or OS=="win" or OS=="linux"', { |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 91 | 'use_ash%': 1, |
[email protected] | 978a2ae | 2013-09-13 04:28:01 | [diff] [blame] | 92 | 'use_aura%': 1, |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 93 | }], |
[email protected] | 020648aa | 2013-06-08 17:16:47 | [diff] [blame] | 94 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 95 | # Ozone uses Aura. |
| 96 | ['use_ozone==1', { |
| 97 | 'use_aura%': 1, |
| 98 | }], |
| 99 | |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 100 | # Whether we're a traditional desktop unix. |
| 101 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', { |
| 102 | 'desktop_linux%': 1, |
| 103 | }, { |
| 104 | 'desktop_linux%': 0, |
| 105 | }], |
| 106 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 107 | # Embedded implies ozone. |
| 108 | ['embedded==1', { |
| 109 | 'use_ozone%': 1, |
| 110 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 111 | |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 112 | ['embedded==1', { |
| 113 | 'use_system_fontconfig%': 0, |
| 114 | }, { |
| 115 | 'use_system_fontconfig%': 1, |
| 116 | }], |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 117 | |
| 118 | ['OS=="android"', { |
| 119 | 'target_arch%': 'arm', |
| 120 | }, { |
| 121 | # Default architecture we're building for is the architecture we're |
| 122 | # building on, and possibly sub-architecture (for iOS builds). |
| 123 | 'target_arch%': '<(host_arch)', |
| 124 | }], |
[email protected] | 8796d92 | 2012-08-07 01:23:11 | [diff] [blame] | 125 | ], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 126 | }, |
| 127 | # Copy conditionally-set variables out one scope. |
| 128 | 'chromeos%': '<(chromeos)', |
[email protected] | 7ed4434 | 2013-09-30 08:36:13 | [diff] [blame] | 129 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 130 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 131 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 132 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 133 | 'use_ozone%': '<(use_ozone)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 134 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 135 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 136 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 137 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 138 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 139 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 140 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 141 | 'branding%': '<(branding)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 142 | 'host_arch%': '<(host_arch)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 143 | 'target_arch%': '<(target_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 144 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 145 | 'target_subarch%': '', |
[email protected] | f1f362b4 | 2012-05-15 17:46:58 | [diff] [blame] | 146 | |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 147 | # This is set when building the Android WebView inside the Android |
| 148 | # build system, using the 'android' gyp backend. The WebView code is |
| 149 | # still built when this is unset, but builds using the normal chromium |
| 150 | # build system. |
| 151 | 'android_webview_build%': 0, |
[email protected] | 0115f04 | 2012-07-27 20:36:53 | [diff] [blame] | 152 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 153 | # Set ARM architecture version. |
| 154 | 'arm_version%': 7, |
| 155 | |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 156 | # Use aurax11 for clipboard implementation. This is true on linux_aura. |
| 157 | 'use_clipboard_aurax11%': 0, |
| 158 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 159 | # goma settings. |
| 160 | # 1 to use goma. |
| 161 | # If no gomadir is set, it uses the default gomadir. |
| 162 | 'use_goma%': 0, |
| 163 | 'gomadir%': '', |
| 164 | |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 165 | # The system root for cross-compiles. Default: none. |
| 166 | 'sysroot%': '', |
| 167 | 'chroot_cmd%': '', |
| 168 | |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 169 | # The system libdir used for this ABI. |
| 170 | 'system_libdir%': 'lib', |
| 171 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 172 | 'conditions': [ |
[email protected] | 2c858a8 | 2013-10-05 01:01:32 | [diff] [blame] | 173 | # Ash needs Aura. |
| 174 | ['use_aura==0', { |
| 175 | 'use_ash%': 0, |
| 176 | }], |
| 177 | |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 178 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 179 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 180 | 'toolkit_views%': 1, |
| 181 | }, { |
| 182 | 'toolkit_views%': 0, |
| 183 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 184 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 185 | # Embedded builds use aura without ash or views. |
| 186 | ['embedded==1', { |
| 187 | 'use_aura%': 1, |
| 188 | 'use_ash%': 0, |
| 189 | 'toolkit_views%': 0, |
| 190 | }], |
| 191 | |
[email protected] | d2b16e3 | 2014-03-06 22:10:49 | [diff] [blame] | 192 | # Enable HiDPI on Mac OS, Chrome OS and Windows. |
| 193 | ['OS=="mac" or chromeos==1 or OS=="win"', { |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 194 | 'enable_hidpi%': 1, |
| 195 | }], |
[email protected] | 219c731 | 2012-05-10 20:32:40 | [diff] [blame] | 196 | |
[email protected] | b11c0cc0 | 2014-06-28 05:36:50 | [diff] [blame^] | 197 | # Enable App Launcher everywhere but mobile. |
| 198 | ['OS!="ios" and OS!="android"', { |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 199 | 'enable_app_list%': 1, |
| 200 | }, { |
| 201 | 'enable_app_list%': 0, |
[email protected] | b1a2b54 | 2013-01-10 07:33:09 | [diff] [blame] | 202 | }], |
| 203 | |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 204 | ['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] | 205 | 'use_default_render_theme%': 1, |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 206 | }, { |
| 207 | 'use_default_render_theme%': 0, |
| 208 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 209 | |
| 210 | ['use_ozone==1', { |
| 211 | 'use_ozone_evdev%': 1, |
| 212 | }, { |
| 213 | 'use_ozone_evdev%': 0, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 214 | }], |
| 215 | |
| 216 | # Set default gomadir. |
| 217 | ['OS=="win"', { |
| 218 | 'gomadir': 'c:\\goma\\goma-win', |
[email protected] | 91b9129 | 2014-01-18 23:54:41 | [diff] [blame] | 219 | }, { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 220 | 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', |
| 221 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 222 | |
| 223 | # Set the default "target_subarch" on iOS. Valid values are "arm32", |
| 224 | # "arm64" and "both" (meaning a fat binary). |
| 225 | # |
| 226 | # TODO(sdefresne): change the default from "arm32" to "both" for |
| 227 | # "target_subarch" once http://crbug.com/339477 is fixed. |
| 228 | # |
| 229 | # TODO(sdefresne): set the "target_arch" to "arm" once compilation |
| 230 | # of skia has been fixed for simulator. http://crbug.com/342377 |
| 231 | ['OS=="ios"', { |
| 232 | 'target_subarch%': 'arm32', |
| 233 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 234 | ], |
| 235 | }, |
| 236 | |
| 237 | # Copy conditionally-set variables out one scope. |
| 238 | 'chromeos%': '<(chromeos)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 239 | 'host_arch%': '<(host_arch)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 240 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 241 | 'target_subarch%': '<(target_subarch)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 242 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 243 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 244 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 245 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 246 | 'use_cras%': '<(use_cras)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 247 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 248 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 249 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 250 | 'embedded%': '<(embedded)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 251 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 252 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 253 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 254 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 255 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 256 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 257 | 'use_goma%': '<(use_goma)', |
| 258 | 'gomadir%': '<(gomadir)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 259 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 260 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 261 | 'buildtype%': '<(buildtype)', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 262 | 'branding%': '<(branding)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 263 | 'arm_version%': '<(arm_version)', |
[email protected] | 1731cd4 | 2014-03-26 19:10:02 | [diff] [blame] | 264 | 'sysroot%': '<(sysroot)', |
| 265 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 03df836 | 2014-06-04 00:17:11 | [diff] [blame] | 266 | 'system_libdir%': '<(system_libdir)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 267 | |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 268 | # Set to 1 to enable fast builds. Set to 2 for even faster builds |
| 269 | # (it disables debug info for fastest compilation - only for use |
| 270 | # on compile-only bots). |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 271 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 272 | |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 273 | # Set to 1 to not store any build metadata (this isn't working yet but |
| 274 | # this flag will help us to get there). See http://crbug.com/314403. |
| 275 | # TODO(sebmarchand): Update this comment once this flag guarantee that |
| 276 | # there's no build metadata in the build artifacts. |
| 277 | 'dont_embed_build_metadata%': 0, |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 278 | |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 279 | # Set to 1 to force Visual C++ to use legacy debug information format /Z7. |
| 280 | # This is useful for parallel compilation tools which can't support /Zi. |
| 281 | # Only used on Windows. |
| 282 | 'win_z7%' : 0, |
| 283 | |
[email protected] | 1a150551 | 2014-03-10 18:23:38 | [diff] [blame] | 284 | # Set to 1 to enable dcheck in release. |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 285 | 'dcheck_always_on%': 0, |
| 286 | |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 287 | # Set to 1 to make a build that disables unshipped tracing events. |
| 288 | # Note: this setting is ignored if buildtype=="Official". |
| 289 | 'tracing_like_official_build%': 0, |
| 290 | |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 291 | # Disable image loader component extension by default. |
| 292 | 'image_loader_extension%': 0, |
| 293 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 294 | # Set NEON compilation flags. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 295 | 'arm_neon%': 1, |
| 296 | |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 297 | # Detect NEON support at run-time. |
| 298 | 'arm_neon_optional%': 0, |
| 299 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 300 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 301 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 302 | |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 303 | # Use system libjpeg. Note that the system's libjepg will be used even if |
| 304 | # use_libjpeg_turbo is set. |
| 305 | 'use_system_libjpeg%': 0, |
| 306 | |
[email protected] | aa5e01fc | 2013-03-06 14:06:17 | [diff] [blame] | 307 | # By default, component is set to static_library and it can be overriden |
| 308 | # by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 309 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 310 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 311 | # Set to select the Title Case versions of strings in GRD files. |
| 312 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 313 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 314 | # Use translations provided by volunteers at launchpad.net. This |
| 315 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 316 | 'use_third_party_translations%': 0, |
| 317 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 318 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 319 | 'remoting%': 1, |
| 320 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 321 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 322 | 'configuration_policy%': 1, |
| 323 | |
[email protected] | 6c521fed | 2012-11-29 17:00:03 | [diff] [blame] | 324 | # Variable safe_browsing is used to control the build time configuration |
| 325 | # for safe browsing feature. Safe browsing can be compiled in 3 different |
| 326 | # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and |
| 327 | # reporting features without enabling phishing and malware detection. This |
| 328 | # is useful to integrate a third party phishing/malware detection to |
| 329 | # existing safe browsing logic. |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 330 | 'safe_browsing%': 1, |
| 331 | |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 332 | # Speech input is compiled in by default. Set to 0 to disable. |
[email protected] | 865ae21 | 2014-05-07 00:53:50 | [diff] [blame] | 333 | # TODO(tommyw): Speech Input doesn't exist anymore. Clarify the scope |
| 334 | # of this flag (and probably rename it). |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 335 | 'input_speech%': 1, |
| 336 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 337 | # Notifications are compiled in by default. Set to 0 to disable. |
| 338 | 'notifications%' : 1, |
| 339 | |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 340 | # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for |
| 341 | # regular builds and 1 for ASan builds. |
| 342 | 'mac_want_real_dsym%': 'default', |
| 343 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 344 | # If this is set, the clang plugins used on the buildbot will be used. |
| 345 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 346 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 347 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 348 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 349 | |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 350 | # Enable building with ASAN (Clang's -fsanitize=address option). |
| 351 | # -fsanitize=address only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 352 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 353 | 'asan%': 0, |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 354 | # Enable coverage gathering instrumentation in ASan. This flag also |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 355 | # controls coverage granularity (1 for function-level coverage, 2 for |
| 356 | # block-level coverage). |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 357 | 'asan_coverage%': 0, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 358 | |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 359 | # Enable Chromium overrides of the default configurations for various |
| 360 | # dynamic tools (like ASan). |
| 361 | 'use_sanitizer_options%': 1, |
| 362 | |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 363 | # Enable building with SyzyAsan. |
| 364 | # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo |
| 365 | 'syzyasan%': 0, |
| 366 | |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 367 | # Enable building with LSan (Clang's -fsanitize=leak option). |
| 368 | # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 |
| 369 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer |
| 370 | 'lsan%': 0, |
| 371 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 372 | # Enable building with TSan (Clang's -fsanitize=thread option). |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 373 | # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 374 | # See http://clang.llvm.org/docs/ThreadSanitizer.html |
| 375 | 'tsan%': 0, |
[email protected] | 0b5ec8bf | 2014-06-25 21:11:54 | [diff] [blame] | 376 | 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 377 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 378 | # Enable building with MSan (Clang's -fsanitize=memory option). |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 379 | # MemorySanitizer only works with clang, but msan=1 implies clang=1 |
| 380 | # See http://clang.llvm.org/docs/MemorySanitizer.html |
| 381 | 'msan%': 0, |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 382 | 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 383 | # Track where uninitialized memory originates from. From fastest to |
| 384 | # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 |
| 385 | # - track the chain of stores leading from allocation site to use site. |
| 386 | 'msan_track_origins%': 1, |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 387 | |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 388 | # Enable building with UBSan (Clang's -fsanitize=undefined option). |
| 389 | # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1 |
| 390 | # See http://clang.llvm.org/docs/UsersManual.html |
| 391 | 'ubsan%': 0, |
| 392 | |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 393 | # Enable building with UBsan's vptr (Clang's -fsanitize=vptr -fsanitize=null options). |
| 394 | # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1 |
| 395 | 'ubsan_vptr%': 0, |
| 396 | 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt', |
| 397 | |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 398 | # Use the dynamic libraries instrumented by one of the sanitizers |
| 399 | # instead of the standard system libraries. |
| 400 | 'use_instrumented_libraries%': 0, |
| 401 | |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 402 | # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of |
| 403 | # stdlibc++ as standard library. This is intended to use for instrumented |
| 404 | # builds. |
| 405 | 'use_custom_libcxx%': 0, |
| 406 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 407 | # Use a modified version of Clang to intercept allocated types and sizes |
| 408 | # for allocated objects. clang_type_profiler=1 implies clang=1. |
| 409 | # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier |
| 410 | # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 |
| 411 | 'clang_type_profiler%': 0, |
| 412 | |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 413 | # Set to true to instrument the code with function call logger. |
| 414 | # See src/third_party/cygprofile/cyg-profile.cc for details. |
| 415 | 'order_profiling%': 0, |
| 416 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 417 | # Use the provided profiled order file to link Chrome image with it. |
| 418 | # This makes Chrome faster by better using CPU cache when executing code. |
| 419 | # This is known as PGO (profile guided optimization). |
| 420 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 421 | 'order_text_section%' : "", |
| 422 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 423 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 424 | # libraries on linux x86-64 and arm, plus ASLR. |
| 425 | 'linux_fpic%': 1, |
| 426 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 427 | # Whether one-click signin is enabled or not. |
| 428 | 'enable_one_click_signin%': 0, |
| 429 | |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 430 | # Whether to back up data before sync. |
| 431 | 'enable_pre_sync_backup%': 0, |
| 432 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 433 | # Enable Chrome browser extensions |
| 434 | 'enable_extensions%': 1, |
| 435 | |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 436 | # Enable Google Now. |
[email protected] | 9a5bb05 | 2014-04-17 16:50:56 | [diff] [blame] | 437 | 'enable_google_now%': 1, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 438 | |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 439 | # Enable printing support and UI. This variable is used to configure |
| 440 | # which parts of printing will be built. 0 disables printing completely, |
| 441 | # 1 enables it fully, and 2 enables only the codepath to generate a |
| 442 | # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud |
| 443 | # print, UI, etc. |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 444 | 'enable_printing%': 1, |
| 445 | |
[email protected] | 75280ad2 | 2014-05-20 22:02:25 | [diff] [blame] | 446 | # Windows prints using a PDF as the metafile from the renderer. |
[email protected] | 4a473e9 | 2014-05-22 18:38:56 | [diff] [blame] | 447 | 'win_pdf_metafile_for_printing%': 1, |
[email protected] | 75280ad2 | 2014-05-20 22:02:25 | [diff] [blame] | 448 | |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 449 | # Set the version of CLD. |
| 450 | # 0: Don't specify the version. This option is for the Finch testing. |
| 451 | # 1: Use only CLD1. |
| 452 | # 2: Use only CLD2. |
[email protected] | d8ef236 | 2013-10-22 02:10:00 | [diff] [blame] | 453 | 'cld_version%': 2, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 454 | |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 455 | # 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] | 456 | # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data |
| 457 | # tool explicitly. |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 458 | # See third_party/cld_2/cld_2.gyp for more information. |
| 459 | # 0: Small tables, lower accuracy |
| 460 | # 1: Medium tables, medium accuracy |
| 461 | # 2: Large tables, high accuracy |
| 462 | 'cld2_table_size%': 2, |
| 463 | |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 464 | # The data acquisition mode for CLD2. Possible values are: |
| 465 | # static: CLD2 data is statically linked to the executable. |
| 466 | # standalone: CLD2 data is provided in a standalone file that is |
| 467 | # bundled with the executable. |
| 468 | # component: CLD2 data is provided as a Chrome "component" and is |
| 469 | # downloaded via the component updater. |
[email protected] | 916748e | 2014-06-25 12:57:15 | [diff] [blame] | 470 | # |
| 471 | # For more information on switching the CLD2 data source, see: |
| 472 | # https://sites.google.com/a/chromium.org/dev/developers/how-tos/compact-language-detector-cld-data-source-configuration |
[email protected] | df0c5ef | 2014-06-26 08:35:01 | [diff] [blame] | 473 | 'cld2_data_source%': 'static', |
[email protected] | fb53e65 | 2014-04-30 11:27:19 | [diff] [blame] | 474 | |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 475 | # Enable spell checker. |
| 476 | 'enable_spellcheck%': 1, |
| 477 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 478 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 479 | 'enable_webrtc%': 1, |
| 480 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 481 | # Enables use of the session service, which is enabled by default. |
| 482 | # Support for disabling depends on the platform. |
| 483 | 'enable_session_service%': 1, |
| 484 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 485 | # Enables theme support, which is enabled by default. Support for |
| 486 | # disabling depends on the platform. |
| 487 | 'enable_themes%': 1, |
| 488 | |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 489 | # Enables autofill dialog and associated features; disabled by default. |
| 490 | 'enable_autofill_dialog%' : 0, |
| 491 | |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 492 | # Defaults Wallet integration in Autofill dialog to use production |
| 493 | # servers. Unofficial builds won't have the proper API keys. |
| 494 | 'enable_prod_wallet_service%': 0, |
| 495 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 496 | # Enables support for background apps. |
| 497 | 'enable_background%': 1, |
| 498 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 499 | # Enable the task manager by default. |
| 500 | 'enable_task_manager%': 1, |
[email protected] | e1de87f | 2012-05-02 17:20:45 | [diff] [blame] | 501 | |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 502 | # Enables used resource whitelist generation; disabled by default. |
| 503 | 'enable_resource_whitelist_generation%': 0, |
| 504 | |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 505 | # Enable FILE support by default. |
| 506 | 'disable_file_support%': 0, |
| 507 | |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 508 | # Enable FTP support by default. |
| 509 | 'disable_ftp_support%': 0, |
| 510 | |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 511 | # Use native android functions in place of ICU. Not supported by most |
| 512 | # components. |
| 513 | 'use_icu_alternatives_on_android%': 0, |
| 514 | |
[email protected] | ef4cb64 | 2013-09-14 22:48:02 | [diff] [blame] | 515 | # XInput2 multitouch support is enabled by default (use_xi2_mt=2). |
| 516 | # Setting to zero value disables XI2 MT. When XI2 MT is enabled, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 517 | # the input value also defines the required XI2 minor minimum version. |
| 518 | # For example, use_xi2_mt=2 means XI2.2 or above version is required. |
[email protected] | ef4cb64 | 2013-09-14 22:48:02 | [diff] [blame] | 519 | 'use_xi2_mt%': 2, |
[email protected] | 22d6dd7 | 2012-05-15 07:29:55 | [diff] [blame] | 520 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 521 | # Use of precompiled headers on Windows. |
| 522 | # |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 523 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 524 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 525 | # This setting will override the default. |
| 526 | # |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 527 | # See |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 528 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 529 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 530 | 'chromium_win_pch%': 0, |
| 531 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 532 | # Set this to true when building with Clang. |
| 533 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
| 534 | 'clang%': 0, |
| 535 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 536 | # Enable plug-in installation by default. |
| 537 | 'enable_plugin_installation%': 1, |
| 538 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 539 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 540 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 541 | # Chrome UI. |
| 542 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 543 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 544 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 545 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 546 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 547 | # with one of those tools. |
| 548 | 'build_for_tool%': '', |
| 549 | |
[email protected] | 3713813 | 2013-01-17 23:08:52 | [diff] [blame] | 550 | # If no directory is specified then a temporary directory will be used. |
| 551 | 'test_isolation_outdir%': '', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 552 | # True if isolate should fail if the isolate files refer to files |
| 553 | # that are missing. |
| 554 | 'test_isolation_fail_on_missing': 0, |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 555 | |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 556 | 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 557 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 558 | |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 559 | # Managed users are enabled by default. |
| 560 | 'enable_managed_users%': 1, |
| 561 | |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 562 | # Platform natively supports discardable memory. |
| 563 | 'native_discardable_memory%': 0, |
| 564 | |
| 565 | # Platform sends memory pressure signals natively. |
| 566 | 'native_memory_pressure_signals%': 0, |
| 567 | |
[email protected] | 9be0a7f | 2014-05-08 06:05:33 | [diff] [blame] | 568 | 'data_reduction_fallback_host%' : '', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 569 | 'data_reduction_dev_host%' : '', |
[email protected] | 9be0a7f | 2014-05-08 06:05:33 | [diff] [blame] | 570 | 'spdy_proxy_auth_origin%' : '', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 571 | 'spdy_proxy_auth_property%' : '', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 572 | 'spdy_proxy_auth_value%' : '', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 573 | 'data_reduction_proxy_probe_url%' : '', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 574 | 'data_reduction_proxy_warmup_url%' : '', |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 575 | 'data_reduction_proxy_ssl_origin%' : '', |
| 576 | 'data_reduction_proxy_alt_origin%' : '', |
| 577 | 'data_reduction_proxy_alt_fallback_origin%' : '', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 578 | 'enable_mdns%' : 0, |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 579 | 'enable_service_discovery%': 0, |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 580 | 'enable_wifi_bootstrapping%': 0, |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 581 | 'enable_hangout_services_extension%': 0, |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 582 | |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 583 | # Enable the Syzygy optimization step. |
| 584 | 'syzygy_optimize%': 0, |
| 585 | |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 586 | # Enable hole punching for the protected video. |
| 587 | 'video_hole%': 0, |
| 588 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 589 | # Automatically select platforms under ozone. Turn this off to |
| 590 | # build only explicitly selected platforms. |
| 591 | 'ozone_auto_platforms%': 1, |
| 592 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 593 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 594 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 595 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 596 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 597 | }, { |
| 598 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 599 | }], |
| 600 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 601 | # A flag for BSD platforms |
| 602 | ['OS=="freebsd" or OS=="openbsd"', { |
| 603 | 'os_bsd%': 1, |
| 604 | }, { |
| 605 | 'os_bsd%': 0, |
| 606 | }], |
| 607 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 608 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 609 | ['(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] | 610 | 'use_nss%': 1, |
| 611 | }, { |
| 612 | 'use_nss%': 0, |
| 613 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 614 | |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 615 | # When OpenSSL is used for SSL and crypto on Unix-like systems, use |
| 616 | # OpenSSL's certificate definition. |
| 617 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', { |
| 618 | 'use_openssl_certs%': 1, |
| 619 | }, { |
| 620 | 'use_openssl_certs%': 0, |
| 621 | }], |
| 622 | |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 623 | # libudev usage. This currently only affects the content layer. |
[email protected] | 048ab5f | 2013-11-22 01:42:47 | [diff] [blame] | 624 | ['OS=="linux" and embedded==0', { |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 625 | 'use_udev%': 1, |
| 626 | }, { |
| 627 | 'use_udev%': 0, |
| 628 | }], |
| 629 | |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 630 | # Flags to use X11 on non-Mac POSIX platforms. |
[email protected] | 1201dd0f | 2013-05-03 23:39:54 | [diff] [blame] | 631 | ['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] | 632 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 633 | }, { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 634 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 635 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 636 | |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 637 | # Flags to use glib. |
[email protected] | 559d8f4f | 2014-04-23 18:28:51 | [diff] [blame] | 638 | ['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] | 639 | 'use_glib%': 0, |
| 640 | }, { |
| 641 | 'use_glib%': 1, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 642 | }], |
| 643 | |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 644 | # Flags to use pango and cairo. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 645 | ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { |
| 646 | 'use_pango%': 0, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 647 | 'use_cairo%': 0, |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 648 | }, { |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 649 | 'use_pango%': 1, |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 650 | 'use_cairo%': 1, |
[email protected] | c335f480 | 2013-04-06 04:51:21 | [diff] [blame] | 651 | }], |
| 652 | |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 653 | # DBus usage. |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 654 | ['OS=="linux" and embedded==0', { |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 655 | 'use_dbus%': 1, |
| 656 | }, { |
| 657 | 'use_dbus%': 0, |
| 658 | }], |
| 659 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 660 | # We always use skia text rendering in Aura on Windows, since GDI |
| 661 | # doesn't agree with our BackingStore. |
| 662 | # TODO(beng): remove once skia text rendering is on by default. |
| 663 | ['use_aura==1 and OS=="win"', { |
| 664 | 'enable_skia_text%': 1, |
| 665 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 666 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 667 | # A flag to enable or disable our compile-time dependency |
| 668 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 669 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 670 | # for Linux distributions and for Aura. |
[email protected] | 8370a62 | 2014-02-19 08:12:29 | [diff] [blame] | 671 | ['OS!="linux" or chromeos==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 672 | 'use_gnome_keyring%': 0, |
| 673 | }, { |
| 674 | 'use_gnome_keyring%': 1, |
| 675 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 676 | |
[email protected] | ce67da1b6 | 2014-04-17 19:20:23 | [diff] [blame] | 677 | ['OS=="mac" or OS=="ios"', { |
| 678 | # Mac and iOS want Title Case strings |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 679 | 'use_titlecase_in_grd_files%': 1, |
| 680 | }], |
| 681 | |
[email protected] | ff930087 | 2014-01-22 11:09:32 | [diff] [blame] | 682 | # Enable loader extensions on Chrome OS. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 683 | ['chromeos==1', { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 684 | 'image_loader_extension%': 1, |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 685 | }, { |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 686 | 'image_loader_extension%': 0, |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 687 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 688 | |
[email protected] | c79d197 | 2013-02-06 18:47:29 | [diff] [blame] | 689 | ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { |
[email protected] | f032fe9 | 2012-06-12 19:20:01 | [diff] [blame] | 690 | 'enable_one_click_signin%': 1, |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 691 | 'enable_pre_sync_backup%': 1, |
[email protected] | e4b66bf | 2012-05-29 20:39:51 | [diff] [blame] | 692 | }], |
| 693 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 694 | ['OS=="android"', { |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 695 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 696 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 697 | 'cld_version%': 1, |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 698 | 'enable_spellcheck%': 0, |
[email protected] | 55e0230 | 2012-08-21 00:50:46 | [diff] [blame] | 699 | 'enable_themes%': 0, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 700 | 'remoting%': 0, |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 701 | 'arm_neon%': 0, |
| 702 | 'arm_neon_optional%': 1, |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 703 | 'native_discardable_memory%': 1, |
| 704 | 'native_memory_pressure_signals%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 705 | 'enable_printing%': 2, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 706 | 'enable_task_manager%':0, |
[email protected] | 335b687 | 2014-02-13 20:14:13 | [diff] [blame] | 707 | # Set to 1 once we have a notification system for Android. |
| 708 | # http://crbug.com/115320 |
| 709 | 'notifications%': 0, |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 710 | 'video_hole%': 1, |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 711 | }], |
[email protected] | b25f003 | 2013-08-19 22:26:25 | [diff] [blame] | 712 | |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 713 | # Android OS includes support for proprietary codecs regardless of |
| 714 | # building Chromium or Google Chrome. We also ship Google Chrome with |
| 715 | # proprietary codecs. |
| 716 | ['OS=="android" or branding=="Chrome"', { |
| 717 | 'proprietary_codecs%': 1, |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 718 | }, { |
| 719 | 'proprietary_codecs%': 0, |
[email protected] | 0d841b7d | 2013-08-20 20:22:22 | [diff] [blame] | 720 | }], |
| 721 | |
[email protected] | 85f2958 | 2013-12-16 18:02:04 | [diff] [blame] | 722 | ['OS=="mac" or OS=="ios"', { |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 723 | 'native_discardable_memory%': 1, |
| 724 | 'native_memory_pressure_signals%': 1, |
| 725 | }], |
| 726 | |
[email protected] | 8f5999e | 2013-08-10 18:27:05 | [diff] [blame] | 727 | # Enable autofill dialog for Android, Mac and Views-enabled platforms. |
| 728 | ['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] | 729 | 'enable_autofill_dialog%': 1, |
| 730 | |
| 731 | 'conditions': [ |
| 732 | ['buildtype=="Official"', { |
| 733 | 'enable_prod_wallet_service%': 1, |
| 734 | }], |
| 735 | ] |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 736 | }], |
| 737 | |
[email protected] | f96d63b | 2014-04-01 19:22:44 | [diff] [blame] | 738 | ['OS=="android"', { |
[email protected] | 11834705 | 2013-01-12 08:35:43 | [diff] [blame] | 739 | 'enable_webrtc%': 1, |
| 740 | }], |
| 741 | |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 742 | ['OS=="ios"', { |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 743 | 'disable_ftp_support%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 744 | 'enable_extensions%': 0, |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 745 | 'enable_google_now%': 0, |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 746 | 'cld_version%': 1, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 747 | 'enable_printing%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 748 | 'enable_session_service%': 0, |
[email protected] | c4ac4d1 | 2012-09-12 12:02:24 | [diff] [blame] | 749 | 'enable_themes%': 0, |
| 750 | 'enable_webrtc%': 0, |
| 751 | 'notifications%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 752 | 'remoting%': 0, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 753 | 'safe_browsing%': 0, |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 754 | 'enable_managed_users%': 0, |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 755 | 'enable_task_manager%': 0, |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 756 | }], |
| 757 | |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 758 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 759 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 760 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 761 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 762 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 763 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 764 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 765 | |
[email protected] | c3340fb3 | 2012-12-20 20:45:39 | [diff] [blame] | 766 | # Turn precompiled headers on by default. |
| 767 | ['OS=="win" and buildtype!="Official"', { |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 768 | 'chromium_win_pch%': 1 |
| 769 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 770 | |
[email protected] | 321dd1b | 2014-06-02 21:51:04 | [diff] [blame] | 771 | ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 772 | 'enable_plugin_installation%': 0, |
| 773 | }, { |
| 774 | 'enable_plugin_installation%': 1, |
| 775 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 776 | |
[email protected] | 50d3c4a4 | 2014-04-22 08:29:14 | [diff] [blame] | 777 | # Whether PPAPI is enabled. |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 778 | ['OS=="android" or OS=="ios" or embedded==1', { |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 779 | 'enable_plugins%': 0, |
| 780 | }, { |
| 781 | 'enable_plugins%': 1, |
| 782 | }], |
| 783 | |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 784 | # linux_use_bundled_gold: whether to use the gold linker binary checked |
| 785 | # into third_party/binutils. Force this off via GYP_DEFINES when you |
| 786 | # are using a custom toolchain and need to control -B in ldflags. |
[email protected] | ac29639 | 2014-04-29 01:22:10 | [diff] [blame] | 787 | # Do not use 32-bit gold on 32-bit hosts as it runs out address space |
| 788 | # for component=static_library builds. |
[email protected] | 1e8e7b9 | 2013-03-15 07:27:56 | [diff] [blame] | 789 | ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 790 | 'linux_use_bundled_gold%': 1, |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 791 | }, { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 792 | 'linux_use_bundled_gold%': 0, |
| 793 | }], |
| 794 | |
| 795 | # linux_use_bundled_binutils: whether to use the binary binutils |
| 796 | # checked into third_party/binutils. These are not multi-arch so cannot |
| 797 | # be used except on x86 and x86-64 (the only two architectures which |
| 798 | # are currently checke in). Force this off via GYP_DEFINES when you |
| 799 | # are using a custom toolchain and need to control -B in cflags. |
| 800 | ['OS=="linux" and (target_arch=="x64")', { |
| 801 | 'linux_use_bundled_binutils%': 1, |
| 802 | }, { |
| 803 | 'linux_use_bundled_binutils%': 0, |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 804 | }], |
| 805 | |
| 806 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
[email protected] | fd6d17c | 2014-04-29 22:01:49 | [diff] [blame] | 807 | # On by default for x64 Linux. |
| 808 | ['OS=="linux" and target_arch=="x64"', { |
[email protected] | d1d90a4 | 2013-03-26 12:01:34 | [diff] [blame] | 809 | 'linux_use_gold_flags%': 1, |
| 810 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 811 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 812 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 813 | |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 814 | # linux_use_debug_fission: whether to use split DWARF debug info |
| 815 | # files. This can reduce link time significantly, but is incompatible |
| 816 | # with some utilities such as icecc and ccache. Requires gold and |
| 817 | # gcc >= 4.8 or clang. |
| 818 | # http://gcc.gnu.org/wiki/DebugFission |
| 819 | ['OS=="linux" and target_arch=="x64"', { |
| 820 | 'linux_use_debug_fission%': 1, |
| 821 | }, { |
| 822 | 'linux_use_debug_fission%': 0, |
| 823 | }], |
| 824 | |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 825 | ['OS=="android" or OS=="ios"', { |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 826 | 'enable_captive_portal_detection%': 0, |
| 827 | }, { |
| 828 | 'enable_captive_portal_detection%': 1, |
| 829 | }], |
| 830 | |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 831 | # Enable Skia UI text drawing incrementally on different platforms. |
| 832 | # http://crbug.com/105550 |
| 833 | # |
| 834 | # On Aura, this allows per-tile painting to be used in the browser |
| 835 | # compositor. |
[email protected] | 04b67b6 | 2013-09-14 01:32:17 | [diff] [blame] | 836 | ['OS!="android"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 837 | 'use_canvas_skia%': 1, |
| 838 | }], |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 839 | |
[email protected] | 0753ea4 | 2012-08-30 20:15:44 | [diff] [blame] | 840 | ['chromeos==1', { |
| 841 | # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. |
| 842 | 'use_libjpeg_turbo%': 0, |
| 843 | }], |
| 844 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 845 | ['OS=="android"', { |
| 846 | # When building as part of the Android system, use system libraries |
| 847 | # where possible to reduce ROM size. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 848 | 'use_system_libjpeg%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 849 | }], |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 850 | |
[email protected] | 5be161f | 2013-06-18 11:09:33 | [diff] [blame] | 851 | # Do not enable the Settings App on ChromeOS. |
| 852 | ['enable_app_list==1 and chromeos==0', { |
[email protected] | 8a46f5f | 2012-12-05 00:47:12 | [diff] [blame] | 853 | 'enable_settings_app%': 1, |
| 854 | }, { |
| 855 | 'enable_settings_app%': 0, |
| 856 | }], |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 857 | |
| 858 | ['OS=="linux" and target_arch=="arm" and chromeos==0', { |
| 859 | # Set some defaults for arm/linux chrome builds |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 860 | 'use_allocator%': 'none', |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 861 | # sysroot needs to be an absolute path otherwise it generates |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 862 | # incorrect results when passed to pkg-config |
[email protected] | 84b00d12f | 2012-12-14 01:53:43 | [diff] [blame] | 863 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 864 | }], # OS=="linux" and target_arch=="arm" and chromeos==0 |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 865 | |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 866 | ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 867 | 'conditions': [ |
| 868 | ['target_arch=="x64"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 869 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 870 | }], |
| 871 | ['target_arch=="ia32"', { |
[email protected] | b32bf9fe | 2013-06-05 23:07:43 | [diff] [blame] | 872 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 873 | }], |
| 874 | ], |
[email protected] | 42972b6 | 2013-08-28 05:46:42 | [diff] [blame] | 875 | }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 |
[email protected] | e2aaaac | 2013-05-08 07:20:09 | [diff] [blame] | 876 | |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 877 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | f147893 | 2013-03-05 20:50:07 | [diff] [blame] | 878 | 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 879 | 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 880 | }], |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 881 | |
| 882 | # Whether tests targets should be run, archived or just have the |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 883 | # dependencies verified. All the tests targets have the '_run' suffix, |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 884 | # e.g. base_unittests_run runs the target base_unittests. The test |
[email protected] | 10d8ac3 | 2013-10-31 13:34:31 | [diff] [blame] | 885 | # target always calls tools/swarming_client/isolate.py. See the script's |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 886 | # --help for more information and the valid --mode values. Meant to be |
| 887 | # overriden with GYP_DEFINES. |
[email protected] | 93fe400 | 2013-04-10 00:17:01 | [diff] [blame] | 888 | # TODO(maruel): Remove the conditions as more configurations are |
| 889 | # supported. |
| 890 | # NOTE: The check for disable_nacl==0 and component=="static_library" |
| 891 | # can't be used here because these variables are not defined yet, but it |
| 892 | # is still not supported. |
[email protected] | e51e3565 | 2013-12-19 02:39:08 | [diff] [blame] | 893 | ['OS!="ios" and OS!="android" and chromeos==0', { |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 894 | 'test_isolation_mode%': 'check', |
| 895 | }, { |
| 896 | 'test_isolation_mode%': 'noop', |
| 897 | }], |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 898 | # Whether Android build uses OpenMAX DL FFT. |
| 899 | ['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")', { |
| 900 | # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel. |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 901 | # When enabled, this will also enable WebAudio support on |
[email protected] | 9d5cb98 | 2014-06-24 23:37:20 | [diff] [blame] | 902 | # Android for these architectures. Default is enabled. Whether |
[email protected] | 353fa4a | 2014-05-02 17:36:22 | [diff] [blame] | 903 | # WebAudio is actually available depends on runtime settings |
| 904 | # and flags. |
[email protected] | 330f3a3 | 2013-04-23 05:47:58 | [diff] [blame] | 905 | 'use_openmax_dl_fft%': 1, |
[email protected] | d29d61b | 2013-04-17 04:00:53 | [diff] [blame] | 906 | }, { |
| 907 | 'use_openmax_dl_fft%': 0, |
| 908 | }], |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 909 | ['OS=="win" or OS=="linux"', { |
| 910 | 'enable_mdns%' : 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 911 | }], |
| 912 | |
| 913 | # Turns on compiler optimizations in V8 in Debug build, except |
| 914 | # on android_clang, where we're hitting a weird linker error. |
| 915 | # TODO(dpranke): http://crbug.com/266155 . |
| 916 | ['OS=="android"', { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 917 | 'v8_optimized_debug%': 1, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 918 | }, { |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 919 | 'v8_optimized_debug%': 2, |
[email protected] | 2abbc1a | 2013-08-07 22:09:06 | [diff] [blame] | 920 | }], |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 921 | |
| 922 | # Disable various features by default on embedded. |
| 923 | ['embedded==1', { |
| 924 | 'remoting%': 0, |
| 925 | 'enable_printing%': 0, |
| 926 | }], |
[email protected] | b390dd7d | 2014-03-20 14:49:41 | [diff] [blame] | 927 | |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 928 | # By default, use ICU data file (icudtl.dat) on all platforms |
| 929 | # except when building Android WebView. |
| 930 | # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium). |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 931 | # Set the data reduction proxy origin for Android Webview. |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 932 | ['android_webview_build==0', { |
| 933 | 'icu_use_data_file_flag%' : 1, |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 934 | 'spdy_proxy_auth_origin%': '', |
| 935 | 'data_reduction_proxy_probe_url%': '', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 936 | 'data_reduction_proxy_warmup_url%': '', |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 937 | 'data_reduction_dev_host%': '', |
| 938 | 'data_reduction_fallback_host%': '', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 939 | }, { |
| 940 | 'icu_use_data_file_flag%' : 0, |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 941 | 'spdy_proxy_auth_origin%': 'https://proxy.googlezip.net:443/', |
| 942 | 'data_reduction_proxy_probe_url%': 'http://check.googlezip.net/connect', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 943 | 'data_reduction_proxy_warmup_url%': 'http://www.gstatic.com/generate_204', |
[email protected] | 7cd3143 | 2014-05-10 12:16:52 | [diff] [blame] | 944 | 'data_reduction_dev_host%': 'http://proxy-dev.googlezip.net:80/', |
| 945 | 'data_reduction_fallback_host%': 'http://compress.googlezip.net:80/', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 946 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 947 | ['OS=="win" or OS=="mac"', { |
| 948 | 'enable_wifi_bootstrapping%' : 1, |
| 949 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 950 | ], |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 951 | |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 952 | # Set this to 1 to enable use of concatenated impulse responses |
| 953 | # for the HRTF panner in WebAudio. |
[email protected] | 508afb7 | 2013-05-02 22:37:26 | [diff] [blame] | 954 | 'use_concatenated_impulse_responses': 1, |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 955 | |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 956 | # You can set the variable 'use_official_google_api_keys' to 1 |
| 957 | # to use the Google-internal file containing official API keys |
| 958 | # for Google Chrome even in a developer build. Setting this |
| 959 | # variable explicitly to 1 will cause your build to fail if the |
| 960 | # internal file is missing. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 961 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 962 | # The variable is documented here, but not handled in this file; |
| 963 | # see //google_apis/determine_use_official_keys.gypi for the |
| 964 | # implementation. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 965 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 966 | # Set the variable to 0 to not use the internal file, even when |
| 967 | # it exists in your checkout. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 968 | # |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 969 | # Leave it unset in your include.gypi to have the variable |
| 970 | # implicitly set to 1 if you have |
| 971 | # src/google_apis/internal/google_chrome_api_keys.h in your |
| 972 | # checkout, and implicitly set to 0 if not. |
| 973 | # |
| 974 | # Note that official builds always behave as if the variable |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 975 | # was explicitly set to 1, i.e. they always use official keys, |
| 976 | # and will fail to build if the internal file is missing. |
[email protected] | f2817cf | 2013-05-16 11:39:54 | [diff] [blame] | 977 | # |
| 978 | # NOTE: You MUST NOT explicitly set the variable to 2 in your |
| 979 | # include.gypi or by other means. Due to subtleties of GYP, this |
| 980 | # is not the same as leaving the variable unset, even though its |
| 981 | # default value in |
| 982 | # //google_apis/determine_use_official_keys.gypi is 2. |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 983 | |
| 984 | # Set these to bake the specified API keys and OAuth client |
| 985 | # IDs/secrets into your build. |
| 986 | # |
| 987 | # If you create a build without values baked in, you can instead |
| 988 | # set environment variables to provide the keys at runtime (see |
| 989 | # src/google_apis/google_api_keys.h for details). Features that |
| 990 | # require server-side APIs may fail to work if no keys are |
| 991 | # provided. |
| 992 | # |
| 993 | # Note that if you are building an official build or if |
| 994 | # use_official_google_api_keys has been set to 1 (explicitly or |
| 995 | # implicitly), these values will be ignored and the official |
| 996 | # keys will be used instead. |
| 997 | 'google_api_key%': '', |
| 998 | 'google_default_client_id%': '', |
| 999 | 'google_default_client_secret%': '', |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1000 | # Native Client is enabled by default. |
| 1001 | 'disable_nacl%': '0', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1002 | }, |
| 1003 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1004 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1005 | 'branding%': '<(branding)', |
| 1006 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 1007 | 'target_arch%': '<(target_arch)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1008 | 'target_subarch%': '<(target_subarch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 1009 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1010 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 1011 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 1012 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1013 | 'use_ash%': '<(use_ash)', |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 1014 | 'use_cras%': '<(use_cras)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 1015 | 'use_openssl%': '<(use_openssl)', |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1016 | 'use_openssl_certs%': '<(use_openssl_certs)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1017 | 'use_nss%': '<(use_nss)', |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 1018 | 'use_udev%': '<(use_udev)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 1019 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1020 | 'os_posix%': '<(os_posix)', |
[email protected] | 61955d9 | 2013-11-13 20:44:52 | [diff] [blame] | 1021 | 'use_dbus%': '<(use_dbus)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 1022 | 'use_glib%': '<(use_glib)', |
[email protected] | 26bade89 | 2013-05-23 21:44:15 | [diff] [blame] | 1023 | 'use_pango%': '<(use_pango)', |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 1024 | 'use_cairo%': '<(use_cairo)', |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1025 | 'use_ozone%': '<(use_ozone)', |
[email protected] | c0c72dd5 | 2013-10-21 23:09:48 | [diff] [blame] | 1026 | 'use_ozone_evdev%': '<(use_ozone_evdev)', |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 1027 | 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', |
[email protected] | 5be6000 | 2014-01-13 21:27:42 | [diff] [blame] | 1028 | 'use_system_fontconfig%': '<(use_system_fontconfig)', |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 1029 | 'desktop_linux%': '<(desktop_linux)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1030 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 1031 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 1032 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 1033 | 'chromeos%': '<(chromeos)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 1034 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 1035 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 1036 | 'use_xi2_mt%':'<(use_xi2_mt)', |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1037 | 'image_loader_extension%': '<(image_loader_extension)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1038 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 1039 | 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)', |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 1040 | 'win_z7%': '<(win_z7)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 1041 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 1042 | 'tracing_like_official_build%': '<(tracing_like_official_build)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1043 | 'arm_version%': '<(arm_version)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 1044 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1045 | 'arm_neon_optional%': '<(arm_neon_optional)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 1046 | 'sysroot%': '<(sysroot)', |
[email protected] | a23d714 | 2014-02-14 16:58:45 | [diff] [blame] | 1047 | 'chroot_cmd%': '<(chroot_cmd)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 1048 | 'system_libdir%': '<(system_libdir)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1049 | 'component%': '<(component)', |
[email protected] | 1a43cc57 | 2014-03-07 22:36:32 | [diff] [blame] | 1050 | 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1051 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 1052 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1053 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 1054 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 1055 | 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 1056 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 1057 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 1058 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 1059 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1060 | 'input_speech%': '<(input_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1061 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1062 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 1063 | 'mac_want_real_dsym%': '<(mac_want_real_dsym)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1064 | 'asan%': '<(asan)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 1065 | 'asan_coverage%': '<(asan_coverage)', |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 1066 | 'use_sanitizer_options%': '<(use_sanitizer_options)', |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 1067 | 'syzyasan%': '<(syzyasan)', |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1068 | 'syzygy_optimize%': '<(syzygy_optimize)', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 1069 | 'lsan%': '<(lsan)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 1070 | 'msan%': '<(msan)', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 1071 | 'msan_blacklist%': '<(msan_blacklist)', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 1072 | 'msan_track_origins%': '<(msan_track_origins)', |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 1073 | 'tsan%': '<(tsan)', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 1074 | 'tsan_blacklist%': '<(tsan_blacklist)', |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 1075 | 'ubsan%': '<(ubsan)', |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1076 | 'ubsan_vptr%': '<(ubsan_vptr)', |
| 1077 | 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)', |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 1078 | 'use_instrumented_libraries%': '<(use_instrumented_libraries)', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 1079 | 'use_custom_libcxx%': '<(use_custom_libcxx)', |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 1080 | 'clang_type_profiler%': '<(clang_type_profiler)', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 1081 | 'order_profiling%': '<(order_profiling)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 1082 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1083 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 1084 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 1085 | 'enable_plugins%': '<(enable_plugins)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1086 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 1087 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 1088 | 'enable_autofill_dialog%': '<(enable_autofill_dialog)', |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 1089 | 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1090 | 'enable_background%': '<(enable_background)', |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1091 | 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', |
| 1092 | 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1093 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 1094 | 'linux_use_debug_fission%': '<(linux_use_debug_fission)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 1095 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0ef3a52 | 2012-05-15 14:56:33 | [diff] [blame] | 1096 | 'test_isolation_mode%': '<(test_isolation_mode)', |
| 1097 | 'test_isolation_outdir%': '<(test_isolation_outdir)', |
[email protected] | 5b38a52 | 2013-03-20 17:00:47 | [diff] [blame] | 1098 | 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1099 | 'enable_printing%': '<(enable_printing)', |
[email protected] | 75280ad2 | 2014-05-20 22:02:25 | [diff] [blame] | 1100 | 'win_pdf_metafile_for_printing%': '<(win_pdf_metafile_for_printing)', |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 1101 | 'enable_spellcheck%': '<(enable_spellcheck)', |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 1102 | 'enable_google_now%': '<(enable_google_now)', |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 1103 | 'cld_version%': '<(cld_version)', |
[email protected] | 61753f2 | 2014-03-19 12:10:59 | [diff] [blame] | 1104 | 'cld2_table_size%': '<(cld2_table_size)', |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 1105 | 'cld2_data_source%': '<(cld2_data_source)', |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 1106 | 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 1107 | 'disable_file_support%': '<(disable_file_support)', |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 1108 | 'disable_ftp_support%': '<(disable_ftp_support)', |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 1109 | 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1110 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 740ebed | 2012-06-27 19:14:06 | [diff] [blame] | 1111 | 'sas_dll_path%': '<(sas_dll_path)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1112 | 'wix_path%': '<(wix_path)', |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 1113 | 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1114 | 'use_system_libjpeg%': '<(use_system_libjpeg)', |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1115 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1116 | 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)', |
[email protected] | 5660f19 | 2013-04-02 16:55:46 | [diff] [blame] | 1117 | 'gyp_managed_install%': 0, |
[email protected] | 97d63ec | 2013-06-25 18:42:07 | [diff] [blame] | 1118 | 'create_standalone_apk%': 1, |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1119 | 'enable_app_list%': '<(enable_app_list)', |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 1120 | 'use_default_render_theme%': '<(use_default_render_theme)', |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 1121 | 'enable_settings_app%': '<(enable_settings_app)', |
[email protected] | 2b11365 | 2012-09-17 17:01:39 | [diff] [blame] | 1122 | 'google_api_key%': '<(google_api_key)', |
| 1123 | 'google_default_client_id%': '<(google_default_client_id)', |
| 1124 | 'google_default_client_secret%': '<(google_default_client_secret)', |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 1125 | 'enable_managed_users%': '<(enable_managed_users)', |
[email protected] | 1591c44d | 2013-07-15 13:28:43 | [diff] [blame] | 1126 | 'native_discardable_memory%': '<(native_discardable_memory)', |
| 1127 | 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 1128 | 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)', |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 1129 | 'data_reduction_dev_host%': '<(data_reduction_dev_host)', |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 1130 | 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', |
| 1131 | 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 1132 | 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 1133 | 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)', |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 1134 | 'data_reduction_proxy_warmup_url%': '<(data_reduction_proxy_warmup_url)', |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 1135 | 'data_reduction_proxy_ssl_origin%' : '<(data_reduction_proxy_ssl_origin)', |
| 1136 | 'data_reduction_proxy_alt_origin%' : '<(data_reduction_proxy_alt_origin)', |
| 1137 | 'data_reduction_proxy_alt_fallback_origin%' : '<(data_reduction_proxy_alt_fallback_origin)', |
[email protected] | 5e131c9f | 2013-07-10 19:21:05 | [diff] [blame] | 1138 | 'enable_mdns%' : '<(enable_mdns)', |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 1139 | 'enable_service_discovery%' : '<(enable_service_discovery)', |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 1140 | 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 1141 | 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)', |
[email protected] | 6268e01b4 | 2013-10-19 22:44:19 | [diff] [blame] | 1142 | 'v8_optimized_debug%': '<(v8_optimized_debug)', |
[email protected] | d80a0619 | 2013-08-23 23:33:41 | [diff] [blame] | 1143 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 1144 | 'use_goma%': '<(use_goma)', |
| 1145 | 'gomadir%': '<(gomadir)', |
[email protected] | 145eacd | 2014-05-09 23:18:16 | [diff] [blame] | 1146 | 'video_hole%': '<(video_hole)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 1147 | |
[email protected] | 2f32567 | 2012-10-31 23:29:37 | [diff] [blame] | 1148 | # Use system protobuf instead of bundled one. |
| 1149 | 'use_system_protobuf%': 0, |
| 1150 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 1151 | # Use system yasm instead of bundled one. |
| 1152 | 'use_system_yasm%': 0, |
| 1153 | |
[email protected] | ea02e96 | 2013-04-26 11:18:16 | [diff] [blame] | 1154 | # Use system ICU instead of bundled one. |
| 1155 | 'use_system_icu%' : 0, |
| 1156 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 1157 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 1158 | # able to turn it off for various reasons. |
| 1159 | 'linux_disable_pie%': 0, |
| 1160 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 1161 | # The release channel that this build targets. This is used to restrict |
| 1162 | # channel-specific build options, like which installer packages to create. |
| 1163 | # The default is 'all', which does no channel-specific filtering. |
| 1164 | 'channel%': 'all', |
| 1165 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1166 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 1167 | # precompiled headers on the Mac. Prefix header injection may still be |
| 1168 | # used, but prefix headers will not be precompiled. This is useful when |
| 1169 | # using distcc to distribute a build to compile slaves that don't |
| 1170 | # share the same compiler executable as the system driving the compilation, |
| 1171 | # because precompiled headers rely on pointers into a specific compiler |
| 1172 | # executable's image. Setting this to 0 is needed to use an experimental |
| 1173 | # Linux-Mac cross compiler distcc farm. |
| 1174 | 'chromium_mac_pch%': 1, |
| 1175 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1176 | # The default value for mac_strip in target_defaults. This cannot be |
| 1177 | # set there, per the comment about variable% in a target_defaults. |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1178 | 'mac_strip_release%': 0, |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 1179 | |
[email protected] | c0a1277 | 2013-08-22 00:08:31 | [diff] [blame] | 1180 | # Set to 1 to enable java code coverage. Instruments classes during build |
| 1181 | # to produce .ec files during runtime. |
| 1182 | 'emma_coverage%': 0, |
| 1183 | |
[email protected] | 9662d92 | 2013-10-04 22:02:44 | [diff] [blame] | 1184 | # EMMA filter string consisting of a list of inclusion/exclusion patterns |
| 1185 | # separated with whitespace and/or comma. Only has effect if |
| 1186 | # 'emma_coverage=1'. |
| 1187 | 'emma_filter%': '', |
| 1188 | |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1189 | # Set to 1 to enable running Android lint on java/class files. |
[email protected] | 2219b75 | 2014-01-10 22:42:57 | [diff] [blame] | 1190 | 'android_lint%': 0, |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1191 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 1192 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1193 | # environment variable, the libcmt shim it uses sometimes gets in |
| 1194 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 1195 | # 'win_use_allocator_shim': 0, |
| 1196 | # 'win_release_RuntimeLibrary': 2 |
| 1197 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1198 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 1199 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 1200 | # TODO(bradnelson): eliminate this when possible. |
| 1201 | # To allow local gyp files to prevent release.vsprops from being included. |
| 1202 | # Yes(1) means include release.vsprops. |
| 1203 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 1204 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1205 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1206 | # TODO(bradnelson): eliminate this when possible. |
| 1207 | # To allow local gyp files to override additional linker options for msvs. |
| 1208 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1209 | 'msvs_use_common_linker_extras%': 1, |
| 1210 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 1211 | # TODO(sgk): eliminate this if possible. |
| 1212 | # It would be nicer to support this via a setting in 'target_defaults' |
| 1213 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 1214 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 1215 | # but that doesn't work as we'd like. |
| 1216 | 'msvs_debug_link_incremental%': '2', |
| 1217 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 1218 | # Needed for some of the largest modules. |
| 1219 | 'msvs_debug_link_nonincremental%': '1', |
| 1220 | |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1221 | # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1222 | # to get incremental linking to be faster in debug builds. |
[email protected] | 8f1da83d | 2012-08-06 21:49:26 | [diff] [blame] | 1223 | 'incremental_chrome_dll%': '0', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 1224 | |
[email protected] | 1ff6429 | 2013-07-18 20:37:15 | [diff] [blame] | 1225 | # Experimental setting to break chrome.dll into multiple pieces based on |
| 1226 | # process type. |
| 1227 | 'chrome_multiple_dll%': '0', |
[email protected] | 56c248b | 2013-05-08 17:51:02 | [diff] [blame] | 1228 | |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 1229 | # Experimental setting to optimize Chrome's DLLs with PGO. |
| 1230 | 'chrome_pgo_phase%': '0', |
| 1231 | |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 1232 | # The default settings for third party code for treating |
| 1233 | # warnings-as-errors. Ideally, this would not be required, however there |
| 1234 | # is some third party code that takes a long time to fix/roll. So, this |
| 1235 | # flag allows us to have warnings as errors in general to prevent |
| 1236 | # regressions in most modules, while working on the bits that are |
| 1237 | # remaining. |
[email protected] | 9a5bb05 | 2014-04-17 16:50:56 | [diff] [blame] | 1238 | 'win_third_party_warn_as_error%': 'true', |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 1239 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1240 | # Clang stuff. |
| 1241 | 'clang%': '<(clang)', |
[email protected] | e4ddf33 | 2011-10-20 21:52:24 | [diff] [blame] | 1242 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1243 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1244 | # Control which version of clang to use when building for iOS. If set to |
| 1245 | # '1', uses the version of clang that ships with Xcode. If set to '0', uses |
| 1246 | # the version of clang that ships with the Chromium source. This variable |
| 1247 | # is automatically set to '1' when using the Xcode generator. |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1248 | 'clang_xcode%': 0, |
| 1249 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1250 | # These two variables can be set in GYP_DEFINES while running |
| 1251 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 1252 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 1253 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 1254 | # 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] | 1255 | |
| 1256 | 'clang_load%': '', |
| 1257 | 'clang_add_plugin%': '', |
| 1258 | |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 1259 | # Tell ld64 to write map files describing binary layout. Useful |
| 1260 | # for looking at what contributes to binary size, e.g. with |
| 1261 | # https://github.com/nico/bloat |
| 1262 | 'mac_write_linker_maps%': 0, |
| 1263 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1264 | # The default type of gtest. |
| 1265 | 'gtest_target_type%': 'executable', |
| 1266 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1267 | # Enable sampling based profiler. |
| 1268 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 1269 | 'profiling%': '0', |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 1270 | # Profile without optimizing out stack frames when profiling==1. |
| 1271 | 'profiling_full_stack_frames%': '0', |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1272 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1273 | # And if we want to dump symbols for Breakpad-enabled builds. |
[email protected] | 8ebfecb | 2013-11-14 05:30:31 | [diff] [blame] | 1274 | 'linux_dump_symbols%': 0, |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 1275 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1276 | 'linux_strip_binary%': 0, |
[email protected] | 1d87c28 | 2010-09-15 22:24:49 | [diff] [blame] | 1277 | # Strip the test binaries needed for Linux reliability tests. |
| 1278 | 'linux_strip_reliability_tests%': 0, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1279 | # If we want stack unwind support for backtrace(). |
| 1280 | 'debug_unwind_tables%': 1, |
| 1281 | 'release_unwind_tables%': 1, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 1282 | |
[email protected] | 8d949f1a0 | 2014-04-10 14:01:57 | [diff] [blame] | 1283 | # Override where to find binutils |
| 1284 | 'binutils_version%': 0, |
| 1285 | 'binutils_dir%': '', |
| 1286 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 1287 | # Enable TCMalloc. |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1288 | # Default of 'use_allocator' is set to 'none' if OS=='android' later. |
| 1289 | 'use_allocator%': 'tcmalloc', |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 1290 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1291 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 1292 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1293 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 1294 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 1295 | |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1296 | # Default arch variant for MIPS. |
[email protected] | 63c8278 | 2014-02-02 16:10:28 | [diff] [blame] | 1297 | 'mips_arch_variant%': 'mips32r1', |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1298 | |
[email protected] | a63e8d2 | 2013-03-23 16:17:08 | [diff] [blame] | 1299 | # Enable use of OpenMAX DL FFT routines. |
| 1300 | 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', |
[email protected] | fc3ab0c | 2013-04-17 15:26:34 | [diff] [blame] | 1301 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1302 | # Enable new NPDevice API. |
| 1303 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1304 | |
| 1305 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 1306 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1307 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1308 | # .gyp files or targets should set chromium_code to 1 if they build |
| 1309 | # Chromium-specific code, as opposed to external code. This variable is |
| 1310 | # used to control such things as the set of warnings to enable, and |
| 1311 | # whether warnings are treated as errors. |
| 1312 | 'chromium_code%': 0, |
| 1313 | |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 1314 | # Disable fatal linker warnings, similarly to how we make it possible |
| 1315 | # to disable -Werror (e.g. for different toolchain versions). |
| 1316 | 'disable_fatal_linker_warnings%': 0, |
| 1317 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1318 | 'release_valgrind_build%': 0, |
| 1319 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1320 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1321 | 'enable_wexit_time_destructors%': 0, |
| 1322 | |
[email protected] | d69acbc | 2014-02-10 21:14:46 | [diff] [blame] | 1323 | # Build libpeerconnection as a static library by default. |
| 1324 | 'libpeer_target_type%': 'static_library', |
| 1325 | |
[email protected] | 9e1149d7 | 2012-07-24 01:27:17 | [diff] [blame] | 1326 | # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. |
| 1327 | 'internal_gles2_conform_tests%': 0, |
| 1328 | |
[email protected] | 5c18edd | 2013-11-19 22:04:11 | [diff] [blame] | 1329 | # Set to 1 to compile the filter fuzzer. |
| 1330 | 'internal_filter_fuzzer%': 0, |
| 1331 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1332 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 1333 | # so Cocoa is happy (http://crbug.com/20441). |
| 1334 | 'locales': [ |
| 1335 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 1336 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 1337 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1338 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 1339 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 1340 | 'vi', 'zh-CN', 'zh-TW', |
| 1341 | ], |
| 1342 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 1343 | # Pseudo locales are special locales which are used for testing and |
| 1344 | # debugging. They don't get copied to the final app. For more info, |
| 1345 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 1346 | 'pseudo_locales': [ |
| 1347 | 'fake-bidi', |
| 1348 | ], |
| 1349 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1350 | 'grit_defines': [], |
| 1351 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 1352 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 1353 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 1354 | # is stored in resources.pak. It is still possible to load JS files |
| 1355 | # from disk by passing --debug-devtools cmdline switch. |
| 1356 | 'debug_devtools%': 0, |
| 1357 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1358 | # The Java Bridge is not compiled in by default. |
| 1359 | 'java_bridge%': 0, |
| 1360 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1361 | # Code signing for iOS binaries. The bots need to be able to disable this. |
| 1362 | 'chromium_ios_signing%': 1, |
| 1363 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 1364 | # This flag is only used when disable_nacl==0 and disables all those |
| 1365 | # subcomponents which would require the installation of a native_client |
| 1366 | # untrusted toolchain. |
| 1367 | 'disable_nacl_untrusted%': 0, |
| 1368 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1369 | # Disable Dart by default. |
| 1370 | 'enable_dart%': 0, |
| 1371 | |
[email protected] | d33d222 | 2014-06-04 15:39:58 | [diff] [blame] | 1372 | # Copy out the setting of disable_nacl. |
| 1373 | 'disable_nacl%': '<(disable_nacl)', |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 1374 | |
[email protected] | 1e40ba00 | 2013-03-07 22:07:33 | [diff] [blame] | 1375 | # Portable Native Client is enabled by default. |
| 1376 | 'disable_pnacl%': 0, |
| 1377 | |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 1378 | # Whether to build full debug version for Debug configuration on Android. |
| 1379 | # Compared to full debug version, the default Debug configuration on Android |
| 1380 | # has no full v8 debug, has size optimization and linker gc section, so that |
| 1381 | # we can build a debug version with acceptable size and performance. |
| 1382 | 'android_full_debug%': 0, |
| 1383 | |
[email protected] | 6588527 | 2012-10-05 23:55:50 | [diff] [blame] | 1384 | # Sets the default version name and code for Android app, by default we |
| 1385 | # do a developer build. |
| 1386 | 'android_app_version_name%': 'Developer Build', |
| 1387 | 'android_app_version_code%': 0, |
| 1388 | |
[email protected] | 014d1ff1 | 2013-07-02 01:52:33 | [diff] [blame] | 1389 | # Contains data about the attached devices for gyp_managed_install. |
| 1390 | 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', |
| 1391 | |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1392 | 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")', |
| 1393 | 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 1394 | |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1395 | 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', |
| 1396 | 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 1397 | |
[email protected] | fd6d882 | 2012-12-08 06:56:11 | [diff] [blame] | 1398 | # Whether we are using the rlz library or not. Platforms like Android send |
| 1399 | # rlz codes for searches but do not use the library. |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 1400 | 'enable_rlz%': 0, |
| 1401 | |
[email protected] | 3b4038e | 2013-07-28 08:59:54 | [diff] [blame] | 1402 | # Turns on the i18n support in V8. |
| 1403 | 'v8_enable_i18n_support': 1, |
| 1404 | |
[email protected] | 6a69491 | 2014-01-17 14:17:40 | [diff] [blame] | 1405 | # Compile d8 for the host toolset. |
| 1406 | 'v8_toolset_for_d8': 'host', |
| 1407 | |
[email protected] | b64e521 | 2014-04-04 21:09:16 | [diff] [blame] | 1408 | # Compiles v8 without its platform library. |
| 1409 | 'v8_use_default_platform': 0, |
| 1410 | |
[email protected] | d98df12 | 2013-08-12 13:56:43 | [diff] [blame] | 1411 | # Use the chromium skia by default. |
| 1412 | 'use_system_skia%': '0', |
| 1413 | |
[email protected] | 2c14260f | 2013-09-11 11:48:22 | [diff] [blame] | 1414 | # Use brlapi from brltty for braille display support. |
| 1415 | 'use_brlapi%': 0, |
| 1416 | |
[email protected] | c66b5aa | 2013-09-12 13:29:41 | [diff] [blame] | 1417 | # Relative path to icu.gyp from this file. |
| 1418 | 'icu_gyp_path': '../third_party/icu/icu.gyp', |
| 1419 | |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 1420 | # IPC fuzzer is disabled by default. |
| 1421 | 'enable_ipc_fuzzer%': 0, |
| 1422 | |
[email protected] | f35bcea8 | 2013-12-04 04:37:06 | [diff] [blame] | 1423 | |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 1424 | # Force disable libstdc++ debug mode. |
| 1425 | 'disable_glibcxx_debug%': 0, |
| 1426 | |
[email protected] | 8063669f | 2014-04-01 01:50:29 | [diff] [blame] | 1427 | # Set to 1 to compile with MSE support for MPEG2 TS |
| 1428 | 'enable_mpeg2ts_stream_parser%': 0, |
| 1429 | |
[email protected] | ec13bd7 | 2014-04-16 19:04:30 | [diff] [blame] | 1430 | # Support ChromeOS touchpad gestures with ozone. |
| 1431 | 'use_evdev_gestures%': 0, |
| 1432 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1433 | # Default ozone platform (if no --ozone-platform flag). |
| 1434 | 'ozone_platform%': "", |
| 1435 | |
| 1436 | # Ozone platforms to include in the build. |
| 1437 | 'ozone_platform_caca%': 0, |
| 1438 | 'ozone_platform_dri%': 0, |
| 1439 | 'ozone_platform_egltest%': 0, |
[email protected] | 26ce20d5 | 2014-05-29 17:22:50 | [diff] [blame] | 1440 | 'ozone_platform_gbm%': 0, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 1441 | 'ozone_platform_ozonex%': 0, |
| 1442 | 'ozone_platform_test%': 0, |
| 1443 | |
[email protected] | 54d5b065 | 2014-05-22 08:52:05 | [diff] [blame] | 1444 | # Chrome OS: whether to build ChromeVox from sources in the Chromium |
| 1445 | # repository rather than using precompiled JavaScript in |
| 1446 | # chrome/third_party/chromevox. This is still experimental. |
[email protected] | d7a6ba7 | 2014-06-26 18:00:55 | [diff] [blame] | 1447 | 'use_migrated_chromevox%': 1, |
[email protected] | 54d5b065 | 2014-05-22 08:52:05 | [diff] [blame] | 1448 | |
[email protected] | b3819c2e | 2014-05-18 14:13:07 | [diff] [blame] | 1449 | # Chrome OS: whether to also build the upcoming version of |
| 1450 | # ChromeVox, which can then be enabled via a command-line switch. |
| 1451 | 'use_chromevox_next%': 0, |
| 1452 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1453 | 'conditions': [ |
[email protected] | 877090c | 2014-03-19 15:25:54 | [diff] [blame] | 1454 | # Enable the Syzygy optimization step for the official builds. |
| 1455 | ['OS=="win" and buildtype=="Official" and syzyasan!=1', { |
| 1456 | 'syzygy_optimize%': 1, |
| 1457 | }, { |
| 1458 | 'syzygy_optimize%': 0, |
| 1459 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1460 | # Get binutils version so we can enable debug fission if we can. |
| 1461 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
| 1462 | 'conditions': [ |
| 1463 | # compiler_version doesn't work with clang |
| 1464 | # TODO(mithro): Land https://codereview.chromium.org/199793014/ so |
| 1465 | # compiler_version works with clang. |
| 1466 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so |
| 1467 | # that it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1468 | ['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] | 1469 | 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)', |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1470 | }], |
| 1471 | # On Android we know the binutils version in the toolchain. |
| 1472 | ['OS=="android"', { |
| 1473 | 'binutils_version%': 222, |
| 1474 | }], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1475 | ['host_arch=="x64"', { |
| 1476 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1477 | }], |
| 1478 | ['host_arch=="ia32"', { |
| 1479 | 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', |
| 1480 | }], |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1481 | # Our version of binutils in third_party/binutils |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 1482 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1483 | 'binutils_version%': 224, |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 1484 | }], |
| 1485 | ], |
| 1486 | }, { |
| 1487 | 'binutils_version%': 0, |
| 1488 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1489 | # The version of GCC in use, set later in platforms that use GCC and have |
| 1490 | # not explicitly chosen to build with clang. Currently, this means all |
| 1491 | # platforms except Windows, Mac and iOS. |
| 1492 | # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
| 1493 | # it takes effect here. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 1494 | ['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] | 1495 | 'conditions': [ |
| 1496 | ['OS=="android"', { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1497 | # We directly set the gcc versions since we know what we use. |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 1498 | 'gcc_version%': 48, |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1499 | }, { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1500 | 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1501 | }], |
[email protected] | 313fcf63 | 2014-05-27 13:58:59 | [diff] [blame] | 1502 | ['android_webview_build==1', { |
| 1503 | # Android WebView uses a hermetic toolchain even for host, so set it |
| 1504 | # manually here. |
| 1505 | 'conditions': [ |
| 1506 | ['host_os=="mac"', { |
| 1507 | 'host_gcc_version%': 42, |
| 1508 | }, { # linux |
| 1509 | 'host_gcc_version%': 46, |
| 1510 | }], |
| 1511 | ], |
| 1512 | }, { # android_webview_build!=1 |
| 1513 | 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', |
| 1514 | }], |
[email protected] | ffa01d2 | 2014-01-14 00:14:49 | [diff] [blame] | 1515 | ], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1516 | }, { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 1517 | 'host_gcc_version%': 0, |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 1518 | 'gcc_version%': 0, |
| 1519 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1520 | ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1521 | 'windows_sdk_path%': '<(windows_sdk_default_path)', |
| 1522 | }, { |
| 1523 | 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', |
| 1524 | }], |
[email protected] | dd0ef2f | 2014-04-16 21:52:49 | [diff] [blame] | 1525 | ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', { |
[email protected] | 1f8d940 | 2012-07-06 22:47:56 | [diff] [blame] | 1526 | 'directx_sdk_path%': '<(directx_sdk_default_path)', |
| 1527 | }, { |
| 1528 | 'directx_sdk_path%': '$(DXSDK_DIR)', |
| 1529 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 1530 | ['OS=="win"', { |
| 1531 | 'windows_driver_kit_path%': '$(WDK_DIR)', |
| 1532 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1533 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1534 | 'conditions': [ |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1535 | ['target_arch=="mipsel"', { |
| 1536 | 'werror%': '', |
| 1537 | 'disable_nacl%': 1, |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1538 | 'nacl_untrusted_build%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1539 | 'use_allocator%': 'none', |
[email protected] | 59e85f47 | 2013-06-28 18:20:44 | [diff] [blame] | 1540 | }], |
| 1541 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1542 | 'sysroot%': '<(sysroot)', |
[email protected] | 801978d3 | 2013-03-09 02:51:28 | [diff] [blame] | 1543 | 'CXX%': '<(CXX)', |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1544 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1545 | # All Chrome builds have breakpad symbols, but only process the |
| 1546 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 1547 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1548 | 'linux_dump_symbols%': 1, |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 1549 | |
| 1550 | # Omit unwind support in official release builds to save space. We |
| 1551 | # can use breakpad for these builds. |
| 1552 | 'release_unwind_tables%': 0, |
[email protected] | ac29639 | 2014-04-29 01:22:10 | [diff] [blame] | 1553 | |
| 1554 | 'conditions': [ |
| 1555 | # For official builds, use a 64-bit linker to avoid running out |
| 1556 | # of address space. The buildbots should have a 64-bit kernel |
| 1557 | # and a 64-bit libc installed. |
| 1558 | ['host_arch=="ia32" and target_arch=="ia32"', { |
| 1559 | 'linux_use_bundled_gold%': '1', |
| 1560 | 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', |
| 1561 | }], |
| 1562 | ], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 1563 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1564 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 1565 | }], # os_posix==1 and OS!="mac" and OS!="ios" |
[email protected] | 0d16f29 | 2012-07-02 22:10:48 | [diff] [blame] | 1566 | ['OS=="ios"', { |
| 1567 | 'disable_nacl%': 1, |
[email protected] | a95d530 | 2012-11-03 00:02:19 | [diff] [blame] | 1568 | 'enable_background%': 0, |
[email protected] | 7ef66c6 | 2014-03-20 18:20:00 | [diff] [blame] | 1569 | 'icu_use_data_file_flag%': 1, |
[email protected] | f87e5f7 | 2014-03-06 22:46:45 | [diff] [blame] | 1570 | 'input_speech%': 0, |
[email protected] | 4e3996f9 | 2012-07-17 10:41:13 | [diff] [blame] | 1571 | 'use_system_libxml%': 1, |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 1572 | 'use_system_sqlite%': 1, |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1573 | 'locales==': [ |
[email protected] | 47cf7a3 | 2013-09-03 22:16:39 | [diff] [blame] | 1574 | 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX', |
| 1575 | 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', |
| 1576 | 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', |
| 1577 | 'vi', 'zh-CN', 'zh-TW', |
[email protected] | b6fbd674 | 2013-03-15 11:15:41 | [diff] [blame] | 1578 | ], |
[email protected] | 57871bc | 2012-08-20 16:28:12 | [diff] [blame] | 1579 | |
| 1580 | # The Mac SDK is set for iOS builds and passed through to Mac |
| 1581 | # sub-builds. This allows the Mac sub-build SDK in an iOS build to be |
| 1582 | # overridden from the command line the same way it is for a Mac build. |
| 1583 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1584 | |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1585 | # iOS SDK and deployment target support. The |ios_sdk| value is left |
| 1586 | # blank so that when it is set in the project files it will be the |
| 1587 | # "current" iOS SDK. Forcing a specific SDK even if it is "current" |
| 1588 | # causes Xcode to spit out a warning for every single project file for |
| 1589 | # not using the "current" SDK. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1590 | 'ios_sdk%': '', |
| 1591 | 'ios_sdk_path%': '', |
[email protected] | 523f128d | 2013-08-06 17:36:11 | [diff] [blame] | 1592 | 'ios_deployment_target%': '6.0', |
[email protected] | fcd63418 | 2012-10-09 10:50:32 | [diff] [blame] | 1593 | |
| 1594 | 'conditions': [ |
| 1595 | # ios_product_name is set to the name of the .app bundle as it should |
| 1596 | # appear on disk. |
| 1597 | ['branding=="Chrome"', { |
| 1598 | 'ios_product_name%': 'Chrome', |
| 1599 | }, { # else: branding!="Chrome" |
| 1600 | 'ios_product_name%': 'Chromium', |
| 1601 | }], |
| 1602 | ['branding=="Chrome" and buildtype=="Official"', { |
| 1603 | 'ios_breakpad%': 1, |
| 1604 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 1605 | 'ios_breakpad%': 0, |
| 1606 | }], |
| 1607 | ], |
| 1608 | }], # OS=="ios" |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1609 | ['OS=="android"', { |
| 1610 | # Location of Android NDK. |
| 1611 | 'variables': { |
| 1612 | 'variables': { |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1613 | # Unfortunately we have to use absolute paths to the SDK/NDK because |
| 1614 | # they're passed to ant which uses a different relative path from |
| 1615 | # gyp. |
| 1616 | 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', |
[email protected] | 93c0393 | 2014-04-10 13:42:46 | [diff] [blame] | 1617 | 'android_ndk_experimental_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk_experimental/', |
[email protected] | 1ffa4b6 | 2014-02-19 18:20:22 | [diff] [blame] | 1618 | 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', |
| 1619 | 'android_host_arch%': '<!(uname -m)', |
| 1620 | # Android API-level of the SDK used for compilation. |
| 1621 | 'android_sdk_version%': '19', |
| 1622 | 'android_sdk_build_tools_version%': '19.0.0', |
| 1623 | 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1624 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1625 | # Copy conditionally-set variables out one scope. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1626 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1627 | 'android_sdk_root%': '<(android_sdk_root)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1628 | 'android_sdk_version%': '<(android_sdk_version)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1629 | 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1630 | 'host_os%': '<(host_os)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1631 | |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1632 | 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', |
[email protected] | aeaf0121 | 2014-02-19 00:52:52 | [diff] [blame] | 1633 | # Android SDK build tools (e.g. dx, aapt, aidl) |
| 1634 | 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1635 | |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1636 | # Android API level 14 is ICS (Android 4.0) which is the minimum |
| 1637 | # platform requirement for Chrome on Android, we use it for native |
| 1638 | # code compilation. |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1639 | 'conditions': [ |
| 1640 | ['target_arch == "ia32"', { |
| 1641 | 'android_app_abi%': 'x86', |
| 1642 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1643 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1644 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 1645 | 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1646 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 1647 | ['target_arch == "x64"', { |
| 1648 | 'android_app_abi%': 'x86_64', |
[email protected] | 93c0393 | 2014-04-10 13:42:46 | [diff] [blame] | 1649 | 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-x86_64/gdbserver/gdbserver', |
| 1650 | 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-x86_64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1651 | 'android_ndk_lib_dir%': 'usr/lib64', |
[email protected] | 93c0393 | 2014-04-10 13:42:46 | [diff] [blame] | 1652 | 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
| 1653 | 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport', |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 1654 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1655 | ['target_arch=="arm"', { |
| 1656 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 1657 | ['arm_version<7', { |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1658 | 'android_app_abi%': 'armeabi', |
| 1659 | }, { |
| 1660 | 'android_app_abi%': 'armeabi-v7a', |
| 1661 | }], |
| 1662 | ], |
| 1663 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', |
[email protected] | 5cfec2b | 2013-03-05 20:54:33 | [diff] [blame] | 1664 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1665 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 1666 | 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1667 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 1668 | ['target_arch == "arm64"', { |
[email protected] | fa84609 | 2014-03-25 04:01:00 | [diff] [blame] | 1669 | 'android_app_abi%': 'arm64-v8a', |
[email protected] | 93c0393 | 2014-04-10 13:42:46 | [diff] [blame] | 1670 | 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-arm64/gdbserver/gdbserver', |
| 1671 | 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-arm64', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1672 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 67220a1 | 2014-04-24 10:15:33 | [diff] [blame] | 1673 | 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 93c0393 | 2014-04-10 13:42:46 | [diff] [blame] | 1674 | 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport', |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 1675 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1676 | ['target_arch == "mipsel"', { |
| 1677 | 'android_app_abi%': 'mips', |
| 1678 | 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', |
| 1679 | 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1680 | 'android_ndk_lib_dir%': 'usr/lib', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 1681 | 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 1682 | }], |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1683 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1684 | }, |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1685 | # Copy conditionally-set variables out one scope. |
| 1686 | 'android_app_abi%': '<(android_app_abi)', |
| 1687 | 'android_gdbserver%': '<(android_gdbserver)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1688 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | 941c6ab | 2014-03-24 04:07:34 | [diff] [blame] | 1689 | 'android_ndk_sysroot%': '<(android_ndk_sysroot)', |
[email protected] | 5061d15 | 2013-01-16 17:45:57 | [diff] [blame] | 1690 | 'android_sdk_root%': '<(android_sdk_root)', |
| 1691 | 'android_sdk_version%': '<(android_sdk_version)', |
| 1692 | 'android_toolchain%': '<(android_toolchain)', |
| 1693 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1694 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
[email protected] | bda4454 | 2014-04-29 08:54:16 | [diff] [blame] | 1695 | 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', |
[email protected] | 6bfda61f | 2013-08-09 06:48:18 | [diff] [blame] | 1696 | 'android_sdk_tools%': '<(android_sdk_tools)', |
[email protected] | e20a8ad | 2013-03-18 15:05:04 | [diff] [blame] | 1697 | 'android_sdk%': '<(android_sdk)', |
| 1698 | 'android_sdk_jar%': '<(android_sdk)/android.jar', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1699 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1700 | 'android_stlport_root': '<(android_stlport_root)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1701 | 'android_stlport_include': '<(android_stlport_root)/stlport', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1702 | 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 1703 | 'host_os%': '<(host_os)', |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1704 | |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 1705 | # Location of the "strip" binary, used by both gyp and scripts. |
| 1706 | 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', |
| 1707 | |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 1708 | # Location of the "readelf" binary. |
| 1709 | 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', |
| 1710 | |
[email protected] | d8621ce | 2013-02-22 00:37:33 | [diff] [blame] | 1711 | # Determines whether we should optimize JNI generation at the cost of |
| 1712 | # breaking assumptions in the build system that when inputs have changed |
| 1713 | # the outputs should always change as well. This is meant purely for |
| 1714 | # developer builds, to avoid spurious re-linking of native files. |
| 1715 | 'optimize_jni_generation%': 0, |
| 1716 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1717 | # Always uses openssl. |
| 1718 | 'use_openssl%': 1, |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 1719 | 'use_openssl_certs%': 1, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1720 | |
| 1721 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 23a30e6 | 2012-12-01 03:39:07 | [diff] [blame] | 1722 | 'safe_browsing%': 2, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1723 | 'input_speech%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 1724 | 'java_bridge%': 1, |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1725 | 'build_ffmpegsumo%': 0, |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 1726 | 'use_allocator%': 'none', |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 1727 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1728 | # Disable Native Client. |
| 1729 | 'disable_nacl%': 1, |
| 1730 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1731 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1732 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 1733 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1734 | # Sessions are store separately in the Java side. |
| 1735 | 'enable_session_service%': 0, |
| 1736 | |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 1737 | 'p2p_apis%' : 0, |
| 1738 | |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 1739 | 'gtest_target_type%': 'shared_library', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1740 | |
| 1741 | # Uses system APIs for decoding audio and video. |
| 1742 | 'use_libffmpeg%': '0', |
| 1743 | |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1744 | # When building as part of the Android system, use system libraries |
| 1745 | # where possible to reduce ROM size. |
| 1746 | # TODO(steveblock): Investigate using the system version of sqlite. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1747 | 'use_system_sqlite%': 0, # '<(android_webview_build)', |
| 1748 | 'use_system_expat%': '<(android_webview_build)', |
| 1749 | 'use_system_icu%': '<(android_webview_build)', |
| 1750 | 'use_system_stlport%': '<(android_webview_build)', |
[email protected] | adb4434 | 2012-07-23 13:36:12 | [diff] [blame] | 1751 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1752 | # Copy it out one scope. |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 1753 | 'android_webview_build%': '<(android_webview_build)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1754 | }], # OS=="android" |
[email protected] | b313955 | 2013-05-30 14:16:12 | [diff] [blame] | 1755 | ['android_webview_build==1', { |
| 1756 | # When building the WebView in the Android tree, jarjar will remap all |
| 1757 | # the class names, so the JNI generator needs to know this. |
| 1758 | 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', |
| 1759 | }], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1760 | ['OS=="mac"', { |
[email protected] | 70d0f78 | 2013-11-14 06:22:29 | [diff] [blame] | 1761 | 'conditions': [ |
| 1762 | # All Chrome builds have breakpad symbols, but only process the |
| 1763 | # symbols from official builds. |
| 1764 | ['(branding=="Chrome" and buildtype=="Official")', { |
| 1765 | 'mac_strip_release%': 1, |
| 1766 | }], |
[email protected] | 2286035 | 2013-12-11 03:02:10 | [diff] [blame] | 1767 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1768 | }], # OS=="mac" |
| 1769 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1770 | 'clang%': 1, |
| 1771 | |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1772 | 'variables': { |
| 1773 | # Mac OS X SDK and deployment target support. The SDK identifies |
| 1774 | # the version of the system headers that will be used, and |
| 1775 | # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time |
| 1776 | # macro. "Maximum allowed" refers to the operating system version |
| 1777 | # whose APIs are available in the headers. The deployment target |
| 1778 | # identifies the minimum system version that the built products are |
| 1779 | # expected to function on. It corresponds to the |
| 1780 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these |
| 1781 | # macros are available, #include <AvailabilityMacros.h>. Additional |
| 1782 | # documentation on these macros is available at |
| 1783 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 1784 | # Chrome normally builds with the Mac OS X 10.6 SDK and sets the |
| 1785 | # deployment target to 10.6. Other projects, such as O3D, may |
| 1786 | # override these defaults. |
| 1787 | |
| 1788 | # Normally, mac_sdk_min is used to find an SDK that Xcode knows |
| 1789 | # about that is at least the specified version. In official builds, |
| 1790 | # the SDK must match mac_sdk_min exactly. If the SDK is installed |
| 1791 | # someplace that Xcode doesn't know about, set mac_sdk_path to the |
| 1792 | # path to the SDK; when set to a non-empty string, SDK detection |
| 1793 | # based on mac_sdk_min will be bypassed entirely. |
| 1794 | 'mac_sdk_min%': '10.6', |
| 1795 | 'mac_sdk_path%': '', |
| 1796 | |
| 1797 | 'mac_deployment_target%': '10.6', |
| 1798 | }, |
| 1799 | |
| 1800 | 'mac_sdk_min': '<(mac_sdk_min)', |
| 1801 | 'mac_sdk_path': '<(mac_sdk_path)', |
| 1802 | 'mac_deployment_target': '<(mac_deployment_target)', |
| 1803 | |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1804 | # Compile in Breakpad support by default so that it can be |
| 1805 | # tested, even if it is not enabled by default at runtime. |
| 1806 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1807 | 'conditions': [ |
| 1808 | # mac_product_name is set to the name of the .app bundle as it should |
| 1809 | # appear on disk. This duplicates data from |
| 1810 | # chrome/app/theme/chromium/BRANDING and |
| 1811 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 1812 | # these names into the build system. |
| 1813 | ['branding=="Chrome"', { |
| 1814 | 'mac_product_name%': 'Google Chrome', |
| 1815 | }, { # else: branding!="Chrome" |
| 1816 | 'mac_product_name%': 'Chromium', |
| 1817 | }], |
| 1818 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1819 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1820 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1821 | # Enable uploading crash dumps. |
| 1822 | 'mac_breakpad_uploads%': 1, |
| 1823 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1824 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1825 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1826 | 'mac_keystone%': 1, |
| 1827 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 1828 | 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 1829 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1830 | 'mac_breakpad%': 0, |
| 1831 | 'mac_keystone%': 0, |
| 1832 | }], |
| 1833 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 1834 | }], # OS=="mac" or OS=="ios" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1835 | ['OS=="win"', { |
| 1836 | 'conditions': [ |
[email protected] | a7a15f3 | 2013-08-06 06:09:43 | [diff] [blame] | 1837 | # This is the architecture convention used in WinSDK paths. |
| 1838 | ['target_arch=="ia32"', { |
| 1839 | 'winsdk_arch%': 'x86', |
| 1840 | },{ |
| 1841 | 'winsdk_arch%': '<(target_arch)', |
| 1842 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1843 | ['component=="shared_library"', { |
| 1844 | 'win_use_allocator_shim%': 0, |
[email protected] | 45b7c52 | 2013-08-21 06:58:22 | [diff] [blame] | 1845 | },{ |
| 1846 | # Turn on multiple dll by default on Windows when in static_library. |
| 1847 | 'chrome_multiple_dll%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1848 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 1849 | ['asan==1', { |
| 1850 | 'win_use_allocator_shim%': 0, |
| 1851 | }], |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1852 | ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1853 | # Only enabled by default for ninja because it's buggy in VS. |
[email protected] | fa0f16e | 2012-08-20 22:30:04 | [diff] [blame] | 1854 | # Not enabled for component=static_library because some targets |
| 1855 | # are too large and the toolchain fails due to the size of the |
| 1856 | # .obj files. |
[email protected] | 6f390be | 2012-08-16 18:57:10 | [diff] [blame] | 1857 | 'incremental_chrome_dll%': 1, |
| 1858 | }], |
[email protected] | a96cf142 | 2013-11-08 08:55:41 | [diff] [blame] | 1859 | # Don't do incremental linking for large modules on 32-bit or when |
| 1860 | # component=static_library as the toolchain fails due to the size of |
| 1861 | # the .ilk files. |
| 1862 | ['MSVS_OS_BITS==32 or component=="static_library"', { |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1863 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 1864 | },{ |
| 1865 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 1866 | }], |
[email protected] | 49ee7ef | 2014-04-12 03:07:46 | [diff] [blame] | 1867 | ['MSVS_VERSION=="2013e"', { |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1868 | 'msvs_express%': 1, |
| 1869 | 'secure_atl%': 0, |
| 1870 | },{ |
| 1871 | 'msvs_express%': 0, |
| 1872 | 'secure_atl%': 1, |
| 1873 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1874 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1875 | 'nacl_win64_defines': [ |
| 1876 | # This flag is used to minimize dependencies when building |
| 1877 | # Native Client loader for 64-bit Windows. |
| 1878 | 'NACL_WIN64', |
| 1879 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1880 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1881 | |
[email protected] | a35aa36 | 2012-10-30 13:55:07 | [diff] [blame] | 1882 | ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', { |
[email protected] | 8e553f4 | 2010-10-25 20:05:44 | [diff] [blame] | 1883 | 'use_cups%': 1, |
| 1884 | }, { |
| 1885 | 'use_cups%': 0, |
| 1886 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1887 | |
[email protected] | 693f63c | 2014-01-17 06:52:19 | [diff] [blame] | 1888 | ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', { |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 1889 | 'enable_pepper_cdms%': 1, |
| 1890 | }, { |
| 1891 | 'enable_pepper_cdms%': 0, |
| 1892 | }], |
| 1893 | |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 1894 | ['OS=="android"', { |
| 1895 | 'enable_browser_cdms%': 1, |
| 1896 | }, { |
| 1897 | 'enable_browser_cdms%': 0, |
| 1898 | }], |
| 1899 | |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 1900 | # Native Client glibc toolchain is enabled |
| 1901 | # by default except on arm and mips. |
| 1902 | ['target_arch=="arm" or target_arch=="mipsel"', { |
[email protected] | 2f7da67 | 2012-06-21 08:38:32 | [diff] [blame] | 1903 | 'disable_glibc%': 1, |
| 1904 | }, { |
| 1905 | 'disable_glibc%': 0, |
| 1906 | }], |
| 1907 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1908 | # Set the relative path from this file to the GYP file of the JPEG |
| 1909 | # library used by Chromium. |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1910 | ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { |
| 1911 | # Configuration for using the system libjeg is here. |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 1912 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
[email protected] | d911354 | 2012-07-18 17:11:28 | [diff] [blame] | 1913 | }, { |
| 1914 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 1915 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1916 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1917 | # Options controlling the use of GConf (the classic GNOME configuration |
| 1918 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 02968b8 | 2013-11-14 02:42:43 | [diff] [blame] | 1919 | ['chromeos==1 or embedded==1', { |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1920 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1921 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1922 | }, { |
| 1923 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 1924 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 1925 | }], |
| 1926 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1927 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1928 | ['branding=="Chrome"', { |
| 1929 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 1930 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1931 | 'grit_defines': ['-D', '_google_chrome', |
| 1932 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1933 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1934 | 'grit_defines': ['-D', '_chromium', |
| 1935 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1936 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1937 | ['chromeos==1', { |
[email protected] | d4d81e9 | 2012-06-04 20:10:13 | [diff] [blame] | 1938 | 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1939 | }], |
[email protected] | d628ab41 | 2013-09-07 03:26:37 | [diff] [blame] | 1940 | ['desktop_linux==1', { |
| 1941 | 'grit_defines': ['-D', 'desktop_linux'], |
| 1942 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1943 | ['toolkit_views==1', { |
| 1944 | 'grit_defines': ['-D', 'toolkit_views'], |
| 1945 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 1946 | ['use_aura==1', { |
| 1947 | 'grit_defines': ['-D', 'use_aura'], |
| 1948 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1949 | ['use_ash==1', { |
| 1950 | 'grit_defines': ['-D', 'use_ash'], |
| 1951 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1952 | ['use_nss==1', { |
| 1953 | 'grit_defines': ['-D', 'use_nss'], |
| 1954 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 1955 | ['use_ozone==1', { |
| 1956 | 'grit_defines': ['-D', 'use_ozone'], |
| 1957 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 1958 | ['image_loader_extension==1', { |
| 1959 | 'grit_defines': ['-D', 'image_loader_extension'], |
| 1960 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1961 | ['remoting==1', { |
| 1962 | 'grit_defines': ['-D', 'remoting'], |
| 1963 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1964 | ['use_titlecase_in_grd_files==1', { |
| 1965 | 'grit_defines': ['-D', 'use_titlecase'], |
| 1966 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1967 | ['use_third_party_translations==1', { |
| 1968 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1969 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 1970 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 1971 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1972 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1973 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1974 | ['OS=="android"', { |
[email protected] | 77e59c5 | 2013-05-21 15:29:17 | [diff] [blame] | 1975 | 'grit_defines': ['-t', 'android', |
[email protected] | 7dc7681 | 2013-03-26 07:31:57 | [diff] [blame] | 1976 | '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1977 | }], |
[email protected] | cc1f057 | 2013-07-31 05:41:03 | [diff] [blame] | 1978 | ['OS=="mac" or OS=="ios"', { |
[email protected] | d39e386 | 2012-06-26 22:38:23 | [diff] [blame] | 1979 | 'grit_defines': ['-D', 'scale_factors=2x'], |
| 1980 | }], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1981 | ['OS == "ios"', { |
| 1982 | 'grit_defines': [ |
[email protected] | 03334690 | 2013-08-20 01:01:12 | [diff] [blame] | 1983 | '-t', 'ios', |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 1984 | # iOS uses a whitelist to filter resources. |
| 1985 | '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' |
| 1986 | ], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1987 | |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1988 | # Enable host builds when generating with ninja-ios. |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1989 | 'conditions': [ |
| 1990 | ['"<(GENERATOR)"=="ninja"', { |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1991 | 'host_os%': "mac", |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1992 | }], |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 1993 | |
| 1994 | # TODO(sdefresne): Remove the target_subarch check once Apple has |
| 1995 | # upstreamed the support for "arm64". http://crbug.com/341453 |
| 1996 | ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', { |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 1997 | 'clang_xcode%': 1, |
| 1998 | }], |
[email protected] | b4530c8 | 2013-05-09 09:20:01 | [diff] [blame] | 1999 | ], |
[email protected] | ad563d0 | 2012-10-03 10:37:03 | [diff] [blame] | 2000 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2001 | ['enable_extensions==1', { |
| 2002 | 'grit_defines': ['-D', 'enable_extensions'], |
| 2003 | }], |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2004 | ['enable_plugins!=0', { |
[email protected] | 6ab4ef9 | 2013-12-09 08:43:17 | [diff] [blame] | 2005 | 'grit_defines': ['-D', 'enable_plugins'], |
| 2006 | }], |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2007 | ['enable_printing!=0', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2008 | 'grit_defines': ['-D', 'enable_printing'], |
| 2009 | }], |
[email protected] | b429eb19b | 2014-01-27 21:07:50 | [diff] [blame] | 2010 | ['enable_printing==1', { |
| 2011 | 'grit_defines': ['-D', 'enable_full_printing'], |
| 2012 | }], |
[email protected] | c2aad54 | 2012-07-31 20:40:33 | [diff] [blame] | 2013 | ['enable_themes==1', { |
| 2014 | 'grit_defines': ['-D', 'enable_themes'], |
| 2015 | }], |
[email protected] | ef1dd506 | 2012-12-17 06:41:33 | [diff] [blame] | 2016 | ['enable_app_list==1', { |
| 2017 | 'grit_defines': ['-D', 'enable_app_list'], |
| 2018 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2019 | ['enable_settings_app==1', { |
| 2020 | 'grit_defines': ['-D', 'enable_settings_app'], |
| 2021 | }], |
[email protected] | 5411d820 | 2013-01-30 01:32:15 | [diff] [blame] | 2022 | ['enable_google_now==1', { |
| 2023 | 'grit_defines': ['-D', 'enable_google_now'], |
| 2024 | }], |
[email protected] | a3a720f | 2013-04-25 19:35:42 | [diff] [blame] | 2025 | ['use_concatenated_impulse_responses==1', { |
| 2026 | 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], |
| 2027 | }], |
[email protected] | f66ddbd | 2013-06-27 14:17:04 | [diff] [blame] | 2028 | ['enable_webrtc==1', { |
| 2029 | 'grit_defines': ['-D', 'enable_webrtc'], |
| 2030 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2031 | ['enable_hangout_services_extension==1', { |
| 2032 | 'grit_defines': ['-D', 'enable_hangout_services_extension'], |
| 2033 | }], |
[email protected] | 25b8cb3 | 2014-01-30 11:04:29 | [diff] [blame] | 2034 | ['enable_task_manager==1', { |
| 2035 | 'grit_defines': ['-D', 'enable_task_manager'], |
| 2036 | }], |
[email protected] | 335b687 | 2014-02-13 20:14:13 | [diff] [blame] | 2037 | ['notifications==1', { |
| 2038 | 'grit_defines': ['-D', 'enable_notifications'], |
| 2039 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2040 | ['enable_wifi_bootstrapping==1', { |
| 2041 | 'grit_defines': ['-D', 'enable_wifi_bootstrapping'], |
| 2042 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2043 | ['enable_resource_whitelist_generation==1 and OS!="win"', { |
[email protected] | e4fdab9 | 2014-04-04 00:52:22 | [diff] [blame] | 2044 | '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] | 2045 | }], |
[email protected] | 2b9e68e | 2014-04-15 12:51:25 | [diff] [blame] | 2046 | ['enable_resource_whitelist_generation==1 and OS=="win"', { |
| 2047 | 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'], |
| 2048 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2049 | ['enable_mdns==1 or OS=="mac"', { |
| 2050 | 'grit_defines': ['-D', 'enable_service_discovery'], |
| 2051 | 'enable_service_discovery%': 1 |
| 2052 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 2053 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 7d389e2 | 2013-05-15 00:45:07 | [diff] [blame] | 2054 | 'clang_chrome_plugins_flags': [ |
| 2055 | '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 2056 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2057 | }], |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2058 | ['asan==1 or msan==1 or lsan==1 or tsan==1', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2059 | 'clang%': 1, |
[email protected] | 3a0278b1 | 2014-05-20 15:37:58 | [diff] [blame] | 2060 | 'use_allocator%': 'none', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2061 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 2062 | ['ubsan==1', { |
| 2063 | 'clang%': 1, |
| 2064 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2065 | ['ubsan_vptr==1', { |
| 2066 | 'clang%': 1, |
| 2067 | }], |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2068 | ['asan==1 and OS=="mac"', { |
[email protected] | 57db18a | 2014-05-28 18:48:29 | [diff] [blame] | 2069 | # TODO(glider): we do not strip ASan binaries until the dynamic ASan |
| 2070 | # runtime is fully adopted. See http://crbug.com/242503. |
| 2071 | 'mac_strip_release': 0, |
[email protected] | f5d8c22 | 2012-08-29 17:47:02 | [diff] [blame] | 2072 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2073 | ['tsan==1', { |
[email protected] | 193149c | 2014-04-08 23:56:09 | [diff] [blame] | 2074 | 'use_custom_libcxx%': 1, |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2075 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2076 | ['msan==1', { |
[email protected] | e12b37ec | 2014-06-16 11:21:17 | [diff] [blame] | 2077 | # Use a just-built, MSan-instrumented libc++ instead of the system-wide |
| 2078 | # libstdc++. This is required to avoid false positive reports whenever |
| 2079 | # the C++ standard library is used. |
| 2080 | 'use_custom_libcxx%': 1, |
| 2081 | # Running the V8-generated code on an ARM simulator is a powerful hack |
| 2082 | # that allows the tool to see the memory accesses from JITted code. |
| 2083 | # Without this flag, JS code causes false positive reports from MSan. |
| 2084 | 'v8_target_arch': 'arm64', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 2085 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 2086 | |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2087 | ['OS=="linux" and clang_type_profiler==1', { |
| 2088 | 'clang%': 1, |
| 2089 | 'clang_use_chrome_plugins%': 0, |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 2090 | 'conditions': [ |
| 2091 | ['host_arch=="x64"', { |
| 2092 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', |
| 2093 | }], |
| 2094 | ['host_arch=="ia32"', { |
| 2095 | # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 2096 | # Clang in this directory at your own risk if needed for some |
| 2097 | # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 2098 | # usage). Any failure by this compiler should not close the tree. |
| 2099 | 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 2100 | }], |
| 2101 | ], |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2102 | }], |
| 2103 | |
[email protected] | 85a75e57 | 2014-05-06 20:13:38 | [diff] [blame] | 2104 | ['OS=="win"', { |
| 2105 | # The Clang plugins don't currently work on Windows. |
| 2106 | # TODO(hans): One day, this will work. (crbug.com/82385) |
| 2107 | 'clang_use_chrome_plugins%': 0, |
| 2108 | }], |
| 2109 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2110 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 2111 | # much and make the stacks harder to figure out. |
| 2112 | # |
| 2113 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 2114 | # them under a build_for_tool== condition. |
| 2115 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 2116 | # gcc flags |
| 2117 | 'mac_debug_optimization': '1', |
| 2118 | 'mac_release_optimization': '1', |
| 2119 | 'release_optimize': '1', |
| 2120 | 'no_gc_sections': 1, |
| 2121 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2122 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2123 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 2124 | '-fno-builtin -fno-optimize-sibling-calls', |
| 2125 | |
| 2126 | # MSVS flags for TSan on Pin and Windows. |
| 2127 | 'win_debug_RuntimeChecks': '0', |
| 2128 | 'win_debug_disable_iterator_debugging': '1', |
| 2129 | 'win_debug_Optimization': '1', |
| 2130 | 'win_debug_InlineFunctionExpansion': '0', |
| 2131 | 'win_release_InlineFunctionExpansion': '0', |
| 2132 | 'win_release_OmitFramePointers': '0', |
| 2133 | |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2134 | 'use_allocator': 'tcmalloc', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2135 | 'release_valgrind_build': 1, |
| 2136 | 'werror': '', |
| 2137 | 'component': 'static_library', |
| 2138 | 'use_system_zlib': 0, |
| 2139 | }], |
| 2140 | |
| 2141 | # Build tweaks for DrMemory. |
| 2142 | # TODO(rnk): Combine with tsan config to share the builder. |
| 2143 | # http://crbug.com/108155 |
| 2144 | ['build_for_tool=="drmemory"', { |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2145 | # These runtime checks force initialization of stack vars which blocks |
| 2146 | # DrMemory's uninit detection. |
| 2147 | 'win_debug_RuntimeChecks': '0', |
[email protected] | 49605d4 | 2013-10-18 13:58:17 | [diff] [blame] | 2148 | # Iterator debugging is slow. |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2149 | 'win_debug_disable_iterator_debugging': '1', |
| 2150 | # Try to disable optimizations that mess up stacks in a release build. |
[email protected] | c13d0030 | 2012-10-18 15:45:16 | [diff] [blame] | 2151 | # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) |
| 2152 | # /O2 and /Ob0 (disable inline) cannot be used together because of a |
| 2153 | # compiler bug, so we use /Ob1 instead. |
| 2154 | 'win_release_InlineFunctionExpansion': '1', |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2155 | 'win_release_OmitFramePointers': '0', |
[email protected] | 6bf3373d | 2012-08-15 22:27:50 | [diff] [blame] | 2156 | # Ditto for debug, to support bumping win_debug_Optimization. |
| 2157 | 'win_debug_InlineFunctionExpansion': 0, |
| 2158 | 'win_debug_OmitFramePointers': 0, |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2159 | # Keep the code under #ifndef NVALGRIND. |
| 2160 | 'release_valgrind_build': 1, |
| 2161 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2162 | |
[email protected] | fcc89bf | 2013-10-30 17:37:21 | [diff] [blame] | 2163 | # Enable RLZ on Win, Mac, iOS and ChromeOS. |
| 2164 | ['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] | 2165 | 'enable_rlz%': 1, |
| 2166 | }], |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2167 | |
| 2168 | # Set default compiler flags depending on ARM version. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2169 | ['arm_version==6 and android_webview_build==0', { |
| 2170 | 'arm_arch%': 'armv6', |
| 2171 | 'arm_tune%': '', |
[email protected] | 70f970d | 2013-12-16 14:11:38 | [diff] [blame] | 2172 | 'arm_fpu%': 'vfp', |
| 2173 | 'arm_float_abi%': 'softfp', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2174 | 'arm_thumb%': 0, |
| 2175 | }], |
| 2176 | ['arm_version==7 and android_webview_build==0', { |
| 2177 | 'arm_arch%': 'armv7-a', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 2178 | 'arm_tune%': 'generic-armv7-a', |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2179 | 'conditions': [ |
| 2180 | ['arm_neon==1', { |
| 2181 | 'arm_fpu%': 'neon', |
| 2182 | }, { |
| 2183 | 'arm_fpu%': 'vfpv3-d16', |
| 2184 | }], |
| 2185 | ], |
[email protected] | 3f85dac3 | 2013-10-29 02:38:46 | [diff] [blame] | 2186 | # Change the default to hard once the armhf transition is complete. |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 2187 | 'arm_float_abi%': 'softfp', |
| 2188 | 'arm_thumb%': 1, |
| 2189 | }], |
| 2190 | |
| 2191 | ['android_webview_build==1', { |
| 2192 | # The WebView build gets its cpu-specific flags from the Android build system. |
| 2193 | 'arm_arch%': '', |
| 2194 | 'arm_tune%': '', |
| 2195 | 'arm_fpu%': '', |
| 2196 | 'arm_float_abi%': '', |
| 2197 | 'arm_thumb%': 0, |
| 2198 | }], |
[email protected] | 5ac4b90 | 2013-10-22 17:21:29 | [diff] [blame] | 2199 | |
| 2200 | # Enable brlapi by default for chromeos. |
| 2201 | [ 'chromeos==1', { |
| 2202 | 'use_brlapi%': 1, |
| 2203 | }], |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 2204 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2205 | ['use_ozone==1 and ozone_auto_platforms==1', { |
| 2206 | # Use test as the default platform. |
| 2207 | 'ozone_platform%': 'test', |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2208 | |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2209 | # Build all platforms whose deps are in install-build-deps.sh. |
| 2210 | # Only these platforms will be compile tested by buildbots. |
[email protected] | 4814ed2 | 2013-11-01 05:37:26 | [diff] [blame] | 2211 | 'ozone_platform_dri%': 1, |
| 2212 | 'ozone_platform_test%': 1, |
[email protected] | 3bdb099 | 2014-05-16 21:30:51 | [diff] [blame] | 2213 | 'ozone_platform_egltest%': 1, |
| 2214 | }], |
| 2215 | |
| 2216 | ['use_ozone==1 and ozone_auto_platforms==1 and chromeos==1', { |
| 2217 | # Use dri as the default platform. |
| 2218 | 'ozone_platform%': 'dri', |
[email protected] | f93c2c9 | 2013-10-31 18:22:44 | [diff] [blame] | 2219 | }], |
[email protected] | da7aed4 | 2013-12-17 22:28:31 | [diff] [blame] | 2220 | |
| 2221 | ['desktop_linux==1 and use_aura==1 and use_x11==1', { |
| 2222 | 'use_clipboard_aurax11%': 1, |
| 2223 | }], |
| 2224 | |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2225 | ['OS=="win" and use_goma==1', { |
| 2226 | # goma doesn't support pch yet. |
| 2227 | 'chromium_win_pch': 0, |
| 2228 | # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. |
| 2229 | 'conditions': [ |
[email protected] | c7336376 | 2014-04-16 21:11:46 | [diff] [blame] | 2230 | ['win_z7==0', { |
| 2231 | 'fastbuild': 1, |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 2232 | }], |
| 2233 | ], |
| 2234 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2235 | |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 2236 | ['OS=="win" and (clang==1 or asan==1)', { |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2237 | 'chromium_win_pch': 0, |
| 2238 | }], |
| 2239 | |
[email protected] | 9f7615ee | 2013-12-19 21:38:38 | [diff] [blame] | 2240 | # The seccomp-bpf sandbox is only supported on three architectures |
| 2241 | # currently. |
| 2242 | # Do not disable seccomp_bpf anywhere without talking to |
| 2243 | # [email protected]! |
| 2244 | ['((OS=="linux" or OS=="android") and ' |
| 2245 | '(target_arch=="ia32" or target_arch=="x64" or ' |
| 2246 | 'target_arch=="arm"))', { |
| 2247 | 'use_seccomp_bpf%': 1, |
| 2248 | }, { |
| 2249 | 'use_seccomp_bpf%': 0, |
| 2250 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 2251 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 2252 | |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 2253 | # The path to the ANGLE library. |
| 2254 | 'angle_path': '<(DEPTH)/third_party/angle', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2255 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2256 | # List of default apps to install in new profiles. The first list contains |
| 2257 | # 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] | 2258 | # contains the destination location for each of the files. When a crx |
| 2259 | # is added or removed from the list, the chrome/browser/resources/ |
| 2260 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2261 | 'default_apps_list': [ |
| 2262 | 'browser/resources/default_apps/external_extensions.json', |
| 2263 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2264 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2265 | 'browser/resources/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2266 | 'browser/resources/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2267 | 'browser/resources/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2268 | ], |
| 2269 | 'default_apps_list_linux_dest': [ |
| 2270 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 2271 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 2272 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2273 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
[email protected] | c3875e2 | 2012-09-06 01:07:00 | [diff] [blame] | 2274 | '<(PRODUCT_DIR)/default_apps/drive.crx', |
[email protected] | 40b38c93 | 2012-09-27 20:42:23 | [diff] [blame] | 2275 | '<(PRODUCT_DIR)/default_apps/docs.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 2276 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2277 | }, |
| 2278 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2279 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2280 | # The condition that operates on chromium_code is in a target_conditions |
| 2281 | # section, and will not have access to the default fallback value of |
| 2282 | # chromium_code at the top of this file, or to the chromium_code |
| 2283 | # variable placed at the root variables scope of .gyp files, because |
| 2284 | # those variables are not set at target scope. As a workaround, |
| 2285 | # if chromium_code is not set at target scope, define it in target scope |
| 2286 | # to contain whatever value it has during early variable expansion. |
| 2287 | # That's enough to make it available during target conditional |
| 2288 | # processing. |
| 2289 | 'chromium_code%': '<(chromium_code)', |
| 2290 | |
[email protected] | 7cd58be | 2014-03-21 12:39:56 | [diff] [blame] | 2291 | 'component%': '<(component)', |
| 2292 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2293 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 2294 | 'win_release_Optimization%': '2', # 2 = /Os |
| 2295 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2296 | |
| 2297 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2298 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 65d61e6 | 2012-06-01 21:52:11 | [diff] [blame] | 2299 | 'win_release_OmitFramePointers%': '0', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2300 | # Tri-state: blank is default, 1 on, 0 off |
| 2301 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2302 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2303 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 2304 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2305 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 2306 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 2307 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 2308 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 2309 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 2310 | # VS inserts quite a lot of extra checks to algorithms like |
| 2311 | # std::partial_sort in Debug build which make them O(N^2) |
| 2312 | # instead of O(N*logN). This is particularly slow under memory |
| 2313 | # tools like ThreadSanitizer so we want it to be disablable. |
| 2314 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
[email protected] | 907cb98d | 2014-02-23 07:19:55 | [diff] [blame] | 2315 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2316 | |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 2317 | # An application manifest fragment to declare compatibility settings for |
| 2318 | # 'executable' targets. Ignored in other target type. |
| 2319 | 'win_exe_compatibility_manifest%': |
| 2320 | '<(DEPTH)\\build\\win\\compatibility.manifest', |
| 2321 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 2322 | 'release_extra_cflags%': '', |
| 2323 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2324 | |
| 2325 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2326 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 2327 | # the non-qualified versions are widely assumed to be *nix-only |
| 2328 | 'win_release_extra_cflags%': '', |
| 2329 | 'win_debug_extra_cflags%': '', |
| 2330 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2331 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 2332 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 2333 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 2334 | # Only used by Windows build for now. Can be used to build into a |
| 2335 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 2336 | # output files in src/build/VS2010_{Debug,Release}. |
| 2337 | 'build_dir_prefix%': '', |
| 2338 | |
[email protected] | 9ac2db69 | 2012-06-08 01:01:57 | [diff] [blame] | 2339 | # Targets are by default not nacl untrusted code. |
| 2340 | 'nacl_untrusted_build%': 0, |
| 2341 | |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2342 | 'pnacl_compile_flags': [ |
[email protected] | 7dcd93c | 2013-11-02 02:05:53 | [diff] [blame] | 2343 | # pnacl uses the clang compiler so we need to suppress all the |
[email protected] | 9c55d9d | 2012-11-15 23:28:44 | [diff] [blame] | 2344 | # same warnings as we do for clang. |
| 2345 | # TODO(sbc): Remove these if/when they are removed from the clang |
| 2346 | # build. |
| 2347 | '-Wno-unused-function', |
| 2348 | '-Wno-char-subscripts', |
| 2349 | '-Wno-c++11-extensions', |
| 2350 | '-Wno-unnamed-type-template-args', |
| 2351 | ], |
| 2352 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2353 | 'conditions': [ |
| 2354 | ['OS=="win" and component=="shared_library"', { |
| 2355 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 2356 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 2357 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2358 | }, { |
| 2359 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 2360 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 2361 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 2362 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2363 | ['OS=="ios"', { |
| 2364 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2365 | 'mac_release_optimization%': 's', # Use -Os unless overridden |
| 2366 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2367 | }, { |
| 2368 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
| 2369 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
| 2370 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
| 2371 | }], |
[email protected] | 625eb03 | 2014-02-13 21:48:25 | [diff] [blame] | 2372 | ['OS=="android"', { |
| 2373 | 'host_os%': '<(host_os)', # See comment above chromium_code. |
| 2374 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2375 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 2376 | }, |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2377 | 'defines': [ |
[email protected] | 6d84e0b | 2013-12-05 12:16:13 | [diff] [blame] | 2378 | # Don't use deprecated V8 APIs anywhere. |
| 2379 | 'V8_DEPRECATION_WARNINGS', |
[email protected] | b8db097 | 2014-03-07 11:26:59 | [diff] [blame] | 2380 | # Temporary suppression until Blink code can be removed. |
| 2381 | 'BLINK_SCALE_FILTERS_AT_RECORD_TIME', |
[email protected] | c91dc72 | 2013-06-12 22:53:01 | [diff] [blame] | 2382 | ], |
[email protected] | 9786502 | 2014-06-13 23:18:04 | [diff] [blame] | 2383 | 'include_dirs': [ |
| 2384 | '<(SHARED_INTERMEDIATE_DIR)', |
| 2385 | ], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2386 | 'conditions': [ |
[email protected] | d808e21 | 2013-03-12 14:06:16 | [diff] [blame] | 2387 | ['(OS=="mac" or OS=="ios") and asan==1', { |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 2388 | 'dependencies': [ |
| 2389 | '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', |
| 2390 | ], |
| 2391 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 2392 | ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', { |
[email protected] | 7ce58b2 | 2012-09-26 05:17:25 | [diff] [blame] | 2393 | 'cflags_cc!': ['-fno-rtti'], |
| 2394 | 'cflags_cc+': [ |
| 2395 | '-frtti', |
| 2396 | '-gline-tables-only', |
| 2397 | '-fintercept-allocation-functions', |
| 2398 | ], |
| 2399 | 'defines': ['TYPE_PROFILING'], |
| 2400 | 'dependencies': [ |
| 2401 | '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', |
| 2402 | ], |
| 2403 | }], |
[email protected] | b0c4572 | 2013-01-23 04:47:32 | [diff] [blame] | 2404 | ['OS=="linux" and clang==1 and host_arch=="ia32"', { |
| 2405 | # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed. |
| 2406 | # See http://crbug.com/162818. |
| 2407 | 'cflags+': ['-Wno-sentinel'], |
| 2408 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 2409 | ['branding=="Chrome"', { |
| 2410 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 2411 | }, { # else: branding!="Chrome" |
| 2412 | 'defines': ['CHROMIUM_BUILD'], |
| 2413 | }], |
[email protected] | 286d9a1 | 2012-05-30 16:20:38 | [diff] [blame] | 2414 | ['OS=="mac" and component=="shared_library"', { |
| 2415 | 'xcode_settings': { |
| 2416 | 'DYLIB_INSTALL_NAME_BASE': '@rpath', |
| 2417 | 'LD_RUNPATH_SEARCH_PATHS': [ |
| 2418 | # For unbundled binaries. |
| 2419 | '@loader_path/.', |
| 2420 | # For bundled binaries, to get back from Binary.app/Contents/MacOS. |
| 2421 | '@loader_path/../../..', |
| 2422 | ], |
| 2423 | }, |
| 2424 | }], |
[email protected] | 6fcbf9d | 2014-05-09 22:01:28 | [diff] [blame] | 2425 | ['clang==1 and OS!="win"', { |
| 2426 | # This is here so that all files get recompiled after a clang roll and |
| 2427 | # when turning clang on or off. |
| 2428 | # (defines are passed via the command line, and build systems rebuild |
| 2429 | # things when their commandline changes). Nothing should ever read this |
| 2430 | # define. |
| 2431 | 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], |
| 2432 | }], |
[email protected] | b6a5ac9 | 2012-10-29 18:17:22 | [diff] [blame] | 2433 | ['enable_rlz==1', { |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 2434 | 'defines': ['ENABLE_RLZ'], |
| 2435 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2436 | ['component=="shared_library"', { |
| 2437 | 'defines': ['COMPONENT_BUILD'], |
| 2438 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 2439 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 2440 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 2441 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 2442 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 2443 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 2444 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 2445 | ['use_aura==1', { |
| 2446 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 2447 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 2448 | ['use_ash==1', { |
| 2449 | 'defines': ['USE_ASH=1'], |
| 2450 | }], |
[email protected] | 928362a | 2013-11-19 20:17:16 | [diff] [blame] | 2451 | ['use_cairo==1', { |
| 2452 | 'defines': ['USE_CAIRO=1'], |
| 2453 | }], |
[email protected] | 2a76009b | 2013-08-07 21:02:31 | [diff] [blame] | 2454 | ['use_cras==1', { |
| 2455 | 'defines': ['USE_CRAS=1'], |
| 2456 | }], |
[email protected] | 6ec70cc7 | 2013-11-20 05:33:46 | [diff] [blame] | 2457 | ['use_glib==1', { |
| 2458 | 'defines': ['USE_GLIB=1'], |
| 2459 | }], |
[email protected] | ff78e4e | 2013-05-03 19:19:15 | [diff] [blame] | 2460 | ['use_ozone==1', { |
| 2461 | 'defines': ['USE_OZONE=1'], |
| 2462 | }], |
[email protected] | cb80056 | 2012-11-20 22:36:07 | [diff] [blame] | 2463 | ['use_default_render_theme==1', { |
| 2464 | 'defines': ['USE_DEFAULT_RENDER_THEME=1'], |
| 2465 | }], |
[email protected] | e190d27 | 2012-08-30 17:36:44 | [diff] [blame] | 2466 | ['use_libjpeg_turbo==1', { |
| 2467 | 'defines': ['USE_LIBJPEG_TURBO=1'], |
| 2468 | }], |
[email protected] | 2fa2f2d8 | 2013-04-29 18:13:12 | [diff] [blame] | 2469 | ['use_x11==1', { |
| 2470 | 'defines': ['USE_X11=1'], |
| 2471 | }], |
[email protected] | 89dcd66 | 2013-12-12 23:06:50 | [diff] [blame] | 2472 | ['use_clipboard_aurax11==1', { |
| 2473 | 'defines': ['USE_CLIPBOARD_AURAX11=1'], |
| 2474 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 2475 | ['enable_one_click_signin==1', { |
| 2476 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 2477 | }], |
[email protected] | b56a9e0 | 2014-06-20 09:57:04 | [diff] [blame] | 2478 | ['enable_pre_sync_backup==1', { |
| 2479 | 'defines': ['ENABLE_PRE_SYNC_BACKUP'], |
| 2480 | }], |
[email protected] | 23485ba | 2013-09-15 00:50:00 | [diff] [blame] | 2481 | ['use_xi2_mt!=0 and use_x11==1', { |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 2482 | 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
| 2483 | }], |
[email protected] | 77a84826 | 2013-02-22 11:17:25 | [diff] [blame] | 2484 | ['image_loader_extension==1', { |
| 2485 | 'defines': ['IMAGE_LOADER_EXTENSION=1'], |
| 2486 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 2487 | ['profiling==1', { |
| 2488 | 'defines': ['ENABLE_PROFILING=1'], |
| 2489 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 2490 | ['remoting==1', { |
| 2491 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 2492 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 2493 | ['enable_webrtc==1', { |
| 2494 | 'defines': ['ENABLE_WEBRTC=1'], |
| 2495 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 2496 | ['proprietary_codecs==1', { |
| 2497 | 'defines': ['USE_PROPRIETARY_CODECS'], |
| 2498 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 2499 | ['enable_viewport==1', { |
| 2500 | 'defines': ['ENABLE_VIEWPORT'], |
| 2501 | }], |
[email protected] | 280755c | 2013-05-23 10:44:35 | [diff] [blame] | 2502 | ['enable_pepper_cdms==1', { |
| 2503 | 'defines': ['ENABLE_PEPPER_CDMS'], |
| 2504 | }], |
[email protected] | 4b556cf | 2014-06-10 23:21:53 | [diff] [blame] | 2505 | ['enable_browser_cdms==1', { |
| 2506 | 'defines': ['ENABLE_BROWSER_CDMS'], |
| 2507 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 2508 | ['configuration_policy==1', { |
| 2509 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 2510 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 2511 | ['notifications==1', { |
| 2512 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 2513 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 2514 | ['enable_hidpi==1', { |
| 2515 | 'defines': ['ENABLE_HIDPI=1'], |
| 2516 | }], |
[email protected] | cef6c76f | 2013-10-30 16:33:30 | [diff] [blame] | 2517 | ['native_discardable_memory==1', { |
| 2518 | 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'], |
| 2519 | }], |
| 2520 | ['native_memory_pressure_signals==1', { |
| 2521 | 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'], |
| 2522 | }], |
[email protected] | 49513e0 | 2013-11-20 08:36:40 | [diff] [blame] | 2523 | ['use_udev==1', { |
| 2524 | 'defines': ['USE_UDEV'], |
| 2525 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2526 | ['fastbuild!=0', { |
[email protected] | 3b0bc5e | 2013-04-24 11:42:31 | [diff] [blame] | 2527 | 'xcode_settings': { |
| 2528 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 2529 | }, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2530 | 'conditions': [ |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 2531 | ['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] | 2532 | # Clang creates chubby debug information, which makes linking very |
| 2533 | # slow. For now, don't create debug information with clang. See |
| 2534 | # http://crbug.com/70000 |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2535 | 'conditions': [ |
| 2536 | ['OS=="linux"', { |
| 2537 | 'variables': { |
| 2538 | 'debug_extra_cflags': '-g0', |
| 2539 | }, |
| 2540 | }], |
| 2541 | # Android builds symbols on release by default, disable them. |
| 2542 | ['OS=="android"', { |
| 2543 | 'variables': { |
| 2544 | 'debug_extra_cflags': '-g0', |
| 2545 | 'release_extra_cflags': '-g0', |
| 2546 | }, |
| 2547 | }], |
| 2548 | ], |
| 2549 | }, { # else clang!=1 |
| 2550 | 'conditions': [ |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2551 | ['OS=="win" and fastbuild==2', { |
| 2552 | # Completely disable debug information. |
| 2553 | 'msvs_settings': { |
| 2554 | 'VCLinkerTool': { |
| 2555 | 'GenerateDebugInformation': 'false', |
| 2556 | }, |
| 2557 | 'VCCLCompilerTool': { |
| 2558 | 'DebugInformationFormat': '0', |
| 2559 | }, |
| 2560 | }, |
| 2561 | }], |
| 2562 | ['OS=="win" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2563 | 'msvs_settings': { |
| 2564 | 'VCLinkerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2565 | # This tells the linker to generate .pdbs, so that |
| 2566 | # we can get meaningful stack traces. |
| 2567 | 'GenerateDebugInformation': 'true', |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2568 | }, |
| 2569 | 'VCCLCompilerTool': { |
[email protected] | 6c97ee07 | 2013-01-28 10:45:31 | [diff] [blame] | 2570 | # No debug info to be generated by compiler. |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2571 | 'DebugInformationFormat': '0', |
| 2572 | }, |
| 2573 | }, |
| 2574 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2575 | ['OS=="linux" and fastbuild==2', { |
| 2576 | 'variables': { |
| 2577 | 'debug_extra_cflags': '-g0', |
| 2578 | }, |
| 2579 | }], |
| 2580 | ['OS=="linux" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2581 | 'variables': { |
| 2582 | 'debug_extra_cflags': '-g1', |
| 2583 | }, |
| 2584 | }], |
[email protected] | c86fd47 | 2013-04-02 19:42:30 | [diff] [blame] | 2585 | ['OS=="android" and fastbuild==2', { |
| 2586 | 'variables': { |
| 2587 | 'debug_extra_cflags': '-g0', |
| 2588 | 'release_extra_cflags': '-g0', |
| 2589 | }, |
| 2590 | }], |
| 2591 | ['OS=="android" and fastbuild==1', { |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 2592 | 'variables': { |
| 2593 | 'debug_extra_cflags': '-g1', |
| 2594 | 'release_extra_cflags': '-g1', |
| 2595 | }, |
| 2596 | }], |
| 2597 | ], |
| 2598 | }], # clang!=1 |
| 2599 | ], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 2600 | }], # fastbuild!=0 |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2601 | ['dont_embed_build_metadata==1', { |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2602 | 'defines': [ |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2603 | 'DONT_EMBED_BUILD_METADATA', |
[email protected] | b9e9992a | 2014-06-12 21:01:19 | [diff] [blame] | 2604 | ], |
[email protected] | 1967740 | 2014-06-18 13:10:04 | [diff] [blame] | 2605 | }], # dont_embed_build_metadata==1 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 2606 | ['dcheck_always_on!=0', { |
| 2607 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 2608 | }], # dcheck_always_on!=0 |
[email protected] | a1e8742 | 2013-07-09 21:47:01 | [diff] [blame] | 2609 | ['tracing_like_official_build!=0', { |
| 2610 | 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'], |
| 2611 | }], # tracing_like_official_build!=0 |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 2612 | ['win_use_allocator_shim==0', { |
| 2613 | 'conditions': [ |
| 2614 | ['OS=="win"', { |
| 2615 | 'defines': ['NO_TCMALLOC'], |
| 2616 | }], |
| 2617 | ], |
| 2618 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 2619 | ['enable_eglimage==1', { |
| 2620 | 'defines': [ |
| 2621 | 'ENABLE_EGLIMAGE=1', |
| 2622 | ], |
| 2623 | }], |
[email protected] | 6c65f2b | 2014-05-07 08:57:46 | [diff] [blame] | 2624 | ['asan==1', { |
| 2625 | 'defines': [ |
| 2626 | 'ADDRESS_SANITIZER', |
| 2627 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 2628 | ], |
| 2629 | }], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2630 | ['syzyasan==1', { |
| 2631 | # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. |
[email protected] | 696de4e6 | 2012-11-21 21:18:54 | [diff] [blame] | 2632 | 'msvs_settings': { |
| 2633 | 'VCLinkerTool': { |
| 2634 | 'Profile': 'true', |
| 2635 | }, |
| 2636 | }, |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2637 | 'defines': [ |
[email protected] | aee2f33 | 2014-03-27 15:08:04 | [diff] [blame] | 2638 | 'SYZYASAN', |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 2639 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 2640 | ], |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 2641 | }], |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2642 | ['OS=="win"', { |
| 2643 | 'defines': [ |
| 2644 | '__STD_C', |
| 2645 | '_CRT_SECURE_NO_DEPRECATE', |
| 2646 | '_SCL_SECURE_NO_DEPRECATE', |
[email protected] | 2d0aa324 | 2012-10-22 16:23:10 | [diff] [blame] | 2647 | # This define is required to pull in the new Win8 interfaces from |
| 2648 | # system headers like ShObjIdl.h. |
| 2649 | 'NTDDI_VERSION=0x06020000', |
[email protected] | 3741674 | 2013-11-12 07:13:33 | [diff] [blame] | 2650 | # This is required for ATL to use XP-safe versions of its functions. |
| 2651 | '_USING_V110_SDK71_', |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2652 | ], |
| 2653 | 'include_dirs': [ |
| 2654 | '<(DEPTH)/third_party/wtl/include', |
| 2655 | ], |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2656 | 'conditions': [ |
| 2657 | ['win_z7!=0', { |
| 2658 | 'msvs_settings': { |
[email protected] | 5146e0b | 2012-08-23 05:49:09 | [diff] [blame] | 2659 | # Generates debug info when win_z7=1 |
| 2660 | # even if fastbuild=1 (that makes GenerateDebugInformation false). |
| 2661 | 'VCLinkerTool': { |
| 2662 | 'GenerateDebugInformation': 'true', |
| 2663 | }, |
[email protected] | 9619e65d | 2012-05-23 19:06:52 | [diff] [blame] | 2664 | 'VCCLCompilerTool': { |
| 2665 | 'DebugInformationFormat': '1', |
| 2666 | } |
| 2667 | } |
| 2668 | }], |
| 2669 | ], # win_z7!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 2670 | }], # OS==win |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 2671 | ['enable_task_manager==1', { |
| 2672 | 'defines': [ |
| 2673 | 'ENABLE_TASK_MANAGER=1', |
| 2674 | ], |
| 2675 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 2676 | ['enable_extensions==1', { |
| 2677 | 'defines': [ |
| 2678 | 'ENABLE_EXTENSIONS=1', |
| 2679 | ], |
| 2680 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 2681 | ['OS=="win" and branding=="Chrome"', { |
| 2682 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 2683 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 2684 | ['enable_dart==1', { |
| 2685 | 'defines': ['WEBKIT_USING_DART=1'], |
| 2686 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 2687 | ['enable_plugin_installation==1', { |
| 2688 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 2689 | }], |
[email protected] | 6d17f639 | 2012-12-05 05:24:54 | [diff] [blame] | 2690 | ['enable_plugins==1', { |
| 2691 | 'defines': ['ENABLE_PLUGINS=1'], |
| 2692 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 2693 | ['enable_session_service==1', { |
| 2694 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 2695 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 2696 | ['enable_themes==1', { |
| 2697 | 'defines': ['ENABLE_THEMES=1'], |
| 2698 | }], |
[email protected] | 57e67ac | 2013-02-22 03:37:22 | [diff] [blame] | 2699 | ['enable_autofill_dialog==1', { |
| 2700 | 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], |
| 2701 | }], |
[email protected] | d3340bf51 | 2014-05-22 22:27:58 | [diff] [blame] | 2702 | ['enable_prod_wallet_service==1', { |
| 2703 | 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'], |
| 2704 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 2705 | ['enable_background==1', { |
| 2706 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 2707 | }], |
[email protected] | 6ee43a7 | 2012-12-07 22:44:40 | [diff] [blame] | 2708 | ['enable_google_now==1', { |
| 2709 | 'defines': ['ENABLE_GOOGLE_NOW=1'], |
| 2710 | }], |
[email protected] | 3b5e88d | 2013-09-06 11:03:06 | [diff] [blame] | 2711 | ['cld_version!=0', { |
| 2712 | 'defines': ['CLD_VERSION=<(cld_version)'], |
| 2713 | }], |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 2714 | ['cld2_data_source=="static"', { |
| 2715 | 'defines': ['CLD_DATA_FROM_STATIC'], |
| 2716 | }, { |
| 2717 | # CLD2 headers use this #define to control the visibility of dynamic |
| 2718 | # mode functions. We use these functions, so we must define here for |
| 2719 | # our #includes to work right. |
| 2720 | 'defines': ['CLD2_DYNAMIC_MODE'], |
[email protected] | e5a7a2a | 2014-03-27 16:16:03 | [diff] [blame] | 2721 | }], |
[email protected] | cf78eec | 2014-06-24 15:54:26 | [diff] [blame] | 2722 | ['cld2_data_source=="standalone"', { |
| 2723 | 'defines': ['CLD_DATA_FROM_STANDALONE'], |
| 2724 | }], |
| 2725 | ['cld2_data_source=="component"', { |
| 2726 | 'defines': ['CLD_DATA_FROM_COMPONENT'], |
[email protected] | fb53e65 | 2014-04-30 11:27:19 | [diff] [blame] | 2727 | }], |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2728 | ['enable_printing==1', { |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 2729 | 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'], |
| 2730 | }], |
| 2731 | ['enable_printing==2', { |
[email protected] | 658677f | 2012-06-09 06:04:02 | [diff] [blame] | 2732 | 'defines': ['ENABLE_PRINTING=1'], |
| 2733 | }], |
[email protected] | 4a473e9 | 2014-05-22 18:38:56 | [diff] [blame] | 2734 | ['OS=="win" and win_pdf_metafile_for_printing==1', { |
[email protected] | 75280ad2 | 2014-05-20 22:02:25 | [diff] [blame] | 2735 | 'defines': ['WIN_PDF_METAFILE_FOR_PRINTING=1'], |
| 2736 | }], |
[email protected] | c6ce0807 | 2013-07-31 07:48:53 | [diff] [blame] | 2737 | ['enable_spellcheck==1', { |
| 2738 | 'defines': ['ENABLE_SPELLCHECK=1'], |
| 2739 | }], |
[email protected] | e602696 | 2012-06-14 21:28:32 | [diff] [blame] | 2740 | ['enable_captive_portal_detection==1', { |
| 2741 | 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], |
| 2742 | }], |
[email protected] | dc4e8b8 | 2012-11-15 03:58:16 | [diff] [blame] | 2743 | ['enable_app_list==1', { |
| 2744 | 'defines': ['ENABLE_APP_LIST=1'], |
| 2745 | }], |
| 2746 | ['enable_settings_app==1', { |
| 2747 | 'defines': ['ENABLE_SETTINGS_APP=1'], |
| 2748 | }], |
[email protected] | 02494ec | 2014-05-07 15:05:29 | [diff] [blame] | 2749 | ['disable_file_support==1', { |
| 2750 | 'defines': ['DISABLE_FILE_SUPPORT=1'], |
| 2751 | }], |
[email protected] | 9bfe0ab | 2012-08-30 13:18:11 | [diff] [blame] | 2752 | ['disable_ftp_support==1', { |
| 2753 | 'defines': ['DISABLE_FTP_SUPPORT=1'], |
| 2754 | }], |
[email protected] | 847aaab8 | 2014-05-07 14:05:46 | [diff] [blame] | 2755 | ['use_icu_alternatives_on_android==1', { |
| 2756 | 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'], |
| 2757 | }], |
[email protected] | 0850e84 | 2013-01-19 03:44:31 | [diff] [blame] | 2758 | ['enable_managed_users==1', { |
| 2759 | 'defines': ['ENABLE_MANAGED_USERS=1'], |
| 2760 | }], |
[email protected] | 3f0ed217 | 2013-11-04 20:27:29 | [diff] [blame] | 2761 | ['data_reduction_fallback_host != ""', { |
| 2762 | 'defines': [ |
| 2763 | 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'], |
| 2764 | }], |
[email protected] | 324856d | 2014-01-14 11:17:30 | [diff] [blame] | 2765 | ['data_reduction_dev_host != ""', { |
| 2766 | 'defines': [ |
| 2767 | 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'], |
| 2768 | }], |
[email protected] | 199def2 | 2013-02-21 17:52:29 | [diff] [blame] | 2769 | ['spdy_proxy_auth_origin != ""', { |
| 2770 | 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'], |
| 2771 | }], |
| 2772 | ['spdy_proxy_auth_property != ""', { |
| 2773 | 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], |
| 2774 | }], |
[email protected] | f37e941 | 2013-05-27 23:18:25 | [diff] [blame] | 2775 | ['spdy_proxy_auth_value != ""', { |
| 2776 | 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], |
| 2777 | }], |
[email protected] | d8dd60e | 2013-10-08 00:49:43 | [diff] [blame] | 2778 | ['data_reduction_proxy_probe_url != ""', { |
| 2779 | 'defines': [ |
| 2780 | 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'], |
| 2781 | }], |
[email protected] | bec6a99 | 2014-06-19 01:03:21 | [diff] [blame] | 2782 | ['data_reduction_proxy_warmup_url != ""', { |
| 2783 | 'defines': [ |
| 2784 | 'DATA_REDUCTION_PROXY_WARMUP_URL="<(data_reduction_proxy_warmup_url)"'], |
| 2785 | }], |
[email protected] | f4b492e9 | 2014-05-31 22:19:48 | [diff] [blame] | 2786 | ['data_reduction_proxy_ssl_origin != ""', { |
| 2787 | 'defines': [ |
| 2788 | 'DATA_REDUCTION_PROXY_SSL_ORIGIN="<(data_reduction_proxy_ssl_origin)"'], |
| 2789 | }], |
| 2790 | ['data_reduction_proxy_alt_origin != ""', { |
| 2791 | 'defines': [ |
| 2792 | 'DATA_REDUCTION_PROXY_ALT_ORIGIN="<(data_reduction_proxy_alt_origin)"'], |
| 2793 | }], |
| 2794 | ['data_reduction_proxy_alt_fallback_origin != ""', { |
| 2795 | 'defines': [ |
| 2796 | 'DATA_REDUCTION_PROXY_ALT_FALLBACK_ORIGIN="<(data_reduction_proxy_alt_fallback_origin)"'], |
| 2797 | }], |
[email protected] | 5cbeb50 | 2013-04-23 19:25:27 | [diff] [blame] | 2798 | ['enable_mdns==1', { |
| 2799 | 'defines': ['ENABLE_MDNS=1'], |
[email protected] | b917162 | 2013-10-01 22:05:23 | [diff] [blame] | 2800 | }], |
[email protected] | 2188c8d | 2014-03-21 00:58:56 | [diff] [blame] | 2801 | ['enable_service_discovery==1', { |
| 2802 | 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ], |
| 2803 | }], |
[email protected] | 4b202ae | 2014-05-23 07:45:36 | [diff] [blame] | 2804 | ['enable_wifi_bootstrapping==1', { |
| 2805 | 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ], |
| 2806 | }], |
[email protected] | 754a200 | 2014-02-14 16:40:34 | [diff] [blame] | 2807 | ['enable_hangout_services_extension==1', { |
| 2808 | 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'], |
| 2809 | }], |
[email protected] | 8c64e28 | 2013-11-28 16:05:14 | [diff] [blame] | 2810 | ['enable_ipc_fuzzer==1', { |
| 2811 | 'defines': ['ENABLE_IPC_FUZZER=1'], |
| 2812 | }], |
[email protected] | 8b4efe9 | 2014-02-21 16:08:20 | [diff] [blame] | 2813 | ['video_hole==1', { |
| 2814 | 'defines': ['VIDEO_HOLE=1'], |
| 2815 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2816 | ], # conditions for 'target_defaults' |
| 2817 | 'target_conditions': [ |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2818 | ['<(use_openssl)==1', { |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 2819 | 'defines': ['USE_OPENSSL=1'], |
| 2820 | }], |
[email protected] | e1b2d73 | 2014-03-28 16:20:32 | [diff] [blame] | 2821 | ['<(use_openssl_certs)==1', { |
| 2822 | 'defines': ['USE_OPENSSL_CERTS=1'], |
| 2823 | }], |
| 2824 | ['>(nacl_untrusted_build)==1', { |
| 2825 | 'defines': [ |
| 2826 | 'USE_OPENSSL=1', |
| 2827 | 'USE_OPENSSL_CERTS=1', |
| 2828 | ], |
| 2829 | }], |
[email protected] | ad9449f9 | 2014-03-12 09:34:10 | [diff] [blame] | 2830 | ['<(use_nss)==1 and >(nacl_untrusted_build)==0', { |
| 2831 | 'defines': ['USE_NSS=1'], |
| 2832 | }], |
[email protected] | 0251701 | 2014-06-13 09:28:41 | [diff] [blame] | 2833 | ['<(chromeos)==1 and >(nacl_untrusted_build)==0', { |
| 2834 | 'defines': ['OS_CHROMEOS=1'], |
| 2835 | }], |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 2836 | ['enable_wexit_time_destructors==1', { |
| 2837 | 'conditions': [ |
| 2838 | [ 'clang==1', { |
| 2839 | 'cflags': [ |
| 2840 | '-Wexit-time-destructors', |
| 2841 | ], |
| 2842 | 'xcode_settings': { |
| 2843 | 'WARNING_CFLAGS': [ |
| 2844 | '-Wexit-time-destructors', |
| 2845 | ], |
| 2846 | }, |
| 2847 | }], |
| 2848 | ], |
| 2849 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2850 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2851 | 'conditions': [ |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2852 | [ 'os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2853 | # We don't want to get warnings from third-party code, |
| 2854 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2855 | 'cflags!': [ |
| 2856 | '-Wall', |
| 2857 | '-Wextra', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2858 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2859 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2860 | # Don't warn about hash_map in third-party code. |
| 2861 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 2862 | ], |
| 2863 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 2864 | # Don't warn about printf format problems. |
| 2865 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 2866 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 2867 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2868 | 'cflags_cc!': [ |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 2869 | # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 2870 | '-Wsign-compare', |
| 2871 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2872 | }], |
[email protected] | 82dd5eb3 | 2012-08-18 04:24:32 | [diff] [blame] | 2873 | # TODO: Fix all warnings on chromeos too. |
| 2874 | [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { |
| 2875 | 'cflags!': [ |
| 2876 | '-Werror', |
| 2877 | ], |
| 2878 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 2879 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2880 | 'cflags': [ |
| 2881 | # Don't warn about ignoring the return value from e.g. close(). |
| 2882 | # 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] | 2883 | # BSD systems do not support this option, since they are usually |
| 2884 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 2885 | '-Wno-unused-result', |
| 2886 | ], |
| 2887 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2888 | [ 'OS=="win"', { |
| 2889 | 'defines': [ |
| 2890 | '_CRT_SECURE_NO_DEPRECATE', |
| 2891 | '_CRT_NONSTDC_NO_WARNINGS', |
| 2892 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 2893 | '_SCL_SECURE_NO_DEPRECATE', |
| 2894 | ], |
| 2895 | 'msvs_disabled_warnings': [4800], |
| 2896 | 'msvs_settings': { |
| 2897 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 2898 | 'WarningLevel': '3', |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2899 | 'WarnAsError': '<(win_third_party_warn_as_error)', |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2900 | 'Detect64BitPortabilityProblems': 'false', |
| 2901 | }, |
| 2902 | }, |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2903 | 'conditions': [ |
| 2904 | ['buildtype=="Official"', { |
| 2905 | 'msvs_settings': { |
| 2906 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 2907 | } |
| 2908 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 2909 | ['clang==1', { |
| 2910 | 'msvs_settings': { |
| 2911 | 'VCCLCompilerTool': { 'WarnAsError': 'false' }, |
| 2912 | } |
| 2913 | }], |
[email protected] | c54b41cb | 2012-08-24 20:58:24 | [diff] [blame] | 2914 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2915 | }], |
[email protected] | 0915c3b | 2012-11-22 17:24:07 | [diff] [blame] | 2916 | # TODO(darin): Unfortunately, some third_party code depends on base. |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 2917 | [ 'OS=="win" and component=="shared_library"', { |
| 2918 | 'msvs_disabled_warnings': [ |
| 2919 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2920 | ], |
| 2921 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2922 | [ 'OS=="mac" or OS=="ios"', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2923 | 'xcode_settings': { |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 2924 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2925 | }, |
[email protected] | 3a352c36 | 2012-05-08 19:45:49 | [diff] [blame] | 2926 | 'conditions': [ |
| 2927 | ['buildtype=="Official"', { |
| 2928 | 'xcode_settings': { |
| 2929 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror |
| 2930 | }, |
| 2931 | }], |
| 2932 | ], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 2933 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2934 | [ 'OS=="ios"', { |
| 2935 | 'xcode_settings': { |
[email protected] | 7afca86 | 2012-07-11 15:11:22 | [diff] [blame] | 2936 | # TODO(ios): Fix remaining warnings in third-party code, then |
| 2937 | # remove this; the Mac cleanup didn't get everything that's |
| 2938 | # flagged in an iOS build. |
| 2939 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2940 | 'RUN_CLANG_STATIC_ANALYZER': 'NO', |
[email protected] | 5a2637d0 | 2013-11-12 17:01:17 | [diff] [blame] | 2941 | # Several internal ios directories generate numerous warnings for |
| 2942 | # -Wobjc-missing-property-synthesis. |
| 2943 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 2944 | }, |
| 2945 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2946 | ], |
| 2947 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 2948 | 'includes': [ |
| 2949 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 2950 | 'filename_rules.gypi', |
| 2951 | ], |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2952 | # In Chromium code, we define __STDC_foo_MACROS in order to get the |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2953 | # C99 macros on Mac and Linux. |
| 2954 | 'defines': [ |
[email protected] | 41af4f8 | 2012-11-08 00:09:31 | [diff] [blame] | 2955 | '__STDC_CONSTANT_MACROS', |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2956 | '__STDC_FORMAT_MACROS', |
| 2957 | ], |
| 2958 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2959 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 2960 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 2961 | 'msvs_settings': { |
| 2962 | 'VCCLCompilerTool': { |
| 2963 | 'AdditionalOptions': ['/we4389'], |
| 2964 | }, |
| 2965 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2966 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 2967 | ['OS=="win" and component=="shared_library"', { |
| 2968 | 'msvs_disabled_warnings': [ |
| 2969 | 4251, # class 'std::xx' needs to have dll-interface. |
| 2970 | ], |
| 2971 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 2972 | ], |
| 2973 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 2974 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2975 | 'default_configuration': 'Debug', |
| 2976 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2977 | # VCLinkerTool LinkIncremental values below: |
| 2978 | # 0 == default |
| 2979 | # 1 == /INCREMENTAL:NO |
| 2980 | # 2 == /INCREMENTAL |
| 2981 | # Debug links incremental, Release does not. |
| 2982 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 2983 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2984 | # |
| 2985 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2986 | 'abstract': 1, |
| 2987 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 2988 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 2989 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 2990 | 'CharacterSet': '1', |
| 2991 | }, |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 2992 | # Add the default import libs. |
| 2993 | 'msvs_settings':{ |
| 2994 | 'VCLinkerTool': { |
| 2995 | 'AdditionalDependencies': [ |
| 2996 | 'kernel32.lib', |
| 2997 | 'gdi32.lib', |
| 2998 | 'winspool.lib', |
| 2999 | 'comdlg32.lib', |
| 3000 | 'advapi32.lib', |
| 3001 | 'shell32.lib', |
| 3002 | 'ole32.lib', |
| 3003 | 'oleaut32.lib', |
| 3004 | 'user32.lib', |
| 3005 | 'uuid.lib', |
| 3006 | 'odbc32.lib', |
| 3007 | 'odbccp32.lib', |
[email protected] | 36bb739c | 2013-02-25 22:10:39 | [diff] [blame] | 3008 | 'delayimp.lib', |
[email protected] | 48293fb | 2013-12-04 04:02:03 | [diff] [blame] | 3009 | 'credui.lib', |
| 3010 | 'netapi32.lib', |
[email protected] | f59e130 | 2013-02-15 13:48:40 | [diff] [blame] | 3011 | ], |
| 3012 | }, |
| 3013 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3014 | }, |
| 3015 | 'x86_Base': { |
| 3016 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3017 | 'msvs_settings': { |
| 3018 | 'VCLinkerTool': { |
[email protected] | 388484f0 | 2014-02-06 09:49:21 | [diff] [blame] | 3019 | 'MinimumRequiredVersion': '5.01', # XP. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3020 | 'TargetMachine': '1', |
| 3021 | }, |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3022 | 'VCLibrarianTool': { |
| 3023 | 'TargetMachine': '1', |
| 3024 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3025 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 3026 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3027 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3028 | 'x64_Base': { |
| 3029 | 'abstract': 1, |
| 3030 | 'msvs_configuration_platform': 'x64', |
| 3031 | 'msvs_settings': { |
| 3032 | 'VCLinkerTool': { |
[email protected] | 68c88b0 | 2014-06-04 17:16:04 | [diff] [blame] | 3033 | # Make sure to understand http://crbug.com/361720 if you want to |
| 3034 | # increase this. |
| 3035 | 'MinimumRequiredVersion': '5.02', # Server 2003. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3036 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3037 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3038 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3039 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3040 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 50f9966 | 2013-03-04 20:58:36 | [diff] [blame] | 3041 | # Doesn't exist x64 SDK. Should use oleaut32 in any case. |
| 3042 | 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3043 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 3044 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3045 | 'AdditionalLibraryDirectories!': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3046 | ['<(windows_sdk_path)/Lib/win8/um/x86'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3047 | 'AdditionalLibraryDirectories': |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 3048 | ['<(windows_sdk_path)/Lib/win8/um/x64'], |
[email protected] | 2d584a9 | 2013-11-12 22:44:39 | [diff] [blame] | 3049 | 'TargetMachine': '17', # x64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3050 | }, |
| 3051 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3052 | }, |
| 3053 | 'Debug_Base': { |
| 3054 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3055 | 'defines': [ |
| 3056 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3057 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3058 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3059 | 'xcode_settings': { |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 3060 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3061 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 3062 | '<@(debug_extra_cflags)', |
| 3063 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3064 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3065 | 'msvs_settings': { |
| 3066 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3067 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3068 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 3069 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3070 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3071 | 'conditions': [ |
| 3072 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3073 | # "default inlining", not "/Ob0". |
| 3074 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3075 | ['win_debug_InlineFunctionExpansion==0', { |
| 3076 | 'AdditionalOptions': ['/Ob0'], |
| 3077 | }], |
| 3078 | ['win_debug_InlineFunctionExpansion!=""', { |
| 3079 | 'InlineFunctionExpansion': |
| 3080 | '<(win_debug_InlineFunctionExpansion)', |
| 3081 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 3082 | ['win_debug_disable_iterator_debugging==1', { |
| 3083 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 3084 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3085 | |
| 3086 | # if win_debug_OmitFramePointers is blank, leave as default |
| 3087 | ['win_debug_OmitFramePointers==1', { |
| 3088 | 'OmitFramePointers': 'true', |
| 3089 | }], |
| 3090 | ['win_debug_OmitFramePointers==0', { |
| 3091 | 'OmitFramePointers': 'false', |
| 3092 | # The above is not sufficient (http://crbug.com/106711): it |
| 3093 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3094 | # perform FPO regardless, so we must explicitly disable. |
| 3095 | # We still want the false setting above to avoid having |
| 3096 | # "/Oy /Oy-" and warnings about overriding. |
| 3097 | 'AdditionalOptions': ['/Oy-'], |
| 3098 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3099 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3100 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3101 | }, |
| 3102 | 'VCLinkerTool': { |
| 3103 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 3104 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 3105 | # Chrome.dll share the same base name. As result, windbg will |
| 3106 | # name the Chrome.dll module like chrome_<base address>, where |
| 3107 | # <base address> typically changes with each launch. This in turn |
| 3108 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 3109 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 3110 | # Note that this is a three-way bool, where 0 means to pick up |
| 3111 | # the default setting, 1 is off and 2 is on. |
| 3112 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3113 | }, |
| 3114 | 'VCResourceCompilerTool': { |
| 3115 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 3116 | }, |
| 3117 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3118 | 'conditions': [ |
[email protected] | 78204c9 | 2012-09-14 04:42:55 | [diff] [blame] | 3119 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3120 | 'target_conditions': [ |
| 3121 | ['_toolset=="target"', { |
| 3122 | 'cflags': [ |
| 3123 | '<@(debug_extra_cflags)', |
| 3124 | ], |
| 3125 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3126 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3127 | }], |
[email protected] | 1eec679e | 2013-12-13 22:10:27 | [diff] [blame] | 3128 | ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', { |
[email protected] | a8d94b4 | 2013-12-10 18:52:22 | [diff] [blame] | 3129 | # Enable libstdc++ debugging facilities to help catch problems |
| 3130 | # early, see http://crbug.com/65151 . |
| 3131 | # TODO(phajdan.jr): Should we enable this for all of POSIX? |
| 3132 | 'defines': ['_GLIBCXX_DEBUG=1',], |
| 3133 | }], |
[email protected] | 330ba6d | 2014-03-06 05:41:36 | [diff] [blame] | 3134 | ['release_valgrind_build==0', { |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 3135 | 'xcode_settings': { |
| 3136 | 'OTHER_CFLAGS': [ |
| 3137 | '-fstack-protector-all', # Implies -fstack-protector |
| 3138 | ], |
| 3139 | }, |
| 3140 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3141 | ], |
| 3142 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3143 | 'Release_Base': { |
| 3144 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3145 | 'defines': [ |
| 3146 | 'NDEBUG', |
| 3147 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3148 | 'xcode_settings': { |
| 3149 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 3150 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 3151 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 3152 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3153 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3154 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3155 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3156 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 3157 | # In official builds, each target will self-select |
| 3158 | # an optimization level. |
| 3159 | ['buildtype!="Official"', { |
| 3160 | 'Optimization': '<(win_release_Optimization)', |
| 3161 | }, |
| 3162 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3163 | # According to MSVS, InlineFunctionExpansion=0 means |
| 3164 | # "default inlining", not "/Ob0". |
| 3165 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 3166 | ['win_release_InlineFunctionExpansion==0', { |
| 3167 | 'AdditionalOptions': ['/Ob0'], |
| 3168 | }], |
| 3169 | ['win_release_InlineFunctionExpansion!=""', { |
| 3170 | 'InlineFunctionExpansion': |
| 3171 | '<(win_release_InlineFunctionExpansion)', |
| 3172 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3173 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3174 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3175 | ['win_release_OmitFramePointers==1', { |
| 3176 | 'OmitFramePointers': 'true', |
| 3177 | }], |
| 3178 | ['win_release_OmitFramePointers==0', { |
| 3179 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3180 | # The above is not sufficient (http://crbug.com/106711): it |
| 3181 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 3182 | # perform FPO regardless, so we must explicitly disable. |
| 3183 | # We still want the false setting above to avoid having |
| 3184 | # "/Oy /Oy-" and warnings about overriding. |
| 3185 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 3186 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 3187 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 3188 | 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3189 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3190 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3191 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 3192 | # (i.e., inherit from parent solution), 1 means false, and |
| 3193 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3194 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 3195 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 3196 | # file contains FIXUP information (growing the PDB file by about |
| 3197 | # 5%) but does not otherwise alter the output binary. This |
| 3198 | # information is used by the Syzygy optimization tool when |
| 3199 | # decomposing the release image. |
| 3200 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3201 | }, |
| 3202 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3203 | 'conditions': [ |
[email protected] | fd3fb3bf | 2012-05-23 22:15:16 | [diff] [blame] | 3204 | ['msvs_use_common_release', { |
| 3205 | 'includes': ['release.gypi'], |
| 3206 | }], |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3207 | ['release_valgrind_build==0 and tsan==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3208 | 'defines': [ |
| 3209 | 'NVALGRIND', |
| 3210 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 3211 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 3212 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3213 | 'defines': [ |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3214 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 3215 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 3216 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3217 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 3218 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 3219 | ['win_use_allocator_shim==0', { |
| 3220 | 'defines': ['NO_TCMALLOC'], |
| 3221 | }], |
[email protected] | 8b22522 | 2014-02-18 22:54:44 | [diff] [blame] | 3222 | # _FORTIFY_SOURCE isn't really supported by Clang now, see |
| 3223 | # http://llvm.org/bugs/show_bug.cgi?id=16821. |
| 3224 | # TODO(glider): once the bug is fixed, disable source fortification |
| 3225 | # under the sanitizer tools only. |
| 3226 | ['os_posix==1 and (OS!="linux" or clang!=1)', { |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 3227 | 'target_conditions': [ |
| 3228 | ['chromium_code==1', { |
| 3229 | # Non-chromium code is not guaranteed to compile cleanly |
| 3230 | # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 3231 | # when optimizations are disabled, so only do that for Release |
| 3232 | # build. |
| 3233 | 'defines': [ |
| 3234 | '_FORTIFY_SOURCE=2', |
| 3235 | ], |
| 3236 | }], |
[email protected] | 37305ae | 2012-12-11 01:54:58 | [diff] [blame] | 3237 | ], |
| 3238 | }], |
[email protected] | 7df3812 | 2012-11-05 23:54:43 | [diff] [blame] | 3239 | ['OS=="linux" or OS=="android"', { |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3240 | 'target_conditions': [ |
| 3241 | ['_toolset=="target"', { |
| 3242 | 'cflags': [ |
| 3243 | '<@(release_extra_cflags)', |
| 3244 | ], |
[email protected] | 9082bba | 2014-05-20 06:50:21 | [diff] [blame] | 3245 | 'conditions': [ |
| 3246 | ['enable_resource_whitelist_generation==1', { |
| 3247 | 'cflags': [ |
| 3248 | '-Wunknown-pragmas -Wno-error=unknown-pragmas', |
| 3249 | ], |
| 3250 | }], |
| 3251 | ], |
[email protected] | d8e3b12 | 2012-05-31 23:07:54 | [diff] [blame] | 3252 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 3253 | ], |
| 3254 | }], |
[email protected] | b64ec82 | 2013-05-23 12:57:41 | [diff] [blame] | 3255 | ['OS=="ios"', { |
| 3256 | 'defines': [ |
| 3257 | 'NS_BLOCK_ASSERTIONS=1', |
| 3258 | ], |
| 3259 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3260 | ], |
| 3261 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3262 | # |
| 3263 | # Concrete configurations |
| 3264 | # |
| 3265 | 'Debug': { |
| 3266 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 3267 | }, |
| 3268 | 'Release': { |
| 3269 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3270 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3271 | 'conditions': [ |
[email protected] | 8125fba7 | 2014-02-26 14:32:58 | [diff] [blame] | 3272 | [ 'OS=="ios"', { |
| 3273 | 'Profile': { |
| 3274 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 3275 | 'target_conditions': [ |
| 3276 | [ '_type=="executable"', { |
| 3277 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 3278 | # debug information format to dwarf-with-dsym. Since |
| 3279 | # strip_from_xcode will not be used, set Xcode to do the |
| 3280 | # stripping as well. |
| 3281 | 'xcode_settings': { |
| 3282 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 3283 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 3284 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 3285 | }, |
| 3286 | }], |
| 3287 | ], |
| 3288 | }, |
| 3289 | }], |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3290 | [ 'OS=="win"', { |
| 3291 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 3292 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3293 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3294 | }, |
| 3295 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3296 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 3297 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 3298 | }], |
| 3299 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3300 | }, |
| 3301 | }, |
| 3302 | 'conditions': [ |
[email protected] | 41300ff | 2014-04-07 08:17:25 | [diff] [blame] | 3303 | ['os_posix==1', { |
| 3304 | 'target_defaults': { |
| 3305 | 'ldflags': [ |
| 3306 | '-Wl,-z,now', |
| 3307 | '-Wl,-z,relro', |
| 3308 | ], |
| 3309 | }, |
| 3310 | }], |
[email protected] | 713d6e4a | 2014-03-28 18:18:20 | [diff] [blame] | 3311 | # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
[email protected] | 453a8ad3 | 2014-05-20 17:32:49 | [diff] [blame] | 3312 | ['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] | 3313 | 'target_defaults': { |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3314 | 'ldflags': [ |
[email protected] | a89c460c | 2014-03-17 13:42:13 | [diff] [blame] | 3315 | '-Wl,--fatal-warnings', |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3316 | ], |
[email protected] | 43539ec | 2012-11-20 22:35:25 | [diff] [blame] | 3317 | }, |
| 3318 | }], |
[email protected] | d2ca75c | 2013-02-01 05:47:17 | [diff] [blame] | 3319 | ['os_posix==1 and chromeos==0', { |
| 3320 | # Chrome OS enables -fstack-protector-strong via its build wrapper, |
| 3321 | # and we want to avoid overriding this, so stack-protector is only |
| 3322 | # enabled when not building on Chrome OS. |
| 3323 | # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc |
| 3324 | # supports it. |
| 3325 | 'target_defaults': { |
| 3326 | 'cflags': [ |
| 3327 | '-fstack-protector', |
| 3328 | '--param=ssp-buffer-size=4', |
| 3329 | ], |
| 3330 | }, |
| 3331 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3332 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3333 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3334 | # Enable -Werror by default, but put it in a variable so it can |
| 3335 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 3336 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 3337 | 'werror%': '-Werror', |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3338 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3339 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 3340 | 'defines': [ |
| 3341 | '_FILE_OFFSET_BITS=64', |
| 3342 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3343 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3344 | '<(werror)', # See note above about the werror variable. |
| 3345 | '-pthread', |
| 3346 | '-fno-exceptions', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 3347 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 3348 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 3349 | # TODO(evan): turn this back on once all the builds work. |
| 3350 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 3351 | # Don't warn about unused function params. We use those everywhere. |
| 3352 | '-Wno-unused-parameter', |
| 3353 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 3354 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 3355 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 3356 | # Note: this is *required* to make some plugins work. |
| 3357 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 3358 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3359 | ], |
| 3360 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 3361 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 3362 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 3363 | # Make inline functions have hidden visiblity by default. |
| 3364 | # Surprisingly, not covered by -fvisibility=hidden. |
| 3365 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3366 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
[email protected] | f58fa2c | 2013-12-06 08:06:20 | [diff] [blame] | 3367 | # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 3368 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3369 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 3370 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 3371 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 3372 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 3373 | 'libraries' : [ |
| 3374 | '<(libraries_for_target)', |
| 3375 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3376 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3377 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 3378 | 'variables': { |
| 3379 | 'debug_optimize%': '0', |
| 3380 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3381 | 'defines': [ |
| 3382 | '_DEBUG', |
| 3383 | ], |
| 3384 | 'cflags': [ |
[email protected] | 95ad203 | 2012-08-24 00:49:25 | [diff] [blame] | 3385 | '-O>(debug_optimize)', |
[email protected] | 5f43f77f | 2014-03-19 13:53:16 | [diff] [blame] | 3386 | '-g', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3387 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3388 | 'conditions' : [ |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3389 | ['OS=="android"', { |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3390 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3391 | # Warn in case of text relocations. |
| 3392 | '-Wl,--warn-shared-textrel', |
[email protected] | 3f05e91 | 2013-04-11 20:38:34 | [diff] [blame] | 3393 | ], |
| 3394 | }], |
[email protected] | fa9d4e26 | 2012-08-21 04:39:00 | [diff] [blame] | 3395 | ['OS=="android" and android_full_debug==0', { |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3396 | # Some configurations are copied from Release_Base to reduce |
| 3397 | # the binary size. |
| 3398 | 'variables': { |
| 3399 | 'debug_optimize%': 's', |
| 3400 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3401 | 'cflags': [ |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3402 | '-fomit-frame-pointer', |
| 3403 | '-fdata-sections', |
| 3404 | '-ffunction-sections', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3405 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3406 | 'ldflags': [ |
| 3407 | '-Wl,-O1', |
| 3408 | '-Wl,--as-needed', |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 3409 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3410 | }], |
[email protected] | d4c0ec5b | 2013-03-10 03:07:45 | [diff] [blame] | 3411 | ['OS=="linux" and target_arch=="ia32"', { |
| 3412 | 'ldflags': [ |
| 3413 | '-Wl,--no-as-needed', |
| 3414 | ], |
| 3415 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3416 | ['debug_unwind_tables==1', { |
| 3417 | 'cflags': ['-funwind-tables'], |
| 3418 | }, { |
| 3419 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
| 3420 | }], |
[email protected] | 9dbbabd | 2014-04-30 23:42:32 | [diff] [blame] | 3421 | # TODO(mostynb): shuffle clang/gcc_version/binutils_version |
| 3422 | # definitions in to the right scope to use them when setting |
| 3423 | # linux_use_debug_fission, so it can be used here alone. |
| 3424 | ['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] | 3425 | 'cflags': ['-gsplit-dwarf'], |
[email protected] | 1c26c6a | 2014-03-17 14:11:21 | [diff] [blame] | 3426 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3427 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 3428 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 3429 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3430 | 'variables': { |
| 3431 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3432 | # Binaries become big and gold is unable to perform GC |
| 3433 | # and remove unused sections for some of test targets |
| 3434 | # on 32 bit platform. |
| 3435 | # (This is currently observed only in chromeos valgrind bots) |
| 3436 | # The following flag is to disable --gc-sections linker |
| 3437 | # option for these bots. |
| 3438 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 3439 | |
| 3440 | # TODO(bradnelson): reexamine how this is done if we change the |
| 3441 | # expansion of configurations |
| 3442 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 3443 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3444 | 'cflags': [ |
[email protected] | 4c33a9b | 2014-06-23 22:20:19 | [diff] [blame] | 3445 | '-O<(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 3446 | # Don't emit the GCC version ident directives, they just end up |
| 3447 | # in the .comment section taking up binary size. |
| 3448 | '-fno-ident', |
| 3449 | # Put data and code in their own sections, so that unused symbols |
| 3450 | # can be removed at link time with --gc-sections. |
| 3451 | '-fdata-sections', |
| 3452 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3453 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3454 | 'ldflags': [ |
| 3455 | # Specifically tell the linker to perform optimizations. |
| 3456 | # See http://lwn.net/Articles/192624/ . |
| 3457 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 3458 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 3459 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 3460 | 'conditions' : [ |
| 3461 | ['no_gc_sections==0', { |
| 3462 | 'ldflags': [ |
| 3463 | '-Wl,--gc-sections', |
| 3464 | ], |
| 3465 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3466 | ['OS=="android"', { |
[email protected] | 48de0fc | 2012-08-02 11:03:58 | [diff] [blame] | 3467 | 'variables': { |
| 3468 | 'release_optimize%': 's', |
| 3469 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3470 | 'cflags': [ |
| 3471 | '-fomit-frame-pointer', |
| 3472 | ], |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3473 | 'ldflags': [ |
[email protected] | 933d072 | 2013-07-03 04:32:49 | [diff] [blame] | 3474 | # Warn in case of text relocations. |
| 3475 | '-Wl,--warn-shared-textrel', |
| 3476 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3477 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 3478 | ['clang==1', { |
| 3479 | 'cflags!': [ |
| 3480 | '-fno-ident', |
| 3481 | ], |
| 3482 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3483 | ['profiling==1', { |
| 3484 | 'cflags': [ |
| 3485 | '-fno-omit-frame-pointer', |
| 3486 | '-g', |
| 3487 | ], |
[email protected] | 0358c483 | 2013-06-23 14:17:58 | [diff] [blame] | 3488 | 'conditions' : [ |
| 3489 | ['profiling_full_stack_frames==1', { |
| 3490 | 'cflags': [ |
| 3491 | '-fno-inline', |
| 3492 | '-fno-optimize-sibling-calls', |
| 3493 | ], |
| 3494 | }], |
| 3495 | ], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 3496 | }], |
[email protected] | 2578ea1 | 2014-01-17 06:02:51 | [diff] [blame] | 3497 | ['release_unwind_tables==1', { |
| 3498 | 'cflags': ['-funwind-tables'], |
| 3499 | }, { |
| 3500 | 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], |
[email protected] | a637d438 | 2014-01-11 03:12:05 | [diff] [blame] | 3501 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 3502 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 3503 | }, |
| 3504 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3505 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3506 | ['target_arch=="ia32"', { |
| 3507 | 'target_conditions': [ |
| 3508 | ['_toolset=="target"', { |
| 3509 | 'asflags': [ |
| 3510 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 3511 | # are compatible with the general 32-bit-ness. |
| 3512 | '-32', |
| 3513 | ], |
| 3514 | # All floating-point computations on x87 happens in 80-bit |
| 3515 | # precision. Because the C and C++ language standards allow |
| 3516 | # the compiler to keep the floating-point values in higher |
| 3517 | # precision than what's specified in the source and doing so |
| 3518 | # is more efficient than constantly rounding up to 64-bit or |
| 3519 | # 32-bit precision as specified in the source, the compiler, |
| 3520 | # especially in the optimized mode, tries very hard to keep |
| 3521 | # values in x87 floating-point stack (in 80-bit precision) |
| 3522 | # as long as possible. This has important side effects, that |
| 3523 | # the real value used in computation may change depending on |
| 3524 | # how the compiler did the optimization - that is, the value |
| 3525 | # kept in 80-bit is different than the value rounded down to |
| 3526 | # 64-bit or 32-bit. There are possible compiler options to |
| 3527 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 3528 | # all floating-values in the memory, thus force them to be |
| 3529 | # rounded to its original precision) but they have significant |
| 3530 | # runtime performance penalty. |
| 3531 | # |
| 3532 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 3533 | # which keep floating-point values in SSE registers in its |
| 3534 | # native precision (32-bit for single precision, and 64-bit |
| 3535 | # for double precision values). This means the floating-point |
| 3536 | # value used during computation does not change depending on |
| 3537 | # how the compiler optimized the code, since the value is |
| 3538 | # always kept in its specified precision. |
[email protected] | 6c0d3067 | 2014-03-12 00:31:30 | [diff] [blame] | 3539 | # |
| 3540 | # Refer to http://crbug.com/348761 for rationale behind SSE2 |
| 3541 | # being a minimum requirement for 32-bit Linux builds and |
| 3542 | # http://crbug.com/313032 for an example where this has "bit" |
| 3543 | # us in the past. |
| 3544 | 'cflags': [ |
| 3545 | '-msse2', |
| 3546 | '-mfpmath=sse', |
| 3547 | '-mmmx', # Allows mmintrin.h for MMX intrinsics. |
| 3548 | '-m32', |
| 3549 | ], |
| 3550 | 'ldflags': [ |
| 3551 | '-m32', |
| 3552 | ], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3553 | 'conditions': [ |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3554 | # Use gold linker for Android ia32 target. |
| 3555 | ['OS=="android"', { |
[email protected] | 0a0063c5 | 2013-03-29 06:36:21 | [diff] [blame] | 3556 | 'ldflags': [ |
| 3557 | '-fuse-ld=gold', |
| 3558 | ], |
| 3559 | }], |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3560 | # Install packages have started cropping up with |
| 3561 | # different headers between the 32-bit and 64-bit |
| 3562 | # versions, so we have to shadow those differences off |
| 3563 | # and make sure a 32-bit-on-64-bit build picks up the |
| 3564 | # right files. |
[email protected] | 3259402 | 2012-05-10 03:22:28 | [diff] [blame] | 3565 | # For android build, use NDK headers instead of host headers |
| 3566 | ['host_arch!="ia32" and OS!="android"', { |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 3567 | 'include_dirs+': [ |
| 3568 | '/usr/include32', |
| 3569 | ], |
| 3570 | }], |
| 3571 | ], |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 3572 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 3573 | ], |
| 3574 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3575 | ['target_arch=="x64"', { |
| 3576 | 'target_conditions': [ |
| 3577 | ['_toolset=="target"', { |
| 3578 | 'conditions': [ |
| 3579 | # Use gold linker for Android x64 target. |
| 3580 | ['OS=="android"', { |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 3581 | 'ldflags': [ |
| 3582 | '-fuse-ld=gold', |
| 3583 | ], |
| 3584 | }], |
| 3585 | ], |
| 3586 | 'cflags': [ |
| 3587 | '-m64', |
| 3588 | '-march=x86-64', |
| 3589 | ], |
| 3590 | 'ldflags': [ |
| 3591 | '-m64', |
| 3592 | ], |
| 3593 | }], |
| 3594 | ], |
| 3595 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3596 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3597 | 'target_conditions': [ |
| 3598 | ['_toolset=="target"', { |
| 3599 | 'cflags_cc': [ |
| 3600 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 3601 | # has changed whenever it encounters a varargs function. This |
| 3602 | # silences those warnings, as they are not helpful and |
| 3603 | # clutter legitimate warnings. |
| 3604 | '-Wno-abi', |
| 3605 | ], |
| 3606 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3607 | ['arm_arch!=""', { |
| 3608 | 'cflags': [ |
| 3609 | '-march=<(arm_arch)', |
| 3610 | ], |
| 3611 | }], |
| 3612 | ['arm_tune!=""', { |
| 3613 | 'cflags': [ |
| 3614 | '-mtune=<(arm_tune)', |
| 3615 | ], |
| 3616 | }], |
| 3617 | ['arm_fpu!=""', { |
| 3618 | 'cflags': [ |
| 3619 | '-mfpu=<(arm_fpu)', |
| 3620 | ], |
| 3621 | }], |
| 3622 | ['arm_float_abi!=""', { |
| 3623 | 'cflags': [ |
| 3624 | '-mfloat-abi=<(arm_float_abi)', |
| 3625 | ], |
| 3626 | }], |
| 3627 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3628 | 'cflags': [ |
| 3629 | '-mthumb', |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 3630 | ] |
| 3631 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3632 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3633 | # Most of the following flags are derived from what Android |
| 3634 | # uses by default when building for arm, reference for which |
| 3635 | # can be found in the following file in the Android NDK: |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3636 | # toolchains/arm-linux-androideabi-4.8/setup.mk |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3637 | 'cflags': [ |
| 3638 | # The tree-sra optimization (scalar replacement for |
| 3639 | # aggregates enabling subsequent optimizations) leads to |
| 3640 | # invalid code generation when using the Android NDK's |
| 3641 | # compiler (r5-r7). This can be verified using |
[email protected] | b78f8f6 | 2013-04-24 01:35:43 | [diff] [blame] | 3642 | # webkit_unit_tests' WTF.Checked_int8_t test. |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3643 | '-fno-tree-sra', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3644 | # The following 6 options are disabled to save on |
| 3645 | # binary size in gcc 4.8. |
| 3646 | # TODO(fdegans) Reevaluate when we upgrade GCC. |
| 3647 | '-fno-partial-inlining', |
| 3648 | '-fno-early-inlining', |
| 3649 | '-fno-tree-copy-prop', |
| 3650 | '-fno-tree-loop-optimize', |
| 3651 | '-fno-move-loop-invariants', |
| 3652 | '-fno-caller-saves', |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 3653 | '-Wno-psabi', |
| 3654 | ], |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3655 | # Android now supports .relro sections properly. |
| 3656 | # NOTE: While these flags enable the generation of .relro |
| 3657 | # sections, the generated libraries can still be loaded on |
| 3658 | # older Android platform versions. |
| 3659 | 'ldflags': [ |
| 3660 | '-Wl,-z,relro', |
| 3661 | '-Wl,-z,now', |
[email protected] | 9cc13e4 | 2012-08-20 20:09:48 | [diff] [blame] | 3662 | '-fuse-ld=gold', |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 3663 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3664 | 'conditions': [ |
[email protected] | 7d676342 | 2013-04-26 12:06:54 | [diff] [blame] | 3665 | ['arm_thumb==1', { |
[email protected] | 94cdbf4 | 2012-12-11 19:49:22 | [diff] [blame] | 3666 | 'cflags': [ '-mthumb-interwork' ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3667 | }], |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3668 | ['profiling==1', { |
| 3669 | 'cflags': [ |
[email protected] | a0e681cc | 2014-05-16 16:56:47 | [diff] [blame] | 3670 | # Thumb code with frame pointer makes chrome crash |
| 3671 | # early. |
| 3672 | '-marm', |
| 3673 | '-mapcs-frame', # Required by -fno-omit-frame-pointer. |
| 3674 | # The perf report sometimes incorrectly attributes |
| 3675 | # code from tail calls. |
| 3676 | '-fno-optimize-sibling-calls', |
| 3677 | ], |
| 3678 | 'cflags!': [ |
| 3679 | '-fomit-frame-pointer', |
[email protected] | 4c48ef10 | 2012-11-29 22:00:38 | [diff] [blame] | 3680 | ], |
| 3681 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3682 | ['clang==1', { |
| 3683 | 'cflags!': [ |
| 3684 | # Clang does not support the following options. |
| 3685 | '-mthumb-interwork', |
| 3686 | '-finline-limit=64', |
| 3687 | '-fno-tree-sra', |
[email protected] | 7557cd4 | 2014-05-28 15:32:59 | [diff] [blame] | 3688 | '-fno-partial-inlining', |
| 3689 | '-fno-early-inlining', |
| 3690 | '-fno-tree-copy-prop', |
| 3691 | '-fno-tree-loop-optimize', |
| 3692 | '-fno-move-loop-invariants', |
| 3693 | '-fno-caller-saves', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3694 | '-Wno-psabi', |
| 3695 | ], |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3696 | 'cflags': [ |
| 3697 | # TODO(hans) Enable integrated-as (crbug.com/124610). |
| 3698 | '-no-integrated-as', |
[email protected] | f4091d3 | 2014-01-23 23:16:35 | [diff] [blame] | 3699 | '-B<(android_toolchain)', # Else /usr/bin/as gets picked up. |
[email protected] | b763d40 | 2014-01-13 18:34:22 | [diff] [blame] | 3700 | ], |
| 3701 | |
[email protected] | 7d899e9a | 2013-10-12 06:02:42 | [diff] [blame] | 3702 | 'ldflags!': [ |
| 3703 | # Clang does not support the following options. |
| 3704 | '-fuse-ld=gold', |
| 3705 | ], |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3706 | 'ldflags': [ |
| 3707 | # As long as -fuse-ld=gold doesn't work, add a dummy directory |
| 3708 | # with an 'ld' that redirects to gold, so that clang uses gold. |
[email protected] | ac15ff0c | 2014-05-13 19:32:48 | [diff] [blame] | 3709 | '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold', |
[email protected] | 1afb110 | 2014-01-31 00:04:22 | [diff] [blame] | 3710 | ], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 3711 | }], |
[email protected] | cdc001e | 2014-01-23 11:07:53 | [diff] [blame] | 3712 | ['asan==1', { |
| 3713 | 'cflags': [ |
| 3714 | '-marm', # Required for frame pointer based stack traces. |
| 3715 | ], |
| 3716 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 3717 | ], |
| 3718 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 3719 | ], |
| 3720 | }], |
| 3721 | ], |
| 3722 | }], |
[email protected] | 7a2f984a | 2014-03-20 18:35:49 | [diff] [blame] | 3723 | ['target_arch=="arm64"', { |
| 3724 | 'target_conditions': [ |
| 3725 | ['_toolset=="target"', { |
| 3726 | 'conditions': [ |
| 3727 | ['OS=="android"', { |
| 3728 | 'cflags!': [ |
| 3729 | '-fstack-protector', # stack protector is always enabled on arm64. |
| 3730 | ], |
| 3731 | }], |
| 3732 | ], |
| 3733 | }], |
| 3734 | ], |
| 3735 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3736 | ['target_arch=="mipsel"', { |
| 3737 | 'target_conditions': [ |
| 3738 | ['_toolset=="target"', { |
| 3739 | 'conditions': [ |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3740 | ['android_webview_build==0 and mips_arch_variant=="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3741 | 'cflags': ['-mips32r2', '-Wa,-mips32r2'], |
[email protected] | 3a626e0 | 2013-06-27 12:58:34 | [diff] [blame] | 3742 | }], |
| 3743 | ['android_webview_build==0 and mips_arch_variant!="mips32r2"', { |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 3744 | 'cflags': ['-mips32', '-Wa,-mips32'], |
| 3745 | }], |
| 3746 | ], |
| 3747 | 'cflags': [ |
| 3748 | '-EL', |
| 3749 | '-mhard-float', |
| 3750 | ], |
| 3751 | 'ldflags': [ |
| 3752 | '-EL', |
| 3753 | '-Wl,--no-keep-memory' |
| 3754 | ], |
| 3755 | 'cflags_cc': [ |
| 3756 | '-Wno-uninitialized', |
| 3757 | ], |
| 3758 | }], |
| 3759 | ], |
| 3760 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 3761 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3762 | 'cflags': [ |
| 3763 | '-fPIC', |
| 3764 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 3765 | 'ldflags': [ |
| 3766 | '-fPIC', |
| 3767 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 3768 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3769 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3770 | 'target_conditions': [ |
| 3771 | ['_toolset=="target"', { |
| 3772 | 'cflags': [ |
| 3773 | '--sysroot=<(sysroot)', |
| 3774 | ], |
| 3775 | 'ldflags': [ |
| 3776 | '--sysroot=<(sysroot)', |
[email protected] | a7e10b9a | 2013-03-22 05:26:15 | [diff] [blame] | 3777 | '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 3778 | ], |
| 3779 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3780 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 3781 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 3782 | 'cflags': [ |
| 3783 | '-Wheader-hygiene', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3784 | |
[email protected] | 7ddcb1d | 2013-04-19 04:52:53 | [diff] [blame] | 3785 | # Don't die on dtoa code that uses a char as an array index. |
| 3786 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3787 | |
[email protected] | 64bbd6c | 2013-11-12 05:05:41 | [diff] [blame] | 3788 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 3789 | # which we no longer use. Check if it makes sense to remove |
| 3790 | # this as well. http://crbug.com/316352 |
| 3791 | '-Wno-unneeded-internal-declaration', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 3792 | |
| 3793 | # Warns on switches on enums that cover all enum values but |
| 3794 | # also contain a default: branch. Chrome is full of that. |
| 3795 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 3796 | |
| 3797 | # Warns when a const char[] is converted to bool. |
| 3798 | '-Wstring-conversion', |
[email protected] | ce889c2 | 2013-07-16 22:37:18 | [diff] [blame] | 3799 | |
| 3800 | # C++11-related flags: |
| 3801 | |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3802 | # This warns on using ints as initializers for floats in |
| 3803 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 3804 | # which happens in several places in chrome code. Not sure if |
| 3805 | # this is worth fixing. |
| 3806 | '-Wno-c++11-narrowing', |
| 3807 | |
[email protected] | 00c83cc | 2013-07-25 00:55:50 | [diff] [blame] | 3808 | # TODO(thakis): Remove, http://crbug.com/263960 |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3809 | '-Wno-reserved-user-defined-literal', |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 3810 | |
| 3811 | # Clang considers the `register` keyword as deprecated, but e.g. |
| 3812 | # code generated by flex (used in angle) contains that keyword. |
| 3813 | # http://crbug.com/255186 |
| 3814 | '-Wno-deprecated-register', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3815 | ], |
[email protected] | ce889c2 | 2013-07-16 22:37:18 | [diff] [blame] | 3816 | 'cflags!': [ |
| 3817 | # Clang doesn't seem to know know this flag. |
| 3818 | '-mfpmath=sse', |
| 3819 | ], |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 3820 | 'cflags_cc': [ |
| 3821 | # See the comment in the Mac section for what it takes to move |
| 3822 | # this to -std=c++11. |
| 3823 | '-std=gnu++11', |
| 3824 | ], |
| 3825 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3826 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3827 | 'cflags': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 3828 | '<@(clang_chrome_plugins_flags)', |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3829 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 3830 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3831 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3832 | 'cflags': [ |
| 3833 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 3834 | ], |
| 3835 | }], |
| 3836 | ['clang==1 and clang_add_plugin!=""', { |
| 3837 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 3838 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 3839 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 3840 | }], |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3841 | ['clang==1 and target_arch=="ia32"', { |
| 3842 | 'cflags': [ |
| 3843 | # Else building libyuv gives clang's register allocator issues, |
| 3844 | # see llvm.org/PR15798 / crbug.com/233709 |
| 3845 | '-momit-leaf-frame-pointer', |
| 3846 | ], |
| 3847 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 3848 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 3849 | 'cflags': [ |
| 3850 | # See http://crbug.com/110262 |
| 3851 | '-fcolor-diagnostics', |
| 3852 | ], |
| 3853 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3854 | # Common options for AddressSanitizer, LeakSanitizer, |
| 3855 | # ThreadSanitizer and MemorySanitizer. |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 3856 | ['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] | 3857 | 'target_conditions': [ |
| 3858 | ['_toolset=="target"', { |
| 3859 | 'cflags': [ |
| 3860 | '-fno-omit-frame-pointer', |
| 3861 | '-gline-tables-only', |
| 3862 | ], |
[email protected] | b772fce | 2014-01-22 09:27:52 | [diff] [blame] | 3863 | 'cflags!': [ |
| 3864 | '-fomit-frame-pointer', |
| 3865 | ], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 3866 | }], |
| 3867 | ], |
| 3868 | }], |
| 3869 | ['asan==1 or lsan==1 or tsan==1 or msan==1', { |
| 3870 | 'target_conditions': [ |
| 3871 | ['_toolset=="target"', { |
[email protected] | 49110f0 | 2013-04-22 22:51:34 | [diff] [blame] | 3872 | 'ldflags!': [ |
| 3873 | # Functions interposed by the sanitizers can make ld think |
| 3874 | # that some libraries aren't needed when they actually are, |
| 3875 | # http://crbug.com/234010. As workaround, disable --as-needed. |
| 3876 | '-Wl,--as-needed', |
| 3877 | ], |
[email protected] | 2f04720 | 2013-06-14 06:36:39 | [diff] [blame] | 3878 | 'defines': [ |
| 3879 | 'MEMORY_TOOL_REPLACES_ALLOCATOR', |
| 3880 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3881 | }], |
| 3882 | ], |
[email protected] | 05b59c9 | 2014-04-15 18:39:20 | [diff] [blame] | 3883 | # TODO(glider): enable the default options on other systems. |
| 3884 | 'conditions': [ |
[email protected] | 1b965412 | 2014-04-28 12:11:15 | [diff] [blame] | 3885 | ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', { |
[email protected] | 05b59c9 | 2014-04-15 18:39:20 | [diff] [blame] | 3886 | 'dependencies': [ |
| 3887 | '<(DEPTH)/base/base.gyp:sanitizer_options', |
| 3888 | ], |
| 3889 | }], |
| 3890 | ], |
[email protected] | cf351c2 | 2013-04-19 13:00:54 | [diff] [blame] | 3891 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3892 | ['asan==1', { |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3893 | 'target_conditions': [ |
| 3894 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3895 | 'cflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3896 | '-fsanitize=address', |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3897 | '-w', # http://crbug.com/162783 |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3898 | ], |
| 3899 | 'ldflags': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 3900 | '-fsanitize=address', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3901 | ], |
[email protected] | 1ffc3b396 | 2012-05-16 14:08:42 | [diff] [blame] | 3902 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 3903 | ], |
[email protected] | eec02d98 | 2014-03-21 18:51:17 | [diff] [blame] | 3904 | 'conditions': [ |
| 3905 | ['OS=="mac"', { |
| 3906 | 'cflags': [ |
| 3907 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 3908 | ], |
| 3909 | }], |
| 3910 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 3911 | }], |
[email protected] | 7fd639a | 2014-05-30 23:59:01 | [diff] [blame] | 3912 | ['ubsan==1', { |
| 3913 | 'target_conditions': [ |
| 3914 | ['_toolset=="target"', { |
| 3915 | 'cflags': [ |
| 3916 | '-fsanitize=undefined', |
| 3917 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 3918 | '-fno-sanitize=vptr', |
| 3919 | '-w', # http://crbug.com/162783 |
| 3920 | ], |
| 3921 | 'ldflags': [ |
| 3922 | '-fsanitize=undefined', |
| 3923 | # -fsanitize=vptr is incompatible with -fno-rtti. |
| 3924 | '-fno-sanitize=vptr', |
| 3925 | ], |
| 3926 | }], |
| 3927 | ], |
| 3928 | }], |
[email protected] | 0dbe7af9 | 2014-06-26 23:31:40 | [diff] [blame] | 3929 | ['ubsan_vptr==1', { |
| 3930 | 'target_conditions': [ |
| 3931 | ['_toolset=="target"', { |
| 3932 | 'cflags': [ |
| 3933 | '-fsanitize=vptr', |
| 3934 | '-fsanitize=null', # Avoid dereferences on null pointer objects. |
| 3935 | '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', |
| 3936 | '-w', # http://crbug.com/162783 |
| 3937 | ], |
| 3938 | 'cflags_cc!': [ |
| 3939 | '-fno-rtti', |
| 3940 | ], |
| 3941 | 'cflags!': [ |
| 3942 | '-fno-rtti', |
| 3943 | ], |
| 3944 | 'ldflags': [ |
| 3945 | '-fsanitize=vptr', # -fsanitize=null is not necessary. |
| 3946 | ], |
| 3947 | 'defines': [ |
| 3948 | 'UNDEFINED_SANITIZER', |
| 3949 | ], |
| 3950 | }], |
| 3951 | ], |
| 3952 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 3953 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 3954 | 'target_conditions': [ |
| 3955 | ['_toolset=="target"', { |
| 3956 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 3957 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 3958 | ], |
| 3959 | }], |
| 3960 | ], |
| 3961 | }], |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3962 | ['lsan==1', { |
| 3963 | 'target_conditions': [ |
| 3964 | ['_toolset=="target"', { |
| 3965 | 'cflags': [ |
| 3966 | '-fsanitize=leak', |
| 3967 | ], |
| 3968 | 'ldflags': [ |
| 3969 | '-fsanitize=leak', |
| 3970 | ], |
| 3971 | 'defines': [ |
| 3972 | 'LEAK_SANITIZER', |
[email protected] | f6f65a0 | 2013-09-06 05:40:52 | [diff] [blame] | 3973 | 'WTF_USE_LEAK_SANITIZER=1', |
[email protected] | 062522a | 2013-06-13 15:49:55 | [diff] [blame] | 3974 | ], |
| 3975 | }], |
| 3976 | ], |
| 3977 | }], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3978 | ['tsan==1', { |
| 3979 | 'target_conditions': [ |
| 3980 | ['_toolset=="target"', { |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3981 | 'cflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3982 | '-fsanitize=thread', |
[email protected] | 9d46a57 | 2013-01-23 10:38:29 | [diff] [blame] | 3983 | '-fPIC', |
[email protected] | 3227d8f | 2014-04-26 00:49:32 | [diff] [blame] | 3984 | '-fsanitize-blacklist=<(tsan_blacklist)', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3985 | ], |
| 3986 | 'ldflags': [ |
[email protected] | 927a9d67 | 2012-11-09 11:28:20 | [diff] [blame] | 3987 | '-fsanitize=thread', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3988 | ], |
| 3989 | 'defines': [ |
| 3990 | 'THREAD_SANITIZER', |
| 3991 | 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
[email protected] | 7bdd7d7c | 2012-11-01 10:36:16 | [diff] [blame] | 3992 | 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3993 | ], |
| 3994 | 'target_conditions': [ |
| 3995 | ['_type=="executable"', { |
| 3996 | 'ldflags': [ |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 3997 | '-pie', |
[email protected] | cb770a4c | 2012-07-25 20:06:45 | [diff] [blame] | 3998 | ], |
| 3999 | }], |
| 4000 | ], |
[email protected] | c9a82927 | 2012-07-04 07:51:12 | [diff] [blame] | 4001 | }], |
| 4002 | ], |
| 4003 | }], |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4004 | ['msan==1', { |
| 4005 | 'target_conditions': [ |
| 4006 | ['_toolset=="target"', { |
| 4007 | 'cflags': [ |
| 4008 | '-fsanitize=memory', |
[email protected] | a030ab6 | 2014-06-23 17:14:15 | [diff] [blame] | 4009 | '-fsanitize-memory-track-origins=<(msan_track_origins)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4010 | '-fPIC', |
[email protected] | 190d4ce6 | 2014-01-17 20:24:53 | [diff] [blame] | 4011 | '-fsanitize-blacklist=<(msan_blacklist)', |
[email protected] | a10ddd2d | 2013-02-26 20:06:59 | [diff] [blame] | 4012 | ], |
| 4013 | 'ldflags': [ |
| 4014 | '-fsanitize=memory', |
| 4015 | ], |
| 4016 | 'defines': [ |
| 4017 | 'MEMORY_SANITIZER', |
| 4018 | ], |
| 4019 | 'target_conditions': [ |
| 4020 | ['_type=="executable"', { |
| 4021 | 'ldflags': [ |
| 4022 | '-pie', |
| 4023 | ], |
| 4024 | }], |
| 4025 | ], |
| 4026 | }], |
| 4027 | ], |
| 4028 | }], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4029 | ['use_instrumented_libraries==1', { |
| 4030 | 'dependencies': [ |
| 4031 | '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', |
| 4032 | ], |
[email protected] | c8103a4 | 2013-11-12 13:41:30 | [diff] [blame] | 4033 | }], |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4034 | ['use_custom_libcxx==1', { |
| 4035 | 'dependencies': [ |
[email protected] | 121cbf6e | 2014-05-05 13:30:42 | [diff] [blame] | 4036 | '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', |
[email protected] | 22b3f531e | 2013-12-20 13:07:28 | [diff] [blame] | 4037 | ], |
| 4038 | }], |
[email protected] | 8a48f3f | 2012-12-04 20:14:04 | [diff] [blame] | 4039 | ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4040 | 'target_conditions' : [ |
[email protected] | c45dbc5 | 2014-05-27 14:02:48 | [diff] [blame] | 4041 | # crazy_linker has an upstream gyp file we can't edit, and we |
| 4042 | # don't want to instrument it. |
| 4043 | ['_toolset=="target" and _target_name!="crazy_linker"', { |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4044 | 'cflags': [ |
| 4045 | '-finstrument-functions', |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4046 | # Allow mmx intrinsics to inline, so that the |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4047 | #0 compiler can expand the intrinsics. |
[email protected] | c2a8d2e | 2012-10-05 09:31:45 | [diff] [blame] | 4048 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4049 | ], |
| 4050 | }], |
[email protected] | 82e9b00 | 2013-07-16 21:04:24 | [diff] [blame] | 4051 | ['_toolset=="target" and OS=="android"', { |
| 4052 | 'cflags': [ |
| 4053 | # Avoids errors with current NDK: |
| 4054 | # "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" |
| 4055 | '-finstrument-functions-exclude-file-list=arm_neon.h', |
| 4056 | ], |
| 4057 | }], |
[email protected] | 8a6abd1 | 2012-05-16 10:04:44 | [diff] [blame] | 4058 | ], |
| 4059 | }], |
[email protected] | ce4367d | 2013-01-15 16:13:10 | [diff] [blame] | 4060 | ['linux_dump_symbols==1', { |
| 4061 | 'cflags': [ '-g' ], |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 4062 | 'conditions': [ |
[email protected] | ac29639 | 2014-04-29 01:22:10 | [diff] [blame] | 4063 | ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', { |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 4064 | 'target_conditions': [ |
| 4065 | ['_toolset=="target"', { |
| 4066 | 'ldflags': [ |
[email protected] | ac29639 | 2014-04-29 01:22:10 | [diff] [blame] | 4067 | # Attempt to use less memory to prevent the linker from |
| 4068 | # running out of address space. Considering installing a |
| 4069 | # 64-bit kernel and switching to a 64-bit linker. |
[email protected] | 567370a3 | 2013-03-01 00:11:23 | [diff] [blame] | 4070 | '-Wl,--no-keep-memory', |
[email protected] | c50c8d7 | 2012-11-15 00:29:25 | [diff] [blame] | 4071 | ], |
| 4072 | }], |
| 4073 | ], |
| 4074 | }], |
| 4075 | ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 4076 | }], |
[email protected] | 2fa89ef | 2014-05-07 18:45:59 | [diff] [blame] | 4077 | ['use_allocator!="tcmalloc"', { |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 4078 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 4079 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4080 | ['linux_use_gold_flags==1', { |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4081 | 'target_conditions': [ |
| 4082 | ['_toolset=="target"', { |
| 4083 | 'ldflags': [ |
| 4084 | # Experimentation found that using four linking threads |
| 4085 | # saved ~20% of link time. |
| 4086 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 4087 | # Only apply this to the target linker, since the host |
| 4088 | # linker might not be gold, but isn't used much anyway. |
[email protected] | 21ed97e | 2014-01-14 23:40:55 | [diff] [blame] | 4089 | # TODO(raymes): Disable threading because gold is frequently |
| 4090 | # crashing on the bots: crbug.com/161942. |
| 4091 | # '-Wl,--threads', |
| 4092 | # '-Wl,--thread-count=4', |
[email protected] | c5a6fe4 | 2013-07-21 14:03:33 | [diff] [blame] | 4093 | ], |
| 4094 | }], |
[email protected] | 68d01e8 | 2012-12-08 03:36:32 | [diff] [blame] | 4095 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4096 | 'conditions': [ |
| 4097 | ['release_valgrind_build==0', { |
| 4098 | 'target_conditions': [ |
| 4099 | ['_toolset=="target"', { |
| 4100 | 'ldflags': [ |
[email protected] | ffc4616 | 2014-01-16 12:19:49 | [diff] [blame] | 4101 | # There seems to be a conflict of --icf and -pie |
| 4102 | # in gold which can generate crashy binaries. As |
[email protected] | 3b09cec5 | 2014-05-15 00:33:41 | [diff] [blame] | 4103 | # a security measure, -pie takes precedence for |
[email protected] | ffc4616 | 2014-01-16 12:19:49 | [diff] [blame] | 4104 | # now. |
| 4105 | #'-Wl,--icf=safe', |
| 4106 | '-Wl,--icf=none', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4107 | ], |
| 4108 | }], |
| 4109 | ], |
| 4110 | }], |
[email protected] | bab9ae3 | 2014-04-11 08:05:11 | [diff] [blame] | 4111 | # Newer gcc's support -fuse-ld, use the flag to force gold |
| 4112 | # selection. |
| 4113 | # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html |
| 4114 | # TODO(mithro): Watch for clang support at following thread: |
| 4115 | # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html |
| 4116 | ['gcc_version>=48', { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 4117 | 'target_conditions': [ |
| 4118 | ['_toolset=="target"', { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 4119 | 'ldflags': [ |
| 4120 | '-fuse-ld=gold', |
| 4121 | ], |
| 4122 | }], |
[email protected] | bab9ae3 | 2014-04-11 08:05:11 | [diff] [blame] | 4123 | ], |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 4124 | }], |
| 4125 | ['host_gcc_version>=48', { |
| 4126 | 'target_conditions': [ |
| 4127 | ['_toolset=="host"', { |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 4128 | 'ldflags': [ |
| 4129 | '-fuse-ld=gold', |
| 4130 | ], |
| 4131 | }], |
[email protected] | bab9ae3 | 2014-04-11 08:05:11 | [diff] [blame] | 4132 | ], |
[email protected] | 707ad51b | 2014-04-23 08:20:16 | [diff] [blame] | 4133 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 4134 | ], |
| 4135 | }], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4136 | ['linux_use_bundled_binutils==1', { |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4137 | 'cflags': [ |
| 4138 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
| 4139 | ], |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4140 | }], |
| 4141 | ['linux_use_bundled_gold==1', { |
| 4142 | # Put our binutils, which contains gold in the search path. We pass |
| 4143 | # the path to gold to the compiler. gyp leaves unspecified what the |
| 4144 | # cwd is when running the compiler, so the normal gyp path-munging |
| 4145 | # fails us. This hack gets the right path. |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4146 | 'ldflags': [ |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4147 | '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 4148 | ], |
| 4149 | }], |
[email protected] | ebb701b7 | 2014-04-24 08:24:51 | [diff] [blame] | 4150 | # Some binutils 2.23 releases may or may not have new dtags enabled, |
| 4151 | # but they are all compatible with --disable-new-dtags, |
| 4152 | # because the new dynamic tags are not created by default. |
| 4153 | ['binutils_version>=223', { |
[email protected] | f0a5832 | 2014-04-16 09:50:23 | [diff] [blame] | 4154 | # Newer binutils don't set DT_RPATH unless you disable "new" dtags |
| 4155 | # and the new DT_RUNPATH doesn't work without --no-as-needed flag. |
| 4156 | # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags |
| 4157 | # inside this file to allow usage of --no-as-needed and removal of |
| 4158 | # this flag. |
[email protected] | 9c23369 | 2014-04-09 20:20:45 | [diff] [blame] | 4159 | 'ldflags': [ |
| 4160 | '-Wl,--disable-new-dtags', |
| 4161 | ], |
[email protected] | 6d4327bf | 2014-06-23 23:20:46 | [diff] [blame] | 4162 | }], |
| 4163 | ['gcc_version>=48', { |
| 4164 | 'target_conditions': [ |
| 4165 | ['_toolset=="target"', { |
| 4166 | 'cflags_cc': [ |
| 4167 | '-std=gnu++11', |
| 4168 | # See comment for -Wno-c++11-narrowing. |
| 4169 | '-Wno-narrowing', |
| 4170 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4171 | '-Wno-literal-suffix', |
| 4172 | ], |
| 4173 | }], |
| 4174 | ], |
| 4175 | }], |
| 4176 | ['host_gcc_version>=48', { |
| 4177 | 'target_conditions': [ |
| 4178 | ['_toolset=="host"', { |
| 4179 | 'cflags_cc': [ |
| 4180 | '-std=gnu++11', |
| 4181 | # See comment for -Wno-c++11-narrowing. |
| 4182 | '-Wno-narrowing', |
| 4183 | # TODO(thakis): Remove, http://crbug.com/263960 |
| 4184 | '-Wno-literal-suffix', |
| 4185 | ], |
| 4186 | }], |
| 4187 | ], |
| 4188 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 4189 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 4190 | }, |
| 4191 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 4192 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 4193 | # with Linux. |
| 4194 | ['OS=="freebsd"', { |
| 4195 | 'target_defaults': { |
| 4196 | 'ldflags': [ |
| 4197 | '-Wl,--no-keep-memory', |
| 4198 | ], |
| 4199 | }, |
| 4200 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4201 | # Android-specific options; note that most are set above with Linux. |
| 4202 | ['OS=="android"', { |
| 4203 | 'variables': { |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4204 | # This is a unique identifier for a given build. It's used for |
| 4205 | # identifying various build artifacts corresponding to a particular |
| 4206 | # build of chrome (e.g. where to find archived symbols). |
| 4207 | 'chrome_build_id%': '', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4208 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4209 | # Use shared stlport library when system one used. |
| 4210 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 4211 | # has to be before that in the set of libraries. |
| 4212 | ['use_system_stlport==1', { |
| 4213 | 'android_stlport_library': 'stlport', |
| 4214 | }, { |
[email protected] | 806b523 | 2012-11-19 21:19:04 | [diff] [blame] | 4215 | 'conditions': [ |
| 4216 | ['component=="shared_library"', { |
| 4217 | 'android_stlport_library': 'stlport_shared', |
| 4218 | }, { |
| 4219 | 'android_stlport_library': 'stlport_static', |
| 4220 | }], |
| 4221 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4222 | }], |
| 4223 | ], |
| 4224 | |
| 4225 | # Placing this variable here prevents from forking libvpx, used |
| 4226 | # by remoting. Remoting is off, so it needn't built, |
| 4227 | # so forking it's deps seems like overkill. |
| 4228 | # But this variable need defined to properly run gyp. |
| 4229 | # A proper solution is to have an OS==android conditional |
| 4230 | # in third_party/libvpx/libvpx.gyp to define it. |
| 4231 | 'libvpx_path': 'lib/linux/arm', |
| 4232 | }, |
| 4233 | 'target_defaults': { |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4234 | 'variables': { |
| 4235 | 'release_extra_cflags%': '', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4236 | 'conditions': [ |
| 4237 | # If we're using the components build, append "cr" to all shared |
| 4238 | # libraries to avoid naming collisions with android system library |
| 4239 | # versions with the same name (e.g. skia, icu). |
| 4240 | ['component=="shared_library"', { |
| 4241 | 'android_product_extension': 'cr.so', |
| 4242 | }, { |
| 4243 | 'android_product_extension': 'so', |
| 4244 | } ], |
| 4245 | ], |
[email protected] | 8a37e450 | 2012-08-14 22:42:55 | [diff] [blame] | 4246 | }, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4247 | 'target_conditions': [ |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4248 | ['_type=="shared_library"', { |
[email protected] | b419365 | 2014-06-09 11:33:38 | [diff] [blame] | 4249 | 'product_extension': '<(android_product_extension)', |
[email protected] | e486525 | 2013-04-04 09:15:59 | [diff] [blame] | 4250 | }], |
| 4251 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4252 | # Settings for building device targets using Android's toolchain. |
| 4253 | # These are based on the setup.mk file from the Android NDK. |
| 4254 | # |
| 4255 | # The NDK Android executable link step looks as follows: |
| 4256 | # $LDFLAGS |
| 4257 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 4258 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4259 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4260 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4261 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4262 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4263 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 4264 | # |
| 4265 | # For now the above are approximated for executables by adding |
| 4266 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 4267 | # of 'libraries'. |
| 4268 | # |
| 4269 | # The NDK Android shared library link step looks as follows: |
| 4270 | # $LDFLAGS |
| 4271 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 4272 | # -l,--whole-archive |
| 4273 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 4274 | # -l,--no-whole-archive |
| 4275 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 4276 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 4277 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 4278 | # $(PRIVATE_LDLIBS) <-- System .so |
| 4279 | # |
[email protected] | ad17e34 | 2012-07-17 20:45:48 | [diff] [blame] | 4280 | # For now, assume that whole static libraries are not needed. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4281 | # |
| 4282 | # For both executables and shared libraries, add the proper |
| 4283 | # libgcc.a to the start of libraries which puts it in the |
| 4284 | # proper spot after .o and .a files get linked in. |
| 4285 | # |
| 4286 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 4287 | # support for a custom link command line. |
| 4288 | ['_toolset=="target"', { |
| 4289 | 'cflags!': [ |
| 4290 | '-pthread', # Not supported by Android toolchain. |
| 4291 | ], |
| 4292 | 'cflags': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4293 | '-ffunction-sections', |
| 4294 | '-funwind-tables', |
| 4295 | '-g', |
| 4296 | '-fstack-protector', |
| 4297 | '-fno-short-enums', |
| 4298 | '-finline-limit=64', |
| 4299 | '-Wa,--noexecstack', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4300 | '<@(release_extra_cflags)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4301 | ], |
| 4302 | 'defines': [ |
| 4303 | 'ANDROID', |
| 4304 | '__GNU_SOURCE=1', # Necessary for clone() |
| 4305 | 'USE_STLPORT=1', |
| 4306 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
[email protected] | 2503672 | 2012-12-11 10:36:17 | [diff] [blame] | 4307 | 'CHROME_BUILD_ID="<(chrome_build_id)"', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4308 | ], |
| 4309 | 'ldflags!': [ |
| 4310 | '-pthread', # Not supported by Android toolchain. |
| 4311 | ], |
| 4312 | 'ldflags': [ |
| 4313 | '-nostdlib', |
| 4314 | '-Wl,--no-undefined', |
[email protected] | b419365 | 2014-06-09 11:33:38 | [diff] [blame] | 4315 | # Don't export symbols from statically linked libraries. |
| 4316 | '-Wl,--exclude-libs=ALL', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4317 | ], |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4318 | 'libraries': [ |
| 4319 | '-l<(android_stlport_library)', |
| 4320 | # Manually link the libgcc.a that the cross compiler uses. |
[email protected] | c0f7631 | 2012-08-16 13:52:04 | [diff] [blame] | 4321 | '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4322 | '-lc', |
| 4323 | '-ldl', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 4324 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4325 | ], |
| 4326 | 'conditions': [ |
[email protected] | b419365 | 2014-06-09 11:33:38 | [diff] [blame] | 4327 | ['component=="shared_library"', { |
| 4328 | 'ldflags!': [ |
| 4329 | '-Wl,--exclude-libs=ALL', |
| 4330 | ], |
| 4331 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4332 | ['clang==1', { |
| 4333 | 'cflags': [ |
| 4334 | # Work around incompatibilities between bionic and clang |
| 4335 | # headers. |
| 4336 | '-D__compiler_offsetof=__builtin_offsetof', |
| 4337 | '-Dnan=__builtin_nan', |
| 4338 | ], |
| 4339 | 'conditions': [ |
| 4340 | ['target_arch=="arm"', { |
| 4341 | 'cflags': [ |
| 4342 | '-target arm-linux-androideabi', |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4343 | ], |
| 4344 | 'ldflags': [ |
| 4345 | '-target arm-linux-androideabi', |
| 4346 | ], |
| 4347 | }], |
| 4348 | ['target_arch=="ia32"', { |
| 4349 | 'cflags': [ |
| 4350 | '-target x86-linux-androideabi', |
| 4351 | ], |
| 4352 | 'ldflags': [ |
| 4353 | '-target x86-linux-androideabi', |
| 4354 | ], |
| 4355 | }], |
[email protected] | be0090f2 | 2014-03-18 17:43:48 | [diff] [blame] | 4356 | # Place holder for x64 support, not tested. |
| 4357 | # TODO: Enable clang support for Android x64. http://crbug.com/346626 |
| 4358 | ['target_arch=="x64"', { |
| 4359 | 'cflags': [ |
| 4360 | '-target x86_64-linux-androideabi', |
| 4361 | ], |
| 4362 | 'ldflags': [ |
| 4363 | '-target x86_64-linux-androideabi', |
| 4364 | ], |
| 4365 | }], |
[email protected] | 220ea593 | 2012-08-09 10:44:07 | [diff] [blame] | 4366 | ], |
| 4367 | }], |
[email protected] | ed70ed186 | 2012-11-07 12:11:25 | [diff] [blame] | 4368 | ['asan==1', { |
| 4369 | 'cflags': [ |
| 4370 | # Android build relies on -Wl,--gc-sections removing |
| 4371 | # unreachable code. ASan instrumentation for globals inhibits |
| 4372 | # this and results in a library with unresolvable relocations. |
| 4373 | # TODO(eugenis): find a way to reenable this. |
| 4374 | '-mllvm -asan-globals=0', |
| 4375 | ], |
| 4376 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4377 | ['android_webview_build==0', { |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4378 | 'defines': [ |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4379 | # The NDK has these things, but doesn't define the constants |
| 4380 | # to say that it does. Define them here instead. |
| 4381 | 'HAVE_SYS_UIO_H', |
| 4382 | ], |
| 4383 | 'cflags': [ |
| 4384 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | 34baed11 | 2012-06-27 16:10:46 | [diff] [blame] | 4385 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4386 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 4387 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4388 | ], |
| 4389 | }], |
[email protected] | d999c3cb | 2013-03-12 10:22:36 | [diff] [blame] | 4390 | ['android_webview_build==1', { |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4391 | 'include_dirs': [ |
| 4392 | # OpenAL headers from the Android tree. |
| 4393 | '<(android_src)/frameworks/wilhelm/include', |
| 4394 | ], |
| 4395 | 'cflags': [ |
[email protected] | 0488213 | 2012-11-21 12:40:45 | [diff] [blame] | 4396 | # Android predefines this as 1; undefine it here so Chromium |
| 4397 | # can redefine it later to be 2 for chromium code and unset |
| 4398 | # for third party code. This works because cflags are added |
| 4399 | # before defines. |
| 4400 | '-U_FORTIFY_SOURCE', |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4401 | # Disable any additional warnings enabled by the Android build system but which |
| 4402 | # chromium does not build cleanly with (when treating warning as errors). |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4403 | # Things that are part of -Wextra: |
[email protected] | 53f93c9 | 2013-01-04 00:48:55 | [diff] [blame] | 4404 | '-Wno-extra', # Enabled by -Wextra, but no specific flag |
| 4405 | '-Wno-ignored-qualifiers', |
| 4406 | '-Wno-type-limits', |
[email protected] | 6c55f124 | 2014-02-12 16:06:56 | [diff] [blame] | 4407 | '-Wno-unused-but-set-variable', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4408 | ], |
| 4409 | 'cflags_cc': [ |
[email protected] | 2f34a20 | 2013-03-11 13:59:16 | [diff] [blame] | 4410 | # Other things unrelated to -Wextra: |
| 4411 | '-Wno-non-virtual-dtor', |
| 4412 | '-Wno-sign-promo', |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4413 | ], |
| 4414 | }], |
[email protected] | 9577be4 | 2013-11-01 15:16:30 | [diff] [blame] | 4415 | ['android_webview_build==1', { |
| 4416 | 'target_conditions': [ |
| 4417 | ['chromium_code==0', { |
| 4418 | 'cflags': [ |
| 4419 | # There is a class of warning which: |
| 4420 | # 1) Android always enables and also treats as errors |
| 4421 | # 2) Chromium ignores in third party code |
| 4422 | # So we re-enable those warnings when building Android. |
| 4423 | '-Wno-address', |
| 4424 | '-Wno-format-security', |
| 4425 | '-Wno-return-type', |
| 4426 | '-Wno-sequence-point', |
| 4427 | ], |
| 4428 | 'cflags_cc': [ |
| 4429 | '-Wno-non-virtual-dtor', |
| 4430 | ], |
| 4431 | }], |
[email protected] | 0d7291e | 2012-10-04 19:16:08 | [diff] [blame] | 4432 | ], |
| 4433 | }], |
[email protected] | febd357 | 2012-05-03 09:17:45 | [diff] [blame] | 4434 | ['target_arch == "arm"', { |
| 4435 | 'ldflags': [ |
| 4436 | # Enable identical code folding to reduce size. |
| 4437 | '-Wl,--icf=safe', |
| 4438 | ], |
| 4439 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4440 | # NOTE: The stlport header include paths below are specified in |
| 4441 | # cflags rather than include_dirs because they need to come |
| 4442 | # after include_dirs. Think of them like system headers, but |
| 4443 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 4444 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 4445 | # The include ordering here is important; change with caution. |
[email protected] | f91ba81 | 2012-07-11 00:00:51 | [diff] [blame] | 4446 | ['use_system_stlport==1', { |
| 4447 | 'cflags': [ |
| 4448 | # For libstdc++/include, which is used by stlport. |
| 4449 | '-I<(android_src)/bionic', |
| 4450 | '-I<(android_src)/external/stlport/stlport', |
| 4451 | ], |
| 4452 | }, { # else: use_system_stlport!=1 |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4453 | 'cflags': [ |
[email protected] | 4ca013ad | 2014-06-27 20:43:57 | [diff] [blame] | 4454 | '-isystem<(android_stlport_include)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4455 | ], |
[email protected] | 225ec63 | 2013-04-03 18:20:22 | [diff] [blame] | 4456 | 'ldflags': [ |
| 4457 | '-L<(android_stlport_libs_dir)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4458 | ], |
| 4459 | }], |
| 4460 | ['target_arch=="ia32"', { |
| 4461 | # The x86 toolchain currently has problems with stack-protector. |
| 4462 | 'cflags!': [ |
| 4463 | '-fstack-protector', |
| 4464 | ], |
| 4465 | 'cflags': [ |
| 4466 | '-fno-stack-protector', |
| 4467 | ], |
| 4468 | }], |
| 4469 | ], |
| 4470 | 'target_conditions': [ |
| 4471 | ['_type=="executable"', { |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4472 | # Force android tools to export the "main" symbol so they can be |
| 4473 | # loaded on ICS using the run_pie wrapper. See crbug.com/373219. |
| 4474 | # TODO(primiano): remove -fvisibility and -rdynamic flags below |
| 4475 | # when ICS support will be dropped. |
| 4476 | 'cflags': [ |
| 4477 | '-fPIE', |
| 4478 | '-fvisibility=default', |
| 4479 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4480 | 'ldflags': [ |
| 4481 | '-Bdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4482 | '-Wl,--gc-sections', |
| 4483 | '-Wl,-z,nocopyreloc', |
[email protected] | 7d2b7cf | 2014-05-14 15:15:19 | [diff] [blame] | 4484 | '-pie', |
| 4485 | '-rdynamic', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4486 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 4487 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 4488 | ], |
| 4489 | 'libraries': [ |
| 4490 | # crtend_android.o needs to be the last item in libraries. |
| 4491 | # Do not add any libraries after this! |
| 4492 | '<(android_ndk_lib)/crtend_android.o', |
| 4493 | ], |
| 4494 | }], |
[email protected] | f5c7758a | 2012-07-25 16:17:57 | [diff] [blame] | 4495 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | 7ab8b9be | 2014-06-12 17:20:42 | [diff] [blame] | 4496 | 'ldflags!': [ |
| 4497 | '-Wl,--exclude-libs=ALL', |
| 4498 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4499 | 'ldflags': [ |
| 4500 | '-Wl,-shared,-Bsymbolic', |
| 4501 | ], |
[email protected] | d093fe8b | 2013-04-30 18:00:23 | [diff] [blame] | 4502 | 'conditions': [ |
| 4503 | ['android_webview_build==0', { |
| 4504 | 'ldflags': [ |
| 4505 | # crtbegin_so.o should be the last item in ldflags. |
| 4506 | '<(android_ndk_lib)/crtbegin_so.o', |
| 4507 | ], |
| 4508 | 'libraries': [ |
| 4509 | # crtend_so.o needs to be the last item in libraries. |
| 4510 | # Do not add any libraries after this! |
| 4511 | '<(android_ndk_lib)/crtend_so.o', |
| 4512 | ], |
| 4513 | }], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 4514 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4515 | }], |
| 4516 | ], |
| 4517 | }], |
| 4518 | # Settings for building host targets using the system toolchain. |
| 4519 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4520 | 'cflags!': [ |
| 4521 | # Due to issues in Clang build system, using ASan on 32-bit |
| 4522 | # binaries on x86_64 host is problematic. |
| 4523 | # TODO(eugenis): re-enable. |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4524 | '-fsanitize=address', |
| 4525 | '-w', # http://crbug.com/162783 |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 4526 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4527 | 'ldflags!': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4528 | '-fsanitize=address', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4529 | '-Wl,-z,noexecstack', |
| 4530 | '-Wl,--gc-sections', |
| 4531 | '-Wl,-O1', |
| 4532 | '-Wl,--as-needed', |
[email protected] | df24071 | 2013-09-02 23:17:22 | [diff] [blame] | 4533 | '-Wl,--warn-shared-textrel', |
| 4534 | '-Wl,--fatal-warnings', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4535 | ], |
| 4536 | }], |
[email protected] | 0ccf578f | 2013-03-13 11:13:39 | [diff] [blame] | 4537 | # Settings for building host targets on mac. |
| 4538 | ['_toolset=="host" and host_os=="mac"', { |
| 4539 | 'ldflags!': [ |
| 4540 | '-Wl,-z,now', |
| 4541 | '-Wl,-z,relro', |
| 4542 | ], |
| 4543 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 4544 | ], |
| 4545 | }, |
| 4546 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 4547 | ['OS=="solaris"', { |
| 4548 | 'cflags!': ['-fvisibility=hidden'], |
| 4549 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 4550 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4551 | ['OS=="mac" or OS=="ios"', { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4552 | 'target_defaults': { |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 4553 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4554 | 'xcode_settings': { |
| 4555 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | 2429bb73 | 2012-10-19 00:24:24 | [diff] [blame] | 4556 | # Don't link in libarclite_macosx.a, see http://crbug.com/156530. |
| 4557 | 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime |
[email protected] | 47c3e85 | 2013-09-13 02:22:31 | [diff] [blame] | 4558 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4559 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 4560 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4561 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 4562 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 4563 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 4564 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 4565 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4566 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 4567 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 4568 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 4569 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4570 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 4571 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4572 | 'USE_HEADERMAP': 'NO', |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 4573 | 'WARNING_CFLAGS': [ |
| 4574 | '-Wall', |
| 4575 | '-Wendif-labels', |
| 4576 | '-Wextra', |
| 4577 | # Don't warn about unused function parameters. |
| 4578 | '-Wno-unused-parameter', |
| 4579 | # Don't warn about the "struct foo f = {0};" initialization |
| 4580 | # pattern. |
| 4581 | '-Wno-missing-field-initializers', |
| 4582 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4583 | 'conditions': [ |
| 4584 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 4585 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 4586 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4587 | # Note that the prebuilt Clang binaries should not be used for iOS |
| 4588 | # development except for ASan builds. |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4589 | ['clang==1', { |
[email protected] | 9e0756c | 2013-09-01 01:37:02 | [diff] [blame] | 4590 | # gnu++11 instead of c++11 is needed because some code uses |
| 4591 | # typeof() (a GNU extension). |
| 4592 | # TODO(thakis): Eventually switch this to c++11 instead of |
| 4593 | # gnu++11 (once typeof can be removed, which is blocked on c++11 |
| 4594 | # being available everywhere). |
| 4595 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11 |
[email protected] | 3e893e0c | 2012-11-16 16:58:44 | [diff] [blame] | 4596 | # Warn if automatic synthesis is triggered with |
| 4597 | # the -Wobjc-missing-property-synthesis flag. |
[email protected] | aae0e59 | 2012-11-15 00:25:53 | [diff] [blame] | 4598 | 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4599 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4600 | 'WARNING_CFLAGS': [ |
[email protected] | 7f8d486f | 2011-04-05 19:49:07 | [diff] [blame] | 4601 | '-Wheader-hygiene', |
[email protected] | c67e8ca | 2012-12-04 16:01:52 | [diff] [blame] | 4602 | |
| 4603 | # This warns on using ints as initializers for floats in |
| 4604 | # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), |
| 4605 | # which happens in several places in chrome code. Not sure if |
| 4606 | # this is worth fixing. |
| 4607 | '-Wno-c++11-narrowing', |
| 4608 | |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4609 | # Don't die on dtoa code that uses a char as an array index. |
| 4610 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 4611 | '-Wno-char-subscripts', |
[email protected] | 8dec02e | 2013-04-30 21:40:07 | [diff] [blame] | 4612 | |
[email protected] | a6aef30 | 2013-11-09 04:18:21 | [diff] [blame] | 4613 | # TODO(thakis): This used to be implied by -Wno-unused-function, |
| 4614 | # which we no longer use. Check if it makes sense to remove |
| 4615 | # this as well. http://crbug.com/316352 |
| 4616 | '-Wno-unneeded-internal-declaration', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 4617 | |
| 4618 | # Warns on switches on enums that cover all enum values but |
| 4619 | # also contain a default: branch. Chrome is full of that. |
| 4620 | '-Wno-covered-switch-default', |
[email protected] | e6844cb | 2013-02-22 03:37:51 | [diff] [blame] | 4621 | |
| 4622 | # Warns when a const char[] is converted to bool. |
| 4623 | '-Wstring-conversion', |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 4624 | |
| 4625 | # Clang considers the `register` keyword as deprecated, but |
| 4626 | # e.g. code generated by flex (used in angle) contains that |
| 4627 | # keyword. http://crbug.com/255186 |
| 4628 | '-Wno-deprecated-register', |
[email protected] | dcd0b95 | 2014-03-26 00:14:35 | [diff] [blame] | 4629 | |
[email protected] | bb14819 | 2014-04-02 03:37:33 | [diff] [blame] | 4630 | # This warns on selectors from Cocoa headers (-length, -set). |
| 4631 | # cfe-dev is currently discussing the merits of this warning. |
| 4632 | # TODO(thakis): Reevaluate what to do with this, based one |
| 4633 | # cfe-dev discussion. |
| 4634 | '-Wno-selector-type-mismatch', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4635 | ], |
[email protected] | 361b47c | 2013-07-02 15:13:24 | [diff] [blame] | 4636 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4637 | 'conditions': [ |
| 4638 | ['clang_xcode==0', { |
| 4639 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 4640 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4641 | }], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 4642 | ], |
| 4643 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4644 | ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4645 | 'OTHER_CFLAGS': [ |
[email protected] | c872dc5 | 2012-05-19 06:36:31 | [diff] [blame] | 4646 | '<@(clang_chrome_plugins_flags)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 4647 | ], |
| 4648 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4649 | ['clang==1 and clang_xcode==0 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4650 | 'OTHER_CFLAGS': [ |
| 4651 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4652 | ], |
| 4653 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4654 | ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 4655 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 4656 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 4657 | ], |
| 4658 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 4659 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 4660 | 'OTHER_CFLAGS': [ |
| 4661 | # See http://crbug.com/110262 |
| 4662 | '-fcolor-diagnostics', |
| 4663 | ], |
| 4664 | }], |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4665 | ['OS=="ios" and target_subarch!="arm32" and \ |
[email protected] | 7e0fe491 | 2014-04-09 20:53:00 | [diff] [blame] | 4666 | "<(GENERATOR)"=="xcode"', { |
[email protected] | 9127407 | 2014-04-03 01:49:49 | [diff] [blame] | 4667 | 'OTHER_CFLAGS': [ |
| 4668 | # TODO(ios): when building Chrome for iOS on 64-bit platform |
| 4669 | # with Xcode, the -Wshorted-64-to-32 warning is automatically |
| 4670 | # enabled. This cause failures when compiling protobuf code, |
| 4671 | # so disable the warning. http://crbug.com/359107 |
| 4672 | '-Wno-shorten-64-to-32', |
| 4673 | ], |
| 4674 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 4675 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4676 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4677 | 'conditions': [ |
| 4678 | ['clang==1', { |
| 4679 | 'variables': { |
| 4680 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 4681 | }, |
| 4682 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4683 | ['asan==1', { |
| 4684 | 'xcode_settings': { |
| 4685 | 'OTHER_CFLAGS': [ |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4686 | '-fsanitize=address', |
[email protected] | 22df2b2 | 2014-03-13 10:55:07 | [diff] [blame] | 4687 | '-mllvm -asan-globals=0', # http://crbug.com/352073 |
[email protected] | 48688df0 | 2012-11-27 21:04:56 | [diff] [blame] | 4688 | '-w', # http://crbug.com/162783 |
[email protected] | 14a3735 | 2014-05-16 11:39:55 | [diff] [blame] | 4689 | '-gline-tables-only', |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4690 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4691 | }, |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 4692 | }], |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4693 | ['asan_coverage!=0', { |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4694 | 'target_conditions': [ |
| 4695 | ['_toolset=="target"', { |
| 4696 | 'cflags': [ |
[email protected] | 544a18ed | 2014-01-17 21:01:36 | [diff] [blame] | 4697 | '-mllvm -asan-coverage=<(asan_coverage)', |
[email protected] | 20a127f | 2014-01-16 03:25:03 | [diff] [blame] | 4698 | ], |
| 4699 | }], |
| 4700 | ], |
| 4701 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 4702 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4703 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 4704 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4705 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4706 | 'conditions': [ |
| 4707 | ['asan==1', { |
| 4708 | 'xcode_settings': { |
| 4709 | 'OTHER_LDFLAGS': [ |
[email protected] | 2e82fa5 | 2012-11-27 23:41:44 | [diff] [blame] | 4710 | '-fsanitize=address', |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4711 | ], |
| 4712 | }, |
| 4713 | }], |
[email protected] | c9cc944 | 2013-12-28 21:27:44 | [diff] [blame] | 4714 | ['mac_write_linker_maps==1', { |
| 4715 | 'xcode_settings': { |
| 4716 | 'OTHER_LDFLAGS': [ |
| 4717 | '-Wl,-map,>(_target_name).map', |
| 4718 | ], |
| 4719 | }, |
| 4720 | }], |
[email protected] | 4281a4e | 2012-08-24 19:05:08 | [diff] [blame] | 4721 | ], |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 4722 | }], |
| 4723 | ['_mac_bundle', { |
| 4724 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 5ec8c96 | 2013-03-12 11:56:31 | [diff] [blame] | 4725 | 'target_conditions': [ |
| 4726 | ['_type=="executable"', { |
| 4727 | 'conditions': [ |
| 4728 | ['asan==1', { |
| 4729 | 'postbuilds': [ |
| 4730 | { |
| 4731 | 'variables': { |
| 4732 | # Define copy_asan_dylib_path in a variable ending in |
| 4733 | # _path so that gyp understands it's a path and |
| 4734 | # performs proper relativization during dict merging. |
| 4735 | 'copy_asan_dylib_path': |
| 4736 | 'mac/copy_asan_runtime_dylib.sh', |
| 4737 | }, |
| 4738 | 'postbuild_name': 'Copy ASan runtime dylib', |
| 4739 | 'action': [ |
| 4740 | '<(copy_asan_dylib_path)', |
| 4741 | ], |
| 4742 | }, |
| 4743 | ], |
| 4744 | }], |
| 4745 | ], |
| 4746 | }], |
| 4747 | ], |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 4748 | }], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4749 | ], # target_conditions |
| 4750 | }, # target_defaults |
| 4751 | }], # OS=="mac" or OS=="ios" |
| 4752 | ['OS=="mac"', { |
| 4753 | 'target_defaults': { |
[email protected] | eea7d33 | 2014-05-16 11:43:08 | [diff] [blame] | 4754 | 'defines': [ |
| 4755 | # Prevent Mac OS X AssertMacros.h from defining macros that collide |
| 4756 | # with common names, like 'check', 'require', and 'verify'. |
| 4757 | # (Included by system header. Also exists on iOS but not included.) |
| 4758 | # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h |
| 4759 | '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', |
| 4760 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4761 | 'variables': { |
| 4762 | # These should end with %, but there seems to be a bug with % in |
| 4763 | # variables that are intended to be set to different values in |
| 4764 | # different targets, like these. |
| 4765 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4766 | # Strip debugging symbols from the target. |
| 4767 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4768 | 'conditions': [ |
| 4769 | ['asan==1', { |
| 4770 | 'conditions': [ |
| 4771 | ['mac_want_real_dsym=="default"', { |
[email protected] | 97ab1fa | 2012-12-24 10:50:35 | [diff] [blame] | 4772 | 'mac_real_dsym': 1, |
[email protected] | 970fd4e | 2012-12-19 11:09:37 | [diff] [blame] | 4773 | }, { |
| 4774 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4775 | }], |
| 4776 | ], |
| 4777 | }, { |
| 4778 | 'conditions': [ |
| 4779 | ['mac_want_real_dsym=="default"', { |
| 4780 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 4781 | }, { |
| 4782 | 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 4783 | }], |
| 4784 | ], |
| 4785 | }], |
| 4786 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4787 | }, |
| 4788 | 'xcode_settings': { |
| 4789 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 4790 | # (Equivalent to -fPIC) |
| 4791 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 4792 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
| 4793 | # Keep pch files below xcodebuild/. |
| 4794 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
[email protected] | 6211f62 | 2013-07-29 23:35:39 | [diff] [blame] | 4795 | 'OTHER_CFLAGS': [ |
| 4796 | # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
| 4797 | # xcode_setting, but not until all downstream projects' mac bots are |
| 4798 | # using xcode >= 4.6, because that's when the default value of the |
| 4799 | # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
| 4800 | # setting is a no-op as far as xcode is concerned, but the compiler |
| 4801 | # behaves differently based on whether -fno-strict-aliasing is |
| 4802 | # specified or not. |
| 4803 | '-fno-strict-aliasing', # See http://crbug.com/32204. |
| 4804 | ], |
[email protected] | 2936b8c | 2012-10-29 10:57:31 | [diff] [blame] | 4805 | }, |
| 4806 | 'target_conditions': [ |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4807 | ['_type=="executable"', { |
| 4808 | 'postbuilds': [ |
| 4809 | { |
| 4810 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4811 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 4812 | # ensures that the position-independent executable (PIE) bit |
| 4813 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4814 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4815 | # Define change_mach_o_flags in a variable ending in _path |
| 4816 | # so that GYP understands it's a path and performs proper |
| 4817 | # relativization during dict merging. |
| 4818 | 'change_mach_o_flags_path': |
| 4819 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4820 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4821 | ], |
| 4822 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4823 | ['mac_pie==0 or release_valgrind_build==1', { |
| 4824 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 4825 | # the target specifies mac_pie=0 or if building for |
| 4826 | # Valgrind, because Valgrind doesn't understand slide. |
| 4827 | # See the similar mac_pie/release_valgrind_build check |
| 4828 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4829 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4830 | '--no-pie', |
| 4831 | ], |
| 4832 | }], |
| 4833 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4834 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4835 | 'postbuild_name': 'Change Mach-O Flags', |
| 4836 | 'action': [ |
| 4837 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 4838 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 4839 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 4840 | }, |
| 4841 | ], |
[email protected] | 57db18a | 2014-05-28 18:48:29 | [diff] [blame] | 4842 | 'conditions': [ |
| 4843 | ['asan==1', { |
| 4844 | 'variables': { |
| 4845 | 'asan_saves_file': 'asan.saves', |
| 4846 | }, |
| 4847 | 'xcode_settings': { |
| 4848 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
| 4849 | }, |
| 4850 | }], |
| 4851 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 4852 | 'target_conditions': [ |
| 4853 | ['mac_pie==1 and release_valgrind_build==0', { |
| 4854 | # Turn on position-independence (ASLR) for executables. When |
| 4855 | # PIE is on for the Chrome executables, the framework will |
| 4856 | # also be subject to ASLR. |
| 4857 | # Don't do this when building for Valgrind, because Valgrind |
| 4858 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 4859 | # understand slide, and get rid of the Valgrind check. |
| 4860 | 'xcode_settings': { |
| 4861 | 'OTHER_LDFLAGS': [ |
| 4862 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 4863 | ], |
| 4864 | }, |
| 4865 | }], |
| 4866 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 4867 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4868 | ['(_type=="executable" or _type=="shared_library" or \ |
| 4869 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4870 | 'target_conditions': [ |
| 4871 | ['mac_real_dsym == 1', { |
| 4872 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 4873 | # debug information format to dwarf-with-dsym. Since |
| 4874 | # strip_from_xcode will not be used, set Xcode to do the |
| 4875 | # stripping as well. |
| 4876 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 4877 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4878 | 'xcode_settings': { |
| 4879 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 4880 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4881 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4882 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 4883 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4884 | # The Xcode default is to strip debugging symbols |
| 4885 | # only (-S). Local symbols should be stripped as |
| 4886 | # well, which will be handled by -x. Xcode will |
| 4887 | # continue to insert -S when stripping even when |
| 4888 | # additional flags are added with STRIPFLAGS. |
| 4889 | 'STRIPFLAGS': '-x', |
[email protected] | ed7e8369 | 2012-12-24 10:13:40 | [diff] [blame] | 4890 | }], # _type=="shared_library" or _type=="loadable_module" |
[email protected] | 57db18a | 2014-05-28 18:48:29 | [diff] [blame] | 4891 | ['_type=="executable"', { |
| 4892 | 'conditions': [ |
| 4893 | ['asan==1', { |
| 4894 | 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', |
| 4895 | }] |
| 4896 | ], |
| 4897 | }], # _type=="executable" and asan==1 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4898 | ], # target_conditions |
| 4899 | }, # xcode_settings |
| 4900 | }, # configuration "Release" |
| 4901 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 4902 | }, { # mac_real_dsym != 1 |
| 4903 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 4904 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 4905 | # only operates in the Release configuration. |
| 4906 | 'postbuilds': [ |
| 4907 | { |
| 4908 | 'variables': { |
| 4909 | # Define strip_from_xcode in a variable ending in _path |
| 4910 | # so that gyp understands it's a path and performs proper |
| 4911 | # relativization during dict merging. |
| 4912 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 4913 | }, |
| 4914 | 'postbuild_name': 'Strip If Needed', |
| 4915 | 'action': ['<(strip_from_xcode_path)'], |
| 4916 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4917 | ], # postbuilds |
| 4918 | }], # mac_real_dsym |
| 4919 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 4920 | }], # (_type=="executable" or _type=="shared_library" or |
| 4921 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 4922 | ], # target_conditions |
| 4923 | }, # target_defaults |
| 4924 | }], # OS=="mac" |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4925 | ['OS=="ios"', { |
| 4926 | 'target_defaults': { |
| 4927 | 'xcode_settings' : { |
[email protected] | e31ef5b | 2013-05-21 11:08:49 | [diff] [blame] | 4928 | # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang |
| 4929 | # section above). |
| 4930 | 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4931 | |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4932 | 'conditions': [ |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 4933 | # Older Xcodes do not support -Wno-deprecated-register, so pass an |
| 4934 | # additional flag to suppress the "unknown compiler option" error. |
| 4935 | # Restrict this flag to builds that are either compiling with Xcode |
| 4936 | # or compiling with Xcode's Clang. This will allow Ninja builds to |
| 4937 | # continue failing on unknown compiler options. |
| 4938 | # TODO(rohitrao): This flag is temporary and should be removed as |
| 4939 | # soon as the iOS bots are updated to use Xcode 5.1. |
[email protected] | d04384ab | 2014-03-13 20:46:01 | [diff] [blame] | 4940 | ['clang_xcode==1', { |
[email protected] | fe32927 | 2014-03-12 19:06:57 | [diff] [blame] | 4941 | 'WARNING_CFLAGS': [ |
| 4942 | '-Wno-unknown-warning-option', |
| 4943 | ], |
| 4944 | }], |
| 4945 | |
| 4946 | # Limit the valid architectures depending on "target_subarch". |
| 4947 | # This need to include the "arm" architectures but also the "x86" |
| 4948 | # ones (they are used when building for the simulator). |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4949 | ['target_subarch=="arm32"', { |
| 4950 | 'VALID_ARCHS': ['armv7', 'i386'], |
| 4951 | }], |
| 4952 | ['target_subarch=="arm64"', { |
| 4953 | 'VALID_ARCHS': ['arm64', 'x86_64'], |
| 4954 | }], |
| 4955 | ['target_subarch=="both"', { |
| 4956 | 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'], |
| 4957 | }], |
| 4958 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4959 | }, |
| 4960 | 'target_conditions': [ |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4961 | ['_toolset=="host"', { |
| 4962 | 'xcode_settings': { |
| 4963 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 4964 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4965 | 'VALID_ARCHS': [ |
| 4966 | 'x86_64', |
| 4967 | ], |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4968 | 'ARCHS': [ |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4969 | 'x86_64', |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4970 | ], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4971 | }, |
| 4972 | }], |
| 4973 | ['_toolset=="target"', { |
| 4974 | 'xcode_settings': { |
| 4975 | # This section should be for overriding host settings. But, |
| 4976 | # since we can't negate the iphone deployment target above, we |
| 4977 | # instead set it here for target only. |
| 4978 | 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 4979 | 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'], |
[email protected] | 296bc45 | 2013-05-13 21:29:47 | [diff] [blame] | 4980 | }, |
| 4981 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4982 | ['_type=="executable"', { |
| 4983 | 'configurations': { |
| 4984 | 'Release_Base': { |
| 4985 | 'xcode_settings': { |
| 4986 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 4987 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
| 4988 | }, |
| 4989 | }, |
[email protected] | 3c6aa86 | 2012-11-05 17:11:44 | [diff] [blame] | 4990 | 'Debug_Base': { |
| 4991 | 'xcode_settings': { |
| 4992 | # Remove dSYM to reduce build time. |
| 4993 | 'DEBUG_INFORMATION_FORMAT': 'dwarf', |
| 4994 | }, |
| 4995 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 4996 | }, |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 4997 | 'xcode_settings': { |
| 4998 | 'conditions': [ |
| 4999 | ['chromium_ios_signing', { |
| 5000 | # iOS SDK wants everything for device signed. |
| 5001 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 5002 | }, { |
| 5003 | 'CODE_SIGNING_REQUIRED': 'NO', |
| 5004 | 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 5005 | }], |
| 5006 | ], |
| 5007 | }, |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5008 | }], |
| 5009 | ], # target_conditions |
| 5010 | }, # target_defaults |
| 5011 | }], # OS=="ios" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5012 | ['OS=="win"', { |
| 5013 | 'target_defaults': { |
| 5014 | 'defines': [ |
[email protected] | 8e345da | 2012-07-01 22:10:30 | [diff] [blame] | 5015 | '_WIN32_WINNT=0x0602', |
| 5016 | 'WINVER=0x0602', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5017 | 'WIN32', |
| 5018 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5019 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 5020 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5021 | '_CRT_RAND_S', |
| 5022 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 5023 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 5024 | '_ATL_NO_OPENGL', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5025 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5026 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5027 | ['buildtype=="Official"', { |
| 5028 | # In official builds, targets can self-select an optimization |
| 5029 | # level by defining a variable named 'optimize', and setting it |
| 5030 | # to one of |
| 5031 | # - "size", optimizes for minimal code size - the default. |
| 5032 | # - "speed", optimizes for speed over code size. |
| 5033 | # - "max", whole program optimization and link-time code |
| 5034 | # generation. This is very expensive and should be used |
| 5035 | # sparingly. |
| 5036 | 'variables': { |
| 5037 | 'optimize%': 'size', |
| 5038 | }, |
[email protected] | 7258906 | 2014-03-14 16:48:30 | [diff] [blame] | 5039 | 'msvs_settings': { |
| 5040 | 'VCLinkerTool': { |
| 5041 | # Set /LTCG for the official builds. |
| 5042 | 'LinkTimeCodeGeneration': '1', |
| 5043 | }, |
| 5044 | }, |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5045 | 'target_conditions': [ |
| 5046 | ['optimize=="size"', { |
| 5047 | 'msvs_settings': { |
| 5048 | 'VCCLCompilerTool': { |
| 5049 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 5050 | 'Optimization': '1', |
| 5051 | # 2, favorSize - Favor small code (/Os) |
| 5052 | 'FavorSizeOrSpeed': '2', |
| 5053 | }, |
| 5054 | }, |
| 5055 | }, |
| 5056 | ], |
| 5057 | ['optimize=="speed"', { |
| 5058 | 'msvs_settings': { |
| 5059 | 'VCCLCompilerTool': { |
| 5060 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5061 | 'Optimization': '2', |
| 5062 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5063 | 'FavorSizeOrSpeed': '1', |
| 5064 | }, |
| 5065 | }, |
| 5066 | }, |
| 5067 | ], |
| 5068 | ['optimize=="max"', { |
[email protected] | cb875c0 | 2014-06-12 18:06:31 | [diff] [blame] | 5069 | # Disable Warning 4702 ("Unreachable code") for the WPO/PGO |
| 5070 | # builds. Probably anything that this would catch that |
| 5071 | # wouldn't be caught in a normal build isn't going to |
| 5072 | # actually be a bug, so the incremental value of C4702 for |
| 5073 | # PGO builds is likely very small. |
| 5074 | 'msvs_disabled_warnings': [ |
| 5075 | 4702 |
| 5076 | ], |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 5077 | 'msvs_settings': { |
| 5078 | 'VCCLCompilerTool': { |
| 5079 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 5080 | 'Optimization': '2', |
| 5081 | # 1, favorSpeed - Favor fast code (/Ot) |
| 5082 | 'FavorSizeOrSpeed': '1', |
| 5083 | # This implies link time code generation. |
| 5084 | 'WholeProgramOptimization': 'true', |
| 5085 | }, |
| 5086 | }, |
| 5087 | }, |
| 5088 | ], |
| 5089 | ], |
| 5090 | }, |
| 5091 | ], |
[email protected] | 0ecd06f | 2014-05-23 22:11:03 | [diff] [blame] | 5092 | ['component=="static_library"', { |
| 5093 | 'defines': [ |
| 5094 | '_HAS_EXCEPTIONS=0', |
| 5095 | ], |
| 5096 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 5097 | ['secure_atl', { |
| 5098 | 'defines': [ |
| 5099 | '_SECURE_ATL', |
| 5100 | ], |
| 5101 | }], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 5102 | ['msvs_express', { |
| 5103 | 'configurations': { |
| 5104 | 'x86_Base': { |
| 5105 | 'msvs_settings': { |
| 5106 | 'VCLinkerTool': { |
| 5107 | 'AdditionalLibraryDirectories': |
| 5108 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 5109 | }, |
| 5110 | 'VCLibrarianTool': { |
| 5111 | 'AdditionalLibraryDirectories': |
| 5112 | ['<(windows_driver_kit_path)/lib/ATL/i386'], |
| 5113 | }, |
| 5114 | }, |
| 5115 | }, |
| 5116 | 'x64_Base': { |
| 5117 | 'msvs_settings': { |
| 5118 | 'VCLibrarianTool': { |
| 5119 | 'AdditionalLibraryDirectories': |
| 5120 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 5121 | }, |
| 5122 | 'VCLinkerTool': { |
| 5123 | 'AdditionalLibraryDirectories': |
| 5124 | ['<(windows_driver_kit_path)/lib/ATL/amd64'], |
| 5125 | }, |
| 5126 | }, |
| 5127 | }, |
| 5128 | }, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5129 | # https://code.google.com/p/chromium/issues/detail?id=372451#c20 |
| 5130 | # Warning 4702 ("Unreachable code") should be re-enabled once |
| 5131 | # Express users are updated to VS2013 Update 2. |
| 5132 | 'msvs_disabled_warnings': [ |
| 5133 | 4702 |
| 5134 | ], |
[email protected] | 54184ce7 | 2012-10-18 07:11:26 | [diff] [blame] | 5135 | 'msvs_settings': { |
| 5136 | 'VCLinkerTool': { |
| 5137 | # Explicitly required when using the ATL with express |
| 5138 | 'AdditionalDependencies': ['atlthunk.lib'], |
| 5139 | |
| 5140 | # ATL 8.0 included in WDK 7.1 makes the linker to generate |
| 5141 | # almost eight hundred LNK4254 and LNK4078 warnings: |
| 5142 | # - warning LNK4254: section 'ATL' (50000040) merged into |
| 5143 | # '.rdata' (40000040) with different attributes |
| 5144 | # - warning LNK4078: multiple 'ATL' sections found with |
| 5145 | # different attributes |
| 5146 | 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
| 5147 | }, |
| 5148 | }, |
| 5149 | 'msvs_system_include_dirs': [ |
| 5150 | '<(windows_driver_kit_path)/inc/atl71', |
| 5151 | '<(windows_driver_kit_path)/inc/mfc42', |
| 5152 | ], |
[email protected] | 3f3f45f | 2013-10-28 19:30:43 | [diff] [blame] | 5153 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5154 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 5155 | 'msvs_system_include_dirs': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5156 | '<(windows_sdk_path)/Include/shared', |
| 5157 | '<(windows_sdk_path)/Include/um', |
| 5158 | '<(windows_sdk_path)/Include/winrt', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5159 | '$(VSInstallDir)/VC/atlmfc/include', |
| 5160 | ], |
[email protected] | bab6e23 | 2013-11-27 22:52:39 | [diff] [blame] | 5161 | 'msvs_cygwin_shell': 0, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5162 | 'msvs_disabled_warnings': [ |
| 5163 | 4351, 4355, 4396, 4503, 4819, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5164 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 5165 | # removed as code is fixed. |
| 5166 | 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
[email protected] | 0a42e900 | 2014-05-24 02:35:26 | [diff] [blame] | 5167 | 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4706, |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5168 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5169 | 'msvs_settings': { |
| 5170 | 'VCCLCompilerTool': { |
[email protected] | e9b96bb | 2012-09-07 01:10:44 | [diff] [blame] | 5171 | 'AdditionalOptions': ['/MP'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5172 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5173 | 'BufferSecurityCheck': 'true', |
| 5174 | 'EnableFunctionLevelLinking': 'true', |
| 5175 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 5176 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5177 | 'WarnAsError': 'true', |
| 5178 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 5179 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 5180 | ['component=="shared_library"', { |
| 5181 | 'ExceptionHandling': '1', # /EHsc |
| 5182 | }, { |
| 5183 | 'ExceptionHandling': '0', |
| 5184 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 5185 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5186 | }, |
| 5187 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5188 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5189 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5190 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5191 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5192 | }, |
| 5193 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5194 | 'AdditionalDependencies': [ |
| 5195 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 5196 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5197 | 'version.lib', |
| 5198 | 'msimg32.lib', |
| 5199 | 'ws2_32.lib', |
| 5200 | 'usp10.lib', |
| 5201 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 5202 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 5203 | 'winmm.lib', |
| 5204 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5205 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5206 | 'AdditionalLibraryDirectories': [ |
[email protected] | 1ab4803 | 2012-07-02 21:48:05 | [diff] [blame] | 5207 | '<(windows_sdk_path)/Lib/win8/um/x86', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 5208 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5209 | 'GenerateDebugInformation': 'true', |
| 5210 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 5211 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5212 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 5213 | # SubSystem values: |
| 5214 | # 0 == not set |
| 5215 | # 1 == /SUBSYSTEM:CONSOLE |
| 5216 | # 2 == /SUBSYSTEM:WINDOWS |
| 5217 | # Most of the executables we'll ever create are tests |
| 5218 | # and utilities with console output. |
| 5219 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5220 | }, |
| 5221 | 'VCMIDLTool': { |
| 5222 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5223 | 'TypeLibraryName': '$(InputName).tlb', |
| 5224 | 'OutputDirectory': '$(IntDir)', |
| 5225 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 5226 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 5227 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 5228 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5229 | }, |
| 5230 | 'VCResourceCompilerTool': { |
| 5231 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 5232 | 'AdditionalIncludeDirectories': [ |
| 5233 | '<(DEPTH)', |
| 5234 | '<(SHARED_INTERMEDIATE_DIR)', |
| 5235 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5236 | }, |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5237 | 'target_conditions': [ |
[email protected] | 2b52f99 | 2014-02-26 19:09:47 | [diff] [blame] | 5238 | ['_type=="executable"', { |
| 5239 | 'VCManifestTool': { |
| 5240 | 'EmbedManifest': 'true', |
| 5241 | }, |
| 5242 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5243 | ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', { |
| 5244 | 'VCManifestTool': { |
| 5245 | 'AdditionalManifestFiles': [ |
| 5246 | '>(win_exe_compatibility_manifest)', |
| 5247 | ], |
| 5248 | }, |
| 5249 | }], |
[email protected] | 5d60b0b | 2013-07-30 20:24:30 | [diff] [blame] | 5250 | ], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5251 | 'conditions': [ |
| 5252 | ['clang==1', { |
| 5253 | # Building with Clang on Windows is a work in progress and very |
| 5254 | # experimental. See crbug.com/82385. |
| 5255 | 'VCCLCompilerTool': { |
| 5256 | 'WarnAsError': 'false', |
| 5257 | 'RuntimeTypeInfo': 'false', |
| 5258 | 'AdditionalOptions': [ |
[email protected] | 49ee7ef | 2014-04-12 03:07:46 | [diff] [blame] | 5259 | '-fmsc-version=1800', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5260 | '/fallback', |
| 5261 | |
| 5262 | # Many files use intrinsics without including this header. |
| 5263 | # TODO(hans): Fix those files, or move this to sub-GYPs. |
| 5264 | '/FIIntrin.h', |
| 5265 | |
| 5266 | # TODO(hans): Make this list shorter eventually. |
| 5267 | '-Qunused-arguments', |
| 5268 | '-Wno-c++11-compat-deprecated-writable-strings', |
| 5269 | '-Wno-char-subscripts', |
| 5270 | '-Wno-deprecated-declarations', |
| 5271 | '-Wno-deprecated-register', |
| 5272 | '-Wno-empty-body', |
| 5273 | '-Wno-enum-conversion', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5274 | '-Wno-extra-tokens', |
| 5275 | '-Wno-ignored-attributes', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5276 | '-Wno-incompatible-pointer-types', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5277 | '-Wno-int-to-void-pointer-cast', |
| 5278 | '-Wno-invalid-noreturn', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5279 | '-Wno-logical-op-parentheses', |
| 5280 | '-Wno-microsoft', |
| 5281 | '-Wno-missing-braces', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5282 | '-Wno-missing-declarations', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5283 | '-Wno-msvc-include', |
| 5284 | '-Wno-null-dereference', |
| 5285 | '-Wno-overloaded-virtual', |
| 5286 | '-Wno-parentheses', |
| 5287 | '-Wno-pointer-sign', |
| 5288 | '-Wno-reorder', |
| 5289 | '-Wno-return-type-c-linkage', |
| 5290 | '-Wno-self-assign', |
[email protected] | 609d1c0 | 2014-02-11 02:05:13 | [diff] [blame] | 5291 | '-Wno-sometimes-uninitialized', |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5292 | '-Wno-switch', |
| 5293 | '-Wno-tautological-compare', |
| 5294 | '-Wno-unknown-pragmas', |
| 5295 | '-Wno-unsequenced', |
| 5296 | '-Wno-unused-function', |
| 5297 | '-Wno-unused-private-field', |
| 5298 | '-Wno-unused-value', |
| 5299 | '-Wno-unused-variable', |
| 5300 | '-ferror-limit=1', |
| 5301 | ], |
| 5302 | }, |
| 5303 | }], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5304 | ['asan==1', { |
| 5305 | # ASan on Windows is a work in progress and very experimental. |
| 5306 | # See crbug.com/345874. |
| 5307 | 'VCCLCompilerTool': { |
| 5308 | 'AdditionalOptions': [ |
| 5309 | '-fsanitize=address', |
| 5310 | ], |
[email protected] | 4c1abdb | 2014-05-16 17:03:57 | [diff] [blame] | 5311 | 'AdditionalIncludeDirectories': [ |
| 5312 | # MSVC needs to be able to find the sanitizer headers when |
| 5313 | # invoked via /fallback. This is critical for using macros |
| 5314 | # like ASAN_UNPOISON_MEMORY_REGION in files where we fall |
| 5315 | # back. |
| 5316 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/include_sanitizer', |
| 5317 | ], |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5318 | }, |
| 5319 | 'VCLinkerTool': { |
| 5320 | 'AdditionalLibraryDirectories': [ |
| 5321 | # TODO(hans): If make_clang_dir is absolute, this breaks. |
[email protected] | fd9ad77 | 2014-05-02 21:47:19 | [diff] [blame] | 5322 | '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/lib/windows', |
[email protected] | 2a79400 | 2014-02-22 00:27:11 | [diff] [blame] | 5323 | ], |
| 5324 | }, |
| 5325 | 'target_conditions': [ |
| 5326 | ['_type=="executable"', { |
| 5327 | 'VCLinkerTool': { |
| 5328 | 'AdditionalDependencies': [ |
| 5329 | 'clang_rt.asan-i386.lib', |
| 5330 | ], |
| 5331 | }, |
| 5332 | }], |
| 5333 | ['_type=="shared_library" or _type=="loadable_module"', { |
| 5334 | 'VCLinkerTool': { |
| 5335 | 'AdditionalDependencies': [ |
| 5336 | 'clang_rt.asan_dll_thunk-i386.lib', |
| 5337 | ], |
| 5338 | }, |
| 5339 | }], |
| 5340 | ], |
| 5341 | }], |
[email protected] | 8efc2608 | 2014-01-24 13:26:35 | [diff] [blame] | 5342 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5343 | }, |
| 5344 | }, |
| 5345 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 5346 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 5347 | 'target_defaults': { |
| 5348 | 'defines': [ |
| 5349 | 'DISABLE_NACL', |
| 5350 | ], |
| 5351 | }, |
| 5352 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 5353 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5354 | 'target_defaults': { |
| 5355 | 'msvs_settings': { |
| 5356 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5357 | 'DelayLoadDLLs': [ |
| 5358 | 'dbghelp.dll', |
| 5359 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 5360 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5361 | 'uxtheme.dll', |
| 5362 | ], |
| 5363 | }, |
| 5364 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5365 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5366 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5367 | 'msvs_settings': { |
| 5368 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5369 | 'AdditionalOptions': [ |
| 5370 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5371 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5372 | '/ignore:4199', |
| 5373 | '/ignore:4221', |
| 5374 | '/nxcompat', |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5375 | ], |
| 5376 | 'conditions': [ |
[email protected] | 1612e55 | 2014-02-15 04:49:18 | [diff] [blame] | 5377 | ['syzyasan==0', { |
[email protected] | c3fcbd12 | 2013-06-20 10:47:43 | [diff] [blame] | 5378 | 'AdditionalOptions': ['/largeaddressaware'], |
| 5379 | }], |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5380 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5381 | }, |
| 5382 | }, |
| 5383 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 5384 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5385 | 'msvs_settings': { |
| 5386 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5387 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5388 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 5389 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 5390 | '/ignore:4199', |
| 5391 | '/ignore:4221', |
| 5392 | '/nxcompat', |
| 5393 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 5394 | }, |
| 5395 | }, |
| 5396 | }, |
| 5397 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 5398 | }, |
| 5399 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 5400 | ['enable_new_npdevice_api==1', { |
| 5401 | 'target_defaults': { |
| 5402 | 'defines': [ |
| 5403 | 'ENABLE_NEW_NPDEVICE_API', |
| 5404 | ], |
| 5405 | }, |
| 5406 | }], |
[email protected] | 5f68317 | 2013-04-27 01:53:19 | [diff] [blame] | 5407 | # Don't warn about the "typedef 'foo' locally defined but not used" |
| 5408 | # for gcc 4.8. |
| 5409 | # TODO: remove this flag once all builds work. See crbug.com/227506 |
| 5410 | ['gcc_version>=48', { |
| 5411 | 'target_defaults': { |
| 5412 | 'cflags': [ |
| 5413 | '-Wno-unused-local-typedefs', |
| 5414 | ], |
| 5415 | }, |
| 5416 | }], |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5417 | # We need a special case to handle the android webview build on mac because |
| 5418 | # the host gcc there doesn't accept this flag, but the target gcc may |
| 5419 | # require it. |
| 5420 | ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { |
| 5421 | 'target_defaults': { |
| 5422 | 'target_conditions': [ |
[email protected] | f2cef30 | 2014-05-23 13:34:58 | [diff] [blame] | 5423 | ['_toolset=="host"', { |
[email protected] | 7a4c78e0 | 2014-05-12 11:10:16 | [diff] [blame] | 5424 | 'cflags!': [ |
| 5425 | '-Wno-unused-local-typedefs', |
| 5426 | ], |
| 5427 | }], |
| 5428 | ], |
| 5429 | }, |
| 5430 | }], |
[email protected] | ce2cad7 | 2014-02-13 18:17:35 | [diff] [blame] | 5431 | ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' |
| 5432 | 'and OS!="win"', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5433 | 'make_global_settings': [ |
| 5434 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 5435 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
| 5436 | ['CC.host', '$(CC)'], |
| 5437 | ['CXX.host', '$(CXX)'], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 5438 | ], |
| 5439 | }], |
[email protected] | 6e354d4 | 2014-01-29 01:59:21 | [diff] [blame] | 5440 | ['clang==1 and OS=="win"', { |
| 5441 | 'make_global_settings': [ |
| 5442 | # On Windows, gyp's ninja generator only looks at CC. |
| 5443 | ['CC', '<(make_clang_dir)/bin/clang-cl'], |
| 5444 | ], |
| 5445 | }], |
[email protected] | 615fa664 | 2012-08-14 19:17:07 | [diff] [blame] | 5446 | ['OS=="android" and clang==0', { |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5447 | # Hardcode the compiler names in the Makefile so that |
| 5448 | # it won't depend on the environment at make time. |
[email protected] | 7fc96c8 | 2012-07-24 18:15:11 | [diff] [blame] | 5449 | 'make_global_settings': [ |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5450 | ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], |
| 5451 | ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], |
| 5452 | ['CC.host', '<!(which gcc)'], |
| 5453 | ['CXX.host', '<!(which g++)'], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 5454 | ], |
| 5455 | }], |
[email protected] | 23eea4a4 | 2013-04-27 04:10:26 | [diff] [blame] | 5456 | ['OS=="linux" and target_arch=="mipsel"', { |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5457 | 'make_global_settings': [ |
| 5458 | ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], |
| 5459 | ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5460 | ['CC.host', '<!(which gcc)'], |
| 5461 | ['CXX.host', '<!(which g++)'], |
[email protected] | eb5f167 | 2013-01-31 07:56:46 | [diff] [blame] | 5462 | ], |
| 5463 | }], |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5464 | |
| 5465 | # TODO(yyanagisawa): supports GENERATOR==make |
| 5466 | # make generator doesn't support CC_wrapper without CC |
| 5467 | # in make_global_settings yet. |
[email protected] | c8007541 | 2014-02-27 18:46:26 | [diff] [blame] | 5468 | ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { |
[email protected] | e71a362 | 2013-12-04 07:32:41 | [diff] [blame] | 5469 | 'make_global_settings': [ |
| 5470 | ['CC_wrapper', '<(gomadir)/gomacc'], |
| 5471 | ['CXX_wrapper', '<(gomadir)/gomacc'], |
| 5472 | ['CC.host_wrapper', '<(gomadir)/gomacc'], |
| 5473 | ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
| 5474 | ], |
| 5475 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5476 | ], |
| 5477 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5478 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 5479 | # This block adds *project-wide* configuration settings to each project |
| 5480 | # file. It's almost always wrong to put things here. Specify your |
| 5481 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 5482 | |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5483 | 'conditions': [ |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5484 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 5485 | # setting sets the SDK on a project-wide basis. In order to get the |
| 5486 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 5487 | # here at the project level. |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5488 | ['OS=="mac"', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5489 | 'conditions': [ |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5490 | ['mac_sdk_path==""', { |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5491 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5492 | }, { |
| 5493 | 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
[email protected] | fca3d81 | 2012-07-27 00:55:36 | [diff] [blame] | 5494 | }], |
| 5495 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5496 | }], |
| 5497 | ['OS=="ios"', { |
| 5498 | 'conditions': [ |
| 5499 | ['ios_sdk_path==""', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5500 | 'conditions': [ |
| 5501 | # TODO(justincohen): Ninja only supports simulator for now. |
[email protected] | c3c372e | 2013-10-29 22:31:51 | [diff] [blame] | 5502 | ['"<(GENERATOR)"=="xcode"', { |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5503 | 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot |
[email protected] | 187e0e3 | 2013-07-18 21:49:38 | [diff] [blame] | 5504 | }, { |
| 5505 | 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
[email protected] | 0286b6f | 2013-05-03 11:06:40 | [diff] [blame] | 5506 | }], |
| 5507 | ], |
[email protected] | 2c26153 | 2012-10-06 00:46:29 | [diff] [blame] | 5508 | }, { |
| 5509 | 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
| 5510 | }], |
| 5511 | ], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5512 | }], |
| 5513 | ['OS=="ios"', { |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5514 | # Target both iPhone and iPad. |
| 5515 | 'TARGETED_DEVICE_FAMILY': '1,2', |
[email protected] | 72c0d365 | 2013-11-05 19:11:42 | [diff] [blame] | 5516 | }, { # OS!="ios" |
| 5517 | 'conditions': [ |
| 5518 | ['target_arch=="x64"', { |
| 5519 | 'ARCHS': [ |
| 5520 | 'x86_64' |
| 5521 | ], |
| 5522 | }], |
| 5523 | ['target_arch=="ia32"', { |
| 5524 | 'ARCHS': [ |
| 5525 | 'i386' |
| 5526 | ], |
| 5527 | }], |
| 5528 | ], |
[email protected] | d6455401 | 2013-10-31 18:40:00 | [diff] [blame] | 5529 | }], |
[email protected] | 1e01367 | 2012-06-29 22:12:20 | [diff] [blame] | 5530 | ], |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 5531 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5532 | # The Xcode generator will look for an xcode_settings section at the root |
| 5533 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 5534 | # settings should not be here, they should be in target-specific |
| 5535 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 5536 | # settings in target dicts. SYMROOT is a special case, because many other |
| 5537 | # Xcode variables depend on it, including variables such as |
| 5538 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 5539 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 5540 | # files to appear (when present) in the UI as actual files and not red |
| 5541 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 5542 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 5543 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 5544 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 5545 | } |