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