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