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