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

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: whoops, fixed mistake 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
« no previous file with comments | « build/all.gyp ('k') | build/features_override.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Unix platforms for which there is some support.
43 # else gets passed through, which probably won't work very well; suc h 43 # Anything else gets passed through, which probably won't work very
44 # hosts should pass an explicit target_arch to gyp. 44 # well; such 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_nix%': 1,
48 }, { # OS=="win" or OS=="mac"
48 'host_arch%': 'ia32', 49 'host_arch%': 'ia32',
50 'os_nix%': 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_nix%': '<(os_nix)',
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 # Also note that this should be enabled for remoting to compile. 136 # Also note that this should be enabled for remoting to compile.
134 'p2p_apis%': 1, 137 'p2p_apis%': 1,
135 138
136 # If this is set, the clang plugins used on the buildbot will be used. 139 # If this is set, the clang plugins used on the buildbot will be used.
137 # Run tools/clang/scripts/update.sh to make sure they are compiled. 140 # Run tools/clang/scripts/update.sh to make sure they are compiled.
138 # This causes 'clang_chrome_plugins_flags' to be set. 141 # This causes 'clang_chrome_plugins_flags' to be set.
139 # Has no effect if 'clang' is not set as well. 142 # Has no effect if 'clang' is not set as well.
140 'clang_use_chrome_plugins%': 0, 143 'clang_use_chrome_plugins%': 0,
141 144
142 'conditions': [ 145 'conditions': [
146 # A flag for POSIX platforms
147 ['os_nix==1 or OS=="mac"', {
148 'os_posix%': 1,
149 }, {
150 'os_posix%': 0,
151 }],
152
153 # Flags to use Gtk and X11 on non-Mac POSIX platforms
154 ['os_nix==1', {
155 'toolkit_uses_gtk%': 1,
156 'use_x11%': 1,
157 }, {
158 'toolkit_uses_gtk%': 0,
159 'use_x11%': 0,
160 }],
161
143 # A flag to enable or disable our compile-time dependency 162 # A flag to enable or disable our compile-time dependency
144 # on gnome-keyring. If that dependency is disabled, no gnome-keyring 163 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
145 # support will be available. This option is useful 164 # support will be available. This option is useful
146 # for Linux distributions. 165 # for Linux distributions.
147 ['chromeos==1', { 166 ['chromeos==1', {
148 'use_gnome_keyring%': 0, 167 'use_gnome_keyring%': 0,
149 }, { 168 }, {
150 'use_gnome_keyring%': 1, 169 'use_gnome_keyring%': 1,
151 }], 170 }],
152 171
(...skipping 25 matching lines...) Expand all
178 }], 197 }],
179 ], 198 ],
180 }, 199 },
181 200
182 # Copy conditionally-set variables out one scope. 201 # Copy conditionally-set variables out one scope.
183 'branding%': '<(branding)', 202 'branding%': '<(branding)',
184 'buildtype%': '<(buildtype)', 203 'buildtype%': '<(buildtype)',
185 'target_arch%': '<(target_arch)', 204 'target_arch%': '<(target_arch)',
186 'host_arch%': '<(host_arch)', 205 'host_arch%': '<(host_arch)',
187 'toolkit_views%': '<(toolkit_views)', 206 'toolkit_views%': '<(toolkit_views)',
207 'os_posix%': '<(os_posix)',
208 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
209 'use_x11%': '<(use_x11)',
188 'use_gnome_keyring%': '<(use_gnome_keyring)', 210 'use_gnome_keyring%': '<(use_gnome_keyring)',
189 'linux_fpic%': '<(linux_fpic)', 211 'linux_fpic%': '<(linux_fpic)',
190 'enable_flapper_hacks%': '<(enable_flapper_hacks)', 212 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
191 'chromeos%': '<(chromeos)', 213 'chromeos%': '<(chromeos)',
192 'touchui%': '<(touchui)', 214 'touchui%': '<(touchui)',
193 'file_manager_extension%': '<(file_manager_extension)', 215 'file_manager_extension%': '<(file_manager_extension)',
194 'inside_chromium_build%': '<(inside_chromium_build)', 216 'inside_chromium_build%': '<(inside_chromium_build)',
195 'fastbuild%': '<(fastbuild)', 217 'fastbuild%': '<(fastbuild)',
196 'python_ver%': '<(python_ver)', 218 'python_ver%': '<(python_ver)',
197 'armv7%': '<(armv7)', 219 '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 420 # If debug_devtools is set to 1, JavaScript files for DevTools are
399 # stored as is and loaded from disk. Otherwise, a concatenated file 421 # 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 422 # is stored in resources.pak. It is still possible to load JS files
401 # from disk by passing --debug-devtools cmdline switch. 423 # from disk by passing --debug-devtools cmdline switch.
402 'debug_devtools%': 0, 424 'debug_devtools%': 0,
403 425
404 # Point to ICU directory. 426 # Point to ICU directory.
405 'icu_src_dir': '../third_party/icu', 427 'icu_src_dir': '../third_party/icu',
406 428
407 'conditions': [ 429 'conditions': [
408 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 430 ['os_posix==1 and OS!="mac"', {
409 # This will set gcc_version to XY if you are running gcc X.Y.*. 431 # 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. 432 # This is used to tweak build flags for gcc 4.4.
411 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', 433 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
412 # Figure out the python architecture to decide if we build pyauto. 434 # 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)', 435 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/l ib/libpython<(python_ver).so.1.0)',
414 'conditions': [ 436 'conditions': [
415 ['branding=="Chrome"', { 437 ['branding=="Chrome"', {
416 'linux_breakpad%': 1, 438 'linux_breakpad%': 1,
417 }], 439 }],
418 # All Chrome builds have breakpad symbols, but only process the 440 # All Chrome builds have breakpad symbols, but only process the
419 # symbols from official builds. 441 # symbols from official builds.
420 ['(branding=="Chrome" and buildtype=="Official")', { 442 ['(branding=="Chrome" and buildtype=="Official")', {
421 'linux_dump_symbols%': 1, 443 'linux_dump_symbols%': 1,
422 }], 444 }],
423 ], 445 ],
424 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" 446 }], # os_posix==1 and OS!="mac"
425 447
426 ['OS=="mac"', { 448 ['OS=="mac"', {
427 'conditions': [ 449 'conditions': [
428 # mac_product_name is set to the name of the .app bundle as it should 450 # mac_product_name is set to the name of the .app bundle as it should
429 # appear on disk. This duplicates data from 451 # appear on disk. This duplicates data from
430 # chrome/app/theme/chromium/BRANDING and 452 # chrome/app/theme/chromium/BRANDING and
431 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get 453 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
432 # these names into the build system. 454 # these names into the build system.
433 ['branding=="Chrome"', { 455 ['branding=="Chrome"', {
434 'mac_product_name%': 'Google Chrome', 456 'mac_product_name%': 'Google Chrome',
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 'secure_atl%': 1, 498 'secure_atl%': 1,
477 }], 499 }],
478 ], 500 ],
479 'nacl_win64_defines': [ 501 'nacl_win64_defines': [
480 # This flag is used to minimize dependencies when building 502 # This flag is used to minimize dependencies when building
481 # Native Client loader for 64-bit Windows. 503 # Native Client loader for 64-bit Windows.
482 'NACL_WIN64', 504 'NACL_WIN64',
483 ], 505 ],
484 }], 506 }],
485 507
486 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', { 508 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
487 'use_cups%': 1, 509 'use_cups%': 1,
488 }, { 510 }, {
489 'use_cups%': 0, 511 'use_cups%': 0,
490 }], 512 }],
491 513
492 # Set the relative path from this file to the GYP file of the JPEG 514 # Set the relative path from this file to the GYP file of the JPEG
493 # library used by Chromium. 515 # library used by Chromium.
494 ['use_libjpeg_turbo==1', { 516 ['use_libjpeg_turbo==1', {
495 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', 517 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
496 }, { 518 }, {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 '_SCL_SECURE_NO_DEPRECATE', 747 '_SCL_SECURE_NO_DEPRECATE',
726 ], 748 ],
727 'include_dirs': [ 749 'include_dirs': [
728 '<(DEPTH)/third_party/wtl/include', 750 '<(DEPTH)/third_party/wtl/include',
729 ], 751 ],
730 }], # OS==win 752 }], # OS==win
731 ], # conditions for 'target_defaults' 753 ], # conditions for 'target_defaults'
732 'target_conditions': [ 754 'target_conditions': [
733 ['chromium_code==0', { 755 ['chromium_code==0', {
734 'conditions': [ 756 'conditions': [
735 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 757 [ 'os_posix==1 and OS!="mac"', {
736 # We don't want to get warnings from third-party code, 758 # We don't want to get warnings from third-party code,
737 # so remove any existing warning-enabling flags like -Wall. 759 # so remove any existing warning-enabling flags like -Wall.
738 'cflags!': [ 760 'cflags!': [
739 '-Wall', 761 '-Wall',
740 '-Wextra', 762 '-Wextra',
741 '-Werror', 763 '-Werror',
742 ], 764 ],
743 'cflags': [ 765 'cflags': [
744 # Don't warn about hash_map in third-party code. 766 # Don't warn about hash_map in third-party code.
745 '-Wno-deprecated', 767 '-Wno-deprecated',
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 ['OS!="win"', { 803 ['OS!="win"', {
782 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'], 804 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
783 ['exclude', '(^|/)win/'], 805 ['exclude', '(^|/)win/'],
784 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ], 806 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
785 }], 807 }],
786 ['OS!="mac"', { 808 ['OS!="mac"', {
787 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'], 809 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
788 ['exclude', '(^|/)(cocoa|mac)/'], 810 ['exclude', '(^|/)(cocoa|mac)/'],
789 ['exclude', '\\.mm?$' ] ], 811 ['exclude', '\\.mm?$' ] ],
790 }], 812 }],
791 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { 813 ['toolkit_uses_gtk!=1', {
792 'sources/': [ 814 'sources/': [
793 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'], 815 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
794 ['exclude', '(^|/)gtk/'], 816 ['exclude', '(^|/)gtk/'],
795 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'], 817 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
796 ], 818 ],
797 }], 819 }],
798 ['OS!="linux"', { 820 ['OS!="linux"', {
799 'sources/': [ 821 'sources/': [
800 ['exclude', '_linux(_unittest)?\\.(h|cc)$'], 822 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
801 ['exclude', '(^|/)linux/'], 823 ['exclude', '(^|/)linux/'],
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], 1038 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
1017 }, 1039 },
1018 'Purify_x64': { 1040 'Purify_x64': {
1019 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_ Base'], 1041 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_ Base'],
1020 }, 1042 },
1021 }], 1043 }],
1022 ], 1044 ],
1023 }, 1045 },
1024 }, 1046 },
1025 'conditions': [ 1047 'conditions': [
1026 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 1048 ['os_posix==1 and OS!="mac"', {
1027 'target_defaults': { 1049 'target_defaults': {
1028 # Enable -Werror by default, but put it in a variable so it can 1050 # Enable -Werror by default, but put it in a variable so it can
1029 # be disabled in ~/.gyp/include.gypi on the valgrind builders. 1051 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1030 'variables': { 1052 'variables': {
1031 # Use -fno-strict-aliasing, see http://crbug.com/32204 1053 # Use -fno-strict-aliasing, see http://crbug.com/32204
1032 'no_strict_aliasing%': 1, 1054 'no_strict_aliasing%': 1,
1033 'conditions': [['OS=="linux"', {'werror%': '-Werror',}], 1055 'conditions': [
1034 ['OS=="freebsd"', {'werror%': '',}], 1056 ['OS=="linux"', {
1035 ['OS=="openbsd"', {'werror%': '',}], 1057 'werror%': '-Werror',
1058 }, { # turn off -Werror on other Unices
1059 'werror%': '',
1060 }],
1036 ], 1061 ],
1037 }, 1062 },
1038 'cflags': [ 1063 'cflags': [
1039 '<(werror)', # See note above about the werror variable. 1064 '<(werror)', # See note above about the werror variable.
1040 '-pthread', 1065 '-pthread',
1041 '-fno-exceptions', 1066 '-fno-exceptions',
1042 '-Wall', 1067 '-Wall',
1043 # TODO(evan): turn this back on once all the builds work. 1068 # TODO(evan): turn this back on once all the builds work.
1044 # '-Wextra', 1069 # '-Wextra',
1045 # Don't warn about unused function params. We use those everywhere. 1070 # Don't warn about unused function params. We use those everywhere.
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 'VCResourceCompilerTool': { 1648 'VCResourceCompilerTool': {
1624 'Culture' : '1033', 1649 'Culture' : '1033',
1625 'AdditionalIncludeDirectories': [ 1650 'AdditionalIncludeDirectories': [
1626 '<(DEPTH)', 1651 '<(DEPTH)',
1627 '<(SHARED_INTERMEDIATE_DIR)', 1652 '<(SHARED_INTERMEDIATE_DIR)',
1628 ], 1653 ],
1629 }, 1654 },
1630 }, 1655 },
1631 }, 1656 },
1632 }], 1657 }],
1633 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { 1658 ['disable_nacl==1', {
1634 'target_defaults': { 1659 'target_defaults': {
1635 'defines': [ 1660 'defines': [
1636 'DISABLE_NACL', 1661 'DISABLE_NACL',
1637 ], 1662 ],
1638 }, 1663 },
1639 }], 1664 }],
1640 ['OS=="win" and msvs_use_common_linker_extras', { 1665 ['OS=="win" and msvs_use_common_linker_extras', {
1641 'target_defaults': { 1666 'target_defaults': {
1642 'msvs_settings': { 1667 'msvs_settings': {
1643 'VCLinkerTool': { 1668 'VCLinkerTool': {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 # and therefore SYMROOT, needs to be set at the project level. 1736 # and therefore SYMROOT, needs to be set at the project level.
1712 'SYMROOT': '<(DEPTH)/xcodebuild', 1737 'SYMROOT': '<(DEPTH)/xcodebuild',
1713 }, 1738 },
1714 } 1739 }
1715 1740
1716 # Local Variables: 1741 # Local Variables:
1717 # tab-width:2 1742 # tab-width:2
1718 # indent-tabs-mode:nil 1743 # indent-tabs-mode:nil
1719 # End: 1744 # End:
1720 # vim: set expandtab tabstop=2 shiftwidth=2: 1745 # vim: set expandtab tabstop=2 shiftwidth=2:
OLDNEW
« no previous file with comments | « build/all.gyp ('k') | build/features_override.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698