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