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