[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1 | # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 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 | { |
| 9 | 'variables': { |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 10 | # .gyp files should set chromium_code to 1 if they build Chromium-specific |
| 11 | # code, as opposed to external code. This variable is used to control |
| 12 | # such things as the set of warnings to enable, and whether warnings are |
| 13 | # treated as errors. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 14 | 'chromium_code%': 0, |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 15 | |
| 16 | # Variables expected to be overriden on the GYP command line (-D) or by |
| 17 | # ~/.gyp/include.gypi. |
| 18 | |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 19 | # Putting a variables dict inside another variables dict looks kind of |
| 20 | # weird. This is done so that "branding" and "buildtype" are defined as |
| 21 | # variables within the outer variables dict here. This is necessary |
| 22 | # to get these variables defined for the conditions within this variables |
| 23 | # dict that operate on these variables. |
| 24 | 'variables': { |
| 25 | # Override branding to select the desired branding flavor. |
| 26 | 'branding%': 'Chromium', |
| 27 | |
| 28 | # Override buildtype to select the desired build flavor. |
| 29 | # Dev - everyday build for development/testing |
| 30 | # Official - release build (generally implies additional processing) |
| 31 | # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp |
| 32 | # conversion is done), some of the things which are now controlled by |
| 33 | # 'branding', such as symbol generation, will need to be refactored based |
| 34 | # on 'buildtype' (i.e. we don't care about saving symbols for non-Official |
| 35 | # builds). |
| 36 | 'buildtype%': 'Dev', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 37 | |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 38 | 'variables': { |
| 39 | # Compute the architecture that we're building on. |
| 40 | 'conditions': [ |
[email protected] | 65df058 | 2010-01-23 02:37:56 | [diff] [blame] | 41 | [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 42 | # This handles the Linux platforms we generally deal with. Anything |
| 43 | # else gets passed through, which probably won't work very well; such |
| 44 | # hosts should pass an explicit target_arch to gyp. |
| 45 | 'host_arch%': |
| 46 | '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")', |
| 47 | }, { # OS!="linux" |
| 48 | 'host_arch%': 'ia32', |
| 49 | }], |
| 50 | ], |
| 51 | }, |
| 52 | 'host_arch%': '<(host_arch)', |
| 53 | |
| 54 | # Default architecture we're building for is the architecture we're |
| 55 | # building on. |
| 56 | 'target_arch%': '<(host_arch)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 57 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 58 | # We do want to build Chromium with Breakpad support in certain |
| 59 | # situations. I.e. for Chrome bot. |
| 60 | 'linux_chromium_breakpad%': 0, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 61 | # And if we want to dump symbols. |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 62 | 'linux_chromium_dump_symbols%': 0, |
| 63 | # Also see linux_strip_binary below. |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 64 | |
| 65 | # By default, Linux does not use views. To turn on views in Linux, |
| 66 | # set the variable GYP_DEFINES to "toolkit_views=1", or modify |
| 67 | # ~/.gyp/include.gypi . |
| 68 | 'toolkit_views%': 0, |
| 69 | |
| 70 | # Defaults to a desktop build, overridden via command line/env. |
| 71 | 'chromeos%': 0, |
[email protected] | b2f030c | 2009-09-24 20:36:21 | [diff] [blame] | 72 | |
| 73 | # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are |
| 74 | # are built under a chromium full build (1) or a webkit.org chromium |
| 75 | # build (0). |
| 76 | 'inside_chromium_build%': 1, |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 77 | |
| 78 | # Set to 1 to enable fast builds. It disables debug info for fastest |
| 79 | # compilation. |
| 80 | 'fastbuild%': 0, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 81 | }, |
| 82 | |
| 83 | # Define branding and buildtype on the basis of their settings within the |
| 84 | # variables sub-dict above, unless overridden. |
| 85 | 'branding%': '<(branding)', |
| 86 | 'buildtype%': '<(buildtype)', |
[email protected] | e0d0014 | 2009-09-18 22:10:27 | [diff] [blame] | 87 | 'target_arch%': '<(target_arch)', |
[email protected] | cf185b3 | 2010-01-12 04:29:59 | [diff] [blame] | 88 | 'host_arch%': '<(host_arch)', |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 89 | 'toolkit_views%': '<(toolkit_views)', |
| 90 | 'chromeos%': '<(chromeos)', |
[email protected] | b2f030c | 2009-09-24 20:36:21 | [diff] [blame] | 91 | 'inside_chromium_build%': '<(inside_chromium_build)', |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 92 | 'fastbuild%': '<(fastbuild)', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 93 | |
[email protected] | caa95c8 | 2009-11-23 22:39:32 | [diff] [blame] | 94 | # The release channel that this build targets. This is used to restrict |
| 95 | # channel-specific build options, like which installer packages to create. |
| 96 | # The default is 'all', which does no channel-specific filtering. |
| 97 | 'channel%': 'all', |
| 98 | |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 99 | # Override chromium_mac_pch and set it to 0 to suppress the use of |
| 100 | # precompiled headers on the Mac. Prefix header injection may still be |
| 101 | # used, but prefix headers will not be precompiled. This is useful when |
| 102 | # using distcc to distribute a build to compile slaves that don't |
| 103 | # share the same compiler executable as the system driving the compilation, |
| 104 | # because precompiled headers rely on pointers into a specific compiler |
| 105 | # executable's image. Setting this to 0 is needed to use an experimental |
| 106 | # Linux-Mac cross compiler distcc farm. |
| 107 | 'chromium_mac_pch%': 1, |
| 108 | |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 109 | # Mac OS X SDK and deployment target support. |
| 110 | # The SDK identifies the version of the system headers that will be used, |
| 111 | # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro. |
| 112 | # "Maximum allowed" refers to the operating system version whose APIs are |
| 113 | # available in the headers. |
| 114 | # The deployment target identifies the minimum system version that the |
| 115 | # built products are expected to function on. It corresponds to the |
| 116 | # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. |
| 117 | # To ensure these macros are available, #include <AvailabilityMacros.h>. |
| 118 | # Additional documentation on these macros is available at |
| 119 | # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 |
| 120 | # Chrome normally builds with the Mac OS X 10.5 SDK and sets the |
| 121 | # deployment target to 10.5. Other projects, such as O3D, may override |
| 122 | # these defaults. |
| 123 | 'mac_sdk%': '10.5', |
| 124 | 'mac_deployment_target%': '10.5', |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 125 | |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 126 | # Set to 1 to enable code coverage. In addition to build changes |
| 127 | # (e.g. extra CFLAGS), also creates a new target in the src/chrome |
| 128 | # project file called "coverage". |
| 129 | # Currently ignored on Windows. |
| 130 | 'coverage%': 0, |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 131 | |
[email protected] | c61f643 | 2009-04-22 01:16:42 | [diff] [blame] | 132 | # Overridable specification for potential use of alternative |
| 133 | # JavaScript engines. |
| 134 | 'javascript_engine%': 'v8', |
| 135 | |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 136 | # Although base/allocator lets you select a heap library via an |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 137 | # environment variable, the libcmt shim it uses sometimes gets in |
| 138 | # the way. To disable it entirely, and switch to normal msvcrt, do e.g. |
| 139 | # 'win_use_allocator_shim': 0, |
| 140 | # 'win_release_RuntimeLibrary': 2 |
| 141 | # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. |
| 142 | 'win_use_allocator_shim%': 1, # 0 = shim allocator via libcmt; 1 = msvcrt |
| 143 | |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 144 | # To do a shared build on linux we need to be able to choose between type |
| 145 | # static_library and shared_library. We default to doing a static build |
| 146 | # but you can override this with "gyp -Dlibrary=shared_library" or you |
| 147 | # can add the following line (without the #) to ~/.gyp/include.gypi |
| 148 | # {'variables': {'library': 'shared_library'}} |
| 149 | # to compile as shared by default |
| 150 | 'library%': 'static_library', |
[email protected] | 279cd421 | 2009-09-11 22:32:11 | [diff] [blame] | 151 | |
[email protected] | 95ff808 | 2009-11-13 22:21:01 | [diff] [blame] | 152 | # Whether usage of OpenMAX is enabled. |
| 153 | 'enable_openmax%': 0, |
| 154 | |
[email protected] | e5b2eaa | 2009-04-14 01:39:12 | [diff] [blame] | 155 | # TODO(bradnelson): eliminate this when possible. |
| 156 | # To allow local gyp files to prevent release.vsprops from being included. |
| 157 | # Yes(1) means include release.vsprops. |
| 158 | # Once all vsprops settings are migrated into gyp, this can go away. |
| 159 | 'msvs_use_common_release%': 1, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 160 | |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 161 | # TODO(bradnelson): eliminate this when possible. |
| 162 | # To allow local gyp files to override additional linker options for msvs. |
| 163 | # Yes(1) means set use the common linker options. |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 164 | 'msvs_use_common_linker_extras%': 1, |
| 165 | |
[email protected] | 1ffb650 | 2009-06-02 07:46:24 | [diff] [blame] | 166 | # TODO(sgk): eliminate this if possible. |
| 167 | # It would be nicer to support this via a setting in 'target_defaults' |
| 168 | # in chrome/app/locales/locales.gypi overriding the setting in the |
| 169 | # 'Debug' configuration in the 'target_defaults' dict below, |
| 170 | # but that doesn't work as we'd like. |
| 171 | 'msvs_debug_link_incremental%': '2', |
| 172 | |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 173 | # The system root for cross-compiles. Default: none. |
| 174 | 'sysroot%': '', |
| 175 | |
[email protected] | 57313614 | 2009-07-15 22:48:37 | [diff] [blame] | 176 | # This is the location of the sandbox binary. Chrome looks for this before |
| 177 | # running the zygote process. If found, and SUID, it will be used to |
| 178 | # sandbox the zygote process and, thus, all renderer processes. |
| 179 | 'linux_sandbox_path%': '', |
| 180 | |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 181 | # Set this to true to enable SELinux support. |
| 182 | 'selinux%': 0, |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 183 | |
[email protected] | 05cb696 | 2009-10-01 23:29:03 | [diff] [blame] | 184 | # Strip the binary after dumping symbols. |
| 185 | 'linux_strip_binary%': 0, |
| 186 | |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 187 | # Enable TCMalloc. |
[email protected] | 6cf2436 | 2010-01-21 02:46:50 | [diff] [blame] | 188 | 'linux_use_tcmalloc%': 0, |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 189 | |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame^] | 190 | 'linux_fpic%': 0, |
| 191 | |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 192 | # Set to select the Title Case versions of strings in GRD files. |
| 193 | 'use_titlecase_in_grd_files%': 0, |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 194 | |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 195 | # Used to disable Native Client at compile time, for platforms where it |
| 196 | # isn't supported |
| 197 | 'disable_nacl%': 0, |
| 198 | |
[email protected] | 3ed42e3 | 2009-10-07 00:10:46 | [diff] [blame] | 199 | # Set ARM-v7 compilation flags |
| 200 | 'armv7%': 0, |
| 201 | |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 202 | # Set Thumb compilation flags. |
| 203 | 'arm_thumb%': 0, |
| 204 | |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 205 | 'conditions': [ |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 206 | ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
[email protected] | 242a9e6 | 2009-11-03 17:32:10 | [diff] [blame] | 207 | # This will set gcc_version to XY if you are running gcc X.Y.*. |
| 208 | # This is used to tweak build flags for gcc 4.4. |
| 209 | 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 210 | 'conditions': [ |
| 211 | ['branding=="Chrome" or linux_chromium_breakpad==1', { |
| 212 | 'linux_breakpad%': 1, |
| 213 | }, { |
| 214 | 'linux_breakpad%': 0, |
| 215 | }], |
[email protected] | 4c9cc6c | 2009-10-01 18:54:57 | [diff] [blame] | 216 | # All Chrome builds have breakpad symbols, but only process the |
| 217 | # symbols from official builds. |
| 218 | # TODO(mmoss) dump_syms segfaults on x64. Enable once dump_syms and |
| 219 | # crash server handle 64-bit symbols. |
| 220 | ['linux_chromium_dump_symbols==1 or ' |
| 221 | '(branding=="Chrome" and buildtype=="Official" and ' |
| 222 | 'target_arch=="ia32")', { |
| 223 | 'linux_dump_symbols%': 1, |
| 224 | }, { |
| 225 | 'linux_dump_symbols%': 0, |
| 226 | }], |
[email protected] | d3a2cef | 2009-12-22 23:30:18 | [diff] [blame] | 227 | ['toolkit_views==0 and chromeos==0', { |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 228 | # GTK wants Title Case strings |
| 229 | 'use_titlecase_in_grd_files%': 1, |
| 230 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 231 | ], |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 232 | }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 233 | ['OS=="mac"', { |
[email protected] | c153e535 | 2009-09-22 12:37:44 | [diff] [blame] | 234 | # Mac wants Title Case strings |
| 235 | 'use_titlecase_in_grd_files%': 1, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 236 | 'conditions': [ |
| 237 | # mac_product_name is set to the name of the .app bundle as it should |
| 238 | # appear on disk. This duplicates data from |
| 239 | # chrome/app/theme/chromium/BRANDING and |
| 240 | # chrome/app/theme/google_chrome/BRANDING, but is necessary to get |
| 241 | # these names into the build system. |
| 242 | ['branding=="Chrome"', { |
| 243 | 'mac_product_name%': 'Google Chrome', |
| 244 | }, { # else: branding!="Chrome" |
| 245 | 'mac_product_name%': 'Chromium', |
| 246 | }], |
| 247 | |
| 248 | # Feature variables for enabling Mac Breakpad and Keystone auto-update |
| 249 | # support. Both features are on by default in official builds with |
| 250 | # Chrome branding. |
| 251 | ['branding=="Chrome" and buildtype=="Official"', { |
| 252 | 'mac_breakpad%': 1, |
| 253 | 'mac_keystone%': 1, |
| 254 | }, { # else: branding!="Chrome" or buildtype!="Official" |
| 255 | 'mac_breakpad%': 0, |
| 256 | 'mac_keystone%': 0, |
| 257 | }], |
| 258 | ], |
| 259 | }], # OS=="mac" |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 260 | # Whether to use multiple cores to compile with visual studio. This is |
| 261 | # optional because it sometimes causes corruption on VS 2005. |
| 262 | # It is on by default on VS 2008 and off on VS 2005. |
| 263 | ['OS=="win"', { |
| 264 | 'conditions': [ |
| 265 | ['MSVS_VERSION=="2005"', { |
[email protected] | 66979537 | 2009-08-14 17:51:13 | [diff] [blame] | 266 | 'msvs_multi_core_compile%': 0, |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 267 | },{ |
| 268 | 'msvs_multi_core_compile%': 1, |
| 269 | }], |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 270 | # Don't do incremental linking for large modules on 32-bit. |
| 271 | ['MSVS_OS_BITS==32', { |
| 272 | 'msvs_large_module_debug_link_mode%': '1', # No |
| 273 | },{ |
| 274 | 'msvs_large_module_debug_link_mode%': '2', # Yes |
| 275 | }], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 276 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 277 | 'nacl_win64_defines': [ |
| 278 | # This flag is used to minimize dependencies when building |
| 279 | # Native Client loader for 64-bit Windows. |
| 280 | 'NACL_WIN64', |
| 281 | ], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 282 | }], |
| 283 | ], |
[email protected] | f703c4e | 2009-09-17 21:54:28 | [diff] [blame] | 284 | |
| 285 | # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' |
| 286 | # so Cocoa is happy (http://crbug.com/20441). |
| 287 | 'locales': [ |
[email protected] | af27c8c | 2009-11-04 20:36:50 | [diff] [blame] | 288 | 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', |
[email protected] | f703c4e | 2009-09-17 21:54:28 | [diff] [blame] | 289 | 'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he', |
| 290 | 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', |
| 291 | 'ml', 'mr', 'nb', 'nl', 'or', 'pl', 'pt-BR', 'pt-PT', 'ro', |
[email protected] | af27c8c | 2009-11-04 20:36:50 | [diff] [blame] | 292 | 'ru', 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', |
[email protected] | f703c4e | 2009-09-17 21:54:28 | [diff] [blame] | 293 | 'uk', 'vi', 'zh-CN', 'zh-TW', |
| 294 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 295 | }, |
| 296 | 'target_defaults': { |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 297 | 'variables': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 298 | # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 299 | 'mac_release_optimization%': '3', # Use -O3 unless overridden |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 300 | 'mac_debug_optimization%': '0', # Use -O0 unless overridden |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 301 | # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx |
| 302 | 'win_release_Optimization%': '2', # 2 = /Os |
| 303 | 'win_debug_Optimization%': '0', # 0 = /Od |
| 304 | # See http://msdn.microsoft.com/en-us/library/aa652367(VS.71).aspx |
| 305 | 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) |
| 306 | 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) |
| 307 | |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 308 | 'release_extra_cflags%': '', |
| 309 | 'debug_extra_cflags%': '', |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 310 | 'release_valgrind_build%': 0, |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 311 | }, |
[email protected] | 32aa8cc | 2009-03-04 21:36:39 | [diff] [blame] | 312 | 'conditions': [ |
| 313 | ['branding=="Chrome"', { |
| 314 | 'defines': ['GOOGLE_CHROME_BUILD'], |
| 315 | }, { # else: branding!="Chrome" |
| 316 | 'defines': ['CHROMIUM_BUILD'], |
| 317 | }], |
[email protected] | d3a2cef | 2009-12-22 23:30:18 | [diff] [blame] | 318 | ['toolkit_views==1 or chromeos==1', { |
[email protected] | e697023 | 2009-05-12 23:51:17 | [diff] [blame] | 319 | 'defines': ['TOOLKIT_VIEWS=1'], |
| 320 | }], |
[email protected] | fdc5bed | 2010-01-09 01:16:57 | [diff] [blame] | 321 | ['chromeos==1', { |
[email protected] | 1677984 | 2009-07-08 23:45:29 | [diff] [blame] | 322 | 'defines': ['OS_CHROMEOS=1'], |
[email protected] | 2b883b9 | 2009-06-02 22:57:50 | [diff] [blame] | 323 | }], |
[email protected] | 9c1949e | 2009-10-02 19:59:54 | [diff] [blame] | 324 | ['fastbuild!=0', { |
| 325 | 'conditions': [ |
| 326 | # Finally, for Windows, we simply turn on profiling. |
| 327 | ['OS=="win"', { |
| 328 | 'msvs_settings': { |
| 329 | 'VCLinkerTool': { |
| 330 | 'GenerateDebugInformation': 'false', |
| 331 | }, |
| 332 | 'VCCLCompilerTool': { |
| 333 | 'DebugInformationFormat': '0', |
| 334 | } |
| 335 | } |
| 336 | }], # OS==win |
| 337 | ], # conditions for fastbuild. |
| 338 | }], # fastbuild!=0 |
[email protected] | ad6d2c4 | 2009-09-15 20:13:38 | [diff] [blame] | 339 | ['selinux==1', { |
| 340 | 'defines': ['CHROMIUM_SELINUX=1'], |
| 341 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 342 | ['win_use_allocator_shim==0', { |
| 343 | 'conditions': [ |
| 344 | ['OS=="win"', { |
| 345 | 'defines': ['NO_TCMALLOC'], |
| 346 | }], |
| 347 | ], |
| 348 | }], |
[email protected] | be4f188 | 2010-01-06 04:38:55 | [diff] [blame] | 349 | ['OS=="win" or (OS=="linux" and target_arch!="arm")', { |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 350 | 'defines': [ |
| 351 | 'ENABLE_GPU=1', |
| 352 | ], |
| 353 | }], |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 354 | ['coverage!=0', { |
| 355 | 'conditions': [ |
| 356 | ['OS=="mac"', { |
| 357 | 'xcode_settings': { |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 358 | 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs |
| 359 | 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 360 | }, |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 361 | # Add -lgcov for types executable, shared_library, and |
| 362 | # loadable_module; not for static_library. |
| 363 | # This is a delayed conditional. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 364 | 'target_conditions': [ |
[email protected] | e4fb84c | 2009-12-28 20:45:43 | [diff] [blame] | 365 | ['_type!="static_library"', { |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 366 | 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 367 | }], |
| 368 | ], |
| 369 | }], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 370 | # Linux gyp (into scons) doesn't like target_conditions? |
| 371 | # TODO(???): track down why 'target_conditions' doesn't work |
| 372 | # on Linux gyp into scons like it does on Mac gyp into xcodeproj. |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 373 | ['OS=="linux"', { |
| 374 | 'cflags': [ '-ftest-coverage', |
| 375 | '-fprofile-arcs' ], |
[email protected] | 7122ffd5 | 2009-04-30 23:19:00 | [diff] [blame] | 376 | 'link_settings': { 'libraries': [ '-lgcov' ] }, |
[email protected] | f5ecbba1 | 2009-04-03 04:35:18 | [diff] [blame] | 377 | }], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 378 | # Finally, for Windows, we simply turn on profiling. |
| 379 | ['OS=="win"', { |
| 380 | 'msvs_settings': { |
| 381 | 'VCLinkerTool': { |
| 382 | 'Profile': 'true', |
| 383 | }, |
[email protected] | 10bb8c9 | 2009-08-07 21:16:03 | [diff] [blame] | 384 | 'VCCLCompilerTool': { |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 385 | # /Z7, not /Zi, so coverage is happyb |
| 386 | 'DebugInformationFormat': '1', |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 387 | 'AdditionalOptions': ['/Yd'], |
[email protected] | e8f6ff4 | 2009-07-07 18:20:53 | [diff] [blame] | 388 | } |
| 389 | } |
| 390 | }], # OS==win |
| 391 | ], # conditions for coverage |
| 392 | }], # coverage!=0 |
| 393 | ], # conditions for 'target_defaults' |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 394 | 'default_configuration': 'Debug', |
| 395 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 396 | # VCLinkerTool LinkIncremental values below: |
| 397 | # 0 == default |
| 398 | # 1 == /INCREMENTAL:NO |
| 399 | # 2 == /INCREMENTAL |
| 400 | # Debug links incremental, Release does not. |
| 401 | # |
| 402 | # Abstract base configurations to cover common |
| 403 | # attributes. |
| 404 | # |
| 405 | 'Common_Base': { |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 406 | 'abstract': 1, |
| 407 | 'msvs_configuration_attributes': { |
| 408 | 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', |
| 409 | 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', |
| 410 | 'CharacterSet': '1', |
| 411 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 412 | }, |
| 413 | 'x86_Base': { |
| 414 | 'abstract': 1, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 415 | 'msvs_settings': { |
| 416 | 'VCLinkerTool': { |
| 417 | 'TargetMachine': '1', |
| 418 | }, |
| 419 | }, |
[email protected] | 2fa4078 | 2009-11-01 21:17:34 | [diff] [blame] | 420 | 'msvs_configuration_platform': 'Win32', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 421 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 422 | 'x64_Base': { |
| 423 | 'abstract': 1, |
| 424 | 'msvs_configuration_platform': 'x64', |
| 425 | 'msvs_settings': { |
| 426 | 'VCLinkerTool': { |
| 427 | 'TargetMachine': '17', # x86 - 64 |
| 428 | }, |
| 429 | }, |
| 430 | 'msvs_settings': { |
| 431 | 'VCLibrarianTool': { |
| 432 | 'AdditionalLibraryDirectories!': |
| 433 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 434 | 'AdditionalLibraryDirectories': |
| 435 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 436 | }, |
| 437 | 'VCLinkerTool': { |
| 438 | 'TargetMachine': '17', |
| 439 | 'AdditionalLibraryDirectories!': |
| 440 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
| 441 | 'AdditionalLibraryDirectories': |
| 442 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'], |
| 443 | }, |
| 444 | }, |
| 445 | 'defines': [ |
| 446 | # Not sure if tcmalloc works on 64-bit Windows. |
| 447 | 'NO_TCMALLOC', |
| 448 | ], |
| 449 | }, |
| 450 | 'Debug_Base': { |
| 451 | 'abstract': 1, |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 452 | 'xcode_settings': { |
| 453 | 'COPY_PHASE_STRIP': 'NO', |
[email protected] | d5d593a | 2009-08-28 23:23:29 | [diff] [blame] | 454 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', |
[email protected] | bd232ac | 2009-10-21 02:23:53 | [diff] [blame] | 455 | 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 456 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 457 | 'msvs_settings': { |
| 458 | 'VCCLCompilerTool': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 459 | 'Optimization': '<(win_debug_Optimization)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 460 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 461 | 'BasicRuntimeChecks': '3', |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 462 | 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 463 | }, |
| 464 | 'VCLinkerTool': { |
| 465 | 'LinkIncremental': '<(msvs_debug_link_incremental)', |
| 466 | }, |
| 467 | 'VCResourceCompilerTool': { |
| 468 | 'PreprocessorDefinitions': ['_DEBUG'], |
| 469 | }, |
| 470 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 471 | 'conditions': [ |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 472 | ['OS=="linux"', { |
| 473 | 'cflags': [ |
| 474 | '<@(debug_extra_cflags)', |
| 475 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 476 | }], |
| 477 | ], |
| 478 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 479 | 'Release_Base': { |
| 480 | 'abstract': 1, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 481 | 'defines': [ |
| 482 | 'NDEBUG', |
| 483 | ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 484 | 'xcode_settings': { |
| 485 | 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip |
| 486 | 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 487 | 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], |
[email protected] | 1c96609 | 2009-08-20 21:19:26 | [diff] [blame] | 488 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 489 | 'msvs_settings': { |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 490 | 'VCCLCompilerTool': { |
| 491 | 'Optimization': '<(win_release_Optimization)', |
| 492 | 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', |
| 493 | }, |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 494 | 'VCLinkerTool': { |
| 495 | 'LinkIncremental': '1', |
| 496 | }, |
| 497 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 498 | 'conditions': [ |
[email protected] | 92822e8 | 2009-09-18 14:26:56 | [diff] [blame] | 499 | ['release_valgrind_build==0', { |
| 500 | 'defines': ['NVALGRIND'], |
| 501 | }], |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 502 | ['win_use_allocator_shim==0', { |
| 503 | 'defines': ['NO_TCMALLOC'], |
| 504 | }], |
| 505 | ['win_release_RuntimeLibrary==2', { |
| 506 | # Visual C++ 2008 barfs when building anything with /MD (msvcrt): |
[email protected] | 7477ea6f | 2009-12-22 23:28:15 | [diff] [blame] | 507 | # VC\include\typeinfo(139) : warning C4275: non dll-interface |
| 508 | # class 'stdext::exception' used as base for dll-interface |
[email protected] | 7e0d664a | 2009-12-03 21:07:47 | [diff] [blame] | 509 | # class 'std::bad_cast' |
| 510 | 'msvs_disabled_warnings': [4275], |
| 511 | }], |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 512 | ['OS=="linux"', { |
| 513 | 'cflags': [ |
[email protected] | ffd984b1 | 2009-09-11 19:37:00 | [diff] [blame] | 514 | '<@(release_extra_cflags)', |
[email protected] | bb05e45 | 2009-10-29 21:24:56 | [diff] [blame] | 515 | ], |
| 516 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 517 | ], |
| 518 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 519 | 'Purify_Base': { |
| 520 | 'abstract': 1, |
| 521 | 'defines': [ |
| 522 | 'PURIFY', |
| 523 | 'NO_TCMALLOC', |
| 524 | ], |
| 525 | 'msvs_settings': { |
| 526 | 'VCCLCompilerTool': { |
| 527 | 'Optimization': '0', |
| 528 | 'RuntimeLibrary': '0', |
| 529 | 'BufferSecurityCheck': 'false', |
| 530 | }, |
| 531 | 'VCLinkerTool': { |
| 532 | 'EnableCOMDATFolding': '1', |
| 533 | 'LinkIncremental': '1', |
| 534 | }, |
| 535 | }, |
| 536 | }, |
| 537 | # |
| 538 | # Concrete configurations |
| 539 | # |
| 540 | 'Debug': { |
| 541 | 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], |
| 542 | }, |
| 543 | 'Release': { |
| 544 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], |
| 545 | 'conditions': [ |
| 546 | ['msvs_use_common_release', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 547 | 'includes': ['release.gypi'], |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 548 | }], |
| 549 | ] |
| 550 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 551 | 'conditions': [ |
| 552 | [ 'OS=="win"', { |
| 553 | # TODO(bradnelson): add a gyp mechanism to make this more graceful. |
| 554 | 'Purify': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 555 | 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 556 | }, |
| 557 | 'Debug_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 558 | 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 559 | }, |
| 560 | 'Release_x64': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 561 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 562 | }, |
| 563 | 'Purify_x64': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 564 | 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'], |
[email protected] | 78263c1 | 2009-11-01 23:45:30 | [diff] [blame] | 565 | }, |
[email protected] | f926fa0a | 2009-08-04 22:50:13 | [diff] [blame] | 566 | }], |
| 567 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 568 | }, |
| 569 | }, |
| 570 | 'conditions': [ |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 571 | ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 572 | 'target_defaults': { |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 573 | # Enable -Werror by default, but put it in a variable so it can |
| 574 | # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 575 | 'variables': { |
[email protected] | ecf52cb8 | 2010-01-13 19:25:42 | [diff] [blame] | 576 | # Use -fno-strict-aliasing by default since gcc 4.4 has periodic |
| 577 | # issues that slip through the cracks. We could do this just for |
| 578 | # gcc 4.4 but it makes more sense to be consistent on all |
| 579 | # compilers in use. TODO(Craig): turn this off again when |
| 580 | # there is some 4.4 test infrastructure in place and existing |
| 581 | # aliasing issues have been fixed. |
| 582 | 'no_strict_aliasing%': 1, |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 583 | 'conditions': [['OS=="linux"', {'werror%': '-Werror',}], |
| 584 | ['OS=="freebsd"', {'werror%': '',}], |
| 585 | ['OS=="openbsd"', {'werror%': '',}], |
| 586 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 587 | }, |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 588 | 'cflags': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 589 | '<(werror)', # See note above about the werror variable. |
| 590 | '-pthread', |
| 591 | '-fno-exceptions', |
| 592 | '-Wall', |
| 593 | '-D_FILE_OFFSET_BITS=64', |
[email protected] | 3df6e3a | 2010-01-21 20:23:12 | [diff] [blame] | 594 | # Don't export any symbols (for example, to plugins we dlopen()). |
| 595 | # Note: this is *required* to make some plugins work. |
| 596 | '-fvisibility=hidden', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 597 | ], |
| 598 | 'cflags_cc': [ |
[email protected] | 832d021 | 2009-10-28 19:12:22 | [diff] [blame] | 599 | '-fno-rtti', |
[email protected] | 8a2fcba | 2009-07-29 00:52:24 | [diff] [blame] | 600 | '-fno-threadsafe-statics', |
[email protected] | f5986c4 | 2009-11-17 18:39:36 | [diff] [blame] | 601 | # Make inline functions have hidden visiblity by default. |
| 602 | # Surprisingly, not covered by -fvisibility=hidden. |
| 603 | '-fvisibility-inlines-hidden', |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 604 | ], |
[email protected] | a6cf87e | 2009-04-03 04:07:38 | [diff] [blame] | 605 | 'ldflags': [ |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 606 | '-pthread', |
| 607 | ], |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 608 | 'scons_variable_settings': { |
| 609 | 'LIBPATH': ['$LIB_DIR'], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 610 | # Linking of large files uses lots of RAM, so serialize links |
| 611 | # using the handy flock command from util-linux. |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 612 | 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], |
[email protected] | 789fbb7c | 2009-04-02 16:20:31 | [diff] [blame] | 613 | 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], |
| 614 | 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 615 | |
| 616 | # We have several cases where archives depend on each other in |
| 617 | # a cyclic fashion. Since the GNU linker does only a single |
| 618 | # pass over the archives we surround the libraries with |
| 619 | # --start-group and --end-group (aka -( and -) ). That causes |
| 620 | # ld to loop over the group until no more undefined symbols |
| 621 | # are found. In an ideal world we would only make groups from |
| 622 | # those libraries which we knew to be in cycles. However, |
| 623 | # that's tough with SCons, so we bodge it by making all the |
| 624 | # archives a group by redefining the linking command here. |
| 625 | # |
| 626 | # TODO: investigate whether we still have cycles that |
| 627 | # require --{start,end}-group. There has been a lot of |
| 628 | # refactoring since this was first coded, which might have |
| 629 | # eliminated the circular dependencies. |
[email protected] | 1286292 | 2009-04-20 21:36:41 | [diff] [blame] | 630 | # |
| 631 | # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS |
| 632 | # so that we prefer our own built libraries (e.g. -lpng) to |
| 633 | # system versions of libraries that pkg-config might turn up. |
| 634 | # TODO(sgk): investigate handling this not by re-ordering the |
| 635 | # flags this way, but by adding a hook to use the SCons |
| 636 | # ParseFlags() option on the output from pkg-config. |
[email protected] | 610d8cc | 2009-09-19 00:47:04 | [diff] [blame] | 637 | 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET', |
| 638 | '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES', |
| 639 | '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 640 | 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET', |
| 641 | '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES', |
| 642 | '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
| 643 | 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET', |
| 644 | '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES', |
| 645 | '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 646 | 'IMPLICIT_COMMAND_DEPENDENCIES': 0, |
[email protected] | d064428 | 2009-04-22 00:20:29 | [diff] [blame] | 647 | # -rpath is only used when building with shared libraries. |
| 648 | 'conditions': [ |
| 649 | [ 'library=="shared_library"', { |
| 650 | 'RPATH': '$LIB_DIR', |
| 651 | }], |
| 652 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 653 | }, |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 654 | 'scons_import_variables': [ |
[email protected] | 52049d5c | 2009-05-01 20:32:49 | [diff] [blame] | 655 | 'AS', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 656 | 'CC', |
| 657 | 'CXX', |
| 658 | 'LINK', |
| 659 | ], |
| 660 | 'scons_propagate_variables': [ |
[email protected] | 52049d5c | 2009-05-01 20:32:49 | [diff] [blame] | 661 | 'AS', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 662 | 'CC', |
| 663 | 'CCACHE_DIR', |
| 664 | 'CXX', |
| 665 | 'DISTCC_DIR', |
| 666 | 'DISTCC_HOSTS', |
| 667 | 'HOME', |
[email protected] | 5ae4f55e | 2009-04-13 23:19:47 | [diff] [blame] | 668 | 'INCLUDE_SERVER_ARGS', |
| 669 | 'INCLUDE_SERVER_PORT', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 670 | 'LINK', |
[email protected] | fff920a | 2009-05-08 22:35:32 | [diff] [blame] | 671 | 'CHROME_BUILD_TYPE', |
| 672 | 'CHROMIUM_BUILD', |
| 673 | 'OFFICIAL_BUILD', |
[email protected] | b5e46b9 | 2009-03-26 18:58:10 | [diff] [blame] | 674 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 675 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 676 | 'Debug_Base': { |
[email protected] | c5bdc03 | 2009-04-20 19:11:31 | [diff] [blame] | 677 | 'variables': { |
| 678 | 'debug_optimize%': '0', |
| 679 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 680 | 'defines': [ |
| 681 | '_DEBUG', |
| 682 | ], |
| 683 | 'cflags': [ |
[email protected] | 22898f6 | 2009-10-26 22:14:01 | [diff] [blame] | 684 | '-O>(debug_optimize)', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 685 | '-g', |
[email protected] | 9a5d2a5 | 2009-05-22 03:37:45 | [diff] [blame] | 686 | # One can use '-gstabs' to enable building the debugging |
| 687 | # information in STABS format for breakpad's dumpsyms. |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 688 | ], |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 689 | 'ldflags': [ |
| 690 | '-rdynamic', # Allows backtrace to resolve symbols. |
| 691 | ], |
[email protected] | 5315f284 | 2009-04-28 00:43:27 | [diff] [blame] | 692 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 693 | 'Release_Base': { |
[email protected] | 740e2de | 2009-07-21 11:41:01 | [diff] [blame] | 694 | 'variables': { |
| 695 | 'release_optimize%': '2', |
| 696 | }, |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 697 | 'cflags': [ |
[email protected] | 22898f6 | 2009-10-26 22:14:01 | [diff] [blame] | 698 | '-O>(release_optimize)', |
[email protected] | d8cc3a6 | 2009-04-08 18:29:53 | [diff] [blame] | 699 | # Don't emit the GCC version ident directives, they just end up |
| 700 | # in the .comment section taking up binary size. |
| 701 | '-fno-ident', |
| 702 | # Put data and code in their own sections, so that unused symbols |
| 703 | # can be removed at link time with --gc-sections. |
| 704 | '-fdata-sections', |
| 705 | '-ffunction-sections', |
[email protected] | 60b93ec | 2009-11-30 20:17:32 | [diff] [blame] | 706 | # We don't use exceptions. The eh_frame section is used for those |
| 707 | # and for symbolizing backtraces. By passing this flag we drop |
| 708 | # the eh_frame section completely, we shaving off 2.5mb from |
| 709 | # our resulting binary. |
| 710 | '-fno-asynchronous-unwind-tables', |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 711 | ], |
[email protected] | 3a48e054 | 2009-11-18 17:07:13 | [diff] [blame] | 712 | 'ldflags': [ |
| 713 | '-Wl,--gc-sections', |
| 714 | ], |
[email protected] | 3aacaf95 | 2009-04-02 15:34:09 | [diff] [blame] | 715 | }, |
| 716 | }, |
[email protected] | 601b54022 | 2009-04-03 21:32:04 | [diff] [blame] | 717 | 'variants': { |
| 718 | 'coverage': { |
| 719 | 'cflags': ['-fprofile-arcs', '-ftest-coverage'], |
| 720 | 'ldflags': ['-fprofile-arcs'], |
| 721 | }, |
| 722 | 'profile': { |
| 723 | 'cflags': ['-pg', '-g'], |
| 724 | 'ldflags': ['-pg'], |
| 725 | }, |
| 726 | 'symbols': { |
| 727 | 'cflags': ['-g'], |
| 728 | }, |
| 729 | }, |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 730 | 'conditions': [ |
[email protected] | 7e8eb761 | 2009-07-29 15:56:00 | [diff] [blame] | 731 | [ 'target_arch=="ia32"', { |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 732 | 'asflags': [ |
| 733 | # Needed so that libs with .s files (e.g. libicudata.a) |
| 734 | # are compatible with the general 32-bit-ness. |
| 735 | '-32', |
| 736 | ], |
| 737 | # All floating-point computations on x87 happens in 80-bit |
| 738 | # precision. Because the C and C++ language standards allow |
| 739 | # the compiler to keep the floating-point values in higher |
| 740 | # precision than what's specified in the source and doing so |
| 741 | # is more efficient than constantly rounding up to 64-bit or |
| 742 | # 32-bit precision as specified in the source, the compiler, |
| 743 | # especially in the optimized mode, tries very hard to keep |
| 744 | # values in x87 floating-point stack (in 80-bit precision) |
| 745 | # as long as possible. This has important side effects, that |
| 746 | # the real value used in computation may change depending on |
| 747 | # how the compiler did the optimization - that is, the value |
| 748 | # kept in 80-bit is different than the value rounded down to |
| 749 | # 64-bit or 32-bit. There are possible compiler options to make |
| 750 | # this behavior consistent (e.g. -ffloat-store would keep all |
| 751 | # floating-values in the memory, thus force them to be rounded |
| 752 | # to its original precision) but they have significant runtime |
| 753 | # performance penalty. |
| 754 | # |
| 755 | # -mfpmath=sse -msse2 makes the compiler use SSE instructions |
| 756 | # which keep floating-point values in SSE registers in its |
| 757 | # native precision (32-bit for single precision, and 64-bit for |
| 758 | # double precision values). This means the floating-point value |
| 759 | # used during computation does not change depending on how the |
| 760 | # compiler optimized the code, since the value is always kept |
| 761 | # in its specified precision. |
[email protected] | ffde793 | 2009-05-29 00:39:06 | [diff] [blame] | 762 | 'conditions': [ |
| 763 | ['branding=="Chromium"', { |
| 764 | 'cflags': [ |
| 765 | '-march=pentium4', |
| 766 | '-msse2', |
| 767 | '-mfpmath=sse', |
| 768 | ], |
| 769 | }], |
| 770 | ], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 771 | 'cflags': [ |
| 772 | '-m32', |
[email protected] | 1c6560af | 2009-07-14 11:02:16 | [diff] [blame] | 773 | ], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 774 | 'ldflags': [ |
| 775 | '-m32', |
| 776 | ], |
| 777 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 778 | ['target_arch=="arm"', { |
[email protected] | 77c1b2939 | 2009-12-04 06:21:29 | [diff] [blame] | 779 | 'target_conditions': [ |
| 780 | ['_toolset=="target"', { |
| 781 | 'cflags_cc': [ |
| 782 | # The codesourcery arm-2009q3 toolchain warns at that the ABI |
| 783 | # has changed whenever it encounters a varargs function. This |
| 784 | # silences those warnings, as they are not helpful and |
| 785 | # clutter legitimate warnings. |
| 786 | '-Wno-abi', |
| 787 | ], |
| 788 | 'conditions': [ |
| 789 | ['arm_thumb == 1', { |
| 790 | 'cflags': [ |
| 791 | '-mthumb', |
| 792 | # TODO(piman): -Wa,-mimplicit-it=thumb is needed for |
| 793 | # inline assembly that uses condition codes but it's |
| 794 | # suboptimal. Better would be to #ifdef __thumb__ at the |
| 795 | # right place and have a separate thumb path. |
| 796 | '-Wa,-mimplicit-it=thumb', |
| 797 | ] |
| 798 | }], |
| 799 | ['armv7==1', { |
[email protected] | dc9711f | 2009-11-13 19:30:25 | [diff] [blame] | 800 | 'cflags': [ |
| 801 | '-march=armv7-a', |
| 802 | '-mtune=cortex-a8', |
| 803 | '-mfpu=neon', |
| 804 | '-mfloat-abi=softfp', |
| 805 | ], |
| 806 | }], |
[email protected] | 3dda8a96 | 2009-08-10 18:58:07 | [diff] [blame] | 807 | ], |
| 808 | }], |
| 809 | ], |
| 810 | }], |
[email protected] | c76723a | 2010-01-25 23:10:58 | [diff] [blame^] | 811 | ['linux_fpic==1', { |
| 812 | 'cflags': [ |
| 813 | '-fPIC', |
| 814 | ], |
| 815 | }], |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 816 | ['sysroot!=""', { |
[email protected] | fd36ce82 | 2009-10-28 20:13:57 | [diff] [blame] | 817 | 'target_conditions': [ |
| 818 | ['_toolset=="target"', { |
| 819 | 'cflags': [ |
| 820 | '--sysroot=<(sysroot)', |
| 821 | ], |
| 822 | 'ldflags': [ |
| 823 | '--sysroot=<(sysroot)', |
| 824 | ], |
| 825 | }]] |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 826 | }], |
[email protected] | cc4219a | 2009-08-14 05:30:52 | [diff] [blame] | 827 | ['no_strict_aliasing==1', { |
| 828 | 'cflags': [ |
| 829 | '-fno-strict-aliasing', |
| 830 | ], |
| 831 | }], |
[email protected] | cbd5fd5 | 2009-08-26 00:14:27 | [diff] [blame] | 832 | ['linux_breakpad==1', { |
| 833 | 'cflags': [ '-gstabs' ], |
| 834 | 'defines': ['USE_LINUX_BREAKPAD'], |
| 835 | }], |
[email protected] | 7cd2afd | 2009-10-27 21:40:26 | [diff] [blame] | 836 | ['library=="shared_library"', { |
| 837 | # When building with shared libraries, remove the visiblity-hiding |
| 838 | # flag. |
| 839 | 'cflags!': [ '-fvisibility=hidden' ], |
[email protected] | 4907ac4 | 2009-11-02 20:32:51 | [diff] [blame] | 840 | 'conditions': [ |
[email protected] | 08be8a7 | 2009-11-18 20:35:54 | [diff] [blame] | 841 | ['target_arch=="x64" or target_arch=="arm"', { |
| 842 | # Shared libraries need -fPIC on x86-64 and arm |
[email protected] | 4907ac4 | 2009-11-02 20:32:51 | [diff] [blame] | 843 | 'cflags': ['-fPIC'] |
| 844 | }] |
| 845 | ], |
[email protected] | 7cd2afd | 2009-10-27 21:40:26 | [diff] [blame] | 846 | }], |
[email protected] | 01699e2 | 2009-11-11 19:24:24 | [diff] [blame] | 847 | ['linux_use_tcmalloc==1', { |
| 848 | 'defines': ['LINUX_USE_TCMALLOC'], |
| 849 | }], |
[email protected] | 606116d2 | 2009-05-06 22:38:23 | [diff] [blame] | 850 | ], |
[email protected] | 9d38403 | 2009-03-20 23:13:26 | [diff] [blame] | 851 | }, |
| 852 | }], |
[email protected] | c51e8d5 | 2009-12-11 20:04:06 | [diff] [blame] | 853 | # FreeBSD-specific options; note that most FreeBSD options are set above, |
| 854 | # with Linux. |
| 855 | ['OS=="freebsd"', { |
| 856 | 'target_defaults': { |
| 857 | 'ldflags': [ |
| 858 | '-Wl,--no-keep-memory', |
| 859 | ], |
| 860 | }, |
| 861 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 862 | ['OS=="mac"', { |
| 863 | 'target_defaults': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 864 | 'variables': { |
| 865 | # This should be 'mac_real_dsym%', but there seems to be a bug |
| 866 | # with % in variables that are intended to be set to different |
| 867 | # values in different targets, like this one. |
| 868 | 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. |
| 869 | }, |
[email protected] | d92c7c01 | 2009-03-19 19:26:42 | [diff] [blame] | 870 | 'mac_bundle': 0, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 871 | 'xcode_settings': { |
| 872 | 'ALWAYS_SEARCH_USER_PATHS': 'NO', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 873 | 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 |
| 874 | 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks |
| 875 | 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
| 876 | # (Equivalent to -fPIC) |
| 877 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions |
| 878 | 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti |
| 879 | 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 880 | # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden |
| 881 | 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 882 | 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors |
| 883 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden |
| 884 | 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics |
| 885 | 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 886 | 'GCC_VERSION': '4.2', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 887 | 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof |
[email protected] | 3224dcd | 2009-09-16 17:31:25 | [diff] [blame] | 888 | # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
| 889 | 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
[email protected] | ab295637 | 2009-08-13 18:11:04 | [diff] [blame] | 890 | 'PREBINDING': 'NO', # No -Wl,-prebind |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 891 | 'USE_HEADERMAP': 'NO', |
| 892 | 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 893 | 'conditions': [ |
| 894 | ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
[email protected] | 9543af05 | 2009-09-15 22:42:59 | [diff] [blame] | 895 | {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
| 896 | ], |
[email protected] | b3fb809 | 2009-03-12 19:09:24 | [diff] [blame] | 897 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 898 | }, |
| 899 | 'target_conditions': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 900 | ['_type!="static_library"', { |
[email protected] | 5d7dc97 | 2009-04-16 15:30:46 | [diff] [blame] | 901 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, |
| 902 | }], |
| 903 | ['_mac_bundle', { |
| 904 | 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, |
[email protected] | 87fde4a | 2009-02-28 00:50:08 | [diff] [blame] | 905 | }], |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 906 | ['_type=="executable" or _type=="shared_library"', { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 907 | 'target_conditions': [ |
| 908 | ['mac_real_dsym == 1', { |
| 909 | # To get a real .dSYM bundle produced by dsymutil, set the |
| 910 | # debug information format to dwarf-with-dsym. Since |
| 911 | # strip_from_xcode will not be used, set Xcode to do the |
| 912 | # stripping as well. |
| 913 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 914 | 'Release_Base': { |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 915 | 'xcode_settings': { |
| 916 | 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', |
| 917 | 'DEPLOYMENT_POSTPROCESSING': 'YES', |
| 918 | 'STRIP_INSTALLED_PRODUCT': 'YES', |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 919 | 'target_conditions': [ |
| 920 | ['_type=="shared_library"', { |
| 921 | # The Xcode default is to strip debugging symbols |
| 922 | # only (-S). Local symbols should be stripped as |
| 923 | # well, which will be handled by -x. Xcode will |
| 924 | # continue to insert -S when stripping even when |
| 925 | # additional flags are added with STRIPFLAGS. |
| 926 | 'STRIPFLAGS': '-x', |
| 927 | }], # _type=="shared_library" |
| 928 | ], # target_conditions |
| 929 | }, # xcode_settings |
| 930 | }, # configuration "Release" |
| 931 | }, # configurations |
[email protected] | 2470064 | 2009-06-01 16:01:20 | [diff] [blame] | 932 | }, { # mac_real_dsym != 1 |
| 933 | # To get a fast fake .dSYM bundle, use a post-build step to |
| 934 | # produce the .dSYM and strip the executable. strip_from_xcode |
| 935 | # only operates in the Release configuration. |
| 936 | 'postbuilds': [ |
| 937 | { |
| 938 | 'variables': { |
| 939 | # Define strip_from_xcode in a variable ending in _path |
| 940 | # so that gyp understands it's a path and performs proper |
| 941 | # relativization during dict merging. |
| 942 | 'strip_from_xcode_path': 'mac/strip_from_xcode', |
| 943 | }, |
| 944 | 'postbuild_name': 'Strip If Needed', |
| 945 | 'action': ['<(strip_from_xcode_path)'], |
| 946 | }, |
[email protected] | e14a9f9 | 2009-08-05 19:26:07 | [diff] [blame] | 947 | ], # postbuilds |
| 948 | }], # mac_real_dsym |
| 949 | ], # target_conditions |
| 950 | }], # _type=="executable" or _type=="shared_library" |
| 951 | ], # target_conditions |
| 952 | }, # target_defaults |
| 953 | }], # OS=="mac" |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 954 | ['OS=="win"', { |
| 955 | 'target_defaults': { |
| 956 | 'defines': [ |
| 957 | '_WIN32_WINNT=0x0600', |
| 958 | 'WINVER=0x0600', |
| 959 | 'WIN32', |
| 960 | '_WINDOWS', |
| 961 | '_HAS_EXCEPTIONS=0', |
| 962 | 'NOMINMAX', |
| 963 | '_CRT_RAND_S', |
| 964 | 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', |
| 965 | 'WIN32_LEAN_AND_MEAN', |
| 966 | '_SECURE_ATL', |
[email protected] | adfb98c | 2009-06-23 20:08:45 | [diff] [blame] | 967 | '_HAS_TR1=0', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 968 | ], |
[email protected] | 5b5ca7cb | 2009-07-20 23:00:20 | [diff] [blame] | 969 | 'msvs_system_include_dirs': [ |
[email protected] | 998b515 | 2009-12-12 22:19:52 | [diff] [blame] | 970 | '<(DEPTH)/third_party/platformsdk_win7/files/Include', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 971 | '$(VSInstallDir)/VC/atlmfc/include', |
| 972 | ], |
[email protected] | a8d99cef | 2009-08-26 20:47:49 | [diff] [blame] | 973 | 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], |
[email protected] | 684056177 | 2009-05-12 16:37:55 | [diff] [blame] | 974 | 'msvs_disabled_warnings': [4396, 4503, 4819], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 975 | 'msvs_settings': { |
| 976 | 'VCCLCompilerTool': { |
| 977 | 'MinimalRebuild': 'false', |
| 978 | 'ExceptionHandling': '0', |
| 979 | 'BufferSecurityCheck': 'true', |
| 980 | 'EnableFunctionLevelLinking': 'true', |
| 981 | 'RuntimeTypeInfo': 'false', |
| 982 | 'WarningLevel': '3', |
| 983 | 'WarnAsError': 'true', |
| 984 | 'DebugInformationFormat': '3', |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 985 | 'conditions': [ |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 986 | [ 'msvs_multi_core_compile', { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 987 | 'AdditionalOptions': ['/MP'], |
[email protected] | 912c55c | 2009-07-31 23:33:55 | [diff] [blame] | 988 | }], |
[email protected] | 3fef6e6 | 2009-07-31 19:58:58 | [diff] [blame] | 989 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 990 | }, |
| 991 | 'VCLibrarianTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 992 | 'AdditionalOptions': ['/ignore:4221'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 993 | 'AdditionalLibraryDirectories': |
[email protected] | 998b515 | 2009-12-12 22:19:52 | [diff] [blame] | 994 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 995 | }, |
| 996 | 'VCLinkerTool': { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 997 | 'AdditionalDependencies': [ |
| 998 | 'wininet.lib', |
| 999 | 'version.lib', |
| 1000 | 'msimg32.lib', |
| 1001 | 'ws2_32.lib', |
| 1002 | 'usp10.lib', |
| 1003 | 'psapi.lib', |
[email protected] | 96fd003 | 2009-04-24 00:13:08 | [diff] [blame] | 1004 | 'dbghelp.lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1005 | ], |
| 1006 | 'AdditionalLibraryDirectories': |
[email protected] | 998b515 | 2009-12-12 22:19:52 | [diff] [blame] | 1007 | ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1008 | 'GenerateDebugInformation': 'true', |
| 1009 | 'MapFileName': '$(OutDir)\\$(TargetName).map', |
| 1010 | 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1011 | 'FixedBaseAddress': '1', |
[email protected] | 825ff8d | 2009-05-22 01:40:48 | [diff] [blame] | 1012 | # SubSystem values: |
| 1013 | # 0 == not set |
| 1014 | # 1 == /SUBSYSTEM:CONSOLE |
| 1015 | # 2 == /SUBSYSTEM:WINDOWS |
| 1016 | # Most of the executables we'll ever create are tests |
| 1017 | # and utilities with console output. |
| 1018 | 'SubSystem': '1', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1019 | }, |
| 1020 | 'VCMIDLTool': { |
| 1021 | 'GenerateStublessProxies': 'true', |
| 1022 | 'TypeLibraryName': '$(InputName).tlb', |
| 1023 | 'OutputDirectory': '$(IntDir)', |
| 1024 | 'HeaderFileName': '$(InputName).h', |
| 1025 | 'DLLDataFileName': 'dlldata.c', |
| 1026 | 'InterfaceIdentifierFileName': '$(InputName)_i.c', |
| 1027 | 'ProxyFileName': '$(InputName)_p.c', |
| 1028 | }, |
| 1029 | 'VCResourceCompilerTool': { |
| 1030 | 'Culture' : '1033', |
[email protected] | 245b3cd59 | 2009-03-31 01:12:14 | [diff] [blame] | 1031 | 'AdditionalIncludeDirectories': ['<(DEPTH)'], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1032 | }, |
| 1033 | }, |
| 1034 | }, |
| 1035 | }], |
| 1036 | ['chromium_code==0', { |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1037 | # This section must follow the other condition sections above because |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1038 | # external_code.gypi expects to be merged into those settings. |
| 1039 | 'includes': [ |
| 1040 | 'external_code.gypi', |
| 1041 | ], |
[email protected] | dce5df5 | 2009-06-29 17:58:25 | [diff] [blame] | 1042 | }, { |
| 1043 | 'target_defaults': { |
| 1044 | # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the |
| 1045 | # C99 macros on Mac and Linux. |
| 1046 | 'defines': [ |
| 1047 | '__STDC_FORMAT_MACROS', |
| 1048 | ], |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1049 | 'conditions': [ |
| 1050 | ['OS!="win"', { |
| 1051 | 'sources/': [ ['exclude', '_win\\.cc$'], |
| 1052 | ['exclude', '/win/'], |
| 1053 | ['exclude', '/win_[^/]*\\.cc$'] ], |
| 1054 | }], |
| 1055 | ['OS!="mac"', { |
| 1056 | 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'], |
[email protected] | eee9f55 | 2009-11-28 22:05:11 | [diff] [blame] | 1057 | ['exclude', '/(cocoa|mac)/'], |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1058 | ['exclude', '\.mm$' ] ], |
| 1059 | }], |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 1060 | ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1061 | 'sources/': [ |
| 1062 | ['exclude', '_(chromeos|gtk|linux|x|x11)(_unittest)?\\.cc$'], |
| 1063 | ['exclude', '/gtk/'], |
| 1064 | ['exclude', '/(gtk|x11)_[^/]*\\.cc$'] ], |
| 1065 | }], |
| 1066 | # We use "POSIX" to refer to all non-Windows operating systems. |
| 1067 | ['OS=="win"', { |
| 1068 | 'sources/': [ ['exclude', '_posix\\.cc$'] ], |
| 1069 | }], |
| 1070 | # Though Skia is conceptually shared by Linux and Windows, |
| 1071 | # the only _skia files in our tree are Linux-specific. |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 1072 | ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1073 | 'sources/': [ ['exclude', '_skia\\.cc$'] ], |
| 1074 | }], |
| 1075 | ['chromeos!=1', { |
| 1076 | 'sources/': [ ['exclude', '_chromeos\\.cc$'] ] |
| 1077 | }], |
[email protected] | d3a2cef | 2009-12-22 23:30:18 | [diff] [blame] | 1078 | ['OS!="win" and (toolkit_views==0 and chromeos==0)', { |
[email protected] | 4ebb4f1 | 2009-11-26 00:15:50 | [diff] [blame] | 1079 | 'sources/': [ ['exclude', '_views\\.cc$'] ] |
| 1080 | }], |
| 1081 | ], |
[email protected] | dce5df5 | 2009-06-29 17:58:25 | [diff] [blame] | 1082 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1083 | }], |
[email protected] | 47deeb6 | 2009-12-17 14:49:39 | [diff] [blame] | 1084 | # Disable native client on FreeBSD/OpenBSD for now |
| 1085 | ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd"', { |
[email protected] | d8c7cbcc | 2009-10-02 19:00:31 | [diff] [blame] | 1086 | 'target_defaults': { |
| 1087 | 'defines': [ |
| 1088 | 'DISABLE_NACL', |
| 1089 | ], |
| 1090 | }, |
| 1091 | }], |
[email protected] | cfbf9bc | 2009-12-07 22:07:56 | [diff] [blame] | 1092 | ['OS=="win" and msvs_use_common_linker_extras', { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1093 | 'target_defaults': { |
| 1094 | 'msvs_settings': { |
| 1095 | 'VCLinkerTool': { |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1096 | 'DelayLoadDLLs': [ |
| 1097 | 'dbghelp.dll', |
| 1098 | 'dwmapi.dll', |
| 1099 | 'uxtheme.dll', |
| 1100 | ], |
| 1101 | }, |
| 1102 | }, |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1103 | 'configurations': { |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1104 | 'x86_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1105 | 'msvs_settings': { |
| 1106 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1107 | 'AdditionalOptions': [ |
| 1108 | '/safeseh', |
| 1109 | '/dynamicbase', |
| 1110 | '/ignore:4199', |
| 1111 | '/ignore:4221', |
| 1112 | '/nxcompat', |
| 1113 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1114 | }, |
| 1115 | }, |
| 1116 | }, |
[email protected] | 5153767c | 2009-12-22 01:52:50 | [diff] [blame] | 1117 | 'x64_Base': { |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1118 | 'msvs_settings': { |
| 1119 | 'VCLinkerTool': { |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1120 | 'AdditionalOptions': [ |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1121 | # safeseh is not compatible with x64 |
[email protected] | 1f9471a | 2010-01-04 06:40:16 | [diff] [blame] | 1122 | '/dynamicbase', |
| 1123 | '/ignore:4199', |
| 1124 | '/ignore:4221', |
| 1125 | '/nxcompat', |
| 1126 | ], |
[email protected] | ef4fa407 | 2009-12-04 22:46:50 | [diff] [blame] | 1127 | }, |
| 1128 | }, |
| 1129 | }, |
| 1130 | }, |
[email protected] | 48c7af7 | 2009-07-03 22:00:19 | [diff] [blame] | 1131 | }, |
| 1132 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1133 | ], |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 1134 | 'scons_settings': { |
| 1135 | 'sconsbuild_dir': '<(DEPTH)/sconsbuild', |
[email protected] | a8b56d9 | 2009-08-10 04:09:07 | [diff] [blame] | 1136 | 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], |
[email protected] | c13fcbd | 2009-03-27 04:27:01 | [diff] [blame] | 1137 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1138 | 'xcode_settings': { |
[email protected] | 0c8ab45 | 2009-11-06 21:57:50 | [diff] [blame] | 1139 | # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! |
| 1140 | # This block adds *project-wide* configuration settings to each project |
| 1141 | # file. It's almost always wrong to put things here. Specify your |
| 1142 | # custom xcode_settings in target_defaults to add them to targets instead. |
| 1143 | |
| 1144 | # In an Xcode Project Info window, the "Base SDK for All Configurations" |
| 1145 | # setting sets the SDK on a project-wide basis. In order to get the |
| 1146 | # configured SDK to show properly in the Xcode UI, SDKROOT must be set |
| 1147 | # here at the project level. |
| 1148 | 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 1149 | |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1150 | # The Xcode generator will look for an xcode_settings section at the root |
| 1151 | # of each dict and use it to apply settings on a file-wide basis. Most |
| 1152 | # settings should not be here, they should be in target-specific |
| 1153 | # xcode_settings sections, or better yet, should use non-Xcode-specific |
| 1154 | # settings in target dicts. SYMROOT is a special case, because many other |
| 1155 | # Xcode variables depend on it, including variables such as |
| 1156 | # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 1157 | # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 1158 | # files to appear (when present) in the UI as actual files and not red |
| 1159 | # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 1160 | # and therefore SYMROOT, needs to be set at the project level. |
[email protected] | bfa24b96 | 2009-03-02 00:16:16 | [diff] [blame] | 1161 | 'SYMROOT': '<(DEPTH)/xcodebuild', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1162 | }, |
[email protected] | ee28c9f | 2009-09-04 01:53:01 | [diff] [blame] | 1163 | } |
[email protected] | f5c990c | 2009-10-06 03:02:38 | [diff] [blame] | 1164 | |
| 1165 | # Local Variables: |
| 1166 | # tab-width:2 |
| 1167 | # indent-tabs-mode:nil |
| 1168 | # End: |
| 1169 | # vim: set expandtab tabstop=2 shiftwidth=2: |