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