Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: src/client/windows/build/common.gypi

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

Powered by Google App Engine
This is Rietveld 408576698