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