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

Side by Side Diff: build/common.gypi

Issue 6965007: Define os_posix in gyp files to get new Unix platforms added quickly (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: changed os_nix to os_posix Created 9 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
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 20 matching lines...) Expand all
31 # To do a shared build on linux we need to be able to choose between 31 # To do a shared build on linux we need to be able to choose between
32 # type static_library and shared_library. We default to doing a static 32 # type static_library and shared_library. We default to doing a static
33 # build but you can override this with "gyp -Dlibrary=shared_library" 33 # build but you can override this with "gyp -Dlibrary=shared_library"
34 # or you can add the following line (without the #) to 34 # or you can add the following line (without the #) to
35 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}} 35 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
36 # to compile as shared by default 36 # to compile as shared by default
37 'library%': 'static_library', 37 'library%': 'static_library',
38 38
39 # Compute the architecture that we're building on. 39 # Compute the architecture that we're building on.
40 'conditions': [ 40 'conditions': [
41 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 41 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
42 # This handles the Linux platforms we generally deal with. Anything 42 # This handles the Linux platforms we generally deal with. Anything
43 # else gets passed through, which probably won't work very well; suc h 43 # else gets passed through, which probably won't work very well; suc h
44 # hosts should pass an explicit target_arch to gyp. 44 # hosts should pass an explicit target_arch to gyp.
45 'host_arch%': 45 'host_arch%':
46 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/")', 46 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/a rm.*/arm/;s/i86pc/ia32/")',
47 }, { # OS!="linux" 47 'os_posix%': 1,
Mark Mentovai 2011/05/09 19:54:50 Now we’re getting into a semantic difference thing
48 }, { # OS!=posix
48 'host_arch%': 'ia32', 49 'host_arch%': 'ia32',
50 'os_posix%': 0,
49 }], 51 }],
50 52
51 # Set default value of toolkit_views on for Windows, Chrome OS 53 # Set default value of toolkit_views on for Windows, Chrome OS
52 # and the touch UI. 54 # and the touch UI.
53 ['OS=="win" or chromeos==1 or touchui==1', { 55 ['OS=="win" or chromeos==1 or touchui==1', {
54 'toolkit_views%': 1, 56 'toolkit_views%': 1,
55 }, { 57 }, {
56 'toolkit_views%': 0, 58 'toolkit_views%': 0,
57 }], 59 }],
58 ], 60 ],
59 }, 61 },
60 62
61 # Copy conditionally-set variables out one scope. 63 # Copy conditionally-set variables out one scope.
62 'chromeos%': '<(chromeos)', 64 'chromeos%': '<(chromeos)',
63 'touchui%': '<(touchui)', 65 'touchui%': '<(touchui)',
64 'host_arch%': '<(host_arch)', 66 'host_arch%': '<(host_arch)',
65 'library%': '<(library)', 67 'library%': '<(library)',
66 'toolkit_views%': '<(toolkit_views)', 68 'toolkit_views%': '<(toolkit_views)',
69 'os_posix%': '<(os_posix)',
67 70
68 # Override branding to select the desired branding flavor. 71 # Override branding to select the desired branding flavor.
69 'branding%': 'Chromium', 72 'branding%': 'Chromium',
70 73
71 # Override buildtype to select the desired build flavor. 74 # Override buildtype to select the desired build flavor.
72 # Dev - everyday build for development/testing 75 # Dev - everyday build for development/testing
73 # Official - release build (generally implies additional processing) 76 # Official - release build (generally implies additional processing)
74 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp 77 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
75 # conversion is done), some of the things which are now controlled by 78 # conversion is done), some of the things which are now controlled by
76 # 'branding', such as symbol generation, will need to be refactored based 79 # 'branding', such as symbol generation, will need to be refactored based
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 }], 181 }],
179 ], 182 ],
180 }, 183 },
181 184
182 # Copy conditionally-set variables out one scope. 185 # Copy conditionally-set variables out one scope.
183 'branding%': '<(branding)', 186 'branding%': '<(branding)',
184 'buildtype%': '<(buildtype)', 187 'buildtype%': '<(buildtype)',
185 'target_arch%': '<(target_arch)', 188 'target_arch%': '<(target_arch)',
186 'host_arch%': '<(host_arch)', 189 'host_arch%': '<(host_arch)',
187 'toolkit_views%': '<(toolkit_views)', 190 'toolkit_views%': '<(toolkit_views)',
191 'os_posix%': '<(os_posix)',
188 'use_gnome_keyring%': '<(use_gnome_keyring)', 192 'use_gnome_keyring%': '<(use_gnome_keyring)',
189 'linux_fpic%': '<(linux_fpic)', 193 'linux_fpic%': '<(linux_fpic)',
190 'enable_flapper_hacks%': '<(enable_flapper_hacks)', 194 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
191 'chromeos%': '<(chromeos)', 195 'chromeos%': '<(chromeos)',
192 'touchui%': '<(touchui)', 196 'touchui%': '<(touchui)',
193 'file_manager_extension%': '<(file_manager_extension)', 197 'file_manager_extension%': '<(file_manager_extension)',
194 'inside_chromium_build%': '<(inside_chromium_build)', 198 'inside_chromium_build%': '<(inside_chromium_build)',
195 'fastbuild%': '<(fastbuild)', 199 'fastbuild%': '<(fastbuild)',
196 'python_ver%': '<(python_ver)', 200 'python_ver%': '<(python_ver)',
197 'armv7%': '<(armv7)', 201 'armv7%': '<(armv7)',
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 # If debug_devtools is set to 1, JavaScript files for DevTools are 402 # If debug_devtools is set to 1, JavaScript files for DevTools are
399 # stored as is and loaded from disk. Otherwise, a concatenated file 403 # stored as is and loaded from disk. Otherwise, a concatenated file
400 # is stored in resources.pak. It is still possible to load JS files 404 # is stored in resources.pak. It is still possible to load JS files
401 # from disk by passing --debug-devtools cmdline switch. 405 # from disk by passing --debug-devtools cmdline switch.
402 'debug_devtools%': 0, 406 'debug_devtools%': 0,
403 407
404 # Point to ICU directory. 408 # Point to ICU directory.
405 'icu_src_dir': '../third_party/icu', 409 'icu_src_dir': '../third_party/icu',
406 410
407 'conditions': [ 411 'conditions': [
408 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 412 ['os_posix==1', {
409 # This will set gcc_version to XY if you are running gcc X.Y.*. 413 # This will set gcc_version to XY if you are running gcc X.Y.*.
410 # This is used to tweak build flags for gcc 4.4. 414 # This is used to tweak build flags for gcc 4.4.
411 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', 415 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
412 # Figure out the python architecture to decide if we build pyauto. 416 # Figure out the python architecture to decide if we build pyauto.
413 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/l ib/libpython<(python_ver).so.1.0)', 417 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/l ib/libpython<(python_ver).so.1.0)',
414 'conditions': [ 418 'conditions': [
415 ['branding=="Chrome"', { 419 ['branding=="Chrome"', {
416 'linux_breakpad%': 1, 420 'linux_breakpad%': 1,
417 }], 421 }],
418 # All Chrome builds have breakpad symbols, but only process the 422 # All Chrome builds have breakpad symbols, but only process the
419 # symbols from official builds. 423 # symbols from official builds.
420 ['(branding=="Chrome" and buildtype=="Official")', { 424 ['(branding=="Chrome" and buildtype=="Official")', {
421 'linux_dump_symbols%': 1, 425 'linux_dump_symbols%': 1,
422 }], 426 }],
423 ], 427 ],
424 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" 428 }], # os_posix==1
425 429
426 ['OS=="mac"', { 430 ['OS=="mac"', {
427 'conditions': [ 431 'conditions': [
428 # mac_product_name is set to the name of the .app bundle as it should 432 # mac_product_name is set to the name of the .app bundle as it should
429 # appear on disk. This duplicates data from 433 # appear on disk. This duplicates data from
430 # chrome/app/theme/chromium/BRANDING and 434 # chrome/app/theme/chromium/BRANDING and
431 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get 435 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
432 # these names into the build system. 436 # these names into the build system.
433 ['branding=="Chrome"', { 437 ['branding=="Chrome"', {
434 'mac_product_name%': 'Google Chrome', 438 'mac_product_name%': 'Google Chrome',
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 'secure_atl%': 1, 480 'secure_atl%': 1,
477 }], 481 }],
478 ], 482 ],
479 'nacl_win64_defines': [ 483 'nacl_win64_defines': [
480 # This flag is used to minimize dependencies when building 484 # This flag is used to minimize dependencies when building
481 # Native Client loader for 64-bit Windows. 485 # Native Client loader for 64-bit Windows.
482 'NACL_WIN64', 486 'NACL_WIN64',
483 ], 487 ],
484 }], 488 }],
485 489
486 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', { 490 ['OS=="mac" or (os_posix==1 and chromeos==0 and target_arch!="arm")', {
487 'use_cups%': 1, 491 'use_cups%': 1,
488 }, { 492 }, {
489 'use_cups%': 0, 493 'use_cups%': 0,
490 }], 494 }],
491 495
492 # Set the relative path from this file to the GYP file of the JPEG 496 # Set the relative path from this file to the GYP file of the JPEG
493 # library used by Chromium. 497 # library used by Chromium.
494 ['use_libjpeg_turbo==1', { 498 ['use_libjpeg_turbo==1', {
495 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', 499 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
496 }, { 500 }, {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 '_SCL_SECURE_NO_DEPRECATE', 729 '_SCL_SECURE_NO_DEPRECATE',
726 ], 730 ],
727 'include_dirs': [ 731 'include_dirs': [
728 '<(DEPTH)/third_party/wtl/include', 732 '<(DEPTH)/third_party/wtl/include',
729 ], 733 ],
730 }], # OS==win 734 }], # OS==win
731 ], # conditions for 'target_defaults' 735 ], # conditions for 'target_defaults'
732 'target_conditions': [ 736 'target_conditions': [
733 ['chromium_code==0', { 737 ['chromium_code==0', {
734 'conditions': [ 738 'conditions': [
735 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 739 [ 'os_posix==1', {
736 # We don't want to get warnings from third-party code, 740 # We don't want to get warnings from third-party code,
737 # so remove any existing warning-enabling flags like -Wall. 741 # so remove any existing warning-enabling flags like -Wall.
738 'cflags!': [ 742 'cflags!': [
739 '-Wall', 743 '-Wall',
740 '-Wextra', 744 '-Wextra',
741 '-Werror', 745 '-Werror',
742 ], 746 ],
743 'cflags': [ 747 'cflags': [
744 # Don't warn about hash_map in third-party code. 748 # Don't warn about hash_map in third-party code.
745 '-Wno-deprecated', 749 '-Wno-deprecated',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 ['OS!="win"', { 785 ['OS!="win"', {
782 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'], 786 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
783 ['exclude', '(^|/)win/'], 787 ['exclude', '(^|/)win/'],
784 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ], 788 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
785 }], 789 }],
786 ['OS!="mac"', { 790 ['OS!="mac"', {
787 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'], 791 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
788 ['exclude', '(^|/)(cocoa|mac)/'], 792 ['exclude', '(^|/)(cocoa|mac)/'],
789 ['exclude', '\\.mm?$' ] ], 793 ['exclude', '\\.mm?$' ] ],
790 }], 794 }],
791 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { 795 ['os_posix!=1', {
792 'sources/': [ 796 'sources/': [
793 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'], 797 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
794 ['exclude', '(^|/)gtk/'], 798 ['exclude', '(^|/)gtk/'],
795 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'], 799 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
796 ], 800 ],
797 }], 801 }],
798 ['OS!="linux"', { 802 ['OS!="linux"', {
799 'sources/': [ 803 'sources/': [
800 ['exclude', '_linux(_unittest)?\\.(h|cc)$'], 804 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
801 ['exclude', '(^|/)linux/'], 805 ['exclude', '(^|/)linux/'],
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], 1020 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
1017 }, 1021 },
1018 'Purify_x64': { 1022 'Purify_x64': {
1019 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_ Base'], 1023 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_ Base'],
1020 }, 1024 },
1021 }], 1025 }],
1022 ], 1026 ],
1023 }, 1027 },
1024 }, 1028 },
1025 'conditions': [ 1029 'conditions': [
1026 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 1030 ['os_posix==1', {
1027 'target_defaults': { 1031 'target_defaults': {
1028 # Enable -Werror by default, but put it in a variable so it can 1032 # Enable -Werror by default, but put it in a variable so it can
1029 # be disabled in ~/.gyp/include.gypi on the valgrind builders. 1033 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1030 'variables': { 1034 'variables': {
1031 # Use -fno-strict-aliasing, see http://crbug.com/32204 1035 # Use -fno-strict-aliasing, see http://crbug.com/32204
1032 'no_strict_aliasing%': 1, 1036 'no_strict_aliasing%': 1,
1033 'conditions': [['OS=="linux"', {'werror%': '-Werror',}], 1037 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
1034 ['OS=="freebsd"', {'werror%': '',}], 1038 ['OS=="freebsd"', {'werror%': '',}],
1035 ['OS=="openbsd"', {'werror%': '',}], 1039 ['OS=="openbsd"', {'werror%': '',}],
1040 ['OS=="solaris"', {'werror%': '',}],
tony 2011/05/09 20:13:18 Nit: Can we put freebsd/openbsd/solaris in the els
1036 ], 1041 ],
1037 }, 1042 },
1038 'cflags': [ 1043 'cflags': [
1039 '<(werror)', # See note above about the werror variable. 1044 '<(werror)', # See note above about the werror variable.
1040 '-pthread', 1045 '-pthread',
1041 '-fno-exceptions', 1046 '-fno-exceptions',
1042 '-Wall', 1047 '-Wall',
1043 # TODO(evan): turn this back on once all the builds work. 1048 # TODO(evan): turn this back on once all the builds work.
1044 # '-Wextra', 1049 # '-Wextra',
1045 # Don't warn about unused function params. We use those everywhere. 1050 # Don't warn about unused function params. We use those everywhere.
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 'VCResourceCompilerTool': { 1624 'VCResourceCompilerTool': {
1620 'Culture' : '1033', 1625 'Culture' : '1033',
1621 'AdditionalIncludeDirectories': [ 1626 'AdditionalIncludeDirectories': [
1622 '<(DEPTH)', 1627 '<(DEPTH)',
1623 '<(SHARED_INTERMEDIATE_DIR)', 1628 '<(SHARED_INTERMEDIATE_DIR)',
1624 ], 1629 ],
1625 }, 1630 },
1626 }, 1631 },
1627 }, 1632 },
1628 }], 1633 }],
1629 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 1634 ['disable_nacl==1', {
tony 2011/05/09 20:13:18 This looks like a functional change. Looks like i
1630 'target_defaults': { 1635 'target_defaults': {
1631 'defines': [ 1636 'defines': [
1632 'DISABLE_NACL', 1637 'DISABLE_NACL',
1633 ], 1638 ],
1634 }, 1639 },
1635 }], 1640 }],
1636 ['OS=="win" and msvs_use_common_linker_extras', { 1641 ['OS=="win" and msvs_use_common_linker_extras', {
1637 'target_defaults': { 1642 'target_defaults': {
1638 'msvs_settings': { 1643 'msvs_settings': {
1639 'VCLinkerTool': { 1644 'VCLinkerTool': {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 # and therefore SYMROOT, needs to be set at the project level. 1712 # and therefore SYMROOT, needs to be set at the project level.
1708 'SYMROOT': '<(DEPTH)/xcodebuild', 1713 'SYMROOT': '<(DEPTH)/xcodebuild',
1709 }, 1714 },
1710 } 1715 }
1711 1716
1712 # Local Variables: 1717 # Local Variables:
1713 # tab-width:2 1718 # tab-width:2
1714 # indent-tabs-mode:nil 1719 # indent-tabs-mode:nil
1715 # End: 1720 # End:
1716 # vim: set expandtab tabstop=2 shiftwidth=2: 1721 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698