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