[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] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 20 | 'variables': { |
| 21 | # Whether we're building a ChromeOS build. |
| 22 | 'chromeos%': 0, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 23 | |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 24 | # Whether the Views toolkit can use its Pure form when available |
| 25 | # or if it must only use GTK (the default at the moment). |
| 26 | # This is an intermediate step until all of Views is 'Pure', |
| 27 | # at which point we plan to remove those switches. |
| 28 | # This turns on the TOOLKIT_USES_PURE_VIEWS macro which is used |
| 29 | # to replace the corresponding GTK implementation in such a way |
| 30 | # that GTK and PureViews can coexist. This intermediate solution |
| 31 | # allow us to switch the view implementations using |
| 32 | # --use-pure-views, without breaking exiting gtk implementation. |
| 33 | 'toolkit_uses_pure_views%': 0, |
| 34 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 35 | # Disable touch support by default. |
| 36 | 'touchui%': 0, |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 37 | |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 38 | # Disable webui certificate viewer until it is complete. |
| 39 | 'webui_certificate_viewer%': 0, |
| 40 | |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 41 | # Whether the compositor is enabled on views. |
| 42 | 'views_compositor%': 0, |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 43 | }, |
| 44 | # Copy conditionally-set variables out one scope. |
| 45 | 'chromeos%': '<(chromeos)', |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 46 | 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 47 | 'touchui%': '<(touchui)', |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 48 | 'webui_certificate_viewer%': '<(webui_certificate_viewer)', |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 49 | 'views_compositor%': '<(views_compositor)', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 50 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 51 | # Compute the architecture that we're building on. |
| 52 | 'conditions': [ |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 53 | [ 'OS=="win" or OS=="mac"', { |
| 54 | 'host_arch%': 'ia32', |
| 55 | }, { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 56 | # This handles the Unix platforms for which there is some support. |
| 57 | # Anything else gets passed through, which probably won't work very |
| 58 | # well; such hosts should pass an explicit target_arch to gyp. |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 59 | 'host_arch%': |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 60 | '<!(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] | 61 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 62 | |
| 63 | # Set default value of toolkit_views on for Windows, Chrome OS |
| 64 | # and the touch UI. |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 65 | ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', { |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 66 | 'toolkit_views%': 1, |
| 67 | }, { |
| 68 | 'toolkit_views%': 0, |
| 69 | }], |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 70 | |
| 71 | # Views are always Pure in Touch case |
| 72 | ['touchui==1', { |
| 73 | 'toolkit_uses_pure_views%': 1, |
| 74 | }, { |
| 75 | 'toolkit_uses_pure_views%': 0, |
| 76 | }], |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 77 | |
| 78 | # Use WebUI certificate viewer in Touch case |
| 79 | ['touchui==1', { |
| 80 | 'webui_certificate_viewer%': 1 |
| 81 | }], |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 82 | ], |
| 83 | }, |
| 84 | |
| 85 | # Copy conditionally-set variables out one scope. |
| 86 | 'chromeos%': '<(chromeos)', |
| 87 | 'touchui%': '<(touchui)', |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 88 | 'webui_certificate_viewer%': '<(webui_certificate_viewer)', |
[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] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 91 | 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 92 | 'views_compositor%': '<(views_compositor)', |
[email protected] | 236754a | 2011-07-28 17:38:23 | [diff] [blame] | 93 | # Whether to build for Wayland display server |
| 94 | 'use_wayland%': 0, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 95 | |
[email protected] | 8fb0ef0 | 2011-05-20 00:53:50 | [diff] [blame] | 96 | # We used to provide a variable for changing how libraries were built. |
| 97 | # This variable remains until we can clean up all the users. |
| 98 | # This needs to be one nested variables dict in so that dependent |
| 99 | # gyp files can make use of it in their outer variables. (Yikes!) |
| 100 | # http://code.google.com/p/chromium/issues/detail?id=83308 |
| 101 | 'library%': 'static_library', |
| 102 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 103 | # Override branding to select the desired branding flavor. |
| 104 | 'branding%': 'Chromium', |
| 105 | |
| 106 | # Override buildtype to select the desired build flavor. |
| 107 | # Dev - everyday build for development/testing |
| 108 | # Official - release build (generally implies additional processing) |
| 109 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 110 | # conversion is done), some of the things which are now controlled by |
| 111 | # 'branding', such as symbol generation, will need to be refactored based |
| 112 | # on 'buildtype' (i.e. we don't care about saving symbols for non-Official |
| 113 | # builds). |
| 114 | 'buildtype%': 'Dev', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 115 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 116 | # Default architecture we're building for is the architecture we're |
| 117 | # building on. |
| 118 | 'target_arch%': '<(host_arch)', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 119 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 120 | # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are |
| 121 | # are built under a chromium full build (1) or a webkit.org chromium |
| 122 | # build (0). |
| 123 | 'inside_chromium_build%': 1, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 124 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 125 | # Set to 1 to enable fast builds. It disables debug info for fastest |
| 126 | # compilation. |
| 127 | 'fastbuild%': 0, |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 128 | |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 129 | # Disable file manager component extension by default. |
| 130 | 'file_manager_extension%': 0, |
| 131 | |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 132 | # Disable WebUI TaskManager by default. |
| 133 | 'webui_task_manager%': 0, |
| 134 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 135 | # Python version. |
[email protected] | a43c5a0 | 2011-05-27 06:54:51 | [diff] [blame] | 136 | 'python_ver%': '2.6', |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 137 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 138 | # Set ARM-v7 compilation flags |
| 139 | 'armv7%': 0, |
| 140 | |
| 141 | # Set Neon compilation flags (only meaningful if armv7==1). |
| 142 | 'arm_neon%': 1, |
| 143 | |
| 144 | # The system root for cross-compiles. Default: none. |
| 145 | 'sysroot%': '', |
| 146 | |
| 147 | # On Linux, we build with sse2 for Chromium builds. |
| 148 | 'disable_sse2%': 0, |
| 149 | |
| 150 | # Use libjpeg-turbo as the JPEG codec used by Chromium. |
[email protected] | 32e56e5 | 2011-02-28 02:28:03 | [diff] [blame] | 151 | 'use_libjpeg_turbo%': 1, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 152 | |
| 153 | # Variable 'component' is for cases where we would like to build some |
| 154 | # components as dynamic shared libraries but still need variable |
| 155 | # 'library' for static libraries. |
| 156 | # By default, component is set to whatever library is set to and |
| 157 | # 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] | 158 | 'component%': 'static_library', |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 159 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 160 | # Set to select the Title Case versions of strings in GRD files. |
| 161 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 162 | |
[email protected] | 98da004 | 2011-02-02 00:10:27 | [diff] [blame] | 163 | # Use translations provided by volunteers at launchpad.net. This |
| 164 | # currently only works on Linux. |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 165 | 'use_third_party_translations%': 0, |
| 166 | |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 167 | # Remoting compilation is enabled by default. Set to 0 to disable. |
| 168 | 'remoting%': 1, |
| 169 | |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 170 | # P2P APIs are compiled in by default. Set to 0 to disable. |
| 171 | # Also note that this should be enabled for remoting to compile. |
| 172 | 'p2p_apis%': 1, |
| 173 | |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 174 | # Configuration policy is enabled by default. Set to 0 to disable. |
| 175 | 'configuration_policy%': 1, |
| 176 | |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 177 | # Safe browsing is compiled in by default. Set to 0 to disable. |
| 178 | 'safe_browsing%': 1, |
| 179 | |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 180 | # If this is set, the clang plugins used on the buildbot will be used. |
| 181 | # Run tools/clang/scripts/update.sh to make sure they are compiled. |
| 182 | # This causes 'clang_chrome_plugins_flags' to be set. |
| 183 | # Has no effect if 'clang' is not set as well. |
| 184 | 'clang_use_chrome_plugins%': 0, |
| 185 | |
[email protected] | 1ad5a7b | 2011-06-24 03:15:13 | [diff] [blame] | 186 | # Set to 1 compile with -fPIC cflag on linux. This is a must for shared |
| 187 | # libraries on linux x86-64 and arm, plus ASLR. |
| 188 | 'linux_fpic%': 1, |
| 189 | |
[email protected] | c6a1f9417 | 2011-07-05 02:35:00 | [diff] [blame] | 190 | # Enable navigator.registerProtocolHandler and supporting UI. |
| 191 | 'enable_register_protocol_handler%': 1, |
| 192 | |
[email protected] | 62af76e | 2011-08-01 02:34:01 | [diff] [blame] | 193 | # Enable Web Intents and supporting UI. |
| 194 | 'enable_web_intents%': 0, |
| 195 | |
[email protected] | 32877d30 | 2011-07-07 17:57:49 | [diff] [blame] | 196 | # Smooth scrolling is disabled by default. |
| 197 | 'enable_smooth_scrolling%': 0, |
| 198 | |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 199 | # Webrtc compilation is enabled by default. Set to 0 to disable. |
| 200 | 'enable_webrtc%': 1, |
| 201 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 202 | 'conditions': [ |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 203 | # Use Skia as WebKit renderer on Mac |
| 204 | ['OS=="mac"', { |
| 205 | 'use_skia%': 0, |
| 206 | }, { |
| 207 | 'use_skia%': 1, |
| 208 | }], |
| 209 | |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 210 | # A flag for POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 211 | ['OS=="win"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 212 | 'os_posix%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 213 | }, { |
| 214 | 'os_posix%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 215 | }], |
| 216 | |
| 217 | # Flags to use Gtk and X11 on non-Mac POSIX platforms |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 218 | ['OS=="win" or OS=="mac"', { |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 219 | 'toolkit_uses_gtk%': 0, |
| 220 | 'use_x11%': 0, |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 221 | }, { |
[email protected] | 236754a | 2011-07-28 17:38:23 | [diff] [blame] | 222 | # TODO(dnicoara) Wayland build should have these disabled, but |
| 223 | # currently GTK and X is too spread and it's hard to completely |
| 224 | # remove every dependency. |
[email protected] | c49ab0c | 2011-05-18 17:25:37 | [diff] [blame] | 225 | 'toolkit_uses_gtk%': 1, |
| 226 | 'use_x11%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 227 | }], |
| 228 | |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 229 | # A flag to enable or disable our compile-time dependency |
| 230 | # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| 231 | # support will be available. This option is useful |
| 232 | # for Linux distributions. |
| 233 | ['chromeos==1', { |
| 234 | 'use_gnome_keyring%': 0, |
| 235 | }, { |
| 236 | 'use_gnome_keyring%': 1, |
| 237 | }], |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 238 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 239 | ['toolkit_views==0 or OS=="mac"', { |
| 240 | # GTK+ and Mac wants Title Case strings |
| 241 | 'use_titlecase_in_grd_files%': 1, |
| 242 | }], |
| 243 | |
[email protected] | 1b4209f | 2011-01-07 00:25:40 | [diff] [blame] | 244 | # Enable some hacks to support Flapper only on Chrome OS. |
| 245 | ['chromeos==1', { |
| 246 | 'enable_flapper_hacks%': 1, |
| 247 | }, { |
| 248 | 'enable_flapper_hacks%': 0, |
| 249 | }], |
[email protected] | 3d38d8e | 2011-04-16 20:48:51 | [diff] [blame] | 250 | |
| 251 | # Enable file manager extension by default on Chrome OS. |
| 252 | ['chromeos==1', { |
| 253 | 'file_manager_extension%': 1, |
| 254 | }, { |
| 255 | 'file_manager_extension%': 0, |
| 256 | }], |
[email protected] | 32877d30 | 2011-07-07 17:57:49 | [diff] [blame] | 257 | |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 258 | # Enable WebUI TaskManager only on Chrome OS and Touch UI. |
| 259 | ['chromeos==1 or touchui==1', { |
| 260 | 'webui_task_manager%': 1, |
| 261 | }, { |
| 262 | 'webui_task_manager%': 0, |
| 263 | }], |
| 264 | |
[email protected] | 32877d30 | 2011-07-07 17:57:49 | [diff] [blame] | 265 | # Enable smooth scrolling for Linux and ChromeOS |
| 266 | ['OS=="linux"', { |
| 267 | 'enable_smooth_scrolling%': 1, |
| 268 | }, { |
| 269 | 'enable_smooth_scrolling%': 0, |
| 270 | }], |
[email protected] | b3f23ba | 2010-04-26 22:58:17 | [diff] [blame] | 271 | ], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 272 | }, |
| 273 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 274 | # Copy conditionally-set variables out one scope. |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 275 | 'branding%': '<(branding)', |
| 276 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 277 | 'target_arch%': '<(target_arch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 278 | 'host_arch%': '<(host_arch)', |
[email protected] | 8fb0ef0 | 2011-05-20 00:53:50 | [diff] [blame] | 279 | 'library%': 'static_library', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 280 | 'toolkit_views%': '<(toolkit_views)', |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 281 | 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)', |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 282 | 'views_compositor%': '<(views_compositor)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 283 | 'os_posix%': '<(os_posix)', |
| 284 | 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 285 | 'use_skia%': '<(use_skia)', |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 286 | 'use_x11%': '<(use_x11)', |
[email protected] | 6369221 | 2010-09-16 00:22:21 | [diff] [blame] | 287 | 'use_gnome_keyring%': '<(use_gnome_keyring)', |
[email protected] | 0afe521 | 2010-10-01 18:56:11 | [diff] [blame] | 288 | 'linux_fpic%': '<(linux_fpic)', |
[email protected] | 1b4209f | 2011-01-07 00:25:40 | [diff] [blame] | 289 | 'enable_flapper_hacks%': '<(enable_flapper_hacks)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 290 | 'chromeos%': '<(chromeos)', |
[email protected] | 93012ca | 2010-08-10 20:10:49 | [diff] [blame] | 291 | 'touchui%': '<(touchui)', |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 292 | 'webui_certificate_viewer%': '<(webui_certificate_viewer)', |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 293 | 'file_manager_extension%': '<(file_manager_extension)', |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 294 | 'webui_task_manager%': '<(webui_task_manager)', |
[email protected] | b2f030c | 2009-09-24 20:36:21 | [diff] [blame] | 295 | 'inside_chromium_build%': '<(inside_chromium_build)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 296 | 'fastbuild%': '<(fastbuild)', |
[email protected] | a76fe1a | 2010-03-01 23:39:36 | [diff] [blame] | 297 | 'python_ver%': '<(python_ver)', |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 298 | 'armv7%': '<(armv7)', |
| 299 | 'arm_neon%': '<(arm_neon)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 300 | 'sysroot%': '<(sysroot)', |
[email protected] | ac120ff | 2010-04-28 02:14:22 | [diff] [blame] | 301 | 'disable_sse2%': '<(disable_sse2)', |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 302 | 'component%': '<(component)', |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 303 | 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', |
[email protected] | 9e94cca | 2011-02-04 17:38:17 | [diff] [blame] | 304 | 'use_third_party_translations%': '<(use_third_party_translations)', |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 305 | 'remoting%': '<(remoting)', |
[email protected] | dda90ae | 2011-07-19 22:07:48 | [diff] [blame] | 306 | 'enable_webrtc%': '<(enable_webrtc)', |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 307 | 'p2p_apis%': '<(p2p_apis)', |
[email protected] | 1ec68c4 | 2011-06-01 13:56:25 | [diff] [blame] | 308 | 'configuration_policy%': '<(configuration_policy)', |
[email protected] | 4b58e7d | 2011-07-11 10:22:56 | [diff] [blame] | 309 | 'safe_browsing%': '<(safe_browsing)', |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 310 | 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 311 | 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)', |
[email protected] | 32877d30 | 2011-07-07 17:57:49 | [diff] [blame] | 312 | 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)', |
[email protected] | 236754a | 2011-07-28 17:38:23 | [diff] [blame] | 313 | 'use_wayland%': '<(use_wayland)', |
[email protected] | a22ebd81 | 2011-06-23 00:05:39 | [diff] [blame] | 314 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 315 | # The release channel that this build targets. This is used to restrict |
| 316 | # channel-specific build options, like which installer packages to create. |
| 317 | # The default is 'all', which does no channel-specific filtering. |
| 318 | 'channel%': 'all', |
| 319 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 320 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 321 | # precompiled headers on the Mac. Prefix header injection may still be |
| 322 | # used, but prefix headers will not be precompiled. This is useful when |
| 323 | # using distcc to distribute a build to compile slaves that don't |
| 324 | # share the same compiler executable as the system driving the compilation, |
| 325 | # because precompiled headers rely on pointers into a specific compiler |
| 326 | # executable's image. Setting this to 0 is needed to use an experimental |
| 327 | # Linux-Mac cross compiler distcc farm. |
| 328 | 'chromium_mac_pch%': 1, |
| 329 | |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 330 | # Mac OS X SDK and deployment target support. |
| 331 | # The SDK identifies the version of the system headers that will be used, |
| 332 | # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro. |
| 333 | # "Maximum allowed" refers to the operating system version whose APIs are |
| 334 | # available in the headers. |
| 335 | # The deployment target identifies the minimum system version that the |
| 336 | # built products are expected to function on. It corresponds to the |
| 337 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. |
| 338 | # To ensure these macros are available, #include <AvailabilityMacros.h>. |
| 339 | # Additional documentation on these macros is available at |
| 340 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 341 | # Chrome normally builds with the Mac OS X 10.5 SDK and sets the |
| 342 | # deployment target to 10.5. Other projects, such as O3D, may override |
| 343 | # these defaults. |
| 344 | 'mac_sdk%': '10.5', |
| 345 | 'mac_deployment_target%': '10.5', |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 346 | |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 347 | # Set to 1 to enable code coverage. In addition to build changes |
| 348 | # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 349 | # project file called "coverage". |
| 350 | # Currently ignored on Windows. |
| 351 | 'coverage%': 0, |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 352 | |
[email protected] | c61f643 | 2009-04-22 01:16:42 | [diff] [blame] | 353 | # Overridable specification for potential use of alternative |
| 354 | # JavaScript engines. |
| 355 | 'javascript_engine%': 'v8', |
| 356 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 357 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 358 | # environment variable, the libcmt shim it uses sometimes gets in |
| 359 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 360 | # 'win_use_allocator_shim': 0, |
| 361 | # 'win_release_RuntimeLibrary': 2 |
| 362 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 363 | 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 364 | |
[email protected] | 95ff808 | 2009-11-13 22:21:01 | [diff] [blame] | 365 | # Whether usage of OpenMAX is enabled. |
| 366 | 'enable_openmax%': 0, |
| 367 | |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 368 | # Whether proprietary audio/video codecs are assumed to be included with |
| 369 | # this build (only meaningful if branding!=Chrome). |
| 370 | 'proprietary_codecs%': 0, |
| 371 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 372 | # TODO(bradnelson): eliminate this when possible. |
| 373 | # To allow local gyp files to prevent release.vsprops from being included. |
| 374 | # Yes(1) means include release.vsprops. |
| 375 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 376 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 377 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 378 | # TODO(bradnelson): eliminate this when possible. |
| 379 | # To allow local gyp files to override additional linker options for msvs. |
| 380 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 381 | 'msvs_use_common_linker_extras%': 1, |
| 382 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 383 | # TODO(sgk): eliminate this if possible. |
| 384 | # It would be nicer to support this via a setting in 'target_defaults' |
| 385 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 386 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 387 | # but that doesn't work as we'd like. |
| 388 | 'msvs_debug_link_incremental%': '2', |
| 389 | |
[email protected] | 1f790ef | 2011-01-11 20:45:36 | [diff] [blame] | 390 | # Needed for some of the largest modules. |
| 391 | 'msvs_debug_link_nonincremental%': '1', |
| 392 | |
[email protected] | 57313614 | 2009-07-15 22:48:37 | [diff] [blame] | 393 | # This is the location of the sandbox binary. Chrome looks for this before |
| 394 | # running the zygote process. If found, and SUID, it will be used to |
| 395 | # sandbox the zygote process and, thus, all renderer processes. |
| 396 | 'linux_sandbox_path%': '', |
| 397 | |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 398 | # Set this to true to enable SELinux support. |
| 399 | 'selinux%': 0, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 400 | |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 401 | # Set this to true when building with Clang. |
| 402 | # See http://code.google.com/p/chromium/wiki/Clang for details. |
| 403 | # TODO: eventually clang should behave identically to gcc, and this |
| 404 | # won't be necessary. |
| 405 | 'clang%': 0, |
| 406 | |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 407 | # These two variables can be set in GYP_DEFINES while running |
| 408 | # |gclient runhooks| to let clang run a plugin in every compilation. |
| 409 | # Only has an effect if 'clang=1' is in GYP_DEFINES as well. |
| 410 | # Example: |
[email protected] | 93120fe | 2011-02-03 20:46:42 | [diff] [blame] | 411 | # 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] | 412 | |
| 413 | 'clang_load%': '', |
| 414 | 'clang_add_plugin%': '', |
| 415 | |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 416 | # Enable sampling based profiler. |
| 417 | # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
| 418 | 'profiling%': '0', |
| 419 | |
[email protected] | 36532f33 | 2010-08-25 00:22:01 | [diff] [blame] | 420 | # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. |
| 421 | 'linux_breakpad%': 0, |
| 422 | # And if we want to dump symbols for Breakpad-enabled builds. |
| 423 | 'linux_dump_symbols%': 0, |
| 424 | # And if we want to strip the binary after dumping symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 425 | 'linux_strip_binary%': 0, |
[email protected] | 1d87c28 | 2010-09-15 22:24:49 | [diff] [blame] | 426 | # Strip the test binaries needed for Linux reliability tests. |
| 427 | 'linux_strip_reliability_tests%': 0, |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 428 | |
[email protected] | 46ce5b56 | 2010-06-16 18:39:53 | [diff] [blame] | 429 | # Enable TCMalloc. |
| 430 | 'linux_use_tcmalloc%': 1, |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 431 | |
[email protected] | 39ca7de | 2010-04-16 08:04:03 | [diff] [blame] | 432 | # Disable TCMalloc's debugallocation. |
| 433 | 'linux_use_debugallocation%': 0, |
| 434 | |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 435 | # Disable TCMalloc's heapchecker. |
| 436 | 'linux_use_heapchecker%': 0, |
| 437 | |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 438 | # Disable shadow stack keeping used by heapcheck to unwind the stacks |
| 439 | # better. |
| 440 | 'linux_keep_shadow_stacks%': 0, |
| 441 | |
[email protected] | 6def64a | 2010-10-28 20:40:34 | [diff] [blame] | 442 | # Set to 1 to turn on seccomp sandbox by default. |
| 443 | # (Note: this is ignored for official builds.) |
| 444 | 'linux_use_seccomp_sandbox%': 0, |
[email protected] | 39c4e1a8 | 2010-03-30 19:47:41 | [diff] [blame] | 445 | |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 446 | # Set to 1 to link against libgnome-keyring instead of using dlopen(). |
| 447 | 'linux_link_gnome_keyring%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 448 | # Set to 1 to link against gsettings APIs instead of using dlopen(). |
| 449 | 'linux_link_gsettings%': 0, |
[email protected] | 556c5d7 | 2010-06-10 05:45:01 | [diff] [blame] | 450 | |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 451 | # Used to disable Native Client at compile time, for platforms where it |
| 452 | # isn't supported |
| 453 | 'disable_nacl%': 0, |
| 454 | |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 455 | # Set Thumb compilation flags. |
| 456 | 'arm_thumb%': 0, |
| 457 | |
[email protected] | 53e0f64 | 2010-03-05 01:41:56 | [diff] [blame] | 458 | # Set ARM fpu compilation flags (only meaningful if armv7==1 and |
| 459 | # arm_neon==0). |
| 460 | 'arm_fpu%': 'vfpv3', |
| 461 | |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 462 | # Enable new NPDevice API. |
| 463 | 'enable_new_npdevice_api%': 0, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 464 | |
| 465 | # Enable EGLImage support in OpenMAX |
[email protected] | 58023be | 2011-02-04 20:34:14 | [diff] [blame] | 466 | 'enable_eglimage%': 1, |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 467 | |
[email protected] | 6f51b27e | 2010-06-22 20:43:53 | [diff] [blame] | 468 | # Enable a variable used elsewhere throughout the GYP files to determine |
| 469 | # whether to compile in the sources for the GPU plugin / process. |
| 470 | 'enable_gpu%': 1, |
| 471 | |
[email protected] | 32e1dee | 2010-12-09 18:36:24 | [diff] [blame] | 472 | # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 |
[email protected] | d518cd9 | 2010-09-29 12:27:44 | [diff] [blame] | 473 | 'use_openssl%': 0, |
| 474 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 475 | # .gyp files or targets should set chromium_code to 1 if they build |
| 476 | # Chromium-specific code, as opposed to external code. This variable is |
| 477 | # used to control such things as the set of warnings to enable, and |
| 478 | # whether warnings are treated as errors. |
| 479 | 'chromium_code%': 0, |
| 480 | |
| 481 | # Set to 1 to compile with the built in pdf viewer. |
| 482 | 'internal_pdf%': 0, |
| 483 | |
| 484 | # This allows to use libcros from the current system, ie. /usr/lib/ |
| 485 | # The cros_api will be pulled in as a static library, and all headers |
| 486 | # from the system include dirs. |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 487 | 'system_libcros%': 0, |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 488 | |
[email protected] | e72e55b | 2011-01-06 22:19:30 | [diff] [blame] | 489 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 490 | # so Cocoa is happy (http://crbug.com/20441). |
| 491 | 'locales': [ |
| 492 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
| 493 | 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', |
| 494 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
| 495 | 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', |
| 496 | 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', |
| 497 | 'vi', 'zh-CN', 'zh-TW', |
| 498 | ], |
| 499 | |
[email protected] | cc0322d | 2011-07-24 09:29:19 | [diff] [blame] | 500 | # Pseudo locales are special locales which are used for testing and |
| 501 | # debugging. They don't get copied to the final app. For more info, |
| 502 | # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi |
| 503 | 'pseudo_locales': [ |
| 504 | 'fake-bidi', |
| 505 | ], |
| 506 | |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 507 | 'grit_defines': [], |
| 508 | |
[email protected] | 29c2daea | 2011-01-05 20:38:50 | [diff] [blame] | 509 | # Use Harfbuzz-NG instead of Harfbuzz. |
| 510 | # Under development: http://crbug.com/68551 |
| 511 | 'use_harfbuzz_ng%': 0, |
| 512 | |
[email protected] | bd3bd44 | 2011-03-28 07:58:51 | [diff] [blame] | 513 | # If debug_devtools is set to 1, JavaScript files for DevTools are |
| 514 | # stored as is and loaded from disk. Otherwise, a concatenated file |
| 515 | # is stored in resources.pak. It is still possible to load JS files |
| 516 | # from disk by passing --debug-devtools cmdline switch. |
| 517 | 'debug_devtools%': 0, |
| 518 | |
[email protected] | be8a927 | 2011-02-10 22:06:07 | [diff] [blame] | 519 | # Point to ICU directory. |
| 520 | 'icu_src_dir': '../third_party/icu', |
| 521 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 522 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 523 | ['os_posix==1 and OS!="mac"', { |
[email protected] | 242a9e6 | 2009-11-03 17:32:10 | [diff] [blame] | 524 | # This will set gcc_version to XY if you are running gcc X.Y.*. |
| 525 | # This is used to tweak build flags for gcc 4.4. |
| 526 | 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
[email protected] | 4d83eb7 | 2010-03-04 16:42:23 | [diff] [blame] | 527 | # Figure out the python architecture to decide if we build pyauto. |
[email protected] | efd6846 | 2010-03-04 17:07:54 | [diff] [blame] | 528 | 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 529 | 'conditions': [ |
[email protected] | 2a77a9d | 2010-08-26 19:58:10 | [diff] [blame] | 530 | ['branding=="Chrome"', { |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 531 | 'linux_breakpad%': 1, |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 532 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 533 | # All Chrome builds have breakpad symbols, but only process the |
| 534 | # symbols from official builds. |
[email protected] | c913cb8 | 2010-08-31 19:44:08 | [diff] [blame] | 535 | ['(branding=="Chrome" and buildtype=="Official")', { |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 536 | 'linux_dump_symbols%': 1, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 537 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 538 | ], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 539 | }], # os_posix==1 and OS!="mac" |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 540 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 541 | ['OS=="mac"', { |
| 542 | 'conditions': [ |
| 543 | # mac_product_name is set to the name of the .app bundle as it should |
| 544 | # appear on disk. This duplicates data from |
| 545 | # chrome/app/theme/chromium/BRANDING and |
| 546 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 547 | # these names into the build system. |
| 548 | ['branding=="Chrome"', { |
| 549 | 'mac_product_name%': 'Google Chrome', |
| 550 | }, { # else: branding!="Chrome" |
| 551 | 'mac_product_name%': 'Chromium', |
| 552 | }], |
| 553 | |
| 554 | # Feature variables for enabling Mac Breakpad and Keystone auto-update |
| 555 | # support. Both features are on by default in official builds with |
| 556 | # Chrome branding. |
| 557 | ['branding=="Chrome" and buildtype=="Official"', { |
| 558 | 'mac_breakpad%': 1, |
| 559 | 'mac_keystone%': 1, |
[email protected] | 08857c6c | 2011-08-10 00:11:49 | [diff] [blame] | 560 | |
| 561 | # Official builds use clang, but only on m15+. Since there's just |
| 562 | # one buildbot config for the builder for m13, m14, and m15, this |
| 563 | # can't be defined in the buildbot config but is instead defined |
| 564 | # here (it was added after the m14 branch was cut). This is in the |
| 565 | # buildtype=="Official" section so that developers don't see it |
| 566 | # for their local builds. |
| 567 | 'clang%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 568 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 569 | 'mac_breakpad%': 0, |
| 570 | 'mac_keystone%': 0, |
| 571 | }], |
| 572 | ], |
| 573 | }], # OS=="mac" |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 574 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 575 | # Whether to use multiple cores to compile with visual studio. This is |
| 576 | # optional because it sometimes causes corruption on VS 2005. |
| 577 | # It is on by default on VS 2008 and off on VS 2005. |
| 578 | ['OS=="win"', { |
| 579 | 'conditions': [ |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 580 | ['component=="shared_library"', { |
| 581 | 'win_use_allocator_shim%': 0, |
| 582 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 583 | ['MSVS_VERSION=="2005"', { |
[email protected] | 66979537 | 2009-08-14 17:51:13 | [diff] [blame] | 584 | 'msvs_multi_core_compile%': 0, |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 585 | },{ |
| 586 | 'msvs_multi_core_compile%': 1, |
| 587 | }], |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 588 | # Don't do incremental linking for large modules on 32-bit. |
| 589 | ['MSVS_OS_BITS==32', { |
| 590 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 591 | },{ |
| 592 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 593 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 594 | ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', { |
| 595 | 'msvs_express%': 1, |
| 596 | 'secure_atl%': 0, |
| 597 | },{ |
| 598 | 'msvs_express%': 0, |
| 599 | 'secure_atl%': 1, |
| 600 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 601 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 602 | 'nacl_win64_defines': [ |
| 603 | # This flag is used to minimize dependencies when building |
| 604 | # Native Client loader for 64-bit Windows. |
| 605 | 'NACL_WIN64', |
| 606 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 607 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 608 | |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 609 | ['os_posix==1 and chromeos==0 and target_arch!="arm"', { |
[email protected] | 8e553f4 | 2010-10-25 20:05:44 | [diff] [blame] | 610 | 'use_cups%': 1, |
| 611 | }, { |
| 612 | 'use_cups%': 0, |
| 613 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 614 | |
[email protected] | 19fe8f0b | 2010-12-07 07:27:27 | [diff] [blame] | 615 | # Set the relative path from this file to the GYP file of the JPEG |
| 616 | # library used by Chromium. |
| 617 | ['use_libjpeg_turbo==1', { |
| 618 | 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', |
| 619 | }, { |
| 620 | 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', |
| 621 | }], # use_libjpeg_turbo==1 |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 622 | |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 623 | # Options controlling the use of GConf (the classic GNOME configuration |
| 624 | # system) and GIO, which contains GSettings (the new GNOME config system). |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 625 | ['chromeos==1', { |
| 626 | 'use_gconf%': 0, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 627 | 'use_gio%': 0, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 628 | }, { |
| 629 | 'use_gconf%': 1, |
[email protected] | abcc9ac | 2011-05-16 20:04:35 | [diff] [blame] | 630 | 'use_gio%': 1, |
[email protected] | 1c6fe2930 | 2011-01-20 22:14:31 | [diff] [blame] | 631 | }], |
| 632 | |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 633 | # Set up -D and -E flags passed into grit. |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 634 | ['branding=="Chrome"', { |
| 635 | # TODO(mmoss) The .grd files look for _google_chrome, but for |
| 636 | # consistency they should look for google_chrome_build like C++. |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 637 | 'grit_defines': ['-D', '_google_chrome', |
| 638 | '-E', 'CHROMIUM_BUILD=google_chrome'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 639 | }, { |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 640 | 'grit_defines': ['-D', '_chromium', |
| 641 | '-E', 'CHROMIUM_BUILD=chromium'], |
[email protected] | 1660bffd | 2011-03-23 16:24:29 | [diff] [blame] | 642 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 643 | ['chromeos==1', { |
| 644 | 'grit_defines': ['-D', 'chromeos'], |
| 645 | }], |
| 646 | ['toolkit_views==1', { |
| 647 | 'grit_defines': ['-D', 'toolkit_views'], |
| 648 | }], |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 649 | ['toolkit_uses_pure_views==1', { |
| 650 | 'grit_defines': ['-D', 'toolkit_uses_pure_views'], |
| 651 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 652 | ['touchui==1', { |
| 653 | 'grit_defines': ['-D', 'touchui'], |
| 654 | }], |
[email protected] | 8ebc9b4 | 2011-07-14 15:22:18 | [diff] [blame] | 655 | ['webui_certificate_viewer==1', { |
| 656 | 'grit_defines': ['-D', 'webui_certificate_viewer'], |
| 657 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 658 | ['file_manager_extension==1', { |
| 659 | 'grit_defines': ['-D', 'file_manager_extension'], |
| 660 | }], |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 661 | ['webui_task_manager==1', { |
| 662 | 'grit_defines': ['-D', 'webui_task_manager'], |
| 663 | }], |
[email protected] | 9a42542 | 2011-01-11 00:53:18 | [diff] [blame] | 664 | ['remoting==1', { |
| 665 | 'grit_defines': ['-D', 'remoting'], |
| 666 | }], |
[email protected] | bb6aba3 | 2011-01-07 19:04:43 | [diff] [blame] | 667 | ['use_titlecase_in_grd_files==1', { |
| 668 | 'grit_defines': ['-D', 'use_titlecase'], |
| 669 | }], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 670 | ['use_third_party_translations==1', { |
| 671 | 'grit_defines': ['-D', 'use_third_party_translations'], |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 672 | 'locales': [ |
[email protected] | 53e7333 | 2011-08-09 04:44:34 | [diff] [blame] | 673 | 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 'ka', |
| 674 | 'ku', 'kw', 'ug', |
[email protected] | fb6c102 | 2011-06-27 21:58:12 | [diff] [blame] | 675 | ], |
[email protected] | 00dc15583 | 2011-02-01 18:51:19 | [diff] [blame] | 676 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 677 | |
| 678 | ['clang_use_chrome_plugins==1', { |
| 679 | 'clang_chrome_plugins_flags': |
| 680 | '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)', |
| 681 | }], |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 682 | |
[email protected] | 452da69e | 2011-05-24 02:36:05 | [diff] [blame] | 683 | # Set use_ibus to 1 to enable ibus support. |
[email protected] | cfa2e110 | 2011-04-27 22:30:23 | [diff] [blame] | 684 | ['touchui==1 and chromeos==1', { |
| 685 | 'use_ibus%': 1, |
| 686 | }, { |
| 687 | 'use_ibus%': 0, |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 688 | }], |
| 689 | |
| 690 | ['enable_register_protocol_handler==1', { |
| 691 | 'grit_defines': ['-D', 'enable_register_protocol_handler'], |
| 692 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 693 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 694 | }, |
| 695 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 696 | 'variables': { |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 697 | # The condition that operates on chromium_code is in a target_conditions |
| 698 | # section, and will not have access to the default fallback value of |
| 699 | # chromium_code at the top of this file, or to the chromium_code |
| 700 | # variable placed at the root variables scope of .gyp files, because |
| 701 | # those variables are not set at target scope. As a workaround, |
| 702 | # if chromium_code is not set at target scope, define it in target scope |
| 703 | # to contain whatever value it has during early variable expansion. |
| 704 | # That's enough to make it available during target conditional |
| 705 | # processing. |
| 706 | 'chromium_code%': '<(chromium_code)', |
| 707 | |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 708 | # 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] | 709 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 710 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 711 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 712 | 'win_release_Optimization%': '2', # 2 = /Os |
| 713 | 'win_debug_Optimization%': '0', # 0 = /Od |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 714 | # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx |
| 715 | 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off |
| 716 | # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 717 | 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, |
| 718 | 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 719 | # VS inserts quite a lot of extra checks to algorithms like |
| 720 | # std::partial_sort in Debug build which make them O(N^2) |
| 721 | # instead of O(N*logN). This is particularly slow under memory |
| 722 | # tools like ThreadSanitizer so we want it to be disablable. |
| 723 | # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx |
| 724 | 'win_debug_disable_iterator_debugging%': '0', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 725 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 726 | 'release_extra_cflags%': '', |
| 727 | 'debug_extra_cflags%': '', |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 728 | 'release_valgrind_build%': 0, |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 729 | |
| 730 | 'conditions': [ |
| 731 | ['OS=="win" and component=="shared_library"', { |
| 732 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 733 | 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL) |
| 734 | 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL) |
| 735 | }, { |
| 736 | # See http://msdn.microsoft.com/en-us/library/aa652367.aspx |
| 737 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 738 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 739 | }], |
| 740 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 741 | }, |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 742 | 'conditions': [ |
| 743 | ['branding=="Chrome"', { |
| 744 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 745 | }, { # else: branding!="Chrome" |
| 746 | 'defines': ['CHROMIUM_BUILD'], |
| 747 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 748 | ['component=="shared_library"', { |
| 749 | 'defines': ['COMPONENT_BUILD'], |
| 750 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 751 | ['toolkit_views==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 752 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 753 | }], |
[email protected] | 1b54669 | 2011-06-30 18:22:30 | [diff] [blame] | 754 | ['toolkit_uses_pure_views==1', { |
| 755 | 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'], |
| 756 | }], |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 757 | ['views_compositor==1', { |
[email protected] | c3870f4 | 2011-06-10 16:43:27 | [diff] [blame] | 758 | 'defines': ['VIEWS_COMPOSITOR=1'], |
[email protected] | 9c8a198 | 2011-05-24 23:08:58 | [diff] [blame] | 759 | }], |
[email protected] | fdc5bed | 2010-01-09 01:16:57 | [diff] [blame] | 760 | ['chromeos==1', { |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 761 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 762 | }], |
[email protected] | 0094fbe | 2010-07-15 21:51:43 | [diff] [blame] | 763 | ['touchui==1', { |
| 764 | 'defines': ['TOUCH_UI=1'], |
| 765 | }], |
[email protected] | 236754a | 2011-07-28 17:38:23 | [diff] [blame] | 766 | ['use_wayland==1', { |
| 767 | 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'], |
| 768 | }], |
[email protected] | e47c3203 | 2011-03-01 19:26:20 | [diff] [blame] | 769 | ['file_manager_extension==1', { |
| 770 | 'defines': ['FILE_MANAGER_EXTENSION=1'], |
| 771 | }], |
[email protected] | 8b2e9f39 | 2011-08-05 04:00:47 | [diff] [blame] | 772 | ['webui_task_manager==1', { |
| 773 | 'defines': ['WEBUI_TASK_MANAGER=1'], |
| 774 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 775 | ['profiling==1', { |
| 776 | 'defines': ['ENABLE_PROFILING=1'], |
| 777 | }], |
[email protected] | 542bf24a | 2010-06-11 23:08:17 | [diff] [blame] | 778 | ['remoting==1', { |
| 779 | 'defines': ['ENABLE_REMOTING=1'], |
[email protected] | c0bac53 | 2010-06-11 00:39:00 | [diff] [blame] | 780 | }], |
[email protected] | a026daa | 2011-04-20 15:49:51 | [diff] [blame] | 781 | ['p2p_apis==1', { |
| 782 | 'defines': ['ENABLE_P2P_APIS=1'], |
| 783 | }], |
[email protected] | d01120e6 | 2010-05-10 17:04:48 | [diff] [blame] | 784 | ['proprietary_codecs==1', { |
| 785 | 'defines': ['USE_PROPRIETARY_CODECS'], |
| 786 | }], |
[email protected] | 1b4209f | 2011-01-07 00:25:40 | [diff] [blame] | 787 | ['enable_flapper_hacks==1', { |
| 788 | 'defines': ['ENABLE_FLAPPER_HACKS=1'], |
| 789 | }], |
[email protected] | f31e2e5 | 2011-07-14 16:01:19 | [diff] [blame] | 790 | ['configuration_policy==1', { |
| 791 | 'defines': ['ENABLE_CONFIGURATION_POLICY'], |
| 792 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 793 | ['fastbuild!=0', { |
| 794 | 'conditions': [ |
[email protected] | 1cc2fa7 | 2010-07-03 08:49:24 | [diff] [blame] | 795 | # For Windows, we don't genererate debug information. |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 796 | ['OS=="win"', { |
| 797 | 'msvs_settings': { |
| 798 | 'VCLinkerTool': { |
| 799 | 'GenerateDebugInformation': 'false', |
| 800 | }, |
| 801 | 'VCCLCompilerTool': { |
| 802 | 'DebugInformationFormat': '0', |
| 803 | } |
| 804 | } |
[email protected] | 1cc2fa7 | 2010-07-03 08:49:24 | [diff] [blame] | 805 | }, { # else: OS != "win", generate less debug information. |
| 806 | 'variables': { |
| 807 | 'debug_extra_cflags': '-g1', |
| 808 | }, |
[email protected] | 37c8419 | 2010-04-14 21:37:40 | [diff] [blame] | 809 | }], |
[email protected] | aecc4d1 | 2011-01-19 05:32:33 | [diff] [blame] | 810 | # Clang creates chubby debug information, which makes linking very |
| 811 | # slow. For now, don't create debug information with clang. See |
| 812 | # http://crbug.com/70000 |
| 813 | ['OS=="linux" and clang==1', { |
| 814 | 'variables': { |
| 815 | 'debug_extra_cflags': '-g0', |
| 816 | }, |
| 817 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 818 | ], # conditions for fastbuild. |
| 819 | }], # fastbuild!=0 |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 820 | ['selinux==1', { |
| 821 | 'defines': ['CHROMIUM_SELINUX=1'], |
| 822 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 823 | ['win_use_allocator_shim==0', { |
| 824 | 'conditions': [ |
| 825 | ['OS=="win"', { |
| 826 | 'defines': ['NO_TCMALLOC'], |
| 827 | }], |
| 828 | ], |
| 829 | }], |
[email protected] | 43f28f83 | 2010-02-03 02:28:48 | [diff] [blame] | 830 | ['enable_gpu==1', { |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 831 | 'defines': [ |
| 832 | 'ENABLE_GPU=1', |
| 833 | ], |
| 834 | }], |
[email protected] | b1c2a554 | 2010-10-08 12:44:40 | [diff] [blame] | 835 | ['use_openssl==1', { |
| 836 | 'defines': [ |
| 837 | 'USE_OPENSSL=1', |
| 838 | ], |
| 839 | }], |
[email protected] | ed15459 | 2010-04-29 00:18:50 | [diff] [blame] | 840 | ['enable_eglimage==1', { |
| 841 | 'defines': [ |
| 842 | 'ENABLE_EGLIMAGE=1', |
| 843 | ], |
| 844 | }], |
[email protected] | 7d7564a1 | 2011-06-21 19:20:22 | [diff] [blame] | 845 | ['use_skia==1', { |
| 846 | 'defines': [ |
| 847 | 'USE_SKIA=1', |
| 848 | ], |
| 849 | }], |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 850 | ['coverage!=0', { |
| 851 | 'conditions': [ |
| 852 | ['OS=="mac"', { |
| 853 | 'xcode_settings': { |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 854 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs |
| 855 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 856 | }, |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 857 | # Add -lgcov for types executable, shared_library, and |
[email protected] | dc259ce5 | 2010-04-13 04:03:10 | [diff] [blame] | 858 | # loadable_module; not for static_library. |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 859 | # This is a delayed conditional. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 860 | 'target_conditions': [ |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 861 | ['_type!="static_library"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 862 | 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 863 | }], |
| 864 | ], |
| 865 | }], |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 866 | ['OS=="linux"', { |
| 867 | 'cflags': [ '-ftest-coverage', |
| 868 | '-fprofile-arcs' ], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 869 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 870 | }], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 871 | # Finally, for Windows, we simply turn on profiling. |
| 872 | ['OS=="win"', { |
| 873 | 'msvs_settings': { |
| 874 | 'VCLinkerTool': { |
| 875 | 'Profile': 'true', |
| 876 | }, |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 877 | 'VCCLCompilerTool': { |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 878 | # /Z7, not /Zi, so coverage is happyb |
| 879 | 'DebugInformationFormat': '1', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 880 | 'AdditionalOptions': ['/Yd'], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 881 | } |
| 882 | } |
| 883 | }], # OS==win |
| 884 | ], # conditions for coverage |
| 885 | }], # coverage!=0 |
[email protected] | 4e4d604 | 2010-08-26 18:34:38 | [diff] [blame] | 886 | ['OS=="win"', { |
| 887 | 'defines': [ |
| 888 | '__STD_C', |
| 889 | '_CRT_SECURE_NO_DEPRECATE', |
| 890 | '_SCL_SECURE_NO_DEPRECATE', |
| 891 | ], |
| 892 | 'include_dirs': [ |
| 893 | '<(DEPTH)/third_party/wtl/include', |
| 894 | ], |
| 895 | }], # OS==win |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 896 | ['enable_register_protocol_handler==1', { |
| 897 | 'defines': [ |
[email protected] | 06bba4fb | 2011-06-09 05:17:19 | [diff] [blame] | 898 | 'ENABLE_REGISTER_PROTOCOL_HANDLER=1', |
[email protected] | 365dd5b9 | 2011-05-26 01:30:56 | [diff] [blame] | 899 | ], |
| 900 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 901 | ], # conditions for 'target_defaults' |
| 902 | 'target_conditions': [ |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 903 | ['chromium_code==0', { |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 904 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 905 | [ 'os_posix==1 and OS!="mac"', { |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 906 | # We don't want to get warnings from third-party code, |
| 907 | # so remove any existing warning-enabling flags like -Wall. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 908 | 'cflags!': [ |
| 909 | '-Wall', |
| 910 | '-Wextra', |
| 911 | '-Werror', |
| 912 | ], |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 913 | 'cflags': [ |
| 914 | # Don't warn about hash_map in third-party code. |
| 915 | '-Wno-deprecated', |
[email protected] | c0a6b27 | 2011-02-09 22:32:33 | [diff] [blame] | 916 | # Don't warn about printf format problems. |
| 917 | # This is off by default in gcc but on in Ubuntu's gcc(!). |
[email protected] | ec39287 | 2011-02-10 22:38:22 | [diff] [blame] | 918 | '-Wno-format', |
[email protected] | ec1d155be | 2011-02-08 22:19:00 | [diff] [blame] | 919 | ], |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 920 | 'cflags_cc!': [ |
| 921 | # TODO(fischman): remove this. |
| 922 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
| 923 | '-Wsign-compare', |
| 924 | ] |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 925 | }], |
[email protected] | 6e445189 | 2011-07-27 10:32:11 | [diff] [blame] | 926 | [ 'os_posix==1 and OS!="mac" and chromeos==0', { |
| 927 | 'cflags': [ |
| 928 | # Don't warn about ignoring the return value from e.g. close(). |
| 929 | # This is off by default in some gccs but on by default in others. |
| 930 | # Currently this option is not set for Chrome OS build because |
| 931 | # the current version of gcc (4.3.4) used for building Chrome in |
| 932 | # Chrome OS chroot doesn't support this option. |
| 933 | # TODO(mazda): remove the conditional for Chrome OS when gcc |
| 934 | # version is upgraded. |
| 935 | '-Wno-unused-result', |
| 936 | ], |
| 937 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 938 | [ 'OS=="win"', { |
| 939 | 'defines': [ |
| 940 | '_CRT_SECURE_NO_DEPRECATE', |
| 941 | '_CRT_NONSTDC_NO_WARNINGS', |
| 942 | '_CRT_NONSTDC_NO_DEPRECATE', |
| 943 | '_SCL_SECURE_NO_DEPRECATE', |
| 944 | ], |
| 945 | 'msvs_disabled_warnings': [4800], |
| 946 | 'msvs_settings': { |
| 947 | 'VCCLCompilerTool': { |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 948 | 'WarningLevel': '3', |
| 949 | 'WarnAsError': 'false', # TODO(maruel): Enable it. |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 950 | 'Detect64BitPortabilityProblems': 'false', |
| 951 | }, |
| 952 | }, |
| 953 | }], |
[email protected] | ea47b6a | 2011-07-17 19:39:42 | [diff] [blame] | 954 | # TODO(darin): Unfortunately, some third_party code depends on base/ |
| 955 | [ 'OS=="win" and component=="shared_library"', { |
| 956 | 'msvs_disabled_warnings': [ |
| 957 | 4251, # class 'std::xx' needs to have dll-interface. |
| 958 | ], |
| 959 | }], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 960 | [ 'OS=="mac"', { |
| 961 | 'xcode_settings': { |
| 962 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', |
[email protected] | 4c4c2e533 | 2010-06-15 11:51:06 | [diff] [blame] | 963 | 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], |
[email protected] | d854331 | 2010-02-10 17:43:28 | [diff] [blame] | 964 | }, |
| 965 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 966 | ], |
| 967 | }, { |
| 968 | # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the |
| 969 | # C99 macros on Mac and Linux. |
| 970 | 'defines': [ |
| 971 | '__STDC_FORMAT_MACROS', |
| 972 | ], |
| 973 | 'conditions': [ |
| 974 | ['OS!="win"', { |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 975 | 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'], |
[email protected] | a316ca53 | 2010-11-15 14:08:16 | [diff] [blame] | 976 | ['exclude', '(^|/)win/'], |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 977 | ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 978 | }], |
| 979 | ['OS!="mac"', { |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 980 | 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'], |
[email protected] | a316ca53 | 2010-11-15 14:08:16 | [diff] [blame] | 981 | ['exclude', '(^|/)(cocoa|mac)/'], |
| 982 | ['exclude', '\\.mm?$' ] ], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 983 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 984 | ['toolkit_uses_gtk!=1', { |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 985 | 'sources/': [ |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 986 | ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'], |
[email protected] | a316ca53 | 2010-11-15 14:08:16 | [diff] [blame] | 987 | ['exclude', '(^|/)gtk/'], |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 988 | ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'], |
[email protected] | 18cff3d | 2010-02-17 18:03:13 | [diff] [blame] | 989 | ], |
| 990 | }], |
[email protected] | f1b2cd0 | 2011-08-10 16:50:44 | [diff] [blame^] | 991 | ['use_wayland!=1', { |
| 992 | 'sources/': [ |
| 993 | ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'], |
| 994 | ['exclude', '(^|/)wayland/'], |
| 995 | ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'], |
| 996 | ], |
| 997 | }], |
[email protected] | 18cff3d | 2010-02-17 18:03:13 | [diff] [blame] | 998 | ['OS!="linux"', { |
| 999 | 'sources/': [ |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 1000 | ['exclude', '_linux(_unittest)?\\.(h|cc)$'], |
[email protected] | a316ca53 | 2010-11-15 14:08:16 | [diff] [blame] | 1001 | ['exclude', '(^|/)linux/'], |
[email protected] | 18cff3d | 2010-02-17 18:03:13 | [diff] [blame] | 1002 | ], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1003 | }], |
| 1004 | # We use "POSIX" to refer to all non-Windows operating systems. |
| 1005 | ['OS=="win"', { |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 1006 | 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ], |
[email protected] | f55bd486 | 2010-05-27 15:38:07 | [diff] [blame] | 1007 | # turn on warnings for signed/unsigned mismatch on chromium code. |
| 1008 | 'msvs_settings': { |
| 1009 | 'VCCLCompilerTool': { |
| 1010 | 'AdditionalOptions': ['/we4389'], |
| 1011 | }, |
| 1012 | }, |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1013 | }], |
[email protected] | 63e39a28 | 2011-07-13 20:41:28 | [diff] [blame] | 1014 | ['OS=="win" and component=="shared_library"', { |
| 1015 | 'msvs_disabled_warnings': [ |
| 1016 | 4251, # class 'std::xx' needs to have dll-interface. |
| 1017 | ], |
| 1018 | }], |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1019 | ['chromeos!=1', { |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 1020 | 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ] |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1021 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 1022 | ['toolkit_views==0', { |
[email protected] | 4051959 | 2010-11-16 15:23:30 | [diff] [blame] | 1023 | 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ] |
[email protected] | c14d8e77 | 2010-02-09 22:06:15 | [diff] [blame] | 1024 | }], |
| 1025 | ], |
| 1026 | }], |
[email protected] | a6e2213 | 2010-02-10 20:43:18 | [diff] [blame] | 1027 | ], # target_conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1028 | 'default_configuration': 'Debug', |
| 1029 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1030 | # VCLinkerTool LinkIncremental values below: |
| 1031 | # 0 == default |
| 1032 | # 1 == /INCREMENTAL:NO |
| 1033 | # 2 == /INCREMENTAL |
| 1034 | # Debug links incremental, Release does not. |
| 1035 | # |
[email protected] | 7b99801e | 2010-11-03 17:26:23 | [diff] [blame] | 1036 | # Abstract base configurations to cover common attributes. |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1037 | # |
| 1038 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1039 | 'abstract': 1, |
| 1040 | 'msvs_configuration_attributes': { |
| 1041 | 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', |
| 1042 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 1043 | 'CharacterSet': '1', |
| 1044 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1045 | }, |
| 1046 | 'x86_Base': { |
| 1047 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1048 | 'msvs_settings': { |
| 1049 | 'VCLinkerTool': { |
| 1050 | 'TargetMachine': '1', |
| 1051 | }, |
| 1052 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 1053 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1054 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1055 | 'x64_Base': { |
| 1056 | 'abstract': 1, |
| 1057 | 'msvs_configuration_platform': 'x64', |
| 1058 | 'msvs_settings': { |
| 1059 | 'VCLinkerTool': { |
| 1060 | 'TargetMachine': '17', # x86 - 64 |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1061 | 'AdditionalLibraryDirectories!': |
| 1062 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 1063 | 'AdditionalLibraryDirectories': |
| 1064 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 1065 | }, |
[email protected] | d26b4418ab | 2010-03-24 22:06:35 | [diff] [blame] | 1066 | 'VCLibrarianTool': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1067 | 'AdditionalLibraryDirectories!': |
| 1068 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 1069 | 'AdditionalLibraryDirectories': |
| 1070 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 1071 | }, |
| 1072 | }, |
| 1073 | 'defines': [ |
| 1074 | # Not sure if tcmalloc works on 64-bit Windows. |
| 1075 | 'NO_TCMALLOC', |
| 1076 | ], |
| 1077 | }, |
| 1078 | 'Debug_Base': { |
| 1079 | 'abstract': 1, |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1080 | 'defines': [ |
| 1081 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 1082 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 1083 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1084 | 'xcode_settings': { |
| 1085 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 1086 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 1087 | 'OTHER_CFLAGS': [ |
[email protected] | a68c29a | 2011-07-01 16:23:49 | [diff] [blame] | 1088 | '<@(debug_extra_cflags)', |
| 1089 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1090 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1091 | 'msvs_settings': { |
| 1092 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1093 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1094 | 'PreprocessorDefinitions': ['_DEBUG'], |
[email protected] | 6b0507b | 2010-05-07 07:41:21 | [diff] [blame] | 1095 | 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1096 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1097 | 'conditions': [ |
| 1098 | # According to MSVS, InlineFunctionExpansion=0 means |
| 1099 | # "default inlining", not "/Ob0". |
| 1100 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 1101 | ['win_debug_InlineFunctionExpansion==0', { |
| 1102 | 'AdditionalOptions': ['/Ob0'], |
| 1103 | }], |
| 1104 | ['win_debug_InlineFunctionExpansion!=""', { |
| 1105 | 'InlineFunctionExpansion': |
| 1106 | '<(win_debug_InlineFunctionExpansion)', |
| 1107 | }], |
[email protected] | fac10d1 | 2010-11-08 16:00:31 | [diff] [blame] | 1108 | ['win_debug_disable_iterator_debugging==1', { |
| 1109 | 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], |
| 1110 | }], |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1111 | ], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1112 | }, |
| 1113 | 'VCLinkerTool': { |
| 1114 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
[email protected] | 646f6b4 | 2011-07-14 13:57:02 | [diff] [blame] | 1115 | # ASLR makes debugging with windbg difficult because Chrome.exe and |
| 1116 | # Chrome.dll share the same base name. As result, windbg will |
| 1117 | # name the Chrome.dll module like chrome_<base address>, where |
| 1118 | # <base address> typically changes with each launch. This in turn |
| 1119 | # means that breakpoints in Chrome.dll don't stick from one launch |
| 1120 | # to the next. For this reason, we turn ASLR off in debug builds. |
| 1121 | # Note that this is a three-way bool, where 0 means to pick up |
| 1122 | # the default setting, 1 is off and 2 is on. |
| 1123 | 'RandomizedBaseAddress': 1, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1124 | }, |
| 1125 | 'VCResourceCompilerTool': { |
| 1126 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 1127 | }, |
| 1128 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1129 | 'conditions': [ |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1130 | ['OS=="linux"', { |
| 1131 | 'cflags': [ |
| 1132 | '<@(debug_extra_cflags)', |
| 1133 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1134 | }], |
[email protected] | 56cca4e | 2011-07-01 21:33:35 | [diff] [blame] | 1135 | ['release_valgrind_build==0', { |
| 1136 | 'xcode_settings': { |
| 1137 | 'OTHER_CFLAGS': [ |
| 1138 | '-fstack-protector-all', # Implies -fstack-protector |
| 1139 | ], |
| 1140 | }, |
| 1141 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1142 | ], |
| 1143 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1144 | 'Release_Base': { |
| 1145 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1146 | 'defines': [ |
| 1147 | 'NDEBUG', |
| 1148 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1149 | 'xcode_settings': { |
| 1150 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 1151 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1152 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 1153 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1154 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1155 | 'VCCLCompilerTool': { |
| 1156 | 'Optimization': '<(win_release_Optimization)', |
| 1157 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
[email protected] | 2ae6e02 | 2010-05-07 13:19:15 | [diff] [blame] | 1158 | 'conditions': [ |
| 1159 | # According to MSVS, InlineFunctionExpansion=0 means |
| 1160 | # "default inlining", not "/Ob0". |
| 1161 | # Thus, we have to handle InlineFunctionExpansion==0 separately. |
| 1162 | ['win_release_InlineFunctionExpansion==0', { |
| 1163 | 'AdditionalOptions': ['/Ob0'], |
| 1164 | }], |
| 1165 | ['win_release_InlineFunctionExpansion!=""', { |
| 1166 | 'InlineFunctionExpansion': |
| 1167 | '<(win_release_InlineFunctionExpansion)', |
| 1168 | }], |
| 1169 | ], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1170 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1171 | 'VCLinkerTool': { |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 1172 | # LinkIncremental is a tri-state boolean, where 0 means default |
| 1173 | # (i.e., inherit from parent solution), 1 means false, and |
| 1174 | # 2 means true. |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1175 | 'LinkIncremental': '1', |
[email protected] | c059c61 | 2011-08-08 20:56:34 | [diff] [blame] | 1176 | # This corresponds to the /PROFILE flag which ensures the PDB |
| 1177 | # file contains FIXUP information (growing the PDB file by about |
| 1178 | # 5%) but does not otherwise alter the output binary. This |
| 1179 | # information is used by the Syzygy optimization tool when |
| 1180 | # decomposing the release image. |
| 1181 | 'Profile': 'true', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1182 | }, |
| 1183 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1184 | 'conditions': [ |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 1185 | ['release_valgrind_build==0', { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1186 | 'defines': [ |
| 1187 | 'NVALGRIND', |
| 1188 | 'DYNAMIC_ANNOTATIONS_ENABLED=0', |
| 1189 | ], |
[email protected] | ee85751 | 2010-05-14 08:24:42 | [diff] [blame] | 1190 | }, { |
[email protected] | 1433976 | 2011-04-05 07:36:58 | [diff] [blame] | 1191 | 'defines': [ |
| 1192 | 'DYNAMIC_ANNOTATIONS_ENABLED=1', |
| 1193 | 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 1194 | ], |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 1195 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 1196 | ['win_use_allocator_shim==0', { |
| 1197 | 'defines': ['NO_TCMALLOC'], |
| 1198 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1199 | ['OS=="linux"', { |
| 1200 | 'cflags': [ |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 1201 | '<@(release_extra_cflags)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 1202 | ], |
| 1203 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1204 | ], |
| 1205 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1206 | 'Purify_Base': { |
| 1207 | 'abstract': 1, |
| 1208 | 'defines': [ |
| 1209 | 'PURIFY', |
| 1210 | 'NO_TCMALLOC', |
| 1211 | ], |
| 1212 | 'msvs_settings': { |
| 1213 | 'VCCLCompilerTool': { |
| 1214 | 'Optimization': '0', |
| 1215 | 'RuntimeLibrary': '0', |
| 1216 | 'BufferSecurityCheck': 'false', |
| 1217 | }, |
| 1218 | 'VCLinkerTool': { |
| 1219 | 'EnableCOMDATFolding': '1', |
| 1220 | 'LinkIncremental': '1', |
| 1221 | }, |
| 1222 | }, |
| 1223 | }, |
| 1224 | # |
| 1225 | # Concrete configurations |
| 1226 | # |
| 1227 | 'Debug': { |
| 1228 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 1229 | }, |
| 1230 | 'Release': { |
| 1231 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 1232 | 'conditions': [ |
| 1233 | ['msvs_use_common_release', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1234 | 'includes': ['release.gypi'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1235 | }], |
| 1236 | ] |
| 1237 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 1238 | 'conditions': [ |
| 1239 | [ 'OS=="win"', { |
| 1240 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
| 1241 | 'Purify': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1242 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1243 | }, |
| 1244 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1245 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 1246 | }, |
| 1247 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1248 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 1249 | }, |
| 1250 | 'Purify_x64': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1251 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 1252 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 1253 | }], |
| 1254 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1255 | }, |
| 1256 | }, |
| 1257 | 'conditions': [ |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1258 | ['os_posix==1 and OS!="mac"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1259 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1260 | # Enable -Werror by default, but put it in a variable so it can |
| 1261 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 1262 | 'variables': { |
[email protected] | 57e9402 | 2011-05-04 15:33:19 | [diff] [blame] | 1263 | # Use -fno-strict-aliasing, see http://crbug.com/32204 |
[email protected] | ecf52cb8 | 2010-01-13 19:25:42 | [diff] [blame] | 1264 | 'no_strict_aliasing%': 1, |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1265 | 'conditions': [ |
| 1266 | ['OS=="linux"', { |
| 1267 | 'werror%': '-Werror', |
| 1268 | }, { # turn off -Werror on other Unices |
| 1269 | 'werror%': '', |
| 1270 | }], |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 1271 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1272 | }, |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1273 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 1274 | '<(werror)', # See note above about the werror variable. |
| 1275 | '-pthread', |
| 1276 | '-fno-exceptions', |
| 1277 | '-Wall', |
[email protected] | 0fa1708 | 2010-03-26 00:48:05 | [diff] [blame] | 1278 | # TODO(evan): turn this back on once all the builds work. |
| 1279 | # '-Wextra', |
[email protected] | 225c8f5 | 2010-02-05 22:23:20 | [diff] [blame] | 1280 | # Don't warn about unused function params. We use those everywhere. |
| 1281 | '-Wno-unused-parameter', |
| 1282 | # Don't warn about the "struct foo f = {0};" initialization pattern. |
| 1283 | '-Wno-missing-field-initializers', |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 1284 | '-D_FILE_OFFSET_BITS=64', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 1285 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 1286 | # Note: this is *required* to make some plugins work. |
| 1287 | '-fvisibility=hidden', |
[email protected] | 7ca6ce1 | 2010-09-15 23:39:35 | [diff] [blame] | 1288 | '-pipe', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 1289 | ], |
| 1290 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 1291 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 1292 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 1293 | # Make inline functions have hidden visiblity by default. |
| 1294 | # Surprisingly, not covered by -fvisibility=hidden. |
| 1295 | '-fvisibility-inlines-hidden', |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 1296 | # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, |
| 1297 | # so we specify it explicitly. |
| 1298 | # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. |
[email protected] | d16bd64 | 2011-07-25 23:59:18 | [diff] [blame] | 1299 | # http://code.google.com/p/chromium/issues/detail?id=90453 |
[email protected] | 554abd90 | 2011-07-25 04:03:17 | [diff] [blame] | 1300 | '-Wsign-compare', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1301 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 1302 | 'ldflags': [ |
[email protected] | 138241f | 2010-03-30 23:53:10 | [diff] [blame] | 1303 | '-pthread', '-Wl,-z,noexecstack', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1304 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1305 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1306 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 1307 | 'variables': { |
| 1308 | 'debug_optimize%': '0', |
| 1309 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1310 | 'defines': [ |
| 1311 | '_DEBUG', |
| 1312 | ], |
| 1313 | 'cflags': [ |
[email protected] | 9cb5cc70 | 2011-02-01 19:56:04 | [diff] [blame] | 1314 | '-O>(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1315 | '-g', |
| 1316 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 1317 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1318 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 1319 | 'variables': { |
| 1320 | 'release_optimize%': '2', |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 1321 | # Binaries become big and gold is unable to perform GC |
| 1322 | # and remove unused sections for some of test targets |
| 1323 | # on 32 bit platform. |
| 1324 | # (This is currently observed only in chromeos valgrind bots) |
| 1325 | # The following flag is to disable --gc-sections linker |
| 1326 | # option for these bots. |
| 1327 | 'no_gc_sections%': 0, |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 1328 | |
| 1329 | # TODO(bradnelson): reexamine how this is done if we change the |
| 1330 | # expansion of configurations |
| 1331 | 'release_valgrind_build%': 0, |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 1332 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1333 | 'cflags': [ |
[email protected] | 9cb5cc70 | 2011-02-01 19:56:04 | [diff] [blame] | 1334 | '-O>(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 1335 | # Don't emit the GCC version ident directives, they just end up |
| 1336 | # in the .comment section taking up binary size. |
| 1337 | '-fno-ident', |
| 1338 | # Put data and code in their own sections, so that unused symbols |
| 1339 | # can be removed at link time with --gc-sections. |
| 1340 | '-fdata-sections', |
| 1341 | '-ffunction-sections', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1342 | ], |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 1343 | 'ldflags': [ |
| 1344 | # Specifically tell the linker to perform optimizations. |
| 1345 | # See http://lwn.net/Articles/192624/ . |
| 1346 | '-Wl,-O1', |
[email protected] | 27c2e49 | 2010-08-06 22:55:22 | [diff] [blame] | 1347 | '-Wl,--as-needed', |
[email protected] | c902f2c | 2010-08-06 20:04:18 | [diff] [blame] | 1348 | ], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 1349 | 'conditions' : [ |
| 1350 | ['no_gc_sections==0', { |
| 1351 | 'ldflags': [ |
| 1352 | '-Wl,--gc-sections', |
| 1353 | ], |
| 1354 | }], |
[email protected] | ecf7b648 | 2010-10-13 09:15:20 | [diff] [blame] | 1355 | ['clang==1', { |
| 1356 | 'cflags!': [ |
| 1357 | '-fno-ident', |
| 1358 | ], |
| 1359 | }], |
[email protected] | 7664ab3 | 2011-02-01 23:35:25 | [diff] [blame] | 1360 | ['profiling==1', { |
| 1361 | 'cflags': [ |
| 1362 | '-fno-omit-frame-pointer', |
| 1363 | '-g', |
| 1364 | ], |
| 1365 | }], |
[email protected] | c75f33e4 | 2011-05-04 18:11:52 | [diff] [blame] | 1366 | # At gyp time, we test the linker for ICF support; this flag |
| 1367 | # is then provided to us by gyp. (Currently only gold supports |
| 1368 | # an --icf flag.) |
[email protected] | 16d71b0d | 2011-06-22 00:43:53 | [diff] [blame] | 1369 | # There seems to be a conflict of --icf and -pie in gold which |
| 1370 | # can generate crashy binaries. As a security measure, -pie |
| 1371 | # takes precendence for now. |
[email protected] | 409dceef | 2011-05-10 19:49:12 | [diff] [blame] | 1372 | ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', { |
[email protected] | f2fcf4df7 | 2011-06-03 20:05:46 | [diff] [blame] | 1373 | 'target_conditions': [ |
| 1374 | ['_toolset=="target"', { |
| 1375 | 'ldflags': [ |
[email protected] | 16d71b0d | 2011-06-22 00:43:53 | [diff] [blame] | 1376 | #'-Wl,--icf=safe', |
| 1377 | '-Wl,--icf=none', |
[email protected] | f2fcf4df7 | 2011-06-03 20:05:46 | [diff] [blame] | 1378 | ] |
| 1379 | }] |
[email protected] | c75f33e4 | 2011-05-04 18:11:52 | [diff] [blame] | 1380 | ] |
| 1381 | }], |
[email protected] | 1dd52964 | 2010-05-15 01:02:51 | [diff] [blame] | 1382 | ] |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 1383 | }, |
| 1384 | }, |
[email protected] | 601b54022 | 2009-04-03 21:32:04 | [diff] [blame] | 1385 | 'variants': { |
| 1386 | 'coverage': { |
| 1387 | 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
| 1388 | 'ldflags': ['-fprofile-arcs'], |
| 1389 | }, |
| 1390 | 'profile': { |
| 1391 | 'cflags': ['-pg', '-g'], |
| 1392 | 'ldflags': ['-pg'], |
| 1393 | }, |
| 1394 | 'symbols': { |
| 1395 | 'cflags': ['-g'], |
| 1396 | }, |
| 1397 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1398 | 'conditions': [ |
[email protected] | 7e8eb761 | 2009-07-29 15:56:00 | [diff] [blame] | 1399 | [ 'target_arch=="ia32"', { |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1400 | 'asflags': [ |
| 1401 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 1402 | # are compatible with the general 32-bit-ness. |
| 1403 | '-32', |
| 1404 | ], |
| 1405 | # All floating-point computations on x87 happens in 80-bit |
| 1406 | # precision. Because the C and C++ language standards allow |
| 1407 | # the compiler to keep the floating-point values in higher |
| 1408 | # precision than what's specified in the source and doing so |
| 1409 | # is more efficient than constantly rounding up to 64-bit or |
| 1410 | # 32-bit precision as specified in the source, the compiler, |
| 1411 | # especially in the optimized mode, tries very hard to keep |
| 1412 | # values in x87 floating-point stack (in 80-bit precision) |
| 1413 | # as long as possible. This has important side effects, that |
| 1414 | # the real value used in computation may change depending on |
| 1415 | # how the compiler did the optimization - that is, the value |
| 1416 | # kept in 80-bit is different than the value rounded down to |
| 1417 | # 64-bit or 32-bit. There are possible compiler options to make |
| 1418 | # this behavior consistent (e.g. -ffloat-store would keep all |
| 1419 | # floating-values in the memory, thus force them to be rounded |
| 1420 | # to its original precision) but they have significant runtime |
| 1421 | # performance penalty. |
| 1422 | # |
| 1423 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 1424 | # which keep floating-point values in SSE registers in its |
| 1425 | # native precision (32-bit for single precision, and 64-bit for |
| 1426 | # double precision values). This means the floating-point value |
| 1427 | # used during computation does not change depending on how the |
| 1428 | # compiler optimized the code, since the value is always kept |
| 1429 | # in its specified precision. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 1430 | 'conditions': [ |
[email protected] | ac120ff | 2010-04-28 02:14:22 | [diff] [blame] | 1431 | ['branding=="Chromium" and disable_sse2==0', { |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 1432 | 'cflags': [ |
| 1433 | '-march=pentium4', |
| 1434 | '-msse2', |
| 1435 | '-mfpmath=sse', |
| 1436 | ], |
| 1437 | }], |
[email protected] | 06c75618 | 2010-04-27 18:31:31 | [diff] [blame] | 1438 | # ChromeOS targets Pinetrail, which is sse3, but most of the |
[email protected] | 0183dbb | 2010-04-16 02:00:44 | [diff] [blame] | 1439 | # benefit comes from sse2 so this setting allows ChromeOS |
| 1440 | # to build on other CPUs. In the future -march=atom would help |
| 1441 | # but requires a newer compiler. |
[email protected] | ac120ff | 2010-04-28 02:14:22 | [diff] [blame] | 1442 | ['chromeos==1 and disable_sse2==0', { |
[email protected] | 0183dbb | 2010-04-16 02:00:44 | [diff] [blame] | 1443 | 'cflags': [ |
| 1444 | '-msse2', |
| 1445 | ], |
| 1446 | }], |
[email protected] | 34799f9d | 2010-07-08 17:51:33 | [diff] [blame] | 1447 | # Install packages have started cropping up with |
| 1448 | # different headers between the 32-bit and 64-bit |
| 1449 | # versions, so we have to shadow those differences off |
| 1450 | # and make sure a 32-bit-on-64-bit build picks up the |
| 1451 | # right files. |
| 1452 | ['host_arch!="ia32"', { |
| 1453 | 'include_dirs+': [ |
| 1454 | '/usr/include32', |
| 1455 | ], |
| 1456 | }], |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 1457 | ], |
[email protected] | dc259ce5 | 2010-04-13 04:03:10 | [diff] [blame] | 1458 | # -mmmx allows mmintrin.h to be used for mmx intrinsics. |
| 1459 | # video playback is mmx and sse2 optimized. |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1460 | 'cflags': [ |
| 1461 | '-m32', |
[email protected] | dc259ce5 | 2010-04-13 04:03:10 | [diff] [blame] | 1462 | '-mmmx', |
[email protected] | 1c6560af | 2009-07-14 11:02:16 | [diff] [blame] | 1463 | ], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1464 | 'ldflags': [ |
| 1465 | '-m32', |
| 1466 | ], |
| 1467 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 1468 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 1469 | 'target_conditions': [ |
| 1470 | ['_toolset=="target"', { |
| 1471 | 'cflags_cc': [ |
| 1472 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 1473 | # has changed whenever it encounters a varargs function. This |
| 1474 | # silences those warnings, as they are not helpful and |
| 1475 | # clutter legitimate warnings. |
| 1476 | '-Wno-abi', |
| 1477 | ], |
| 1478 | 'conditions': [ |
| 1479 | ['arm_thumb == 1', { |
| 1480 | 'cflags': [ |
| 1481 | '-mthumb', |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 1482 | ] |
| 1483 | }], |
| 1484 | ['armv7==1', { |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 1485 | 'cflags': [ |
| 1486 | '-march=armv7-a', |
| 1487 | '-mtune=cortex-a8', |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 1488 | '-mfloat-abi=softfp', |
| 1489 | ], |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 1490 | 'conditions': [ |
| 1491 | ['arm_neon==1', { |
| 1492 | 'cflags': [ '-mfpu=neon', ], |
| 1493 | }, { |
[email protected] | 53e0f64 | 2010-03-05 01:41:56 | [diff] [blame] | 1494 | 'cflags': [ '-mfpu=<(arm_fpu)', ], |
[email protected] | eafc0b45 | 2010-02-26 21:53:43 | [diff] [blame] | 1495 | }] |
| 1496 | ], |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 1497 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 1498 | ], |
| 1499 | }], |
| 1500 | ], |
| 1501 | }], |
[email protected] | 2fb843b | 2010-08-12 02:11:08 | [diff] [blame] | 1502 | ['linux_fpic==1', { |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame] | 1503 | 'cflags': [ |
| 1504 | '-fPIC', |
| 1505 | ], |
| 1506 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 1507 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 1508 | 'target_conditions': [ |
| 1509 | ['_toolset=="target"', { |
| 1510 | 'cflags': [ |
| 1511 | '--sysroot=<(sysroot)', |
| 1512 | ], |
| 1513 | 'ldflags': [ |
| 1514 | '--sysroot=<(sysroot)', |
| 1515 | ], |
| 1516 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 1517 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1518 | ['clang==1', { |
[email protected] | 18ca15a | 2011-08-10 03:07:12 | [diff] [blame] | 1519 | 'cflags': [ |
| 1520 | '-Wheader-hygiene', |
| 1521 | # Clang spots more unused functions. |
| 1522 | '-Wno-unused-function', |
| 1523 | # Don't die on dtoa code that uses a char as an array index. |
| 1524 | '-Wno-char-subscripts', |
| 1525 | # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see |
| 1526 | # http://code.google.com/p/googletest/source/detail?r=446 . |
| 1527 | # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ) |
| 1528 | '-Wno-unnamed-type-template-args', |
| 1529 | ], |
| 1530 | 'cflags!': [ |
| 1531 | # Clang doesn't seem to know know this flag. |
| 1532 | '-mfpmath=sse', |
| 1533 | ], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 1534 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1535 | ['clang==1 and clang_use_chrome_plugins==1', { |
| 1536 | 'target_conditions': [ |
| 1537 | ['_toolset=="target"', { |
| 1538 | 'cflags': [ |
| 1539 | '<(clang_chrome_plugins_flags)', |
| 1540 | ], |
| 1541 | }]], |
| 1542 | }], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1543 | ['clang==1 and clang_load!="" and clang_add_plugin!=""', { |
[email protected] | 3e40c88 | 2011-02-10 21:03:35 | [diff] [blame] | 1544 | 'target_conditions': [ |
| 1545 | ['_toolset=="target"', { |
| 1546 | 'cflags': [ |
| 1547 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
| 1548 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 1549 | ], |
| 1550 | }]], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1551 | }], |
[email protected] | cc4219a | 2009-08-14 05:30:52 | [diff] [blame] | 1552 | ['no_strict_aliasing==1', { |
| 1553 | 'cflags': [ |
| 1554 | '-fno-strict-aliasing', |
| 1555 | ], |
| 1556 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1557 | ['linux_breakpad==1', { |
[email protected] | c87efd4 | 2010-08-26 18:28:17 | [diff] [blame] | 1558 | 'cflags': [ '-g' ], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 1559 | 'defines': ['USE_LINUX_BREAKPAD'], |
| 1560 | }], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 1561 | ['linux_use_heapchecker==1', { |
| 1562 | 'variables': {'linux_use_tcmalloc%': 1}, |
| 1563 | }], |
[email protected] | 61a9b2d8 | 2010-02-26 00:31:08 | [diff] [blame] | 1564 | ['linux_use_tcmalloc==0', { |
| 1565 | 'defines': ['NO_TCMALLOC'], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 1566 | }], |
[email protected] | d8b6060 | 2010-03-26 09:41:22 | [diff] [blame] | 1567 | ['linux_use_heapchecker==0', { |
| 1568 | 'defines': ['NO_HEAPCHECKER'], |
| 1569 | }], |
[email protected] | 64e2d4a4 | 2010-08-27 10:13:21 | [diff] [blame] | 1570 | ['linux_keep_shadow_stacks==1', { |
| 1571 | 'defines': ['KEEP_SHADOW_STACKS'], |
| 1572 | 'cflags': ['-finstrument-functions'], |
| 1573 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 1574 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 1575 | }, |
| 1576 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 1577 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 1578 | # with Linux. |
| 1579 | ['OS=="freebsd"', { |
| 1580 | 'target_defaults': { |
| 1581 | 'ldflags': [ |
| 1582 | '-Wl,--no-keep-memory', |
| 1583 | ], |
| 1584 | }, |
| 1585 | }], |
[email protected] | 93f21e4 | 2010-04-01 00:35:15 | [diff] [blame] | 1586 | ['OS=="solaris"', { |
| 1587 | 'cflags!': ['-fvisibility=hidden'], |
| 1588 | 'cflags_cc!': ['-fvisibility-inlines-hidden'], |
| 1589 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1590 | ['OS=="mac"', { |
| 1591 | 'target_defaults': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 1592 | 'variables': { |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 1593 | # These should be 'mac_real_dsym%' and 'mac_strip%', but there |
| 1594 | # seems to be a bug with % in variables that are intended to be |
| 1595 | # set to different values in different targets, like these two. |
| 1596 | 'mac_strip': 1, # Strip debugging symbols from the target. |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 1597 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 1598 | }, |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 1599 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1600 | 'xcode_settings': { |
| 1601 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 1602 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 1603 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
| 1604 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 1605 | # (Equivalent to -fPIC) |
| 1606 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 1607 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 1608 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 1609 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 1610 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 1611 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 1612 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 1613 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 1614 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1615 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 1616 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 1617 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 1618 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 1619 | 'PREBINDING': 'NO', # No -Wl,-prebind |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1620 | 'USE_HEADERMAP': 'NO', |
[email protected] | 57e9402 | 2011-05-04 15:33:19 | [diff] [blame] | 1621 | 'OTHER_CFLAGS': [ |
| 1622 | '-fno-strict-aliasing', # See http://crbug.com/32204 |
| 1623 | ], |
[email protected] | 080e86f | 2010-06-21 15:19:04 | [diff] [blame] | 1624 | 'WARNING_CFLAGS': [ |
| 1625 | '-Wall', |
| 1626 | '-Wendif-labels', |
| 1627 | '-Wextra', |
| 1628 | # Don't warn about unused function parameters. |
| 1629 | '-Wno-unused-parameter', |
| 1630 | # Don't warn about the "struct foo f = {0};" initialization |
| 1631 | # pattern. |
| 1632 | '-Wno-missing-field-initializers', |
| 1633 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1634 | 'conditions': [ |
| 1635 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 1636 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 1637 | ], |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 1638 | ['clang==1', { |
| 1639 | 'WARNING_CFLAGS': [ |
[email protected] | 7f8d486f | 2011-04-05 19:49:07 | [diff] [blame] | 1640 | '-Wheader-hygiene', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 1641 | # Don't die on dtoa code that uses a char as an array index. |
| 1642 | # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 1643 | '-Wno-char-subscripts', |
[email protected] | 25d3bb72 | 2010-11-22 14:31:45 | [diff] [blame] | 1644 | # Clang spots more unused functions. |
| 1645 | '-Wno-unused-function', |
[email protected] | 0fa0fbc | 2010-10-12 04:32:05 | [diff] [blame] | 1646 | # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see |
| 1647 | # http://code.google.com/p/googletest/source/detail?r=446 . |
| 1648 | # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ). |
| 1649 | '-Wno-unnamed-type-template-args', |
[email protected] | d5368093 | 2011-06-08 16:40:06 | [diff] [blame] | 1650 | # TODO(thakis): Reenable once the one instance this warns on |
| 1651 | # is fixed. |
| 1652 | '-Wno-parentheses', |
[email protected] | 6673317 | 2010-09-22 00:09:28 | [diff] [blame] | 1653 | ], |
| 1654 | }], |
[email protected] | 5d451ad | 2011-02-11 16:43:46 | [diff] [blame] | 1655 | ['clang==1 and clang_use_chrome_plugins==1', { |
| 1656 | 'OTHER_CFLAGS': [ |
| 1657 | '<(clang_chrome_plugins_flags)', |
| 1658 | ], |
| 1659 | }], |
[email protected] | 5e78123 | 2011-01-28 02:57:59 | [diff] [blame] | 1660 | ['clang==1 and clang_load!="" and clang_add_plugin!=""', { |
| 1661 | 'OTHER_CFLAGS': [ |
| 1662 | '-Xclang', '-load', '-Xclang', '<(clang_load)', |
| 1663 | '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
| 1664 | ], |
| 1665 | }], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 1666 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1667 | }, |
| 1668 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1669 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 1670 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
| 1671 | }], |
| 1672 | ['_mac_bundle', { |
| 1673 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 1674 | }], |
[email protected] | 6a0242bc | 2011-07-01 00:34:46 | [diff] [blame] | 1675 | ['_type=="executable" and release_valgrind_build==0', { |
| 1676 | # Turn on position-independence (ASLR) for executables. When PIE |
| 1677 | # is on for the Chrome executables, the framework will also be |
| 1678 | # subject to ASLR. |
| 1679 | # Don't do this when building for Valgrind because Valgrind |
| 1680 | # doesn't understand slide. TODO: Make Valgrind on Mac OS X |
| 1681 | # understand slide, and get rid of the Valgrind check. |
| 1682 | 'xcode_settings': { |
| 1683 | 'OTHER_LDFLAGS': [ |
| 1684 | '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 1685 | ], |
| 1686 | }, |
| 1687 | }], |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 1688 | ['(_type=="executable" or _type=="shared_library" or \ |
| 1689 | _type=="loadable_module") and mac_strip!=0', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 1690 | 'target_conditions': [ |
| 1691 | ['mac_real_dsym == 1', { |
| 1692 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 1693 | # debug information format to dwarf-with-dsym. Since |
| 1694 | # strip_from_xcode will not be used, set Xcode to do the |
| 1695 | # stripping as well. |
| 1696 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1697 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 1698 | 'xcode_settings': { |
| 1699 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 1700 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 1701 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1702 | 'target_conditions': [ |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 1703 | ['_type=="shared_library" or _type=="loadable_module"', { |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1704 | # The Xcode default is to strip debugging symbols |
| 1705 | # only (-S). Local symbols should be stripped as |
| 1706 | # well, which will be handled by -x. Xcode will |
| 1707 | # continue to insert -S when stripping even when |
| 1708 | # additional flags are added with STRIPFLAGS. |
| 1709 | 'STRIPFLAGS': '-x', |
[email protected] | c211142 | 2010-06-01 18:30:25 | [diff] [blame] | 1710 | }], # _type=="shared_library" or _type=="loadable_module"' |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1711 | ], # target_conditions |
| 1712 | }, # xcode_settings |
| 1713 | }, # configuration "Release" |
| 1714 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 1715 | }, { # mac_real_dsym != 1 |
| 1716 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 1717 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 1718 | # only operates in the Release configuration. |
| 1719 | 'postbuilds': [ |
| 1720 | { |
| 1721 | 'variables': { |
| 1722 | # Define strip_from_xcode in a variable ending in _path |
| 1723 | # so that gyp understands it's a path and performs proper |
| 1724 | # relativization during dict merging. |
| 1725 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 1726 | }, |
| 1727 | 'postbuild_name': 'Strip If Needed', |
| 1728 | 'action': ['<(strip_from_xcode_path)'], |
| 1729 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1730 | ], # postbuilds |
| 1731 | }], # mac_real_dsym |
| 1732 | ], # target_conditions |
[email protected] | 9a5e7286 | 2010-09-02 16:16:58 | [diff] [blame] | 1733 | }], # (_type=="executable" or _type=="shared_library" or |
| 1734 | # _type=="loadable_module") and mac_strip!=0 |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 1735 | ], # target_conditions |
| 1736 | }, # target_defaults |
| 1737 | }], # OS=="mac" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1738 | ['OS=="win"', { |
| 1739 | 'target_defaults': { |
| 1740 | 'defines': [ |
| 1741 | '_WIN32_WINNT=0x0600', |
| 1742 | 'WINVER=0x0600', |
| 1743 | 'WIN32', |
| 1744 | '_WINDOWS', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1745 | 'NOMINMAX', |
| 1746 | '_CRT_RAND_S', |
| 1747 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 1748 | 'WIN32_LEAN_AND_MEAN', |
[email protected] | 7a812dd6 | 2010-06-30 18:52:27 | [diff] [blame] | 1749 | '_ATL_NO_OPENGL', |
[email protected] | adfb98c | 2009-06-23 20:08:45 | [diff] [blame] | 1750 | '_HAS_TR1=0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1751 | ], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1752 | 'conditions': [ |
| 1753 | ['component=="static_library"', { |
| 1754 | 'defines': [ |
| 1755 | '_HAS_EXCEPTIONS=0', |
| 1756 | ], |
| 1757 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1758 | ['secure_atl', { |
| 1759 | 'defines': [ |
| 1760 | '_SECURE_ATL', |
| 1761 | ], |
| 1762 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1763 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 1764 | 'msvs_system_include_dirs': [ |
[email protected] | 998b515 | 2009-12-12 22:19:52 | [diff] [blame] | 1765 | '<(DEPTH)/third_party/platformsdk_win7/files/Include', |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 1766 | '<(DEPTH)/third_party/directxsdk/files/Include', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1767 | '$(VSInstallDir)/VC/atlmfc/include', |
| 1768 | ], |
[email protected] | a8d99cef | 2009-08-26 20:47:49 | [diff] [blame] | 1769 | 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 1770 | 'msvs_disabled_warnings': [4351, 4396, 4503, 4819, |
| 1771 | # TODO(maruel): These warnings are level 4. They will be slowly |
| 1772 | # removed as code is fixed. |
| 1773 | 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, |
| 1774 | 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, |
| 1775 | 4702, 4706, |
| 1776 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1777 | 'msvs_settings': { |
| 1778 | 'VCCLCompilerTool': { |
| 1779 | 'MinimalRebuild': 'false', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1780 | 'BufferSecurityCheck': 'true', |
| 1781 | 'EnableFunctionLevelLinking': 'true', |
| 1782 | 'RuntimeTypeInfo': 'false', |
[email protected] | 942c3a60f | 2011-05-03 02:04:11 | [diff] [blame] | 1783 | 'WarningLevel': '4', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1784 | 'WarnAsError': 'true', |
| 1785 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 1786 | 'conditions': [ |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1787 | ['msvs_multi_core_compile', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1788 | 'AdditionalOptions': ['/MP'], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 1789 | }], |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1790 | ['MSVS_VERSION=="2005e"', { |
| 1791 | 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL) |
| 1792 | }], |
[email protected] | 8974e04 | 2010-06-21 18:06:52 | [diff] [blame] | 1793 | ['component=="shared_library"', { |
| 1794 | 'ExceptionHandling': '1', # /EHsc |
| 1795 | }, { |
| 1796 | 'ExceptionHandling': '0', |
| 1797 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 1798 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1799 | }, |
| 1800 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1801 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 1802 | 'AdditionalLibraryDirectories': [ |
| 1803 | '<(DEPTH)/third_party/platformsdk_win7/files/Lib', |
| 1804 | '<(DEPTH)/third_party/directxsdk/files/Lib/x86', |
| 1805 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1806 | }, |
| 1807 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1808 | 'AdditionalDependencies': [ |
| 1809 | 'wininet.lib', |
[email protected] | b1d8c25 | 2011-01-13 20:27:50 | [diff] [blame] | 1810 | 'dnsapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1811 | 'version.lib', |
| 1812 | 'msimg32.lib', |
| 1813 | 'ws2_32.lib', |
| 1814 | 'usp10.lib', |
| 1815 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 1816 | 'dbghelp.lib', |
[email protected] | dfdf7ee | 2011-04-28 18:51:48 | [diff] [blame] | 1817 | 'winmm.lib', |
| 1818 | 'shlwapi.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1819 | ], |
[email protected] | 4de39f8 | 2011-03-28 12:01:29 | [diff] [blame] | 1820 | 'conditions': [ |
[email protected] | 3e2648a | 2011-03-21 20:58:50 | [diff] [blame] | 1821 | ['msvs_express', { |
| 1822 | # Explicitly required when using the ATL with express |
| 1823 | 'AdditionalDependencies': [ |
| 1824 | 'atlthunk.lib', |
| 1825 | ], |
| 1826 | }], |
| 1827 | ['MSVS_VERSION=="2005e"', { |
| 1828 | # Non-express versions link automatically to these |
| 1829 | 'AdditionalDependencies': [ |
| 1830 | 'advapi32.lib', |
| 1831 | 'comdlg32.lib', |
| 1832 | 'ole32.lib', |
| 1833 | 'shell32.lib', |
| 1834 | 'user32.lib', |
| 1835 | 'winspool.lib', |
| 1836 | ], |
| 1837 | }], |
| 1838 | ], |
[email protected] | a78da50e | 2010-06-09 21:31:37 | [diff] [blame] | 1839 | 'AdditionalLibraryDirectories': [ |
| 1840 | '<(DEPTH)/third_party/platformsdk_win7/files/Lib', |
| 1841 | '<(DEPTH)/third_party/directxsdk/files/Lib/x86', |
| 1842 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1843 | 'GenerateDebugInformation': 'true', |
| 1844 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 1845 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1846 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 1847 | # SubSystem values: |
| 1848 | # 0 == not set |
| 1849 | # 1 == /SUBSYSTEM:CONSOLE |
| 1850 | # 2 == /SUBSYSTEM:WINDOWS |
| 1851 | # Most of the executables we'll ever create are tests |
| 1852 | # and utilities with console output. |
| 1853 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1854 | }, |
| 1855 | 'VCMIDLTool': { |
| 1856 | 'GenerateStublessProxies': 'true', |
| 1857 | 'TypeLibraryName': '$(InputName).tlb', |
| 1858 | 'OutputDirectory': '$(IntDir)', |
| 1859 | 'HeaderFileName': '$(InputName).h', |
| 1860 | 'DLLDataFileName': 'dlldata.c', |
| 1861 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 1862 | 'ProxyFileName': '$(InputName)_p.c', |
| 1863 | }, |
| 1864 | 'VCResourceCompilerTool': { |
| 1865 | 'Culture' : '1033', |
[email protected] | 4d91cbc | 2010-05-07 20:41:38 | [diff] [blame] | 1866 | 'AdditionalIncludeDirectories': [ |
| 1867 | '<(DEPTH)', |
| 1868 | '<(SHARED_INTERMEDIATE_DIR)', |
| 1869 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1870 | }, |
| 1871 | }, |
| 1872 | }, |
| 1873 | }], |
[email protected] | 79e2336c | 2011-05-12 18:18:34 | [diff] [blame] | 1874 | ['disable_nacl==1', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 1875 | 'target_defaults': { |
| 1876 | 'defines': [ |
| 1877 | 'DISABLE_NACL', |
| 1878 | ], |
| 1879 | }, |
| 1880 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 1881 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1882 | 'target_defaults': { |
| 1883 | 'msvs_settings': { |
| 1884 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1885 | 'DelayLoadDLLs': [ |
| 1886 | 'dbghelp.dll', |
| 1887 | 'dwmapi.dll', |
| 1888 | 'uxtheme.dll', |
| 1889 | ], |
| 1890 | }, |
| 1891 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1892 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1893 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1894 | 'msvs_settings': { |
| 1895 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1896 | 'AdditionalOptions': [ |
| 1897 | '/safeseh', |
| 1898 | '/dynamicbase', |
| 1899 | '/ignore:4199', |
| 1900 | '/ignore:4221', |
| 1901 | '/nxcompat', |
| 1902 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1903 | }, |
| 1904 | }, |
| 1905 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1906 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1907 | 'msvs_settings': { |
| 1908 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1909 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1910 | # safeseh is not compatible with x64 |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1911 | '/dynamicbase', |
| 1912 | '/ignore:4199', |
| 1913 | '/ignore:4221', |
| 1914 | '/nxcompat', |
| 1915 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1916 | }, |
| 1917 | }, |
| 1918 | }, |
| 1919 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1920 | }, |
| 1921 | }], |
[email protected] | 9821d0d | 2010-04-16 22:40:37 | [diff] [blame] | 1922 | ['enable_new_npdevice_api==1', { |
| 1923 | 'target_defaults': { |
| 1924 | 'defines': [ |
| 1925 | 'ENABLE_NEW_NPDEVICE_API', |
| 1926 | ], |
| 1927 | }, |
| 1928 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1929 | ], |
| 1930 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 1931 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 1932 | # This block adds *project-wide* configuration settings to each project |
| 1933 | # file. It's almost always wrong to put things here. Specify your |
| 1934 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 1935 | |
| 1936 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 1937 | # setting sets the SDK on a project-wide basis. In order to get the |
| 1938 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 1939 | # here at the project level. |
| 1940 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 1941 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1942 | # The Xcode generator will look for an xcode_settings section at the root |
| 1943 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 1944 | # settings should not be here, they should be in target-specific |
| 1945 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 1946 | # settings in target dicts. SYMROOT is a special case, because many other |
| 1947 | # Xcode variables depend on it, including variables such as |
| 1948 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 1949 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 1950 | # files to appear (when present) in the UI as actual files and not red |
| 1951 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 1952 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 1953 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1954 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 1955 | } |