[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': { |
| 20 | # Whether we're building a ChromeOS build. |
| 21 | 'chromeos%': 0, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 22 | |
[email protected] | 3fa441d | 2011-09-18 17:28:50 | [diff] [blame] | 23 | # Whether we are using Views Toolkit |
| 24 | 'toolkit_views%': 0, |
| 25 | |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 26 | # Whether or not we are using the Aura windowing framework. |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 27 | 'use_aura%': 0, |
[email protected] | 1353a09 | 2012-01-13 03:34:28 | [diff] [blame] | 28 | |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 29 | # Whether or not we are building the Ash shell. |
| 30 | 'use_ash%': 0, |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 31 | |
[email protected] | 29197f8 | 2012-04-09 19:27:43 | [diff] [blame] | 32 | # Enable DIP (Density Independent Pixels) support. |
| 33 | 'enable_dip%': 0, |
| 34 | |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 35 | # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 |
| 36 | 'use_openssl%': 0, |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 37 | |
| 38 | # Disable Virtual keyboard support by default. |
| 39 | 'use_virtual_keyboard%': 0, |
[email protected] | 774e061 | 2011-11-28 18:53:48 | [diff] [blame] | 40 | |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 41 | # Disable viewport meta tag by default. |
| 42 | 'enable_viewport%': 0, |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 43 | |
| 44 | # Enable HiDPI support. |
| 45 | 'enable_hidpi%': 0, |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 46 | |
| 47 | # Enable Metro support. |
| 48 | 'enable_metro%': 0, |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 49 | }, |
| 50 | # Copy conditionally-set variables out one scope. |
| 51 | 'chromeos%': '<(chromeos)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 52 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 53 | 'use_ash%': '<(use_ash)', |
[email protected] | 29197f8 | 2012-04-09 19:27:43 | [diff] [blame] | 54 | 'enable_dip%': '<(enable_dip)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 55 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 56 | 'use_virtual_keyboard%': '<(use_virtual_keyboard)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 57 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 58 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 59 | 'enable_metro%': '<(enable_metro)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 60 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 61 | # Compute the architecture that we're building on. |
| 62 | 'conditions': [ |
[email protected] | 177cd08 | 2011-10-04 18:36:38 | [diff] [blame] | 63 | [ 'OS=="win" or OS=="mac"', { |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 64 | 'host_arch%': 'ia32', |
| 65 | }, { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 66 | # This handles the Unix platforms for which there is some support. |
| 67 | # Anything else gets passed through, which probably won't work very |
| 68 | # well; such hosts should pass an explicit target_arch to gyp. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 69 | 'host_arch%': |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 70 | '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 71 | }], |
[email protected] | 1353a09 | 2012-01-13 03:34:28 | [diff] [blame] | 72 | |
[email protected] | 838a3cd | 2012-03-19 16:10:55 | [diff] [blame] | 73 | # Chromeos implies ash. |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 74 | ['chromeos==1', { |
| 75 | 'use_ash%': 1, |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 76 | 'use_aura%': 1, |
| 77 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 78 | |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 79 | # For now, Windows *AND* Linux builds that |use_aura| should also |
| 80 | # imply using ash. This rule should be removed for the future when |
| 81 | # both Linux and Windows are using the aura windows without the ash |
| 82 | # interface. |
| 83 | ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', { |
| 84 | 'use_ash%': 1, |
| 85 | }], |
| 86 | |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 87 | # Set default value of toolkit_views based on OS. |
[email protected] | 6e00601b7 | 2012-03-19 15:40:35 | [diff] [blame] | 88 | ['OS=="win" or chromeos==1 or use_aura==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 89 | 'toolkit_views%': 1, |
| 90 | }, { |
| 91 | 'toolkit_views%': 0, |
| 92 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 93 | |
| 94 | # Enable HiDPI on Mac OS. |
| 95 | ['OS=="mac"', { |
| 96 | 'enable_hidpi%': 1, |
| 97 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 98 | ], |
| 99 | }, |
| 100 | |
| 101 | # Copy conditionally-set variables out one scope. |
| 102 | 'chromeos%': '<(chromeos)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 103 | 'host_arch%': '<(host_arch)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 104 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 105 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 106 | 'use_ash%': '<(use_ash)', |
[email protected] | 29197f8 | 2012-04-09 19:27:43 | [diff] [blame] | 107 | 'enable_dip%': '<(enable_dip)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 108 | 'use_openssl%': '<(use_openssl)', |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 109 | 'use_virtual_keyboard%': '<(use_virtual_keyboard)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 110 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 111 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 112 | 'enable_metro%': '<(enable_metro)', |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 113 | |
[email protected] | 8fb0ef0 | 2011-05-20 00:53:50 | [diff] [blame] | 114 | # We used to provide a variable for changing how libraries were built. |
| 115 | # This variable remains until we can clean up all the users. |
| 116 | # This needs to be one nested variables dict in so that dependent |
| 117 | # gyp files can make use of it in their outer variables. (Yikes!) |
| 118 | # http://code.google.com/p/chromium/issues/detail?id=83308 |
| 119 | 'library%': 'static_library', |
| 120 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 121 | # Override branding to select the desired branding flavor. |
| 122 | 'branding%': 'Chromium', |
| 123 | |
| 124 | # Override buildtype to select the desired build flavor. |
| 125 | # Dev - everyday build for development/testing |
| 126 | # Official - release build (generally implies additional processing) |
| 127 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 128 | # conversion is done), some of the things which are now controlled by |
| 129 | # 'branding', such as symbol generation, will need to be refactored based |
| 130 | # on 'buildtype' (i.e. we don't care about saving symbols for non-Official |
| 131 | # builds). |
| 132 | 'buildtype%': 'Dev', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 133 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 134 | # Default architecture we're building for is the architecture we're |
| 135 | # building on. |
| 136 | 'target_arch%': '<(host_arch)', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 137 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 138 | # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are |
| 139 | # are built under a chromium full build (1) or a webkit.org chromium |
| 140 | # build (0). |
| 141 | 'inside_chromium_build%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 142 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 143 | # Set to 1 to enable fast builds. It disables debug info for fastest |
| 144 | # compilation. |
| 145 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 146 | |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 147 | # Set to 1 to enable dcheck in release without having to use the flag. |
| 148 | 'dcheck_always_on%': 0, |
| 149 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 150 | # Disable file manager component extension by default. |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 151 | 'file_manager_extension%': 0, |
| 152 | |
[email protected] | 5f16f8a | 2012-03-14 07:38:23 | [diff] [blame] | 153 | # Disable WebUI TaskManager by default. |
| 154 | 'webui_task_manager%': 0, |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 155 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 156 | # Python version. |
[email protected] | a43c5a0 | 2011-05-27 06:54:51 | [diff] [blame] | 157 | 'python_ver%': '2.6', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 158 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 159 | # Set ARM-v7 compilation flags |
| 160 | 'armv7%': 0, |
| 161 | |
| 162 | # Set Neon compilation flags (only meaningful if armv7==1). |
| 163 | 'arm_neon%': 1, |
| 164 | |
| 165 | # The system root for cross-compiles. Default: none. |
| 166 | 'sysroot%': '', |
| 167 | |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 168 | # The system libdir used for this ABI. |
| 169 | 'system_libdir%': 'lib', |
| 170 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 171 | # On Linux, we build with sse2 for Chromium builds. |
| 172 | 'disable_sse2%': 0, |
| 173 | |
| 174 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 175 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 176 | |
| 177 | # Variable 'component' is for cases where we would like to build some |
| 178 | # components as dynamic shared libraries but still need variable |
| 179 | # 'library' for static libraries. |
| 180 | # By default, component is set to whatever library is set to and |
| 181 | # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. |
[email protected] | 5a54733 | 2011-05-19 23:18:53 | [diff] [blame] | 182 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 183 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 184 | # Set to select the Title Case versions of strings in GRD files. |
| 185 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 186 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 187 | # Use translations provided by volunteers at launchpad.net. This |
| 188 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 189 | 'use_third_party_translations%': 0, |
| 190 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 191 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 192 | 'remoting%': 1, |
| 193 | |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 194 | # P2P APIs are compiled in by default. Set to 0 to disable. |
| 195 | # Also note that this should be enabled for remoting to compile. |
| 196 | 'p2p_apis%': 1, |
| 197 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 198 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 199 | 'configuration_policy%': 1, |
| 200 | |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 201 | # Safe browsing is compiled in by default. Set to 0 to disable. |
| 202 | 'safe_browsing%': 1, |
| 203 | |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 204 | # Speech input is compiled in by default. Set to 0 to disable. |
| 205 | 'input_speech%': 1, |
| 206 | |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 207 | # Notifications are compiled in by default. Set to 0 to disable. |
| 208 | 'notifications%' : 1, |
| 209 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 210 | # If this is set, the clang plugins used on the buildbot will be used. |
| 211 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 212 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 213 | # Has no effect if 'clang' is not set as well. |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 214 | 'clang_use_chrome_plugins%': 1, |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 215 | |
[email protected] | f36f374 | 2011-11-21 13:12:14 | [diff] [blame] | 216 | # Enable building with ASAN (Clang's -faddress-sanitizer option). |
| 217 | # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 218 | # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer |
| 219 | 'asan%': 0, |
| 220 | |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 221 | # Use the provided profiled order file to link Chrome image with it. |
| 222 | # This makes Chrome faster by better using CPU cache when executing code. |
| 223 | # This is known as PGO (profile guided optimization). |
| 224 | # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort |
| 225 | 'order_text_section%' : "", |
| 226 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 227 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 228 | # libraries on linux x86-64 and arm, plus ASLR. |
| 229 | 'linux_fpic%': 1, |
| 230 | |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 231 | # Whether one-click signin is enabled or not. |
| 232 | 'enable_one_click_signin%': 0, |
| 233 | |
[email protected] | c6a1f9417 | 2011-07-05 02:35:00 | [diff] [blame] | 234 | # Enable navigator.registerProtocolHandler and supporting UI. |
| 235 | 'enable_register_protocol_handler%': 1, |
| 236 | |
[email protected] | 5ffb0a4 | 2012-01-27 09:36:11 | [diff] [blame] | 237 | # Enable Web Intents support in WebKit, dispatching of intents, |
| 238 | # and extensions Web Intents support. |
| 239 | 'enable_web_intents%': 1, |
| 240 | |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 241 | # Enable Chrome browser extensions |
| 242 | 'enable_extensions%': 1, |
| 243 | |
[email protected] | 5ffb0a4 | 2012-01-27 09:36:11 | [diff] [blame] | 244 | # Enable Web Intents web content registration via HTML element |
| 245 | # and WebUI managing such registrations. |
| 246 | 'enable_web_intents_tag%': 0, |
[email protected] | 62af76e | 2011-08-01 02:34:01 | [diff] [blame] | 247 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 248 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 249 | 'enable_webrtc%': 1, |
| 250 | |
[email protected] | 67c125d | 2011-10-11 18:58:22 | [diff] [blame] | 251 | # PPAPI by default does not support plugins making calls off the main |
| 252 | # thread. Set to 1 to turn on experimental support for out-of-process |
| 253 | # plugins to make call of the main thread. |
| 254 | 'enable_pepper_threading%': 0, |
| 255 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 256 | # Enables use of the session service, which is enabled by default. |
| 257 | # Support for disabling depends on the platform. |
| 258 | 'enable_session_service%': 1, |
| 259 | |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 260 | # Enables theme support, which is enabled by default. Support for |
| 261 | # disabling depends on the platform. |
| 262 | 'enable_themes%': 1, |
| 263 | |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 264 | # Enables support for background apps. |
| 265 | 'enable_background%': 1, |
| 266 | |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 267 | # Enable the task manager by default. |
| 268 | 'enable_task_manager%': 1, |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 269 | |
| 270 | # Enables support for promo resource service. |
| 271 | 'enable_promo_resource_service%': 1, |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 272 | |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 273 | # XInput2 multitouch support is disabled by default (use_xi2_mt=0). |
| 274 | # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled, |
| 275 | # the input value also defines the required XI2 minor minimum version. |
| 276 | # For example, use_xi2_mt=2 means XI2.2 or above version is required. |
| 277 | 'use_xi2_mt%': 0, |
| 278 | |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 279 | # Use of precompiled headers on Windows. |
| 280 | # |
| 281 | # This is on by default in VS 2010, but off by default for VS |
| 282 | # 2008 because of complications that it can cause with our |
| 283 | # trybots etc. |
| 284 | # |
| 285 | # This variable may be explicitly set to 1 (enabled) or 0 |
| 286 | # (disabled) in ~/.gyp/include.gypi or via the GYP command line. |
| 287 | # This setting will override the default. |
| 288 | # |
| 289 | # Note that a setting of 1 is probably suitable for most or all |
| 290 | # Windows developers using VS 2008, since precompiled headers |
| 291 | # provide a build speedup of 20-25%. There are a couple of |
| 292 | # small workarounds you may need to use when using VS 2008 (but |
| 293 | # not 2010), see |
| 294 | # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders |
| 295 | # for details. |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 296 | 'chromium_win_pch%': 0, |
| 297 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 298 | # Set this to true when building with Clang. |
| 299 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
| 300 | 'clang%': 0, |
| 301 | |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 302 | # Enable plug-in installation by default. |
| 303 | 'enable_plugin_installation%': 1, |
| 304 | |
[email protected] | ddcaa41 | 2012-03-30 19:57:29 | [diff] [blame] | 305 | # Enable protector service by default. |
| 306 | 'enable_protector_service%': 1, |
| 307 | |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 308 | # Specifies whether to use canvas_skia.cc in place of platform |
[email protected] | 4ddae4b | 2012-03-15 17:32:42 | [diff] [blame] | 309 | # specific implementations of gfx::Canvas. Affects text drawing in the |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 310 | # Chrome UI. |
| 311 | # TODO(asvitkine): Enable this on all platforms and delete this flag. |
| 312 | # http://crbug.com/105550 |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 313 | 'use_canvas_skia%': 0, |
[email protected] | d18e5031 | 2012-01-25 17:49:35 | [diff] [blame] | 314 | |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 315 | # Set to "tsan", "memcheck", or "drmemory" to configure the build to work |
| 316 | # with one of those tools. |
| 317 | 'build_for_tool%': '', |
| 318 | |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 319 | # Whether tests targets should be run, archived or just have the |
| 320 | # dependencies verified. All the tests targets have the '_run' suffix, |
| 321 | # e.g. base_unittests_run runs the target base_unittests. The test target |
| 322 | # always calls tools/isolate/isolate.py. See the script's --help for more |
| 323 | # information and the valid --mode values. Meant to be overriden with |
| 324 | # GYP_DEFINES. |
[email protected] | 5d60607 | 2012-04-30 20:14:13 | [diff] [blame^] | 325 | # TODO(maruel): Converted the default from 'check' to 'noop' so work can |
| 326 | # be done while the builders are being reconfigured to check out test data |
| 327 | # files. |
| 328 | 'tests_run%': 'noop', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 329 | |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 330 | # Force rlz to use chrome's networking stack. |
| 331 | 'force_rlz_use_chrome_net%': 1, |
| 332 | |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 333 | 'platformsdk_path%': '<(DEPTH)/third_party/platformsdk_win7/files', |
| 334 | 'wix_path%': '<(DEPTH)/third_party/wix', |
| 335 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 336 | 'conditions': [ |
[email protected] | 33423fa | 2011-09-23 18:18:14 | [diff] [blame] | 337 | # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of |
| 338 | # the 'conditions' clause. Initial attempts resulted in chromium and |
| 339 | # webkit disagreeing on its setting. |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 340 | ['OS=="mac"', { |
[email protected] | 53c98db | 2012-03-14 16:02:21 | [diff] [blame] | 341 | 'use_skia%': 1, |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 342 | }, { |
| 343 | 'use_skia%': 1, |
| 344 | }], |
| 345 | |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 346 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 347 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 348 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 349 | }, { |
| 350 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 351 | }], |
| 352 | |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 353 | # A flag for BSD platforms |
| 354 | ['OS=="freebsd" or OS=="openbsd"', { |
| 355 | 'os_bsd%': 1, |
| 356 | }, { |
| 357 | 'os_bsd%': 0, |
| 358 | }], |
| 359 | |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 360 | # NSS usage. |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 361 | ['(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] | 362 | 'use_nss%': 1, |
| 363 | }, { |
| 364 | 'use_nss%': 0, |
| 365 | }], |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 366 | |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 367 | # Flags to use X11 on non-Mac POSIX platforms |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 368 | ['OS=="win" or OS=="mac" or OS=="android"', { |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 369 | 'use_glib%': 0, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 370 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 371 | }, { |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 372 | 'use_glib%': 1, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 373 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 374 | }], |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 375 | |
| 376 | # Set toolkit_uses_gtk for the Chromium browser on Linux. |
[email protected] | 17b11af | 2012-03-21 21:46:17 | [diff] [blame] | 377 | ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', { |
[email protected] | 9a817589 | 2012-03-20 02:11:58 | [diff] [blame] | 378 | 'toolkit_uses_gtk%': 1, |
| 379 | }, { |
| 380 | 'toolkit_uses_gtk%': 0, |
| 381 | }], |
| 382 | |
[email protected] | efadeacf | 2011-10-27 19:01:00 | [diff] [blame] | 383 | # We always use skia text rendering in Aura on Windows, since GDI |
| 384 | # doesn't agree with our BackingStore. |
| 385 | # TODO(beng): remove once skia text rendering is on by default. |
| 386 | ['use_aura==1 and OS=="win"', { |
| 387 | 'enable_skia_text%': 1, |
| 388 | }], |
[email protected] | 9edeb71 | 2011-09-20 21:20:33 | [diff] [blame] | 389 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 390 | # A flag to enable or disable our compile-time dependency |
| 391 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 392 | # support will be available. This option is useful |
[email protected] | 25bc66a2 | 2011-09-24 18:32:49 | [diff] [blame] | 393 | # for Linux distributions and for Aura. |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 394 | ['chromeos==1 or use_aura==1', { |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 395 | 'use_gnome_keyring%': 0, |
| 396 | }, { |
| 397 | 'use_gnome_keyring%': 1, |
| 398 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 399 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 400 | ['toolkit_views==0 or OS=="mac"', { |
| 401 | # GTK+ and Mac wants Title Case strings |
| 402 | 'use_titlecase_in_grd_files%': 1, |
| 403 | }], |
| 404 | |
[email protected] | 5f88761 | 2012-03-01 21:34:06 | [diff] [blame] | 405 | # Enable file manager extension on Chrome OS. |
| 406 | ['chromeos==1', { |
[email protected] | ab2017e | 2012-02-07 01:54:50 | [diff] [blame] | 407 | 'file_manager_extension%': 1, |
| 408 | }, { |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 409 | 'file_manager_extension%': 0, |
| 410 | }], |
[email protected] | 7de4635 | 2011-09-12 15:39:19 | [diff] [blame] | 411 | |
[email protected] | febc41db | 2012-03-24 02:44:43 | [diff] [blame] | 412 | # Enable WebUI TaskManager on Chrome OS or Aura. |
| 413 | ['chromeos==1 or use_aura==1', { |
| 414 | 'webui_task_manager%': 1, |
[email protected] | 5f16f8a | 2012-03-14 07:38:23 | [diff] [blame] | 415 | }], |
| 416 | |
[email protected] | f9af2ca | 2012-04-04 15:05:05 | [diff] [blame] | 417 | # TODO(akalin): Enable this for all GTK/views platforms (except for |
| 418 | # ChromeOS). |
| 419 | ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', { |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 420 | 'enable_one_click_signin%': 1, |
| 421 | }], |
| 422 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 423 | ['OS=="android"', { |
| 424 | 'proprietary_codecs%': 1, |
| 425 | 'enable_webrtc%': 0, |
| 426 | }], |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 427 | |
| 428 | # Use GPU accelerated cross process image transport by default |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 429 | # on linux builds with the Aura window manager |
[email protected] | f83c6f7f | 2012-01-28 03:23:01 | [diff] [blame] | 430 | ['use_aura==1 and OS=="linux"', { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 431 | 'ui_compositor_image_transport%': 1, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 432 | }, { |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 433 | 'ui_compositor_image_transport%': 0, |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 434 | }], |
[email protected] | 9061bee8 | 2012-01-16 11:45:17 | [diff] [blame] | 435 | |
| 436 | # Turn precompiled headers on by default for VS 2010. |
| 437 | ['OS=="win" and MSVS_VERSION=="2010"', { |
| 438 | 'chromium_win_pch%': 1 |
| 439 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 440 | |
[email protected] | 3d5173ec | 2012-03-27 04:08:23 | [diff] [blame] | 441 | ['use_aura==1 or chromeos==1 or OS=="android"', { |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 442 | 'enable_plugin_installation%': 0, |
| 443 | }, { |
| 444 | 'enable_plugin_installation%': 1, |
| 445 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 446 | |
[email protected] | ddcaa41 | 2012-03-30 19:57:29 | [diff] [blame] | 447 | ['OS=="android"', { |
| 448 | 'enable_protector_service%': 0, |
| 449 | }, { |
| 450 | 'enable_protector_service%': 1, |
| 451 | }], |
| 452 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 453 | # linux_use_gold_binary: whether to use the binary checked into |
| 454 | # third_party/gold. |
[email protected] | 1d4ace78 | 2012-03-07 09:20:40 | [diff] [blame] | 455 | ['OS=="linux"', { |
[email protected] | 1e03348 | 2012-02-09 19:33:51 | [diff] [blame] | 456 | 'linux_use_gold_binary%': 1, |
| 457 | }, { |
| 458 | 'linux_use_gold_binary%': 0, |
| 459 | }], |
| 460 | |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 461 | # linux_use_gold_flags: whether to use build flags that rely on gold. |
| 462 | # On by default for x64 Linux. Temporarily off for ChromeOS as |
| 463 | # it failed on a buildbot. |
[email protected] | 1d4ace78 | 2012-03-07 09:20:40 | [diff] [blame] | 464 | ['OS=="linux" and chromeos==0', { |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 465 | 'linux_use_gold_flags%': 1, |
| 466 | }, { |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 467 | 'linux_use_gold_flags%': 0, |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 468 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 469 | |
| 470 | # Enable automation on platforms other than Android. |
| 471 | ['OS=="android"', { |
| 472 | 'enable_automation%': 0, |
| 473 | }, { |
| 474 | 'enable_automation%': 1, |
| 475 | }], |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 476 | |
| 477 | # Enable Skia UI text drawing incrementally on different platforms. |
| 478 | # http://crbug.com/105550 |
| 479 | # |
| 480 | # On Aura, this allows per-tile painting to be used in the browser |
| 481 | # compositor. |
[email protected] | 70a377c | 2012-04-04 14:01:17 | [diff] [blame] | 482 | ['use_aura==1 or OS=="win"', { |
[email protected] | 3bd47e02 | 2012-03-22 04:19:12 | [diff] [blame] | 483 | 'use_canvas_skia%': 1, |
| 484 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 485 | ], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 486 | }, |
| 487 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 488 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 489 | 'branding%': '<(branding)', |
| 490 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 491 | 'target_arch%': '<(target_arch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 492 | 'host_arch%': '<(host_arch)', |
[email protected] | 8fb0ef0 | 2011-05-20 00:53:50 | [diff] [blame] | 493 | 'library%': 'static_library', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 494 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 495 | 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 496 | 'use_aura%': '<(use_aura)', |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 497 | 'use_ash%': '<(use_ash)', |
[email protected] | 29197f8 | 2012-04-09 19:27:43 | [diff] [blame] | 498 | 'enable_dip%': '<(enable_dip)', |
[email protected] | e0b85a5 | 2011-10-06 03:30:42 | [diff] [blame] | 499 | 'use_openssl%': '<(use_openssl)', |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 500 | 'use_nss%': '<(use_nss)', |
[email protected] | df9167b | 2011-11-14 19:15:25 | [diff] [blame] | 501 | 'os_bsd%': '<(os_bsd)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 502 | 'os_posix%': '<(os_posix)', |
[email protected] | 258dca4 | 2011-09-21 00:17:19 | [diff] [blame] | 503 | 'use_glib%': '<(use_glib)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 504 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 505 | 'use_skia%': '<(use_skia)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 506 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 507 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 508 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | 67c125d | 2011-10-11 18:58:22 | [diff] [blame] | 509 | 'enable_pepper_threading%': '<(enable_pepper_threading)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 510 | 'chromeos%': '<(chromeos)', |
[email protected] | 2cc81d3 | 2011-10-04 17:03:18 | [diff] [blame] | 511 | 'use_virtual_keyboard%': '<(use_virtual_keyboard)', |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 512 | 'enable_viewport%': '<(enable_viewport)', |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 513 | 'enable_hidpi%': '<(enable_hidpi)', |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 514 | 'enable_metro%': '<(enable_metro)', |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 515 | 'use_xi2_mt%':'<(use_xi2_mt)', |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 516 | 'file_manager_extension%': '<(file_manager_extension)', |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 517 | 'webui_task_manager%': '<(webui_task_manager)', |
[email protected] | b2f030c | 2009-09-24 20:36:21 | [diff] [blame] | 518 | 'inside_chromium_build%': '<(inside_chromium_build)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 519 | 'fastbuild%': '<(fastbuild)', |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 520 | 'dcheck_always_on%': '<(dcheck_always_on)', |
[email protected] | a76fe1a | 2010-03-01 23:39:36 | [diff] [blame] | 521 | 'python_ver%': '<(python_ver)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 522 | 'armv7%': '<(armv7)', |
| 523 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 524 | 'sysroot%': '<(sysroot)', |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 525 | 'system_libdir%': '<(system_libdir)', |
[email protected] | ac120ff | 2010-04-28 02:14:22 | [diff] [blame] | 526 | 'disable_sse2%': '<(disable_sse2)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 527 | 'component%': '<(component)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 528 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 529 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 530 | 'remoting%': '<(remoting)', |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 531 | 'enable_one_click_signin%': '<(enable_one_click_signin)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 532 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 533 | 'chromium_win_pch%': '<(chromium_win_pch)', |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 534 | 'p2p_apis%': '<(p2p_apis)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 535 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 536 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 537 | 'input_speech%': '<(input_speech)', |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 538 | 'notifications%': '<(notifications)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 539 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 540 | 'asan%': '<(asan)', |
[email protected] | 00b0a7f | 2012-01-25 15:30:46 | [diff] [blame] | 541 | 'order_text_section%': '<(order_text_section)', |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 542 | 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 543 | 'enable_extensions%': '<(enable_extensions)', |
[email protected] | 41ed4e8 | 2011-08-25 23:02:07 | [diff] [blame] | 544 | 'enable_web_intents%': '<(enable_web_intents)', |
[email protected] | 5ffb0a4 | 2012-01-27 09:36:11 | [diff] [blame] | 545 | 'enable_web_intents_tag%': '<(enable_web_intents_tag)', |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 546 | 'enable_plugin_installation%': '<(enable_plugin_installation)', |
[email protected] | ddcaa41 | 2012-03-30 19:57:29 | [diff] [blame] | 547 | 'enable_protector_service%': '<(enable_protector_service)', |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 548 | 'enable_session_service%': '<(enable_session_service)', |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 549 | 'enable_themes%': '<(enable_themes)', |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 550 | 'enable_background%': '<(enable_background)', |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 551 | 'enable_promo_resource_service%': '<(enable_promo_resource_service)', |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 552 | 'linux_use_gold_binary%': '<(linux_use_gold_binary)', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 553 | 'linux_use_gold_flags%': '<(linux_use_gold_flags)', |
[email protected] | 62424a5 | 2012-03-18 03:09:50 | [diff] [blame] | 554 | 'use_canvas_skia%': '<(use_canvas_skia)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 555 | 'tests_run%': '<(tests_run)', |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 556 | 'enable_automation%': '<(enable_automation)', |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 557 | 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 558 | 'enable_task_manager%': '<(enable_task_manager)', |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 559 | 'platformsdk_path%': '<(platformsdk_path)', |
| 560 | 'wix_path%': '<(wix_path)', |
[email protected] | 0197164 | 2012-03-07 14:39:56 | [diff] [blame] | 561 | |
[email protected] | 371e109 | 2011-10-12 20:37:36 | [diff] [blame] | 562 | # Use system yasm instead of bundled one. |
| 563 | 'use_system_yasm%': 0, |
| 564 | |
[email protected] | cd00bd86 | 2012-02-29 00:40:36 | [diff] [blame] | 565 | # Default to enabled PIE; this is important for ASLR but we may need to be |
| 566 | # able to turn it off for various reasons. |
| 567 | 'linux_disable_pie%': 0, |
| 568 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 569 | # The release channel that this build targets. This is used to restrict |
| 570 | # channel-specific build options, like which installer packages to create. |
| 571 | # The default is 'all', which does no channel-specific filtering. |
| 572 | 'channel%': 'all', |
| 573 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 574 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 575 | # precompiled headers on the Mac. Prefix header injection may still be |
| 576 | # used, but prefix headers will not be precompiled. This is useful when |
| 577 | # using distcc to distribute a build to compile slaves that don't |
| 578 | # share the same compiler executable as the system driving the compilation, |
| 579 | # because precompiled headers rely on pointers into a specific compiler |
| 580 | # executable's image. Setting this to 0 is needed to use an experimental |
| 581 | # Linux-Mac cross compiler distcc farm. |
| 582 | 'chromium_mac_pch%': 1, |
| 583 | |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 584 | # Mac OS X SDK and deployment target support. |
| 585 | # The SDK identifies the version of the system headers that will be used, |
| 586 | # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro. |
| 587 | # "Maximum allowed" refers to the operating system version whose APIs are |
| 588 | # available in the headers. |
| 589 | # The deployment target identifies the minimum system version that the |
| 590 | # built products are expected to function on. It corresponds to the |
| 591 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. |
| 592 | # To ensure these macros are available, #include <AvailabilityMacros.h>. |
| 593 | # Additional documentation on these macros is available at |
| 594 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 595 | # Chrome normally builds with the Mac OS X 10.5 SDK and sets the |
| 596 | # deployment target to 10.5. Other projects, such as O3D, may override |
| 597 | # these defaults. |
| 598 | 'mac_sdk%': '10.5', |
| 599 | 'mac_deployment_target%': '10.5', |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 600 | |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 601 | # The default value for mac_strip in target_defaults. This cannot be |
| 602 | # set there, per the comment about variable% in a target_defaults. |
| 603 | 'mac_strip_release%': 1, |
| 604 | |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 605 | # Set to 1 to enable code coverage. In addition to build changes |
| 606 | # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 607 | # project file called "coverage". |
| 608 | # Currently ignored on Windows. |
| 609 | 'coverage%': 0, |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 610 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 611 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 612 | # environment variable, the libcmt shim it uses sometimes gets in |
| 613 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 614 | # 'win_use_allocator_shim': 0, |
| 615 | # 'win_release_RuntimeLibrary': 2 |
| 616 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 617 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 618 | |
[email protected] | 95ff808 | 2009-11-13 22:21:01 | [diff] [blame] | 619 | # Whether usage of OpenMAX is enabled. |
| 620 | 'enable_openmax%': 0, |
| 621 | |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 622 | # Whether proprietary audio/video codecs are assumed to be included with |
| 623 | # this build (only meaningful if branding!=Chrome). |
| 624 | 'proprietary_codecs%': 0, |
| 625 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 626 | # TODO(bradnelson): eliminate this when possible. |
| 627 | # To allow local gyp files to prevent release.vsprops from being included. |
| 628 | # Yes(1) means include release.vsprops. |
| 629 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 630 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 631 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 632 | # TODO(bradnelson): eliminate this when possible. |
| 633 | # To allow local gyp files to override additional linker options for msvs. |
| 634 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 635 | 'msvs_use_common_linker_extras%': 1, |
| 636 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 637 | # TODO(sgk): eliminate this if possible. |
| 638 | # It would be nicer to support this via a setting in 'target_defaults' |
| 639 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 640 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 641 | # but that doesn't work as we'd like. |
| 642 | 'msvs_debug_link_incremental%': '2', |
| 643 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 644 | # Needed for some of the largest modules. |
| 645 | 'msvs_debug_link_nonincremental%': '1', |
| 646 | |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 647 | # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows |
| 648 | # to get incremental linking to be faster in debug builds. |
[email protected] | f1b6f991 | 2011-09-30 16:37:51 | [diff] [blame] | 649 | 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)', |
[email protected] | 5ab8f48 | 2011-08-18 18:30:06 | [diff] [blame] | 650 | |
[email protected] | 57313614 | 2009-07-15 22:48:37 | [diff] [blame] | 651 | # This is the location of the sandbox binary. Chrome looks for this before |
| 652 | # running the zygote process. If found, and SUID, it will be used to |
| 653 | # sandbox the zygote process and, thus, all renderer processes. |
| 654 | 'linux_sandbox_path%': '', |
| 655 | |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 656 | # Set this to true to enable SELinux support. |
| 657 | 'selinux%': 0, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 658 | |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 659 | # Clang stuff. |
| 660 | 'clang%': '<(clang)', |
[email protected] | e4ddf33 | 2011-10-20 21:52:24 | [diff] [blame] | 661 | 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 662 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 663 | # These two variables can be set in GYP_DEFINES while running |
| 664 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 665 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 666 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 667 | # 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] | 668 | |
| 669 | 'clang_load%': '', |
| 670 | 'clang_add_plugin%': '', |
| 671 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 672 | # The default type of gtest. |
| 673 | 'gtest_target_type%': 'executable', |
| 674 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 675 | # Enable sampling based profiler. |
| 676 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 677 | 'profiling%': '0', |
| 678 | |
[email protected] | 93b37350 | 2011-08-16 19:06:22 | [diff] [blame] | 679 | # Enable strict glibc debug mode. |
| 680 | 'glibcxx_debug%': 0, |
| 681 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 682 | # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. |
| 683 | 'linux_breakpad%': 0, |
| 684 | # And if we want to dump symbols for Breakpad-enabled builds. |
| 685 | 'linux_dump_symbols%': 0, |
| 686 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 687 | 'linux_strip_binary%': 0, |
[email protected] | 1d87c28 | 2010-09-15 22:24:49 | [diff] [blame] | 688 | # Strip the test binaries needed for Linux reliability tests. |
| 689 | 'linux_strip_reliability_tests%': 0, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 690 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 691 | # Enable TCMalloc. |
| 692 | 'linux_use_tcmalloc%': 1, |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 693 | |
[email protected] | 39ca7de | 2010-04-16 08:04:03 | [diff] [blame] | 694 | # Disable TCMalloc's debugallocation. |
| 695 | 'linux_use_debugallocation%': 0, |
| 696 | |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 697 | # Disable TCMalloc's heapchecker. |
| 698 | 'linux_use_heapchecker%': 0, |
| 699 | |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 700 | # Disable shadow stack keeping used by heapcheck to unwind the stacks |
| 701 | # better. |
| 702 | 'linux_keep_shadow_stacks%': 0, |
| 703 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 704 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 705 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 706 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 707 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 708 | |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 709 | # Set Thumb compilation flags. |
| 710 | 'arm_thumb%': 0, |
| 711 | |
[email protected] | 53e0f64 | 2010-03-05 01:41:56 | [diff] [blame] | 712 | # Set ARM fpu compilation flags (only meaningful if armv7==1 and |
| 713 | # arm_neon==0). |
| 714 | 'arm_fpu%': 'vfpv3', |
| 715 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 716 | # Enable new NPDevice API. |
| 717 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 718 | |
| 719 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 720 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 721 | |
[email protected] | 6f51b27e | 2010-06-22 20:43:53 | [diff] [blame] | 722 | # Enable a variable used elsewhere throughout the GYP files to determine |
| 723 | # whether to compile in the sources for the GPU plugin / process. |
| 724 | 'enable_gpu%': 1, |
| 725 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 726 | # .gyp files or targets should set chromium_code to 1 if they build |
| 727 | # Chromium-specific code, as opposed to external code. This variable is |
| 728 | # used to control such things as the set of warnings to enable, and |
| 729 | # whether warnings are treated as errors. |
| 730 | 'chromium_code%': 0, |
| 731 | |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 732 | 'release_valgrind_build%': 0, |
| 733 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 734 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 735 | 'enable_wexit_time_destructors%': 0, |
| 736 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 737 | # Set to 1 to compile with the built in pdf viewer. |
| 738 | 'internal_pdf%': 0, |
| 739 | |
| 740 | # This allows to use libcros from the current system, ie. /usr/lib/ |
| 741 | # The cros_api will be pulled in as a static library, and all headers |
| 742 | # from the system include dirs. |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 743 | 'system_libcros%': 0, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 744 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 745 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 746 | # so Cocoa is happy (http://crbug.com/20441). |
| 747 | 'locales': [ |
| 748 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 749 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 750 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
[email protected] | 925f94eb | 2012-01-28 00:57:19 | [diff] [blame] | 751 | 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 752 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 753 | 'vi', 'zh-CN', 'zh-TW', |
| 754 | ], |
| 755 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 756 | # Pseudo locales are special locales which are used for testing and |
| 757 | # debugging. They don't get copied to the final app. For more info, |
| 758 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 759 | 'pseudo_locales': [ |
| 760 | 'fake-bidi', |
| 761 | ], |
| 762 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 763 | 'grit_defines': [], |
| 764 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 765 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 766 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 767 | # is stored in resources.pak. It is still possible to load JS files |
| 768 | # from disk by passing --debug-devtools cmdline switch. |
| 769 | 'debug_devtools%': 0, |
| 770 | |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 771 | # The Java Bridge is not compiled in by default. |
| 772 | 'java_bridge%': 0, |
| 773 | |
[email protected] | 33e1c37 | 2011-12-14 16:32:07 | [diff] [blame] | 774 | # This flag is only used when disable_nacl==0 and disables all those |
| 775 | # subcomponents which would require the installation of a native_client |
| 776 | # untrusted toolchain. |
| 777 | 'disable_nacl_untrusted%': 0, |
| 778 | |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 779 | # Disable Dart by default. |
| 780 | 'enable_dart%': 0, |
| 781 | |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 782 | # The desired version of Windows SDK can be set in ~/.gyp/include.gypi. |
| 783 | 'msbuild_toolset%': '', |
| 784 | |
[email protected] | 836285f2 | 2012-04-03 16:19:26 | [diff] [blame] | 785 | # Native Client is enabled by default. |
| 786 | 'disable_nacl%': 0, |
| 787 | |
[email protected] | 49ae3e5 | 2012-04-12 09:50:12 | [diff] [blame] | 788 | 'platformsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py <(platformsdk_path))', |
| 789 | 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))', |
| 790 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 791 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 792 | ['os_posix==1 and OS!="mac" and OS!="android"', { |
[email protected] | 242a9e6 | 2009-11-03 17:32:10 | [diff] [blame] | 793 | # This will set gcc_version to XY if you are running gcc X.Y.*. |
| 794 | # This is used to tweak build flags for gcc 4.4. |
| 795 | 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 796 | # Figure out the python architecture to decide if we build pyauto. |
[email protected] | 945361a | 2011-09-30 04:38:43 | [diff] [blame] | 797 | 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 798 | 'conditions': [ |
[email protected] | 2a77a9d | 2010-08-26 19:58:10 | [diff] [blame] | 799 | ['branding=="Chrome"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 800 | 'linux_breakpad%': 1, |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 801 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 802 | # All Chrome builds have breakpad symbols, but only process the |
| 803 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 804 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 805 | 'linux_dump_symbols%': 1, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 806 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 807 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 808 | }], # os_posix==1 and OS!="mac" and OS!="android" |
| 809 | ['OS=="android"', { |
| 810 | # Location of Android NDK. |
| 811 | 'variables': { |
| 812 | 'variables': { |
| 813 | 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', |
[email protected] | febc41db | 2012-03-24 02:44:43 | [diff] [blame] | 814 | 'target_arch%': 'arm', # target_arch in android terms. |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 815 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 816 | # Switch between different build types, currently only '0' is |
| 817 | # supported. |
| 818 | 'android_build_type%': 0, |
| 819 | }, |
| 820 | 'android_ndk_root%': '<(android_ndk_root)', |
[email protected] | febc41db | 2012-03-24 02:44:43 | [diff] [blame] | 821 | 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 822 | 'android_build_type%': '<(android_build_type)', |
| 823 | }, |
| 824 | 'android_ndk_root%': '<(android_ndk_root)', |
| 825 | 'android_ndk_sysroot': '<(android_ndk_sysroot)', |
| 826 | 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', |
| 827 | 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', |
| 828 | |
| 829 | # Uses Android's crash report system |
| 830 | 'linux_breakpad%': 0, |
| 831 | |
| 832 | # Always uses openssl. |
| 833 | 'use_openssl%': 1, |
| 834 | |
| 835 | 'proprietary_codecs%': '<(proprietary_codecs)', |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 836 | 'enable_task_manager%': 0, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 837 | 'safe_browsing%': 0, |
| 838 | 'configuration_policy%': 0, |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 839 | 'input_speech%': 0, |
[email protected] | 7e19932 | 2012-03-13 20:04:56 | [diff] [blame] | 840 | 'enable_web_intents%': 0, |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 841 | 'enable_extensions%': 0, |
[email protected] | 464750f | 2011-10-24 23:16:18 | [diff] [blame] | 842 | 'java_bridge%': 1, |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 843 | # Android does not support themes. |
| 844 | 'enable_themes%': 0, |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 845 | |
| 846 | # Android does not support background apps. |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 847 | 'enable_background%': 0, |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 848 | |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 849 | # Android does not support promo resources service. |
| 850 | 'enable_promo_resource_service%': 0, |
| 851 | |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 852 | # Sessions are store separately in the Java side. |
| 853 | 'enable_session_service%': 0, |
| 854 | |
[email protected] | 5fd2e84 | 2012-03-01 00:29:11 | [diff] [blame] | 855 | # Set to 1 once we have a notification system for Android. |
| 856 | # http://crbug.com/115320 |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 857 | 'notifications%': 0, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 858 | |
[email protected] | c691139 | 2012-03-24 04:44:41 | [diff] [blame] | 859 | 'gtest_target_type%': '<(gtest_target_type)', |
[email protected] | d9f9695 | 2012-04-19 21:02:09 | [diff] [blame] | 860 | # TODO(jrg): when 'gtest_target_type'=='shared_libary' and |
| 861 | # OS==android, make all gtest_targets depend on |
| 862 | # testing/android/native_test.gyp:native_test_apk. |
| 863 | ### 'gtest_target_type': 'shared_libary', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 864 | |
| 865 | # Uses system APIs for decoding audio and video. |
| 866 | 'use_libffmpeg%': '0', |
| 867 | |
| 868 | # Always use the chromium skia. The use_system_harfbuzz needs to |
| 869 | # match use_system_skia. |
| 870 | 'use_system_skia%': '0', |
| 871 | 'use_system_harfbuzz%': '0', |
| 872 | |
| 873 | # Use the system icu. |
[email protected] | 965b6b2 | 2011-09-29 16:07:28 | [diff] [blame] | 874 | 'use_system_icu%': 0, |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 875 | |
[email protected] | 7c3dc473 | 2012-04-13 07:37:15 | [diff] [blame] | 876 | # TODO(yfriedman): Remove once unit_tests can link for Android. |
| 877 | # To override it specify: |
| 878 | # GYP_DEFINES="$GYP_DEFINES android_unit_test_target_type=executable" |
| 879 | # android_gyp |
| 880 | 'android_unit_test_target_type%': 'static_library', |
| 881 | |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 882 | # Choose static link by build type. |
| 883 | 'conditions': [ |
| 884 | ['android_build_type==0', { |
| 885 | 'static_link_system_icu%': 1, |
| 886 | }, { |
| 887 | 'static_link_system_icu%': 0, |
| 888 | }], |
| 889 | ], |
| 890 | # Enable to use system sqlite. |
| 891 | 'use_system_sqlite%': '<(android_build_type)', |
[email protected] | d5cf9fb | 2011-09-27 00:15:16 | [diff] [blame] | 892 | # Enable to use system libjpeg. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 893 | 'use_system_libjpeg%': '<(android_build_type)', |
| 894 | # Enable to use the system libexpat. |
| 895 | 'use_system_libexpat%': '<(android_build_type)', |
| 896 | # Enable to use the system stlport, otherwise statically |
| 897 | # link the NDK one? |
| 898 | 'use_system_stlport%': '<(android_build_type)', |
| 899 | # Copy it out one scope. |
| 900 | 'android_build_type%': '<(android_build_type)', |
| 901 | }], # OS=="android" |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 902 | ['OS=="mac"', { |
[email protected] | e1ece30 | 2011-09-15 03:58:11 | [diff] [blame] | 903 | # Enable clang on mac by default! |
| 904 | 'clang%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 905 | # Compile in Breakpad support by default so that it can be |
| 906 | # tested, even if it is not enabled by default at runtime. |
| 907 | 'mac_breakpad_compiled_in%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 908 | 'conditions': [ |
| 909 | # mac_product_name is set to the name of the .app bundle as it should |
| 910 | # appear on disk. This duplicates data from |
| 911 | # chrome/app/theme/chromium/BRANDING and |
| 912 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 913 | # these names into the build system. |
| 914 | ['branding=="Chrome"', { |
| 915 | 'mac_product_name%': 'Google Chrome', |
| 916 | }, { # else: branding!="Chrome" |
| 917 | 'mac_product_name%': 'Chromium', |
| 918 | }], |
| 919 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 920 | ['branding=="Chrome" and buildtype=="Official"', { |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 921 | # Enable uploading crash dumps. |
| 922 | 'mac_breakpad_uploads%': 1, |
| 923 | # Enable dumping symbols at build time for use by Mac Breakpad. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 924 | 'mac_breakpad%': 1, |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 925 | # Enable Keystone auto-update support. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 926 | 'mac_keystone%': 1, |
| 927 | }, { # else: branding!="Chrome" or buildtype!="Official" |
[email protected] | 794fb478 | 2011-12-14 19:10:56 | [diff] [blame] | 928 | 'mac_breakpad_uploads%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 929 | 'mac_breakpad%': 0, |
| 930 | 'mac_keystone%': 0, |
| 931 | }], |
| 932 | ], |
| 933 | }], # OS=="mac" |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 934 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 935 | ['OS=="win"', { |
| 936 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 937 | ['component=="shared_library"', { |
| 938 | 'win_use_allocator_shim%': 0, |
| 939 | }], |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 940 | # Whether to use multiple cores to compile with visual studio. This is |
| 941 | # optional because it sometimes causes corruption on VS 2005. |
| 942 | # It is on by default on VS 2008 and off on VS 2005. |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 943 | ['MSVS_VERSION=="2005"', { |
[email protected] | 66979537 | 2009-08-14 17:51:13 | [diff] [blame] | 944 | 'msvs_multi_core_compile%': 0, |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 945 | },{ |
| 946 | 'msvs_multi_core_compile%': 1, |
| 947 | }], |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 948 | # Don't do incremental linking for large modules on 32-bit. |
| 949 | ['MSVS_OS_BITS==32', { |
| 950 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 951 | },{ |
| 952 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 953 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 954 | ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', { |
| 955 | 'msvs_express%': 1, |
| 956 | 'secure_atl%': 0, |
| 957 | },{ |
| 958 | 'msvs_express%': 0, |
| 959 | 'secure_atl%': 1, |
| 960 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 961 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 962 | 'nacl_win64_defines': [ |
| 963 | # This flag is used to minimize dependencies when building |
| 964 | # Native Client loader for 64-bit Windows. |
| 965 | 'NACL_WIN64', |
| 966 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 967 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 968 | |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 969 | ['os_posix==1 and chromeos==0 and target_arch!="arm"', { |
[email protected] | 8e553f49 | 2010-10-25 20:05:44 | [diff] [blame] | 970 | 'use_cups%': 1, |
| 971 | }, { |
| 972 | 'use_cups%': 0, |
| 973 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 974 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 975 | # Set the relative path from this file to the GYP file of the JPEG |
| 976 | # library used by Chromium. |
| 977 | ['use_libjpeg_turbo==1', { |
| 978 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 979 | }, { |
| 980 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
| 981 | }], # use_libjpeg_turbo==1 |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 982 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 983 | # Options controlling the use of GConf (the classic GNOME configuration |
| 984 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 985 | ['chromeos==1', { |
| 986 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 987 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 988 | }, { |
| 989 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 990 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 991 | }], |
| 992 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 993 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 994 | ['branding=="Chrome"', { |
| 995 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 996 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 997 | 'grit_defines': ['-D', '_google_chrome', |
| 998 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 999 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1000 | 'grit_defines': ['-D', '_chromium', |
| 1001 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 1002 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1003 | ['chromeos==1', { |
| 1004 | 'grit_defines': ['-D', 'chromeos'], |
| 1005 | }], |
| 1006 | ['toolkit_views==1', { |
| 1007 | 'grit_defines': ['-D', 'toolkit_views'], |
| 1008 | }], |
[email protected] | 8dd791d | 2011-09-16 16:37:30 | [diff] [blame] | 1009 | ['use_aura==1', { |
| 1010 | 'grit_defines': ['-D', 'use_aura'], |
| 1011 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1012 | ['use_ash==1', { |
| 1013 | 'grit_defines': ['-D', 'use_ash'], |
| 1014 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1015 | ['use_nss==1', { |
| 1016 | 'grit_defines': ['-D', 'use_nss'], |
| 1017 | }], |
[email protected] | 2cc81d3 | 2011-10-04 17:03:18 | [diff] [blame] | 1018 | ['use_virtual_keyboard==1', { |
| 1019 | 'grit_defines': ['-D', 'use_virtual_keyboard'], |
| 1020 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 1021 | ['file_manager_extension==1', { |
| 1022 | 'grit_defines': ['-D', 'file_manager_extension'], |
| 1023 | }], |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 1024 | ['webui_task_manager==1', { |
| 1025 | 'grit_defines': ['-D', 'webui_task_manager'], |
| 1026 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 1027 | ['remoting==1', { |
| 1028 | 'grit_defines': ['-D', 'remoting'], |
| 1029 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 1030 | ['use_titlecase_in_grd_files==1', { |
| 1031 | 'grit_defines': ['-D', 'use_titlecase'], |
| 1032 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1033 | ['use_third_party_translations==1', { |
| 1034 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1035 | 'locales': [ |
[email protected] | 8581e1ba | 2011-08-22 23:27:16 | [diff] [blame] | 1036 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
| 1037 | 'ka', 'ku', 'kw', 'ms', 'ug' |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 1038 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 1039 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1040 | ['OS=="android"', { |
| 1041 | 'grit_defines': ['-D', 'android'], |
| 1042 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1043 | ['enable_extensions==1', { |
| 1044 | 'grit_defines': ['-D', 'enable_extensions'], |
| 1045 | }], |
[email protected] | 3bb37e6 | 2012-04-19 03:40:08 | [diff] [blame] | 1046 | ['clang_use_chrome_plugins==1 and OS!="win"', { |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1047 | 'clang_chrome_plugins_flags': |
| 1048 | '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)', |
| 1049 | }], |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 1050 | |
[email protected] | 452da69e | 2011-05-24 02:36:05 | [diff] [blame] | 1051 | # Set use_ibus to 1 to enable ibus support. |
[email protected] | 023d824 | 2011-11-22 01:25:27 | [diff] [blame] | 1052 | ['use_virtual_keyboard==1 and chromeos==1', { |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 1053 | 'use_ibus%': 1, |
| 1054 | }, { |
| 1055 | 'use_ibus%': 0, |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 1056 | }], |
| 1057 | |
| 1058 | ['enable_register_protocol_handler==1', { |
| 1059 | 'grit_defines': ['-D', 'enable_register_protocol_handler'], |
| 1060 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1061 | |
[email protected] | 5ffb0a4 | 2012-01-27 09:36:11 | [diff] [blame] | 1062 | ['enable_web_intents_tag==1', { |
| 1063 | 'grit_defines': ['-D', 'enable_web_intents_tag'], |
[email protected] | 41ed4e8 | 2011-08-25 23:02:07 | [diff] [blame] | 1064 | }], |
| 1065 | |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1066 | ['asan==1', { |
| 1067 | 'clang%': 1, |
[email protected] | 5dc6aaac | 2011-10-12 16:55:20 | [diff] [blame] | 1068 | # Do not use Chrome plugins for Clang. The Clang version in |
| 1069 | # third_party/asan may be different from the default one. |
| 1070 | 'clang_use_chrome_plugins%': 0, |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 1071 | }], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1072 | |
| 1073 | # On valgrind bots, override the optimizer settings so we don't inline too |
| 1074 | # much and make the stacks harder to figure out. |
| 1075 | # |
| 1076 | # TODO(rnk): Kill off variables that no one else uses and just implement |
| 1077 | # them under a build_for_tool== condition. |
| 1078 | ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 1079 | # gcc flags |
| 1080 | 'mac_debug_optimization': '1', |
| 1081 | 'mac_release_optimization': '1', |
| 1082 | 'release_optimize': '1', |
| 1083 | 'no_gc_sections': 1, |
| 1084 | 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1085 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1086 | 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' |
| 1087 | '-fno-builtin -fno-optimize-sibling-calls', |
| 1088 | |
| 1089 | # MSVS flags for TSan on Pin and Windows. |
| 1090 | 'win_debug_RuntimeChecks': '0', |
| 1091 | 'win_debug_disable_iterator_debugging': '1', |
| 1092 | 'win_debug_Optimization': '1', |
| 1093 | 'win_debug_InlineFunctionExpansion': '0', |
| 1094 | 'win_release_InlineFunctionExpansion': '0', |
| 1095 | 'win_release_OmitFramePointers': '0', |
| 1096 | |
| 1097 | 'linux_use_tcmalloc': 1, |
| 1098 | 'release_valgrind_build': 1, |
| 1099 | 'werror': '', |
| 1100 | 'component': 'static_library', |
| 1101 | 'use_system_zlib': 0, |
| 1102 | }], |
| 1103 | |
| 1104 | # Build tweaks for DrMemory. |
| 1105 | # TODO(rnk): Combine with tsan config to share the builder. |
| 1106 | # http://crbug.com/108155 |
| 1107 | ['build_for_tool=="drmemory"', { |
| 1108 | # DrMemory can't handle the debug CRT dll, so build static. |
| 1109 | 'component': 'static_library', |
| 1110 | # These runtime checks force initialization of stack vars which blocks |
| 1111 | # DrMemory's uninit detection. |
| 1112 | 'win_debug_RuntimeChecks': '0', |
| 1113 | # Iterator debugging is slow. |
| 1114 | 'win_debug_disable_iterator_debugging': '1', |
| 1115 | # Try to disable optimizations that mess up stacks in a release build. |
| 1116 | 'win_release_InlineFunctionExpansion': '0', |
| 1117 | 'win_release_OmitFramePointers': '0', |
| 1118 | # Keep the code under #ifndef NVALGRIND. |
| 1119 | 'release_valgrind_build': 1, |
| 1120 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1121 | ], |
[email protected] | a9318c7 | 2012-03-01 01:29:47 | [diff] [blame] | 1122 | |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1123 | # List of default apps to install in new profiles. The first list contains |
| 1124 | # 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] | 1125 | # contains the destination location for each of the files. When a crx |
| 1126 | # is added or removed from the list, the chrome/browser/resources/ |
| 1127 | # default_apps/external_extensions.json file must also be updated. |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1128 | 'default_apps_list': [ |
| 1129 | 'browser/resources/default_apps/external_extensions.json', |
| 1130 | 'browser/resources/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1131 | 'browser/resources/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1132 | 'browser/resources/default_apps/youtube.crx', |
| 1133 | ], |
| 1134 | 'default_apps_list_linux_dest': [ |
| 1135 | '<(PRODUCT_DIR)/default_apps/external_extensions.json', |
| 1136 | '<(PRODUCT_DIR)/default_apps/gmail.crx', |
[email protected] | 20cc0bb7 | 2011-10-26 00:57:06 | [diff] [blame] | 1137 | '<(PRODUCT_DIR)/default_apps/search.crx', |
[email protected] | 3595842 | 2011-09-28 02:03:59 | [diff] [blame] | 1138 | '<(PRODUCT_DIR)/default_apps/youtube.crx', |
| 1139 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1140 | }, |
| 1141 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1142 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1143 | # The condition that operates on chromium_code is in a target_conditions |
| 1144 | # section, and will not have access to the default fallback value of |
| 1145 | # chromium_code at the top of this file, or to the chromium_code |
| 1146 | # variable placed at the root variables scope of .gyp files, because |
| 1147 | # those variables are not set at target scope. As a workaround, |
| 1148 | # if chromium_code is not set at target scope, define it in target scope |
| 1149 | # to contain whatever value it has during early variable expansion. |
| 1150 | # That's enough to make it available during target conditional |
| 1151 | # processing. |
| 1152 | 'chromium_code%': '<(chromium_code)', |
| 1153 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1154 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 1155 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1156 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1157 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1158 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 1159 | 'win_release_Optimization%': '2', # 2 = /Os |
| 1160 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1161 | |
| 1162 | # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1163 | # Tri-state: blank is default, 1 on, 0 off |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 1164 | 'win_release_OmitFramePointers%': '1', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1165 | # Tri-state: blank is default, 1 on, 0 off |
| 1166 | 'win_debug_OmitFramePointers%': '', |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1167 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1168 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 1169 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1170 | |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1171 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1172 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 1173 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1174 | |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 1175 | # VS inserts quite a lot of extra checks to algorithms like |
| 1176 | # std::partial_sort in Debug build which make them O(N^2) |
| 1177 | # instead of O(N*logN). This is particularly slow under memory |
| 1178 | # tools like ThreadSanitizer so we want it to be disablable. |
| 1179 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
| 1180 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1181 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1182 | 'release_extra_cflags%': '', |
| 1183 | 'debug_extra_cflags%': '', |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1184 | |
| 1185 | 'release_valgrind_build%': '<(release_valgrind_build)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1186 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1187 | # the non-qualified versions are widely assumed to be *nix-only |
| 1188 | 'win_release_extra_cflags%': '', |
| 1189 | 'win_debug_extra_cflags%': '', |
| 1190 | |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1191 | # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 |
| 1192 | 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', |
| 1193 | |
[email protected] | ef332670 | 2011-10-06 18:06:44 | [diff] [blame] | 1194 | # Only used by Windows build for now. Can be used to build into a |
| 1195 | # differet output directory, e.g., a build_dir_prefix of VS2010_ would |
| 1196 | # output files in src/build/VS2010_{Debug,Release}. |
| 1197 | 'build_dir_prefix%': '', |
| 1198 | |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1199 | 'conditions': [ |
| 1200 | ['OS=="win" and component=="shared_library"', { |
| 1201 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
[email protected] | 49e8e02 | 2012-03-16 15:22:16 | [diff] [blame] | 1202 | 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) |
| 1203 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1204 | }, { |
| 1205 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 1206 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 1207 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 1208 | }], |
| 1209 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1210 | }, |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 1211 | 'conditions': [ |
[email protected] | ff10b13 | 2012-02-29 22:53:30 | [diff] [blame] | 1212 | ['OS=="win" and "<(msbuild_toolset)"!=""', { |
| 1213 | 'msbuild_toolset': '<(msbuild_toolset)', |
| 1214 | }], |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 1215 | ['branding=="Chrome"', { |
| 1216 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 1217 | }, { # else: branding!="Chrome" |
| 1218 | 'defines': ['CHROMIUM_BUILD'], |
| 1219 | }], |
[email protected] | 81d9b72d | 2012-03-26 22:29:17 | [diff] [blame] | 1220 | ['branding=="Chrome" and (OS=="win" or OS=="mac")', { |
| 1221 | 'defines': ['ENABLE_RLZ'], |
| 1222 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 1223 | ['component=="shared_library"', { |
| 1224 | 'defines': ['COMPONENT_BUILD'], |
| 1225 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 1226 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 1227 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 1228 | }], |
[email protected] | 1ee7c56c | 2011-10-19 14:51:33 | [diff] [blame] | 1229 | ['ui_compositor_image_transport==1', { |
[email protected] | 839d517 | 2011-10-13 17:18:11 | [diff] [blame] | 1230 | 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], |
| 1231 | }], |
[email protected] | 4142309 | 2011-08-25 15:39:58 | [diff] [blame] | 1232 | ['use_aura==1', { |
| 1233 | 'defines': ['USE_AURA=1'], |
[email protected] | e599f013 | 2011-08-24 19:03:35 | [diff] [blame] | 1234 | }], |
[email protected] | ed329be | 2012-01-03 22:02:16 | [diff] [blame] | 1235 | ['use_ash==1', { |
| 1236 | 'defines': ['USE_ASH=1'], |
| 1237 | }], |
[email protected] | 29197f8 | 2012-04-09 19:27:43 | [diff] [blame] | 1238 | ['enable_dip==1', { |
| 1239 | 'defines': ['ENABLE_DIP'], |
| 1240 | }], |
[email protected] | c329adf8 | 2011-10-05 14:34:57 | [diff] [blame] | 1241 | ['use_nss==1', { |
| 1242 | 'defines': ['USE_NSS=1'], |
| 1243 | }], |
[email protected] | bd7b6fe | 2012-03-05 21:02:40 | [diff] [blame] | 1244 | ['enable_one_click_signin==1', { |
| 1245 | 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], |
| 1246 | }], |
[email protected] | a47aa89 | 2011-11-22 03:12:31 | [diff] [blame] | 1247 | ['toolkit_uses_gtk==1 and toolkit_views==0', { |
| 1248 | # TODO(erg): We are progressively sealing up use of deprecated features |
| 1249 | # in gtk in preparation for an eventual porting to gtk3. |
| 1250 | 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], |
| 1251 | }], |
[email protected] | fdc5bed | 2010-01-09 01:16:57 | [diff] [blame] | 1252 | ['chromeos==1', { |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 1253 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 1254 | }], |
[email protected] | 2cc81d3 | 2011-10-04 17:03:18 | [diff] [blame] | 1255 | ['use_virtual_keyboard==1', { |
| 1256 | 'defines': ['USE_VIRTUAL_KEYBOARD=1'], |
| 1257 | }], |
[email protected] | f56797b | 2011-09-25 00:04:35 | [diff] [blame] | 1258 | ['use_xi2_mt!=0', { |
| 1259 | 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], |
| 1260 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 1261 | ['file_manager_extension==1', { |
| 1262 | 'defines': ['FILE_MANAGER_EXTENSION=1'], |
| 1263 | }], |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 1264 | ['webui_task_manager==1', { |
| 1265 | 'defines': ['WEBUI_TASK_MANAGER=1'], |
| 1266 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1267 | ['profiling==1', { |
| 1268 | 'defines': ['ENABLE_PROFILING=1'], |
| 1269 | }], |
[email protected] | 93b37350 | 2011-08-16 19:06:22 | [diff] [blame] | 1270 | ['OS=="linux" and glibcxx_debug==1', { |
| 1271 | 'defines': ['_GLIBCXX_DEBUG=1',], |
| 1272 | 'cflags_cc!': ['-fno-rtti'], |
| 1273 | 'cflags_cc+': ['-frtti', '-g'], |
| 1274 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 1275 | ['remoting==1', { |
| 1276 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 1277 | }], |
[email protected] | 5b87e78 | 2012-02-09 18:19:32 | [diff] [blame] | 1278 | ['enable_webrtc==1', { |
| 1279 | 'defines': ['ENABLE_WEBRTC=1'], |
| 1280 | }], |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 1281 | ['p2p_apis==1', { |
| 1282 | 'defines': ['ENABLE_P2P_APIS=1'], |
| 1283 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 1284 | ['proprietary_codecs==1', { |
| 1285 | 'defines': ['USE_PROPRIETARY_CODECS'], |
| 1286 | }], |
[email protected] | 67c125d | 2011-10-11 18:58:22 | [diff] [blame] | 1287 | ['enable_pepper_threading==1', { |
| 1288 | 'defines': ['ENABLE_PEPPER_THREADING'], |
| 1289 | }], |
[email protected] | 7ddea980 | 2012-02-22 23:08:05 | [diff] [blame] | 1290 | ['enable_viewport==1', { |
| 1291 | 'defines': ['ENABLE_VIEWPORT'], |
| 1292 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 1293 | ['configuration_policy==1', { |
| 1294 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 1295 | }], |
[email protected] | 9eb100e | 2011-10-14 05:08:22 | [diff] [blame] | 1296 | ['input_speech==1', { |
| 1297 | 'defines': ['ENABLE_INPUT_SPEECH'], |
| 1298 | }], |
[email protected] | 7cce323 | 2011-10-28 10:41:57 | [diff] [blame] | 1299 | ['notifications==1', { |
| 1300 | 'defines': ['ENABLE_NOTIFICATIONS'], |
| 1301 | }], |
[email protected] | 1efbaaa | 2012-04-24 02:43:24 | [diff] [blame] | 1302 | ['enable_hidpi==1', { |
| 1303 | 'defines': ['ENABLE_HIDPI=1'], |
| 1304 | }], |
[email protected] | 8973c3a | 2012-04-25 02:24:18 | [diff] [blame] | 1305 | ['enable_metro==1', { |
| 1306 | 'defines': ['ENABLE_METRO=1'], |
| 1307 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1308 | ['fastbuild!=0', { |
[email protected] | 5834f439 | 2011-09-13 20:06:17 | [diff] [blame] | 1309 | |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1310 | 'conditions': [ |
[email protected] | da4d4ea | 2011-09-22 20:23:14 | [diff] [blame] | 1311 | # For Windows and Mac, we don't genererate debug information. |
| 1312 | ['OS=="win" or OS=="mac"', { |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1313 | 'msvs_settings': { |
| 1314 | 'VCLinkerTool': { |
| 1315 | 'GenerateDebugInformation': 'false', |
| 1316 | }, |
| 1317 | 'VCCLCompilerTool': { |
| 1318 | 'DebugInformationFormat': '0', |
| 1319 | } |
[email protected] | da4d4ea | 2011-09-22 20:23:14 | [diff] [blame] | 1320 | }, |
| 1321 | 'xcode_settings': { |
| 1322 | 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', |
| 1323 | }, |
[email protected] | 1cc2fa7 | 2010-07-03 08:49:24 | [diff] [blame] | 1324 | }, { # else: OS != "win", generate less debug information. |
| 1325 | 'variables': { |
| 1326 | 'debug_extra_cflags': '-g1', |
| 1327 | }, |
[email protected] | 37c8419 | 2010-04-14 21:37:40 | [diff] [blame] | 1328 | }], |
[email protected] | aecc4d1 | 2011-01-19 05:32:33 | [diff] [blame] | 1329 | # Clang creates chubby debug information, which makes linking very |
| 1330 | # slow. For now, don't create debug information with clang. See |
| 1331 | # http://crbug.com/70000 |
| 1332 | ['OS=="linux" and clang==1', { |
| 1333 | 'variables': { |
| 1334 | 'debug_extra_cflags': '-g0', |
| 1335 | }, |
| 1336 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 1337 | ], # conditions for fastbuild. |
| 1338 | }], # fastbuild!=0 |
[email protected] | 20960e07 | 2011-09-20 20:59:01 | [diff] [blame] | 1339 | ['dcheck_always_on!=0', { |
| 1340 | 'defines': ['DCHECK_ALWAYS_ON=1'], |
| 1341 | }], # dcheck_always_on!=0 |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 1342 | ['selinux==1', { |
| 1343 | 'defines': ['CHROMIUM_SELINUX=1'], |
| 1344 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1345 | ['win_use_allocator_shim==0', { |
| 1346 | 'conditions': [ |
| 1347 | ['OS=="win"', { |
| 1348 | 'defines': ['NO_TCMALLOC'], |
| 1349 | }], |
| 1350 | ], |
| 1351 | }], |
[email protected] | 43f28f83 | 2010-02-03 02:28:48 | [diff] [blame] | 1352 | ['enable_gpu==1', { |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 1353 | 'defines': [ |
| 1354 | 'ENABLE_GPU=1', |
| 1355 | ], |
| 1356 | }], |
[email protected] | b1c2a554 | 2010-10-08 12:44:40 | [diff] [blame] | 1357 | ['use_openssl==1', { |
| 1358 | 'defines': [ |
| 1359 | 'USE_OPENSSL=1', |
| 1360 | ], |
| 1361 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 1362 | ['enable_eglimage==1', { |
| 1363 | 'defines': [ |
| 1364 | 'ENABLE_EGLIMAGE=1', |
| 1365 | ], |
| 1366 | }], |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 1367 | ['use_skia==1', { |
| 1368 | 'defines': [ |
| 1369 | 'USE_SKIA=1', |
| 1370 | ], |
| 1371 | }], |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 1372 | ['coverage!=0', { |
| 1373 | 'conditions': [ |
| 1374 | ['OS=="mac"', { |
| 1375 | 'xcode_settings': { |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 1376 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs |
| 1377 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 1378 | }, |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 1379 | # Add -lgcov for types executable, shared_library, and |
[email protected] | dc259ce5 | 2010-04-13 04:03:10 | [diff] [blame] | 1380 | # loadable_module; not for static_library. |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 1381 | # This is a delayed conditional. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 1382 | 'target_conditions': [ |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 1383 | ['_type!="static_library"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 1384 | 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 1385 | }], |
| 1386 | ], |
| 1387 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1388 | ['OS=="linux" or OS=="android"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 1389 | 'cflags': [ '-ftest-coverage', |
| 1390 | '-fprofile-arcs' ], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 1391 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 1392 | }], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 1393 | # Finally, for Windows, we simply turn on profiling. |
| 1394 | ['OS=="win"', { |
| 1395 | 'msvs_settings': { |
| 1396 | 'VCLinkerTool': { |
| 1397 | 'Profile': 'true', |
| 1398 | }, |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 1399 | 'VCCLCompilerTool': { |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 1400 | # /Z7, not /Zi, so coverage is happyb |
| 1401 | 'DebugInformationFormat': '1', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1402 | 'AdditionalOptions': ['/Yd'], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 1403 | } |
| 1404 | } |
| 1405 | }], # OS==win |
| 1406 | ], # conditions for coverage |
| 1407 | }], # coverage!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 1408 | ['OS=="win"', { |
| 1409 | 'defines': [ |
| 1410 | '__STD_C', |
| 1411 | '_CRT_SECURE_NO_DEPRECATE', |
| 1412 | '_SCL_SECURE_NO_DEPRECATE', |
| 1413 | ], |
| 1414 | 'include_dirs': [ |
| 1415 | '<(DEPTH)/third_party/wtl/include', |
| 1416 | ], |
| 1417 | }], # OS==win |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 1418 | ['enable_register_protocol_handler==1', { |
| 1419 | 'defines': [ |
[email protected] | 06bba4fb | 2011-06-09 05:17:19 | [diff] [blame] | 1420 | 'ENABLE_REGISTER_PROTOCOL_HANDLER=1', |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 1421 | ], |
| 1422 | }], |
[email protected] | 44879ed | 2012-04-06 01:11:02 | [diff] [blame] | 1423 | ['enable_task_manager==1', { |
| 1424 | 'defines': [ |
| 1425 | 'ENABLE_TASK_MANAGER=1', |
| 1426 | ], |
| 1427 | }], |
[email protected] | 41ed4e8 | 2011-08-25 23:02:07 | [diff] [blame] | 1428 | ['enable_web_intents==1', { |
| 1429 | 'defines': [ |
[email protected] | 1f2d9ed | 2011-10-04 20:18:47 | [diff] [blame] | 1430 | 'ENABLE_WEB_INTENTS=1', |
[email protected] | 41ed4e8 | 2011-08-25 23:02:07 | [diff] [blame] | 1431 | ], |
| 1432 | }], |
[email protected] | 6a3cd37e | 2012-04-17 17:13:34 | [diff] [blame] | 1433 | ['enable_extensions==1', { |
| 1434 | 'defines': [ |
| 1435 | 'ENABLE_EXTENSIONS=1', |
| 1436 | ], |
| 1437 | }], |
[email protected] | 13eb97d | 2012-01-05 01:07:12 | [diff] [blame] | 1438 | ['OS=="win" and branding=="Chrome"', { |
| 1439 | 'defines': ['ENABLE_SWIFTSHADER'], |
| 1440 | }], |
[email protected] | 407dfa63 | 2011-12-23 11:59:35 | [diff] [blame] | 1441 | ['enable_dart==1', { |
| 1442 | 'defines': ['WEBKIT_USING_DART=1'], |
| 1443 | }], |
[email protected] | 18e0f39b | 2012-01-17 16:47:34 | [diff] [blame] | 1444 | ['enable_plugin_installation==1', { |
| 1445 | 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], |
| 1446 | }], |
[email protected] | ddcaa41 | 2012-03-30 19:57:29 | [diff] [blame] | 1447 | ['enable_protector_service==1', { |
| 1448 | 'defines': ['ENABLE_PROTECTOR_SERVICE=1'], |
| 1449 | }], |
[email protected] | cdb756ef | 2012-04-05 18:34:53 | [diff] [blame] | 1450 | ['enable_session_service==1', { |
| 1451 | 'defines': ['ENABLE_SESSION_SERVICE=1'], |
| 1452 | }], |
[email protected] | 6b40bb58 | 2012-03-15 20:50:38 | [diff] [blame] | 1453 | ['enable_themes==1', { |
| 1454 | 'defines': ['ENABLE_THEMES=1'], |
| 1455 | }], |
[email protected] | 0acdd77 | 2012-04-05 22:53:00 | [diff] [blame] | 1456 | ['enable_background==1', { |
| 1457 | 'defines': ['ENABLE_BACKGROUND=1'], |
| 1458 | }], |
[email protected] | 5824201 | 2012-04-12 16:14:31 | [diff] [blame] | 1459 | ['enable_promo_resource_service==1', { |
| 1460 | 'defines': ['ENABLE_PROMO_RESOURCE_SERVICE=1'], |
| 1461 | }], |
[email protected] | 2e22e2f | 2012-03-15 21:53:10 | [diff] [blame] | 1462 | ['enable_automation==1', { |
| 1463 | 'defines': ['ENABLE_AUTOMATION=1'], |
| 1464 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1465 | ], # conditions for 'target_defaults' |
| 1466 | 'target_conditions': [ |
[email protected] | b1eb341c | 2011-11-09 18:46:07 | [diff] [blame] | 1467 | ['enable_wexit_time_destructors==1', { |
| 1468 | 'conditions': [ |
| 1469 | [ 'clang==1', { |
| 1470 | 'cflags': [ |
| 1471 | '-Wexit-time-destructors', |
| 1472 | ], |
| 1473 | 'xcode_settings': { |
| 1474 | 'WARNING_CFLAGS': [ |
| 1475 | '-Wexit-time-destructors', |
| 1476 | ], |
| 1477 | }, |
| 1478 | }], |
| 1479 | ], |
| 1480 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1481 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1482 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1483 | [ 'os_posix==1 and OS!="mac"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 1484 | # We don't want to get warnings from third-party code, |
| 1485 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1486 | 'cflags!': [ |
| 1487 | '-Wall', |
| 1488 | '-Wextra', |
| 1489 | '-Werror', |
| 1490 | ], |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 1491 | 'cflags_cc': [ |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 1492 | # Don't warn about hash_map in third-party code. |
| 1493 | '-Wno-deprecated', |
[email protected] | 167ec82 | 2011-10-24 22:05:27 | [diff] [blame] | 1494 | ], |
| 1495 | 'cflags': [ |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 1496 | # Don't warn about printf format problems. |
| 1497 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 1498 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 1499 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 1500 | 'cflags_cc!': [ |
| 1501 | # TODO(fischman): remove this. |
| 1502 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
| 1503 | '-Wsign-compare', |
| 1504 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1505 | }], |
[email protected] | bc073c06 | 2012-01-13 06:28:03 | [diff] [blame] | 1506 | [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 1507 | 'cflags': [ |
| 1508 | # Don't warn about ignoring the return value from e.g. close(). |
| 1509 | # 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] | 1510 | # BSD systems do not support this option, since they are usually |
| 1511 | # using gcc 4.2.1, which does not have this flag yet. |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 1512 | '-Wno-unused-result', |
| 1513 | ], |
| 1514 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1515 | [ 'OS=="win"', { |
| 1516 | 'defines': [ |
| 1517 | '_CRT_SECURE_NO_DEPRECATE', |
| 1518 | '_CRT_NONSTDC_NO_WARNINGS', |
| 1519 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 1520 | '_SCL_SECURE_NO_DEPRECATE', |
| 1521 | ], |
| 1522 | 'msvs_disabled_warnings': [4800], |
| 1523 | 'msvs_settings': { |
| 1524 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 1525 | 'WarningLevel': '3', |
| 1526 | 'WarnAsError': 'false', # TODO(maruel): Enable it. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1527 | 'Detect64BitPortabilityProblems': 'false', |
| 1528 | }, |
| 1529 | }, |
| 1530 | }], |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 1531 | # TODO(darin): Unfortunately, some third_party code depends on base/ |
| 1532 | [ 'OS=="win" and component=="shared_library"', { |
| 1533 | 'msvs_disabled_warnings': [ |
| 1534 | 4251, # class 'std::xx' needs to have dll-interface. |
| 1535 | ], |
| 1536 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1537 | [ 'OS=="mac"', { |
| 1538 | 'xcode_settings': { |
| 1539 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 1540 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 1541 | }, |
| 1542 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1543 | ], |
| 1544 | }, { |
[email protected] | a5c59815 | 2012-01-27 04:55:13 | [diff] [blame] | 1545 | 'includes': [ |
| 1546 | # Rules for excluding e.g. foo_win.cc from the build on non-Windows. |
| 1547 | 'filename_rules.gypi', |
| 1548 | ], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1549 | # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the |
| 1550 | # C99 macros on Mac and Linux. |
| 1551 | 'defines': [ |
| 1552 | '__STDC_FORMAT_MACROS', |
| 1553 | ], |
| 1554 | 'conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1555 | ['OS=="win"', { |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 1556 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 1557 | 'msvs_settings': { |
| 1558 | 'VCCLCompilerTool': { |
| 1559 | 'AdditionalOptions': ['/we4389'], |
| 1560 | }, |
| 1561 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1562 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 1563 | ['OS=="win" and component=="shared_library"', { |
| 1564 | 'msvs_disabled_warnings': [ |
| 1565 | 4251, # class 'std::xx' needs to have dll-interface. |
| 1566 | ], |
| 1567 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1568 | ], |
| 1569 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1570 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1571 | 'default_configuration': 'Debug', |
| 1572 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1573 | # VCLinkerTool LinkIncremental values below: |
| 1574 | # 0 == default |
| 1575 | # 1 == /INCREMENTAL:NO |
| 1576 | # 2 == /INCREMENTAL |
| 1577 | # Debug links incremental, Release does not. |
| 1578 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 1579 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1580 | # |
| 1581 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1582 | 'abstract': 1, |
| 1583 | 'msvs_configuration_attributes': { |
[email protected] | 534303c | 2011-09-28 00:02:51 | [diff] [blame] | 1584 | 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1585 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 1586 | 'CharacterSet': '1', |
| 1587 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1588 | }, |
| 1589 | 'x86_Base': { |
| 1590 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1591 | 'msvs_settings': { |
| 1592 | 'VCLinkerTool': { |
| 1593 | 'TargetMachine': '1', |
| 1594 | }, |
| 1595 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 1596 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1597 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1598 | 'x64_Base': { |
| 1599 | 'abstract': 1, |
| 1600 | 'msvs_configuration_platform': 'x64', |
| 1601 | 'msvs_settings': { |
| 1602 | 'VCLinkerTool': { |
| 1603 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1604 | 'AdditionalLibraryDirectories!': |
| 1605 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 1606 | 'AdditionalLibraryDirectories': |
| 1607 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 1608 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 1609 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1610 | 'AdditionalLibraryDirectories!': |
| 1611 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 1612 | 'AdditionalLibraryDirectories': |
| 1613 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 1614 | }, |
| 1615 | }, |
| 1616 | 'defines': [ |
| 1617 | # Not sure if tcmalloc works on 64-bit Windows. |
| 1618 | 'NO_TCMALLOC', |
| 1619 | ], |
| 1620 | }, |
| 1621 | 'Debug_Base': { |
| 1622 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1623 | 'defines': [ |
| 1624 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 1625 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 1626 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1627 | 'xcode_settings': { |
| 1628 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 1629 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 1630 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 1631 | '<@(debug_extra_cflags)', |
| 1632 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1633 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1634 | 'msvs_settings': { |
| 1635 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1636 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1637 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1638 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1639 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1640 | 'conditions': [ |
| 1641 | # According to MSVS, InlineFunctionExpansion=0 means |
| 1642 | # "default inlining", not "/Ob0". |
| 1643 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 1644 | ['win_debug_InlineFunctionExpansion==0', { |
| 1645 | 'AdditionalOptions': ['/Ob0'], |
| 1646 | }], |
| 1647 | ['win_debug_InlineFunctionExpansion!=""', { |
| 1648 | 'InlineFunctionExpansion': |
| 1649 | '<(win_debug_InlineFunctionExpansion)', |
| 1650 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 1651 | ['win_debug_disable_iterator_debugging==1', { |
| 1652 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 1653 | }], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1654 | |
| 1655 | # if win_debug_OmitFramePointers is blank, leave as default |
| 1656 | ['win_debug_OmitFramePointers==1', { |
| 1657 | 'OmitFramePointers': 'true', |
| 1658 | }], |
| 1659 | ['win_debug_OmitFramePointers==0', { |
| 1660 | 'OmitFramePointers': 'false', |
| 1661 | # The above is not sufficient (http://crbug.com/106711): it |
| 1662 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 1663 | # perform FPO regardless, so we must explicitly disable. |
| 1664 | # We still want the false setting above to avoid having |
| 1665 | # "/Oy /Oy-" and warnings about overriding. |
| 1666 | 'AdditionalOptions': ['/Oy-'], |
| 1667 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1668 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1669 | 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1670 | }, |
| 1671 | 'VCLinkerTool': { |
| 1672 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 1673 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 1674 | # Chrome.dll share the same base name. As result, windbg will |
| 1675 | # name the Chrome.dll module like chrome_<base address>, where |
| 1676 | # <base address> typically changes with each launch. This in turn |
| 1677 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 1678 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 1679 | # Note that this is a three-way bool, where 0 means to pick up |
| 1680 | # the default setting, 1 is off and 2 is on. |
| 1681 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1682 | }, |
| 1683 | 'VCResourceCompilerTool': { |
| 1684 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 1685 | }, |
| 1686 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1687 | 'conditions': [ |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1688 | ['OS=="linux"', { |
| 1689 | 'cflags': [ |
| 1690 | '<@(debug_extra_cflags)', |
| 1691 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1692 | }], |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 1693 | ['release_valgrind_build==0', { |
| 1694 | 'xcode_settings': { |
| 1695 | 'OTHER_CFLAGS': [ |
| 1696 | '-fstack-protector-all', # Implies -fstack-protector |
| 1697 | ], |
| 1698 | }, |
| 1699 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1700 | ], |
| 1701 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1702 | 'Release_Base': { |
| 1703 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1704 | 'defines': [ |
| 1705 | 'NDEBUG', |
| 1706 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1707 | 'xcode_settings': { |
| 1708 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 1709 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1710 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1711 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1712 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1713 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1714 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1715 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 1716 | # In official builds, each target will self-select |
| 1717 | # an optimization level. |
| 1718 | ['buildtype!="Official"', { |
| 1719 | 'Optimization': '<(win_release_Optimization)', |
| 1720 | }, |
| 1721 | ], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1722 | # According to MSVS, InlineFunctionExpansion=0 means |
| 1723 | # "default inlining", not "/Ob0". |
| 1724 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 1725 | ['win_release_InlineFunctionExpansion==0', { |
| 1726 | 'AdditionalOptions': ['/Ob0'], |
| 1727 | }], |
| 1728 | ['win_release_InlineFunctionExpansion!=""', { |
| 1729 | 'InlineFunctionExpansion': |
| 1730 | '<(win_release_InlineFunctionExpansion)', |
| 1731 | }], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1732 | |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1733 | # if win_release_OmitFramePointers is blank, leave as default |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1734 | ['win_release_OmitFramePointers==1', { |
| 1735 | 'OmitFramePointers': 'true', |
| 1736 | }], |
| 1737 | ['win_release_OmitFramePointers==0', { |
| 1738 | 'OmitFramePointers': 'false', |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1739 | # The above is not sufficient (http://crbug.com/106711): it |
| 1740 | # simply eliminates an explicit "/Oy", but both /O2 and /Ox |
| 1741 | # perform FPO regardless, so we must explicitly disable. |
| 1742 | # We still want the false setting above to avoid having |
| 1743 | # "/Oy /Oy-" and warnings about overriding. |
| 1744 | 'AdditionalOptions': ['/Oy-'], |
[email protected] | 626d2d2 | 2011-10-11 15:47:33 | [diff] [blame] | 1745 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1746 | ], |
[email protected] | ef5c5f1b | 2011-12-17 02:16:24 | [diff] [blame] | 1747 | 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1748 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1749 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 1750 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 1751 | # (i.e., inherit from parent solution), 1 means false, and |
| 1752 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1753 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 1754 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 1755 | # file contains FIXUP information (growing the PDB file by about |
| 1756 | # 5%) but does not otherwise alter the output binary. This |
| 1757 | # information is used by the Syzygy optimization tool when |
| 1758 | # decomposing the release image. |
| 1759 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1760 | }, |
| 1761 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1762 | 'conditions': [ |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 1763 | ['release_valgrind_build==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1764 | 'defines': [ |
| 1765 | 'NVALGRIND', |
| 1766 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 1767 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 1768 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1769 | 'defines': [ |
| 1770 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 1771 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 1772 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 1773 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1774 | ['win_use_allocator_shim==0', { |
| 1775 | 'defines': ['NO_TCMALLOC'], |
| 1776 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1777 | ['OS=="linux"', { |
| 1778 | 'cflags': [ |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1779 | '<@(release_extra_cflags)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1780 | ], |
| 1781 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1782 | ], |
| 1783 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1784 | # |
| 1785 | # Concrete configurations |
| 1786 | # |
| 1787 | 'Debug': { |
| 1788 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 1789 | }, |
| 1790 | 'Release': { |
| 1791 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 1792 | 'conditions': [ |
| 1793 | ['msvs_use_common_release', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1794 | 'includes': ['release.gypi'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1795 | }], |
| 1796 | ] |
| 1797 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 1798 | 'conditions': [ |
| 1799 | [ 'OS=="win"', { |
| 1800 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1801 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1802 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 1803 | }, |
| 1804 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1805 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 1806 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 1807 | }], |
| 1808 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1809 | }, |
| 1810 | }, |
| 1811 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1812 | ['os_posix==1 and OS!="mac"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1813 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1814 | # Enable -Werror by default, but put it in a variable so it can |
| 1815 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 1816 | 'variables': { |
[email protected] | cbbb347 | 2012-01-25 18:32:31 | [diff] [blame] | 1817 | 'werror%': '-Werror', |
[email protected] | b7cc5321c | 2012-04-12 21:24:36 | [diff] [blame] | 1818 | 'libraries_for_target%': '', |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1819 | }, |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 1820 | 'defines': [ |
| 1821 | '_FILE_OFFSET_BITS=64', |
| 1822 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1823 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 1824 | '<(werror)', # See note above about the werror variable. |
| 1825 | '-pthread', |
| 1826 | '-fno-exceptions', |
[email protected] | ef8c3cf | 2012-01-24 04:37:29 | [diff] [blame] | 1827 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 1828 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 1829 | # TODO(evan): turn this back on once all the builds work. |
| 1830 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 1831 | # Don't warn about unused function params. We use those everywhere. |
| 1832 | '-Wno-unused-parameter', |
| 1833 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 1834 | '-Wno-missing-field-initializers', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 1835 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 1836 | # Note: this is *required* to make some plugins work. |
| 1837 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 1838 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 1839 | ], |
| 1840 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 1841 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 1842 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 1843 | # Make inline functions have hidden visiblity by default. |
| 1844 | # Surprisingly, not covered by -fvisibility=hidden. |
| 1845 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 1846 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
| 1847 | # so we specify it explicitly. |
| 1848 | # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 1849 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 1850 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1851 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 1852 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 1853 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1854 | ], |
[email protected] | b7cc5321c | 2012-04-12 21:24:36 | [diff] [blame] | 1855 | 'libraries' : [ |
| 1856 | '<(libraries_for_target)', |
| 1857 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1858 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1859 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 1860 | 'variables': { |
| 1861 | 'debug_optimize%': '0', |
| 1862 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1863 | 'defines': [ |
| 1864 | '_DEBUG', |
| 1865 | ], |
| 1866 | 'cflags': [ |
[email protected] | 9cb5cc70 | 2011-02-01 19:56:04 | [diff] [blame] | 1867 | '-O>(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1868 | '-g', |
| 1869 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1870 | 'conditions' : [ |
| 1871 | ['OS=="android"', { |
| 1872 | 'cflags': [ |
| 1873 | '-fno-omit-frame-pointer', |
| 1874 | ], |
| 1875 | }], |
| 1876 | ], |
| 1877 | 'target_conditions' : [ |
| 1878 | ['_toolset=="target"', { |
| 1879 | 'conditions': [ |
| 1880 | ['OS=="android" and debug_optimize==0', { |
| 1881 | 'cflags': [ |
| 1882 | '-mlong-calls', # Needed when compiling with -O0 |
| 1883 | ], |
| 1884 | }], |
| 1885 | ['arm_thumb==1', { |
| 1886 | 'cflags': [ |
| 1887 | '-marm', |
| 1888 | ], |
| 1889 | }], |
| 1890 | ], |
| 1891 | }], |
| 1892 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1893 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1894 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 1895 | 'variables': { |
| 1896 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 1897 | # Binaries become big and gold is unable to perform GC |
| 1898 | # and remove unused sections for some of test targets |
| 1899 | # on 32 bit platform. |
| 1900 | # (This is currently observed only in chromeos valgrind bots) |
| 1901 | # The following flag is to disable --gc-sections linker |
| 1902 | # option for these bots. |
| 1903 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 1904 | |
| 1905 | # TODO(bradnelson): reexamine how this is done if we change the |
| 1906 | # expansion of configurations |
| 1907 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 1908 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1909 | 'cflags': [ |
[email protected] | 9cb5cc70 | 2011-02-01 19:56:04 | [diff] [blame] | 1910 | '-O>(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 1911 | # Don't emit the GCC version ident directives, they just end up |
| 1912 | # in the .comment section taking up binary size. |
| 1913 | '-fno-ident', |
| 1914 | # Put data and code in their own sections, so that unused symbols |
| 1915 | # can be removed at link time with --gc-sections. |
| 1916 | '-fdata-sections', |
| 1917 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1918 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 1919 | 'ldflags': [ |
| 1920 | # Specifically tell the linker to perform optimizations. |
| 1921 | # See http://lwn.net/Articles/192624/ . |
| 1922 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 1923 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 1924 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 1925 | 'conditions' : [ |
| 1926 | ['no_gc_sections==0', { |
| 1927 | 'ldflags': [ |
| 1928 | '-Wl,--gc-sections', |
| 1929 | ], |
| 1930 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 1931 | ['OS=="android"', { |
| 1932 | 'cflags': [ |
| 1933 | '-fomit-frame-pointer', |
| 1934 | ], |
| 1935 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 1936 | ['clang==1', { |
| 1937 | 'cflags!': [ |
| 1938 | '-fno-ident', |
| 1939 | ], |
| 1940 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1941 | ['profiling==1', { |
| 1942 | 'cflags': [ |
| 1943 | '-fno-omit-frame-pointer', |
| 1944 | '-g', |
| 1945 | ], |
| 1946 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 1947 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1948 | }, |
| 1949 | }, |
[email protected] | 601b54022 | 2009-04-03 21:32:04 | [diff] [blame] | 1950 | 'variants': { |
| 1951 | 'coverage': { |
| 1952 | 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
| 1953 | 'ldflags': ['-fprofile-arcs'], |
| 1954 | }, |
| 1955 | 'profile': { |
| 1956 | 'cflags': ['-pg', '-g'], |
| 1957 | 'ldflags': ['-pg'], |
| 1958 | }, |
| 1959 | 'symbols': { |
| 1960 | 'cflags': ['-g'], |
| 1961 | }, |
| 1962 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1963 | 'conditions': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 1964 | ['target_arch=="ia32"', { |
| 1965 | 'target_conditions': [ |
| 1966 | ['_toolset=="target"', { |
| 1967 | 'asflags': [ |
| 1968 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 1969 | # are compatible with the general 32-bit-ness. |
| 1970 | '-32', |
| 1971 | ], |
| 1972 | # All floating-point computations on x87 happens in 80-bit |
| 1973 | # precision. Because the C and C++ language standards allow |
| 1974 | # the compiler to keep the floating-point values in higher |
| 1975 | # precision than what's specified in the source and doing so |
| 1976 | # is more efficient than constantly rounding up to 64-bit or |
| 1977 | # 32-bit precision as specified in the source, the compiler, |
| 1978 | # especially in the optimized mode, tries very hard to keep |
| 1979 | # values in x87 floating-point stack (in 80-bit precision) |
| 1980 | # as long as possible. This has important side effects, that |
| 1981 | # the real value used in computation may change depending on |
| 1982 | # how the compiler did the optimization - that is, the value |
| 1983 | # kept in 80-bit is different than the value rounded down to |
| 1984 | # 64-bit or 32-bit. There are possible compiler options to |
| 1985 | # make this behavior consistent (e.g. -ffloat-store would keep |
| 1986 | # all floating-values in the memory, thus force them to be |
| 1987 | # rounded to its original precision) but they have significant |
| 1988 | # runtime performance penalty. |
| 1989 | # |
| 1990 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 1991 | # which keep floating-point values in SSE registers in its |
| 1992 | # native precision (32-bit for single precision, and 64-bit |
| 1993 | # for double precision values). This means the floating-point |
| 1994 | # value used during computation does not change depending on |
| 1995 | # how the compiler optimized the code, since the value is |
| 1996 | # always kept in its specified precision. |
| 1997 | 'conditions': [ |
| 1998 | ['branding=="Chromium" and disable_sse2==0', { |
| 1999 | 'cflags': [ |
| 2000 | '-march=pentium4', |
| 2001 | '-msse2', |
| 2002 | '-mfpmath=sse', |
| 2003 | ], |
| 2004 | }], |
| 2005 | # ChromeOS targets Pinetrail, which is sse3, but most of the |
| 2006 | # benefit comes from sse2 so this setting allows ChromeOS |
| 2007 | # to build on other CPUs. In the future -march=atom would |
| 2008 | # help but requires a newer compiler. |
| 2009 | ['chromeos==1 and disable_sse2==0', { |
| 2010 | 'cflags': [ |
| 2011 | '-msse2', |
| 2012 | ], |
| 2013 | }], |
| 2014 | # Install packages have started cropping up with |
| 2015 | # different headers between the 32-bit and 64-bit |
| 2016 | # versions, so we have to shadow those differences off |
| 2017 | # and make sure a 32-bit-on-64-bit build picks up the |
| 2018 | # right files. |
| 2019 | ['host_arch!="ia32"', { |
| 2020 | 'include_dirs+': [ |
| 2021 | '/usr/include32', |
| 2022 | ], |
| 2023 | }], |
| 2024 | ], |
| 2025 | # -mmmx allows mmintrin.h to be used for mmx intrinsics. |
| 2026 | # video playback is mmx and sse2 optimized. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 2027 | 'cflags': [ |
[email protected] | 04b48260 | 2011-09-14 02:36:21 | [diff] [blame] | 2028 | '-m32', |
| 2029 | '-mmmx', |
| 2030 | ], |
| 2031 | 'ldflags': [ |
| 2032 | '-m32', |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 2033 | ], |
| 2034 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 2035 | ], |
| 2036 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 2037 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 2038 | 'target_conditions': [ |
| 2039 | ['_toolset=="target"', { |
| 2040 | 'cflags_cc': [ |
| 2041 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 2042 | # has changed whenever it encounters a varargs function. This |
| 2043 | # silences those warnings, as they are not helpful and |
| 2044 | # clutter legitimate warnings. |
| 2045 | '-Wno-abi', |
| 2046 | ], |
| 2047 | 'conditions': [ |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2048 | ['arm_thumb==1', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 2049 | 'cflags': [ |
| 2050 | '-mthumb', |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 2051 | ] |
| 2052 | }], |
| 2053 | ['armv7==1', { |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 2054 | 'cflags': [ |
| 2055 | '-march=armv7-a', |
| 2056 | '-mtune=cortex-a8', |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 2057 | '-mfloat-abi=softfp', |
| 2058 | ], |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 2059 | 'conditions': [ |
| 2060 | ['arm_neon==1', { |
| 2061 | 'cflags': [ '-mfpu=neon', ], |
| 2062 | }, { |
[email protected] | 53e0f64 | 2010-03-05 01:41:56 | [diff] [blame] | 2063 | 'cflags': [ '-mfpu=<(arm_fpu)', ], |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 2064 | }] |
| 2065 | ], |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 2066 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2067 | ['OS=="android"', { |
[email protected] | 7b1112c | 2012-03-16 22:03:53 | [diff] [blame] | 2068 | # Most of the following flags are derived from what Android |
| 2069 | # uses by default when building for arm, reference for which |
| 2070 | # can be found in the following file in the Android NDK: |
| 2071 | # toolchains/arm-linux-androideabi-4.4.3/setup.mk |
| 2072 | 'cflags': [ |
| 2073 | # The tree-sra optimization (scalar replacement for |
| 2074 | # aggregates enabling subsequent optimizations) leads to |
| 2075 | # invalid code generation when using the Android NDK's |
| 2076 | # compiler (r5-r7). This can be verified using |
| 2077 | # TestWebKitAPI's WTF.Checked_int8_t test. |
| 2078 | '-fno-tree-sra', |
| 2079 | '-Wno-psabi', |
| 2080 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2081 | 'conditions': [ |
| 2082 | ['arm_thumb == 1', { |
| 2083 | # Android toolchain doesn't support -mimplicit-it=thumb |
| 2084 | 'cflags!': [ '-Wa,-mimplicit-it=thumb', ], |
| 2085 | 'cflags': [ '-mthumb-interwork', ], |
| 2086 | }], |
| 2087 | ['armv7==0', { |
| 2088 | # Flags suitable for Android emulator |
| 2089 | 'cflags': [ |
| 2090 | '-march=armv5te', |
| 2091 | '-mtune=xscale', |
| 2092 | '-msoft-float', |
[email protected] | 6863896f | 2012-01-25 17:51:36 | [diff] [blame] | 2093 | ], |
| 2094 | 'defines': [ |
| 2095 | '__ARM_ARCH_5__', |
| 2096 | '__ARM_ARCH_5T__', |
| 2097 | '__ARM_ARCH_5E__', |
| 2098 | '__ARM_ARCH_5TE__', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2099 | ], |
| 2100 | }], |
| 2101 | ], |
| 2102 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 2103 | ], |
| 2104 | }], |
| 2105 | ], |
| 2106 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 2107 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 2108 | 'cflags': [ |
| 2109 | '-fPIC', |
| 2110 | ], |
[email protected] | d3f692b3 | 2011-12-14 19:04:35 | [diff] [blame] | 2111 | 'ldflags': [ |
| 2112 | '-fPIC', |
| 2113 | ], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 2114 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 2115 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 2116 | 'target_conditions': [ |
| 2117 | ['_toolset=="target"', { |
| 2118 | 'cflags': [ |
| 2119 | '--sysroot=<(sysroot)', |
| 2120 | ], |
| 2121 | 'ldflags': [ |
| 2122 | '--sysroot=<(sysroot)', |
| 2123 | ], |
| 2124 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 2125 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 2126 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 2127 | 'cflags': [ |
| 2128 | '-Wheader-hygiene', |
| 2129 | # Clang spots more unused functions. |
| 2130 | '-Wno-unused-function', |
| 2131 | # Don't die on dtoa code that uses a char as an array index. |
| 2132 | '-Wno-char-subscripts', |
[email protected] | d643172 | 2011-09-01 00:46:33 | [diff] [blame] | 2133 | # Especially needed for gtest macros using enum values from Mac |
| 2134 | # system headers. |
| 2135 | # TODO(pkasting): In C++11 this is legal, so this should be |
| 2136 | # removed when we change to that. (This is also why we don't |
| 2137 | # bother fixing all these cases today.) |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 2138 | '-Wno-unnamed-type-template-args', |
[email protected] | 241109b5 | 2011-10-15 19:00:30 | [diff] [blame] | 2139 | # This (rightyfully) complains about 'override', which we use |
| 2140 | # heavily. |
| 2141 | '-Wno-c++11-extensions', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 2142 | |
| 2143 | # Warns on switches on enums that cover all enum values but |
| 2144 | # also contain a default: branch. Chrome is full of that. |
| 2145 | '-Wno-covered-switch-default', |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 2146 | ], |
| 2147 | 'cflags!': [ |
| 2148 | # Clang doesn't seem to know know this flag. |
| 2149 | '-mfpmath=sse', |
| 2150 | ], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 2151 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2152 | ['clang==1 and clang_use_chrome_plugins==1', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 2153 | 'cflags': [ |
| 2154 | '<(clang_chrome_plugins_flags)', |
| 2155 | ], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2156 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 2157 | ['clang==1 and clang_load!=""', { |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 2158 | 'cflags': [ |
| 2159 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 2160 | ], |
| 2161 | }], |
| 2162 | ['clang==1 and clang_add_plugin!=""', { |
| 2163 | 'cflags': [ |
[email protected] | d2372068 | 2011-08-11 00:16:26 | [diff] [blame] | 2164 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 2165 | ], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 2166 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 2167 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 2168 | 'cflags': [ |
| 2169 | # See http://crbug.com/110262 |
| 2170 | '-fcolor-diagnostics', |
| 2171 | ], |
| 2172 | }], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2173 | ['asan==1', { |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2174 | 'cflags': [ |
[email protected] | 6a4cad0 | 2011-11-25 07:26:56 | [diff] [blame] | 2175 | '-faddress-sanitizer', |
[email protected] | 0ac77303 | 2011-12-21 17:37:08 | [diff] [blame] | 2176 | '-fno-omit-frame-pointer', |
[email protected] | 74a26d7 | 2011-09-29 17:29:03 | [diff] [blame] | 2177 | '-w', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2178 | ], |
| 2179 | 'ldflags': [ |
[email protected] | 6a4cad0 | 2011-11-25 07:26:56 | [diff] [blame] | 2180 | '-faddress-sanitizer', |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2181 | ], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 2182 | 'defines': [ |
| 2183 | 'ADDRESS_SANITIZER', |
| 2184 | ], |
[email protected] | 92799b63 | 2011-08-15 14:33:06 | [diff] [blame] | 2185 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 2186 | ['linux_breakpad==1', { |
[email protected] | c87efd4 | 2010-08-26 18:28:17 | [diff] [blame] | 2187 | 'cflags': [ '-g' ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 2188 | 'defines': ['USE_LINUX_BREAKPAD'], |
| 2189 | }], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 2190 | ['linux_use_heapchecker==1', { |
| 2191 | 'variables': {'linux_use_tcmalloc%': 1}, |
[email protected] | cea4aec | 2012-01-24 12:26:40 | [diff] [blame] | 2192 | 'defines': ['USE_HEAPCHECKER'], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 2193 | }], |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 2194 | ['linux_use_tcmalloc==0', { |
| 2195 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 2196 | }], |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 2197 | ['linux_keep_shadow_stacks==1', { |
| 2198 | 'defines': ['KEEP_SHADOW_STACKS'], |
[email protected] | 987a742 | 2012-02-23 19:10:51 | [diff] [blame] | 2199 | 'cflags': [ |
| 2200 | '-finstrument-functions', |
| 2201 | # Allow mmx intrinsics to inline, so that the compiler can expand |
| 2202 | # the intrinsics. |
| 2203 | '-finstrument-functions-exclude-file-list=mmintrin.h', |
| 2204 | ], |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 2205 | }], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2206 | ['linux_use_gold_flags==1', { |
[email protected] | be23949 | 2012-02-09 19:00:17 | [diff] [blame] | 2207 | 'ldflags': [ |
| 2208 | # Experimentation found that using four linking threads |
| 2209 | # saved ~20% of link time. |
| 2210 | # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 |
| 2211 | '-Wl,--threads', |
| 2212 | '-Wl,--thread-count=4', |
| 2213 | ], |
[email protected] | 8d726a4 | 2012-02-09 03:49:00 | [diff] [blame] | 2214 | 'conditions': [ |
| 2215 | ['release_valgrind_build==0', { |
| 2216 | 'target_conditions': [ |
| 2217 | ['_toolset=="target"', { |
| 2218 | 'ldflags': [ |
| 2219 | # There seems to be a conflict of --icf and -pie |
| 2220 | # in gold which can generate crashy binaries. As |
| 2221 | # a security measure, -pie takes precendence for |
| 2222 | # now. |
| 2223 | #'-Wl,--icf=safe', |
| 2224 | '-Wl,--icf=none', |
| 2225 | ], |
| 2226 | }], |
| 2227 | ], |
| 2228 | }], |
| 2229 | ], |
| 2230 | }], |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 2231 | ['linux_use_gold_binary==1', { |
| 2232 | 'variables': { |
[email protected] | 516312d | 2012-02-28 05:17:26 | [diff] [blame] | 2233 | 'conditions': [ |
| 2234 | ['inside_chromium_build==1', { |
| 2235 | # We pass the path to gold to the compiler. gyp leaves |
| 2236 | # unspecified what the cwd is when running the compiler, |
| 2237 | # so the normal gyp path-munging fails us. This hack |
| 2238 | # gets the right path. |
| 2239 | 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', |
| 2240 | }, { |
| 2241 | 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold', |
| 2242 | }] |
| 2243 | ] |
[email protected] | b07806c1 | 2012-02-03 22:44:59 | [diff] [blame] | 2244 | }, |
| 2245 | 'ldflags': [ |
| 2246 | # Put our gold binary in the search path for the linker. |
| 2247 | '-B<(gold_path)', |
| 2248 | ], |
| 2249 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 2250 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 2251 | }, |
| 2252 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 2253 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 2254 | # with Linux. |
| 2255 | ['OS=="freebsd"', { |
| 2256 | 'target_defaults': { |
| 2257 | 'ldflags': [ |
| 2258 | '-Wl,--no-keep-memory', |
| 2259 | ], |
| 2260 | }, |
| 2261 | }], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2262 | # Android-specific options; note that most are set above with Linux. |
| 2263 | ['OS=="android"', { |
| 2264 | 'variables': { |
[email protected] | febc41db | 2012-03-24 02:44:43 | [diff] [blame] | 2265 | 'target_arch%': 'arm', # target_arch in android terms. |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2266 | 'conditions': [ |
| 2267 | # Android uses x86 instead of ia32 for their target_arch designation. |
| 2268 | ['target_arch=="ia32"', { |
[email protected] | febc41db | 2012-03-24 02:44:43 | [diff] [blame] | 2269 | 'target_arch%': 'x86', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2270 | }], |
| 2271 | # Use shared stlport library when system one used. |
| 2272 | # Figure this out early since it needs symbols from libgcc.a, so it |
| 2273 | # has to be before that in the set of libraries. |
| 2274 | ['use_system_stlport==1', { |
| 2275 | 'android_stlport_library': 'stlport', |
| 2276 | }, { |
| 2277 | 'android_stlport_library': 'stlport_static', |
| 2278 | }], |
| 2279 | ], |
| 2280 | |
| 2281 | # Placing this variable here prevents from forking libvpx, used |
| 2282 | # by remoting. Remoting is off, so it needn't built, |
| 2283 | # so forking it's deps seems like overkill. |
| 2284 | # But this variable need defined to properly run gyp. |
| 2285 | # A proper solution is to have an OS==android conditional |
| 2286 | # in third_party/libvpx/libvpx.gyp to define it. |
| 2287 | 'libvpx_path': 'lib/linux/arm', |
| 2288 | }, |
| 2289 | 'target_defaults': { |
| 2290 | # Build a Release build by default to match Android build behavior. |
| 2291 | # This is typical with Android because Debug builds tend to be much |
| 2292 | # larger and run very slowly on constrained devices. It is still |
| 2293 | # possible to do a Debug build by specifying BUILDTYPE=Debug on the |
| 2294 | # 'make' command line. |
| 2295 | 'default_configuration': 'Release', |
| 2296 | |
| 2297 | 'variables': { |
| 2298 | 'release_extra_cflags%': '', |
| 2299 | }, |
| 2300 | |
| 2301 | 'target_conditions': [ |
| 2302 | # Settings for building device targets using Android's toolchain. |
| 2303 | # These are based on the setup.mk file from the Android NDK. |
| 2304 | # |
| 2305 | # The NDK Android executable link step looks as follows: |
| 2306 | # $LDFLAGS |
| 2307 | # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o |
| 2308 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 2309 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 2310 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 2311 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 2312 | # $(PRIVATE_LDLIBS) <-- System .so |
| 2313 | # $(TARGET_CRTEND_O) <-- crtend.o |
| 2314 | # |
| 2315 | # For now the above are approximated for executables by adding |
| 2316 | # crtbegin.o to the end of the ldflags and 'crtend.o' to the end |
| 2317 | # of 'libraries'. |
| 2318 | # |
| 2319 | # The NDK Android shared library link step looks as follows: |
| 2320 | # $LDFLAGS |
| 2321 | # $(PRIVATE_OBJECTS) <-- The .o that we built |
| 2322 | # -l,--whole-archive |
| 2323 | # $(PRIVATE_WHOLE_STATIC_LIBRARIES) |
| 2324 | # -l,--no-whole-archive |
| 2325 | # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built |
| 2326 | # $(TARGET_LIBGCC) <-- libgcc.a |
| 2327 | # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built |
| 2328 | # $(PRIVATE_LDLIBS) <-- System .so |
| 2329 | # |
| 2330 | # For now, assume not need any whole static libs. |
| 2331 | # |
| 2332 | # For both executables and shared libraries, add the proper |
| 2333 | # libgcc.a to the start of libraries which puts it in the |
| 2334 | # proper spot after .o and .a files get linked in. |
| 2335 | # |
| 2336 | # TODO: The proper thing to do longer-tem would be proper gyp |
| 2337 | # support for a custom link command line. |
| 2338 | ['_toolset=="target"', { |
| 2339 | 'cflags!': [ |
| 2340 | '-pthread', # Not supported by Android toolchain. |
| 2341 | ], |
| 2342 | 'cflags': [ |
| 2343 | '-U__linux__', # Don't allow toolchain to claim -D__linux__ |
| 2344 | '-ffunction-sections', |
| 2345 | '-funwind-tables', |
| 2346 | '-g', |
| 2347 | '-fstack-protector', |
| 2348 | '-fno-short-enums', |
| 2349 | '-finline-limit=64', |
| 2350 | '-Wa,--noexecstack', |
| 2351 | '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings. |
| 2352 | '<@(release_extra_cflags)', |
| 2353 | # Note: This include is in cflags to ensure that it comes after |
| 2354 | # all of the includes. |
| 2355 | '-I<(android_ndk_include)', |
| 2356 | ], |
| 2357 | 'defines': [ |
| 2358 | 'ANDROID', |
| 2359 | '__GNU_SOURCE=1', # Necessary for clone() |
| 2360 | 'USE_STLPORT=1', |
| 2361 | '_STLP_USE_PTR_SPECIALIZATIONS=1', |
| 2362 | 'HAVE_OFF64_T', |
| 2363 | 'HAVE_SYS_UIO_H', |
| 2364 | 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize. |
| 2365 | ], |
| 2366 | 'ldflags!': [ |
| 2367 | '-pthread', # Not supported by Android toolchain. |
| 2368 | ], |
| 2369 | 'ldflags': [ |
| 2370 | '-nostdlib', |
| 2371 | '-Wl,--no-undefined', |
| 2372 | '-Wl,--icf=safe', # Enable identical code folding to reduce size |
| 2373 | # Don't export symbols from statically linked libraries. |
| 2374 | '-Wl,--exclude-libs=ALL', |
| 2375 | ], |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 2376 | 'libraries': [ |
| 2377 | '-l<(android_stlport_library)', |
| 2378 | # Manually link the libgcc.a that the cross compiler uses. |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 2379 | '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)', |
[email protected] | a0e48b0 | 2011-11-22 07:53:01 | [diff] [blame] | 2380 | '-lc', |
| 2381 | '-ldl', |
| 2382 | '-lstdc++', |
| 2383 | '-lm', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2384 | ], |
| 2385 | 'conditions': [ |
| 2386 | ['android_build_type==0', { |
| 2387 | 'ldflags': [ |
[email protected] | 5baf748 | 2011-12-13 16:00:52 | [diff] [blame] | 2388 | '--sysroot=<(android_ndk_sysroot)', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2389 | ], |
| 2390 | }], |
| 2391 | # NOTE: The stlport header include paths below are specified in |
| 2392 | # cflags rather than include_dirs because they need to come |
| 2393 | # after include_dirs. Think of them like system headers, but |
| 2394 | # don't use '-isystem' because the arm-linux-androideabi-4.4.3 |
| 2395 | # toolchain (circa Gingerbread) will exhibit strange errors. |
| 2396 | # The include ordering here is important; change with caution. |
| 2397 | ['use_system_stlport==0', { |
| 2398 | 'cflags': [ |
| 2399 | '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', |
| 2400 | ], |
| 2401 | 'conditions': [ |
| 2402 | ['target_arch=="arm" and armv7==1', { |
| 2403 | 'ldflags': [ |
| 2404 | '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a', |
| 2405 | ], |
| 2406 | }], |
| 2407 | ['target_arch=="arm" and armv7==0', { |
| 2408 | 'ldflags': [ |
| 2409 | '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi', |
| 2410 | ], |
| 2411 | }], |
| 2412 | ['target_arch=="ia32"', { |
| 2413 | 'ldflags': [ |
| 2414 | '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86', |
| 2415 | ], |
| 2416 | }], |
| 2417 | ], |
| 2418 | }], |
| 2419 | ['target_arch=="ia32"', { |
| 2420 | # The x86 toolchain currently has problems with stack-protector. |
| 2421 | 'cflags!': [ |
| 2422 | '-fstack-protector', |
| 2423 | ], |
| 2424 | 'cflags': [ |
| 2425 | '-fno-stack-protector', |
| 2426 | ], |
| 2427 | }], |
| 2428 | ], |
| 2429 | 'target_conditions': [ |
| 2430 | ['_type=="executable"', { |
| 2431 | 'ldflags': [ |
| 2432 | '-Bdynamic', |
| 2433 | '-Wl,-dynamic-linker,/system/bin/linker', |
| 2434 | '-Wl,--gc-sections', |
| 2435 | '-Wl,-z,nocopyreloc', |
| 2436 | # crtbegin_dynamic.o should be the last item in ldflags. |
| 2437 | '<(android_ndk_lib)/crtbegin_dynamic.o', |
| 2438 | ], |
| 2439 | 'libraries': [ |
| 2440 | # crtend_android.o needs to be the last item in libraries. |
| 2441 | # Do not add any libraries after this! |
| 2442 | '<(android_ndk_lib)/crtend_android.o', |
| 2443 | ], |
| 2444 | }], |
| 2445 | ['_type=="shared_library"', { |
| 2446 | 'ldflags': [ |
| 2447 | '-Wl,-shared,-Bsymbolic', |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 2448 | # crtbegin_so.o should be the last item in ldflags. |
| 2449 | '<(android_ndk_lib)/crtbegin_so.o', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2450 | ], |
[email protected] | a08029b4 | 2012-04-25 03:18:46 | [diff] [blame] | 2451 | 'libraries': [ |
| 2452 | # crtend_so.o needs to be the last item in libraries. |
| 2453 | # Do not add any libraries after this! |
| 2454 | '<(android_ndk_lib)/crtend_so.o', |
| 2455 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2456 | }], |
| 2457 | ], |
| 2458 | }], |
| 2459 | # Settings for building host targets using the system toolchain. |
| 2460 | ['_toolset=="host"', { |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 2461 | 'cflags!': [ |
| 2462 | # Due to issues in Clang build system, using ASan on 32-bit |
| 2463 | # binaries on x86_64 host is problematic. |
| 2464 | # TODO(eugenis): re-enable. |
| 2465 | '-faddress-sanitizer', |
| 2466 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2467 | 'ldflags!': [ |
[email protected] | 3984aaf | 2012-02-16 11:42:12 | [diff] [blame] | 2468 | '-faddress-sanitizer', |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2469 | '-Wl,-z,noexecstack', |
| 2470 | '-Wl,--gc-sections', |
| 2471 | '-Wl,-O1', |
| 2472 | '-Wl,--as-needed', |
| 2473 | ], |
[email protected] | 965b6b2 | 2011-09-29 16:07:28 | [diff] [blame] | 2474 | 'sources/': [ |
| 2475 | ['exclude', '_android(_unittest)?\\.cc$'], |
| 2476 | ['exclude', '(^|/)android/'] |
| 2477 | ], |
[email protected] | da1c8d69 | 2011-09-20 20:35:01 | [diff] [blame] | 2478 | }], |
| 2479 | ], |
| 2480 | }, |
| 2481 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 2482 | ['OS=="solaris"', { |
| 2483 | 'cflags!': ['-fvisibility=hidden'], |
| 2484 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 2485 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2486 | ['OS=="mac"', { |
| 2487 | 'target_defaults': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2488 | 'variables': { |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 2489 | # These should end with %, but there seems to be a bug with % in |
| 2490 | # variables that are intended to be set to different values in |
| 2491 | # different targets, like these. |
| 2492 | 'mac_pie': 1, # Most executables can be position-independent. |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2493 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
[email protected] | 27b687ec4 | 2012-03-26 22:22:15 | [diff] [blame] | 2494 | # Strip debugging symbols from the target. |
| 2495 | 'mac_strip': '<(mac_strip_release)', |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2496 | }, |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 2497 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2498 | 'xcode_settings': { |
| 2499 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 2500 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 2501 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
| 2502 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 2503 | # (Equivalent to -fPIC) |
| 2504 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 2505 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 2506 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 2507 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 2508 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 2509 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 2510 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 2511 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 2512 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2513 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 2514 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 2515 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 2516 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | e1ece30 | 2011-09-15 03:58:11 | [diff] [blame] | 2517 | # Keep pch files below xcodebuild/. |
| 2518 | 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2519 | 'USE_HEADERMAP': 'NO', |
[email protected] | 57e9402 | 2011-05-04 15:33:19 | [diff] [blame] | 2520 | 'OTHER_CFLAGS': [ |
| 2521 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
| 2522 | ], |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 2523 | 'WARNING_CFLAGS': [ |
| 2524 | '-Wall', |
| 2525 | '-Wendif-labels', |
| 2526 | '-Wextra', |
| 2527 | # Don't warn about unused function parameters. |
| 2528 | '-Wno-unused-parameter', |
| 2529 | # Don't warn about the "struct foo f = {0};" initialization |
| 2530 | # pattern. |
| 2531 | '-Wno-missing-field-initializers', |
| 2532 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 2533 | 'conditions': [ |
| 2534 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 2535 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 2536 | ], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 2537 | ['clang==1', { |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 2538 | 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
| 2539 | 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
[email protected] | a79fd88 | 2011-10-03 18:22:38 | [diff] [blame] | 2540 | |
[email protected] | 6c648f1 | 2011-12-24 07:50:43 | [diff] [blame] | 2541 | # Don't use -Wc++0x-extensions, which Xcode 4 enables by default |
| 2542 | # when buliding with clang. This warning is triggered when the |
| 2543 | # override keyword is used via the OVERRIDE macro from |
| 2544 | # base/compiler_specific.h. |
| 2545 | 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
[email protected] | a79fd88 | 2011-10-03 18:22:38 | [diff] [blame] | 2546 | |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 2547 | 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 2548 | 'WARNING_CFLAGS': [ |
[email protected] | 7f8d486f | 2011-04-05 19:49:07 | [diff] [blame] | 2549 | '-Wheader-hygiene', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 2550 | # Don't die on dtoa code that uses a char as an array index. |
| 2551 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 2552 | '-Wno-char-subscripts', |
[email protected] | 25d3bb72 | 2010-11-22 14:31:45 | [diff] [blame] | 2553 | # Clang spots more unused functions. |
| 2554 | '-Wno-unused-function', |
[email protected] | d643172 | 2011-09-01 00:46:33 | [diff] [blame] | 2555 | # See comments on this flag higher up in this file. |
[email protected] | 0fa0fbc | 2010-10-12 04:32:05 | [diff] [blame] | 2556 | '-Wno-unnamed-type-template-args', |
[email protected] | 241109b5 | 2011-10-15 19:00:30 | [diff] [blame] | 2557 | # This (rightyfully) complains about 'override', which we use |
| 2558 | # heavily. |
| 2559 | '-Wno-c++11-extensions', |
[email protected] | 9242c764 | 2012-01-29 09:02:10 | [diff] [blame] | 2560 | |
| 2561 | # Warns on switches on enums that cover all enum values but |
| 2562 | # also contain a default: branch. Chrome is full of that. |
| 2563 | '-Wno-covered-switch-default', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 2564 | ], |
| 2565 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 2566 | ['clang==1 and clang_use_chrome_plugins==1', { |
| 2567 | 'OTHER_CFLAGS': [ |
| 2568 | '<(clang_chrome_plugins_flags)', |
| 2569 | ], |
| 2570 | }], |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 2571 | ['clang==1 and clang_load!=""', { |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 2572 | 'OTHER_CFLAGS': [ |
| 2573 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
[email protected] | 4a9ac22e | 2011-12-02 03:41:53 | [diff] [blame] | 2574 | ], |
| 2575 | }], |
| 2576 | ['clang==1 and clang_add_plugin!=""', { |
| 2577 | 'OTHER_CFLAGS': [ |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 2578 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 2579 | ], |
| 2580 | }], |
[email protected] | 2616d45d | 2012-01-19 03:15:48 | [diff] [blame] | 2581 | ['clang==1 and "<(GENERATOR)"=="ninja"', { |
| 2582 | 'OTHER_CFLAGS': [ |
| 2583 | # See http://crbug.com/110262 |
| 2584 | '-fcolor-diagnostics', |
| 2585 | ], |
| 2586 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 2587 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2588 | }, |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 2589 | 'conditions': [ |
| 2590 | ['clang==1', { |
| 2591 | 'variables': { |
| 2592 | 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 2593 | }, |
| 2594 | }], |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 2595 | ['asan==1', { |
| 2596 | 'xcode_settings': { |
| 2597 | 'OTHER_CFLAGS': [ |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 2598 | '-faddress-sanitizer', |
| 2599 | '-w', |
| 2600 | ], |
| 2601 | 'OTHER_LDFLAGS': [ |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 2602 | '-faddress-sanitizer', |
| 2603 | # The symbols below are referenced in the ASan runtime |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 2604 | # library (compiled on OS X 10.6), but may be unavailable |
[email protected] | 921c7b5 | 2011-11-25 10:34:35 | [diff] [blame] | 2605 | # on the prior OS X versions. Because Chromium is currently |
| 2606 | # targeting 10.5.0, we need to explicitly mark these |
| 2607 | # symbols as dynamic_lookup. |
| 2608 | '-Wl,-U,_malloc_default_purgeable_zone', |
| 2609 | '-Wl,-U,_malloc_zone_memalign', |
| 2610 | '-Wl,-U,_dispatch_sync_f', |
| 2611 | '-Wl,-U,_dispatch_async_f', |
| 2612 | '-Wl,-U,_dispatch_barrier_async_f', |
| 2613 | '-Wl,-U,_dispatch_group_async_f', |
| 2614 | '-Wl,-U,_dispatch_after_f', |
| 2615 | ], |
| 2616 | }, |
| 2617 | 'defines': [ |
| 2618 | 'ADDRESS_SANITIZER', |
| 2619 | ], |
| 2620 | }], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 2621 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2622 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2623 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 2624 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
| 2625 | }], |
| 2626 | ['_mac_bundle', { |
| 2627 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 2628 | }], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 2629 | ['_type=="executable"', { |
| 2630 | 'postbuilds': [ |
| 2631 | { |
| 2632 | # Arranges for data (heap) pages to be protected against |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 2633 | # code execution when running on Mac OS X 10.7 ("Lion"), and |
| 2634 | # ensures that the position-independent executable (PIE) bit |
| 2635 | # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 2636 | 'variables': { |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 2637 | # Define change_mach_o_flags in a variable ending in _path |
| 2638 | # so that GYP understands it's a path and performs proper |
| 2639 | # relativization during dict merging. |
| 2640 | 'change_mach_o_flags_path': |
| 2641 | 'mac/change_mach_o_flags_from_xcode.sh', |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 2642 | 'change_mach_o_flags_options%': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 2643 | ], |
| 2644 | 'target_conditions': [ |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 2645 | ['mac_pie==0 or release_valgrind_build==1', { |
| 2646 | # Don't enable PIE if it's unwanted. It's unwanted if |
| 2647 | # the target specifies mac_pie=0 or if building for |
| 2648 | # Valgrind, because Valgrind doesn't understand slide. |
| 2649 | # See the similar mac_pie/release_valgrind_build check |
| 2650 | # below. |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 2651 | 'change_mach_o_flags_options': [ |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 2652 | '--no-pie', |
| 2653 | ], |
| 2654 | }], |
| 2655 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 2656 | }, |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 2657 | 'postbuild_name': 'Change Mach-O Flags', |
| 2658 | 'action': [ |
| 2659 | '<(change_mach_o_flags_path)', |
[email protected] | 081c034 | 2011-08-24 14:59:13 | [diff] [blame] | 2660 | '>@(change_mach_o_flags_options)', |
[email protected] | 8c40f32 | 2011-08-24 03:33:36 | [diff] [blame] | 2661 | ], |
[email protected] | 6303fed | 2011-08-11 01:12:10 | [diff] [blame] | 2662 | }, |
| 2663 | ], |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 2664 | 'conditions': [ |
| 2665 | ['asan==1', { |
| 2666 | 'variables': { |
| 2667 | 'asan_saves_file': 'asan.saves', |
| 2668 | }, |
| 2669 | 'xcode_settings': { |
[email protected] | 6a4cad0 | 2011-11-25 07:26:56 | [diff] [blame] | 2670 | 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', |
[email protected] | 5a5d97aa | 2011-09-02 15:34:00 | [diff] [blame] | 2671 | }, |
| 2672 | }], |
| 2673 | ], |
[email protected] | 162407f | 2011-09-08 15:33:17 | [diff] [blame] | 2674 | 'target_conditions': [ |
| 2675 | ['mac_pie==1 and release_valgrind_build==0', { |
| 2676 | # Turn on position-independence (ASLR) for executables. When |
| 2677 | # PIE is on for the Chrome executables, the framework will |
| 2678 | # also be subject to ASLR. |
| 2679 | # Don't do this when building for Valgrind, because Valgrind |
| 2680 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 2681 | # understand slide, and get rid of the Valgrind check. |
| 2682 | 'xcode_settings': { |
| 2683 | 'OTHER_LDFLAGS': [ |
| 2684 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 2685 | ], |
| 2686 | }, |
| 2687 | }], |
| 2688 | ], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 2689 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 2690 | ['(_type=="executable" or _type=="shared_library" or \ |
| 2691 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2692 | 'target_conditions': [ |
| 2693 | ['mac_real_dsym == 1', { |
| 2694 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 2695 | # debug information format to dwarf-with-dsym. Since |
| 2696 | # strip_from_xcode will not be used, set Xcode to do the |
| 2697 | # stripping as well. |
| 2698 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2699 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2700 | 'xcode_settings': { |
| 2701 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 2702 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 2703 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 2704 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 2705 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 2706 | # The Xcode default is to strip debugging symbols |
| 2707 | # only (-S). Local symbols should be stripped as |
| 2708 | # well, which will be handled by -x. Xcode will |
| 2709 | # continue to insert -S when stripping even when |
| 2710 | # additional flags are added with STRIPFLAGS. |
| 2711 | 'STRIPFLAGS': '-x', |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 2712 | }], # _type=="shared_library" or _type=="loadable_module"' |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 2713 | ], # target_conditions |
| 2714 | }, # xcode_settings |
| 2715 | }, # configuration "Release" |
| 2716 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 2717 | }, { # mac_real_dsym != 1 |
| 2718 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 2719 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 2720 | # only operates in the Release configuration. |
| 2721 | 'postbuilds': [ |
| 2722 | { |
| 2723 | 'variables': { |
| 2724 | # Define strip_from_xcode in a variable ending in _path |
| 2725 | # so that gyp understands it's a path and performs proper |
| 2726 | # relativization during dict merging. |
| 2727 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 2728 | }, |
| 2729 | 'postbuild_name': 'Strip If Needed', |
| 2730 | 'action': ['<(strip_from_xcode_path)'], |
| 2731 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 2732 | ], # postbuilds |
| 2733 | }], # mac_real_dsym |
| 2734 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 2735 | }], # (_type=="executable" or _type=="shared_library" or |
| 2736 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 2737 | ], # target_conditions |
| 2738 | }, # target_defaults |
| 2739 | }], # OS=="mac" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2740 | ['OS=="win"', { |
| 2741 | 'target_defaults': { |
| 2742 | 'defines': [ |
[email protected] | a89e094 | 2011-09-26 16:06:47 | [diff] [blame] | 2743 | '_WIN32_WINNT=0x0601', |
| 2744 | 'WINVER=0x0601', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2745 | 'WIN32', |
| 2746 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2747 | 'NOMINMAX', |
[email protected] | e311628 | 2011-08-13 00:52:28 | [diff] [blame] | 2748 | 'PSAPI_VERSION=1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2749 | '_CRT_RAND_S', |
| 2750 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 2751 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 2752 | '_ATL_NO_OPENGL', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2753 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2754 | 'conditions': [ |
[email protected] | 2212d27 | 2011-12-20 21:37:37 | [diff] [blame] | 2755 | ['buildtype=="Official"', { |
| 2756 | # In official builds, targets can self-select an optimization |
| 2757 | # level by defining a variable named 'optimize', and setting it |
| 2758 | # to one of |
| 2759 | # - "size", optimizes for minimal code size - the default. |
| 2760 | # - "speed", optimizes for speed over code size. |
| 2761 | # - "max", whole program optimization and link-time code |
| 2762 | # generation. This is very expensive and should be used |
| 2763 | # sparingly. |
| 2764 | 'variables': { |
| 2765 | 'optimize%': 'size', |
| 2766 | }, |
| 2767 | 'target_conditions': [ |
| 2768 | ['optimize=="size"', { |
| 2769 | 'msvs_settings': { |
| 2770 | 'VCCLCompilerTool': { |
| 2771 | # 1, optimizeMinSpace, Minimize Size (/O1) |
| 2772 | 'Optimization': '1', |
| 2773 | # 2, favorSize - Favor small code (/Os) |
| 2774 | 'FavorSizeOrSpeed': '2', |
| 2775 | }, |
| 2776 | }, |
| 2777 | }, |
| 2778 | ], |
| 2779 | ['optimize=="speed"', { |
| 2780 | 'msvs_settings': { |
| 2781 | 'VCCLCompilerTool': { |
| 2782 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 2783 | 'Optimization': '2', |
| 2784 | # 1, favorSpeed - Favor fast code (/Ot) |
| 2785 | 'FavorSizeOrSpeed': '1', |
| 2786 | }, |
| 2787 | }, |
| 2788 | }, |
| 2789 | ], |
| 2790 | ['optimize=="max"', { |
| 2791 | 'msvs_settings': { |
| 2792 | 'VCCLCompilerTool': { |
| 2793 | # 2, optimizeMaxSpeed, Maximize Speed (/O2) |
| 2794 | 'Optimization': '2', |
| 2795 | # 1, favorSpeed - Favor fast code (/Ot) |
| 2796 | 'FavorSizeOrSpeed': '1', |
| 2797 | # This implies link time code generation. |
| 2798 | 'WholeProgramOptimization': 'true', |
| 2799 | }, |
| 2800 | }, |
| 2801 | }, |
| 2802 | ], |
| 2803 | ], |
| 2804 | }, |
| 2805 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2806 | ['component=="static_library"', { |
| 2807 | 'defines': [ |
| 2808 | '_HAS_EXCEPTIONS=0', |
| 2809 | ], |
| 2810 | }], |
[email protected] | c7b9539 | 2012-03-28 00:25:20 | [diff] [blame] | 2811 | ['MSVS_VERSION=="2008"', { |
| 2812 | 'defines': [ |
| 2813 | '_HAS_TR1=0', |
| 2814 | ], |
| 2815 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 2816 | ['secure_atl', { |
| 2817 | 'defines': [ |
| 2818 | '_SECURE_ATL', |
| 2819 | ], |
| 2820 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2821 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 2822 | 'msvs_system_include_dirs': [ |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2823 | '<(DEPTH)/third_party/directxsdk/files/Include', |
[email protected] | 58e5614 | 2011-11-24 00:57:54 | [diff] [blame] | 2824 | '<(DEPTH)/third_party/platformsdk_win7/files/Include', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2825 | '$(VSInstallDir)/VC/atlmfc/include', |
| 2826 | ], |
[email protected] | a8d99cef | 2009-08-26 20:47:49 | [diff] [blame] | 2827 | 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 2828 | 'msvs_disabled_warnings': [4351, 4396, 4503, 4819, |
| 2829 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 2830 | # removed as code is fixed. |
| 2831 | 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
| 2832 | 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, |
| 2833 | 4702, 4706, |
| 2834 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2835 | 'msvs_settings': { |
| 2836 | 'VCCLCompilerTool': { |
| 2837 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2838 | 'BufferSecurityCheck': 'true', |
| 2839 | 'EnableFunctionLevelLinking': 'true', |
| 2840 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 2841 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2842 | 'WarnAsError': 'true', |
| 2843 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 2844 | 'conditions': [ |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 2845 | ['msvs_multi_core_compile', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2846 | 'AdditionalOptions': ['/MP'], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 2847 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 2848 | ['MSVS_VERSION=="2005e"', { |
| 2849 | 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL) |
| 2850 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 2851 | ['component=="shared_library"', { |
| 2852 | 'ExceptionHandling': '1', # /EHsc |
| 2853 | }, { |
| 2854 | 'ExceptionHandling': '0', |
| 2855 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 2856 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2857 | }, |
| 2858 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2859 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2860 | 'AdditionalLibraryDirectories': [ |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2861 | '<(DEPTH)/third_party/directxsdk/files/Lib/x86', |
[email protected] | 58e5614 | 2011-11-24 00:57:54 | [diff] [blame] | 2862 | '<(DEPTH)/third_party/platformsdk_win7/files/Lib', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2863 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2864 | }, |
| 2865 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2866 | 'AdditionalDependencies': [ |
| 2867 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 2868 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2869 | 'version.lib', |
| 2870 | 'msimg32.lib', |
| 2871 | 'ws2_32.lib', |
| 2872 | 'usp10.lib', |
| 2873 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 2874 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 2875 | 'winmm.lib', |
| 2876 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2877 | ], |
[email protected] | 60c21983 | 2012-03-21 22:59:32 | [diff] [blame] | 2878 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 2879 | 'conditions': [ |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 2880 | ['msvs_express', { |
| 2881 | # Explicitly required when using the ATL with express |
| 2882 | 'AdditionalDependencies': [ |
| 2883 | 'atlthunk.lib', |
| 2884 | ], |
[email protected] | 60c21983 | 2012-03-21 22:59:32 | [diff] [blame] | 2885 | |
| 2886 | # ATL 8.0 included in WDK 7.1 makes the linker to generate |
| 2887 | # almost eight hundred LNK4254 and LNK4078 warnings: |
| 2888 | # - warning LNK4254: section 'ATL' (50000040) merged into |
| 2889 | # '.rdata' (40000040) with different attributes |
| 2890 | # - warning LNK4078: multiple 'ATL' sections found with |
| 2891 | # different attributes |
| 2892 | 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 2893 | }], |
| 2894 | ['MSVS_VERSION=="2005e"', { |
| 2895 | # Non-express versions link automatically to these |
| 2896 | 'AdditionalDependencies': [ |
| 2897 | 'advapi32.lib', |
| 2898 | 'comdlg32.lib', |
| 2899 | 'ole32.lib', |
| 2900 | 'shell32.lib', |
| 2901 | 'user32.lib', |
| 2902 | 'winspool.lib', |
| 2903 | ], |
| 2904 | }], |
| 2905 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2906 | 'AdditionalLibraryDirectories': [ |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2907 | '<(DEPTH)/third_party/directxsdk/files/Lib/x86', |
[email protected] | 58e5614 | 2011-11-24 00:57:54 | [diff] [blame] | 2908 | '<(DEPTH)/third_party/platformsdk_win7/files/Lib', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 2909 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2910 | 'GenerateDebugInformation': 'true', |
| 2911 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 2912 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2913 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 2914 | # SubSystem values: |
| 2915 | # 0 == not set |
| 2916 | # 1 == /SUBSYSTEM:CONSOLE |
| 2917 | # 2 == /SUBSYSTEM:WINDOWS |
| 2918 | # Most of the executables we'll ever create are tests |
| 2919 | # and utilities with console output. |
| 2920 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2921 | }, |
| 2922 | 'VCMIDLTool': { |
| 2923 | 'GenerateStublessProxies': 'true', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 2924 | 'TypeLibraryName': '$(InputName).tlb', |
| 2925 | 'OutputDirectory': '$(IntDir)', |
| 2926 | 'HeaderFileName': '$(InputName).h', |
[email protected] | 4fdb3cc | 2012-04-07 01:49:33 | [diff] [blame] | 2927 | 'DLLDataFileName': '$(InputName).dlldata.c', |
[email protected] | 279904d | 2012-03-31 00:03:09 | [diff] [blame] | 2928 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 2929 | 'ProxyFileName': '$(InputName)_p.c', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2930 | }, |
| 2931 | 'VCResourceCompilerTool': { |
| 2932 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 2933 | 'AdditionalIncludeDirectories': [ |
| 2934 | '<(DEPTH)', |
| 2935 | '<(SHARED_INTERMEDIATE_DIR)', |
| 2936 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 2937 | }, |
| 2938 | }, |
| 2939 | }, |
| 2940 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 2941 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 2942 | 'target_defaults': { |
| 2943 | 'defines': [ |
| 2944 | 'DISABLE_NACL', |
| 2945 | ], |
| 2946 | }, |
| 2947 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 2948 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 2949 | 'target_defaults': { |
| 2950 | 'msvs_settings': { |
| 2951 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 2952 | 'DelayLoadDLLs': [ |
| 2953 | 'dbghelp.dll', |
| 2954 | 'dwmapi.dll', |
[email protected] | e15a4ce5 | 2012-01-04 20:11:01 | [diff] [blame] | 2955 | 'shell32.dll', |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 2956 | 'uxtheme.dll', |
| 2957 | ], |
| 2958 | }, |
| 2959 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2960 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2961 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2962 | 'msvs_settings': { |
| 2963 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2964 | 'AdditionalOptions': [ |
| 2965 | '/safeseh', |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 2966 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2967 | '/ignore:4199', |
| 2968 | '/ignore:4221', |
| 2969 | '/nxcompat', |
| 2970 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2971 | }, |
| 2972 | }, |
| 2973 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 2974 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2975 | 'msvs_settings': { |
| 2976 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2977 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2978 | # safeseh is not compatible with x64 |
[email protected] | 7cf23ce6 | 2012-01-13 02:43:33 | [diff] [blame] | 2979 | '/dynamicbase', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 2980 | '/ignore:4199', |
| 2981 | '/ignore:4221', |
| 2982 | '/nxcompat', |
| 2983 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 2984 | }, |
| 2985 | }, |
| 2986 | }, |
| 2987 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 2988 | }, |
| 2989 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 2990 | ['enable_new_npdevice_api==1', { |
| 2991 | 'target_defaults': { |
| 2992 | 'defines': [ |
| 2993 | 'ENABLE_NEW_NPDEVICE_API', |
| 2994 | ], |
| 2995 | }, |
| 2996 | }], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 2997 | ['clang==1 and OS!="android"', { |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 2998 | 'make_global_settings': [ |
[email protected] | e4ddf33 | 2011-10-20 21:52:24 | [diff] [blame] | 2999 | ['CC', '<(make_clang_dir)/bin/clang'], |
| 3000 | ['CXX', '<(make_clang_dir)/bin/clang++'], |
[email protected] | 60550c8 | 2011-09-06 23:51:07 | [diff] [blame] | 3001 | ['LINK', '$(CXX)'], |
[email protected] | 34f4089 | 2011-09-06 21:53:30 | [diff] [blame] | 3002 | ['CC.host', '$(CC)'], |
| 3003 | ['CXX.host', '$(CXX)'], |
| 3004 | ['LINK.host', '$(LINK)'], |
| 3005 | ], |
| 3006 | }], |
[email protected] | d10e2cc | 2012-03-20 10:45:27 | [diff] [blame] | 3007 | ['OS=="android" and "<(GENERATOR)"!="ninja"', { |
| 3008 | # Hardcode the compiler names in the Makefile so that |
| 3009 | # it won't depend on the environment at make time. |
| 3010 | 'make_global_settings': [ |
| 3011 | ['CC', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'], |
| 3012 | ['CXX', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'], |
| 3013 | ['LINK', '<!(/bin/echo -n ${GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'], |
| 3014 | ['CC.host', '<!(which gcc)'], |
| 3015 | ['CXX.host', '<!(which g++)'], |
| 3016 | ['LINK.host', '<!(which g++)'], |
| 3017 | ], |
| 3018 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3019 | ], |
| 3020 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 3021 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 3022 | # This block adds *project-wide* configuration settings to each project |
| 3023 | # file. It's almost always wrong to put things here. Specify your |
| 3024 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 3025 | |
| 3026 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 3027 | # setting sets the SDK on a project-wide basis. In order to get the |
| 3028 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 3029 | # here at the project level. |
| 3030 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 3031 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3032 | # The Xcode generator will look for an xcode_settings section at the root |
| 3033 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 3034 | # settings should not be here, they should be in target-specific |
| 3035 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 3036 | # settings in target dicts. SYMROOT is a special case, because many other |
| 3037 | # Xcode variables depend on it, including variables such as |
| 3038 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 3039 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 3040 | # files to appear (when present) in the UI as actual files and not red |
| 3041 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 3042 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 3043 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 3044 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 3045 | } |