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