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