Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index 48787ec5cbf03c993b03a41bf1b3457064d1f7f7..435b198b34f7990b8a010c62fdc20dd0ca68df12 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -38,14 +38,16 @@ |
| # Compute the architecture that we're building on. |
| 'conditions': [ |
| - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| - # This handles the Linux platforms we generally deal with. Anything |
| - # else gets passed through, which probably won't work very well; such |
| - # hosts should pass an explicit target_arch to gyp. |
| + [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { |
| + # This handles the Unix platforms for which there is some support. |
| + # Anything else gets passed through, which probably won't work very |
| + # well; such hosts should pass an explicit target_arch to gyp. |
| 'host_arch%': |
| - '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")', |
| - }, { # OS!="linux" |
| + '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', |
| + 'os_nix%': 1, |
| + }, { # OS=="win" or OS=="mac" |
|
Mark Mentovai
2011/05/10 14:20:27
This comment isn’t really correct. Since keeping i
Mark Mentovai
2011/05/10 21:45:09
This "else" comment isn’t correct because it doesn
|
| 'host_arch%': 'ia32', |
| + 'os_nix%': 0, |
| }], |
| # Set default value of toolkit_views on for Windows, Chrome OS |
| @@ -64,6 +66,7 @@ |
| 'host_arch%': '<(host_arch)', |
| 'library%': '<(library)', |
| 'toolkit_views%': '<(toolkit_views)', |
| + 'os_nix%': '<(os_nix)', |
| # Override branding to select the desired branding flavor. |
| 'branding%': 'Chromium', |
| @@ -140,6 +143,22 @@ |
| 'clang_use_chrome_plugins%': 0, |
| 'conditions': [ |
| + # A flag for POSIX platforms |
| + ['os_nix==1 or OS=="mac"', { |
| + 'os_posix%': 1, |
| + }, { |
| + 'os_posix%': 0, |
| + }], |
| + |
| + # Flags to use Gtk and X11 on non-Mac POSIX platforms |
| + ['os_nix==1', { |
| + 'toolkit_gtk%': 1, |
| + 'use_x11%': 1, |
| + }, { |
| + 'toolkit_gtk%': 0, |
| + 'use_x11%': 0, |
| + }], |
| + |
| # A flag to enable or disable our compile-time dependency |
| # on gnome-keyring. If that dependency is disabled, no gnome-keyring |
| # support will be available. This option is useful |
| @@ -185,6 +204,9 @@ |
| 'target_arch%': '<(target_arch)', |
| 'host_arch%': '<(host_arch)', |
| 'toolkit_views%': '<(toolkit_views)', |
| + 'os_posix%': '<(os_posix)', |
| + 'toolkit_gtk%': '<(toolkit_gtk)', |
| + 'use_x11%': '<(use_x11)', |
| 'use_gnome_keyring%': '<(use_gnome_keyring)', |
| 'linux_fpic%': '<(linux_fpic)', |
| 'enable_flapper_hacks%': '<(enable_flapper_hacks)', |
| @@ -405,7 +427,7 @@ |
| 'icu_src_dir': '../third_party/icu', |
| 'conditions': [ |
| - ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| + ['os_posix==1 and OS!="mac"', { |
| # This will set gcc_version to XY if you are running gcc X.Y.*. |
| # This is used to tweak build flags for gcc 4.4. |
| 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', |
| @@ -421,7 +443,7 @@ |
| 'linux_dump_symbols%': 1, |
| }], |
| ], |
| - }], # OS=="linux" or OS=="freebsd" or OS=="openbsd" |
| + }], # os_posix==1 and OS!="mac" |
| ['OS=="mac"', { |
| 'conditions': [ |
| @@ -483,7 +505,7 @@ |
| ], |
| }], |
| - ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', { |
| + ['OS=="mac" or (os_posix==1 and chromeos==0 and target_arch!="arm")', { |
|
Mark Mentovai
2011/05/10 14:20:27
Since mac is os_posix, this can be simplified.
|
| 'use_cups%': 1, |
| }, { |
| 'use_cups%': 0, |
| @@ -732,7 +754,7 @@ |
| 'target_conditions': [ |
| ['chromium_code==0', { |
| 'conditions': [ |
| - [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| + [ 'os_posix==1 and OS!="mac"', { |
| # We don't want to get warnings from third-party code, |
| # so remove any existing warning-enabling flags like -Wall. |
| 'cflags!': [ |
| @@ -788,7 +810,7 @@ |
| ['exclude', '(^|/)(cocoa|mac)/'], |
| ['exclude', '\\.mm?$' ] ], |
| }], |
| - ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', { |
| + ['toolkit_gtk!=1', { |
| 'sources/': [ |
| ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'], |
| ['exclude', '(^|/)gtk/'], |
| @@ -1023,16 +1045,16 @@ |
| }, |
| }, |
| 'conditions': [ |
| - ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { |
| + ['os_posix==1 and OS!="mac"', { |
| 'target_defaults': { |
| # Enable -Werror by default, but put it in a variable so it can |
| # be disabled in ~/.gyp/include.gypi on the valgrind builders. |
| 'variables': { |
| # Use -fno-strict-aliasing, see http://crbug.com/32204 |
| 'no_strict_aliasing%': 1, |
| - 'conditions': [['OS=="linux"', {'werror%': '-Werror',}], |
| - ['OS=="freebsd"', {'werror%': '',}], |
| - ['OS=="openbsd"', {'werror%': '',}], |
| + 'conditions': [['OS=="linux"', {'werror%': '-Werror', |
|
Mark Mentovai
2011/05/10 14:20:27
Can you reformat this to match the traditional for
|
| + }, { # turn off -Werror on other Unices |
| + 'werror%': '',}], |
| ], |
| }, |
| 'cflags': [ |
| @@ -1626,7 +1648,7 @@ |
| }, |
| }, |
| }], |
| - ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', { |
| + ['disable_nacl==1', { |
| 'target_defaults': { |
| 'defines': [ |
| 'DISABLE_NACL', |