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