diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 20:13:57 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 20:13:57 +0000 |
commit | fd36ce82ca04c8ed09f9b6fc519cb000ad529b3f (patch) | |
tree | 0910724e0623d076a50ca676caef56e0708ceaec /build | |
parent | 2329792307deebd09cf0b79bda7dfeffae61c715 (diff) | |
download | chromium_src-fd36ce82ca04c8ed09f9b6fc519cb000ad529b3f.zip chromium_src-fd36ce82ca04c8ed09f9b6fc519cb000ad529b3f.tar.gz chromium_src-fd36ce82ca04c8ed09f9b6fc519cb000ad529b3f.tar.bz2 |
This does a few things:
- only include cflags/linkflags and other compiler settings that are target-specific when building for 'target'
- make build tools (protoc) compile for 'host', and change the dependencies on them to reflect that.
Review URL: http://codereview.chromium.org/265031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30381 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/common.gypi | 19 | ||||
-rw-r--r-- | build/linux/system.gyp | 245 |
2 files changed, 147 insertions, 117 deletions
diff --git a/build/common.gypi b/build/common.gypi index 700bdc0..37dcdce 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -667,8 +667,8 @@ ], }], ['target_arch=="arm"', { - 'conditions': [ - ['armv7==1', { + 'target_conditions': [ + ['armv7==1 and _toolset=="target"', { 'cflags': [ '-march=armv7-a', '-mtune=cortex-a8', @@ -679,12 +679,15 @@ ], }], ['sysroot!=""', { - 'cflags': [ - '--sysroot=<(sysroot)', - ], - 'ldflags': [ - '--sysroot=<(sysroot)', - ], + 'target_conditions': [ + ['_toolset=="target"', { + 'cflags': [ + '--sysroot=<(sysroot)', + ], + 'ldflags': [ + '--sysroot=<(sysroot)', + ], + }]] }], ['no_strict_aliasing==1', { 'cflags': [ diff --git a/build/linux/system.gyp b/build/linux/system.gyp index df71899..c48a08c 100644 --- a/build/linux/system.gyp +++ b/build/linux/system.gyp @@ -19,147 +19,174 @@ { 'target_name': 'gtk', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags gtk+-2.0 gthread-2.0)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0 gthread-2.0)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l gtk+-2.0 gthread-2.0)', + ], + }, + }]] }, { 'target_name': 'gtkprint', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags gtk+-unix-print-2.0)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-unix-print-2.0)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l gtk+-unix-print-2.0)', + ], + }, + }]] }, { 'target_name': 'nss', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags nss)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l nss)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags nss)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l nss)', + ], + }, + }]] }, { 'target_name': 'freetype2', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags freetype2)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l freetype2)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags freetype2)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other freetype2)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l freetype2)', + ], + }, + }]] }, { 'target_name': 'fontconfig', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags fontconfig)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l fontconfig)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags fontconfig)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l fontconfig)', + ], + }, + }]] }, { 'target_name': 'gdk', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags gdk-2.0)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l gdk-2.0)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags gdk-2.0)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other gdk-2.0)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l gdk-2.0)', + ], + }, + }]] }, { 'target_name': 'gconf', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags gconf-2.0)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l gconf-2.0)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags gconf-2.0)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other gconf-2.0)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l gconf-2.0)', + ], + }, + }]] }, { 'target_name': 'x11', 'type': 'settings', - 'direct_dependent_settings': { - 'cflags': [ - '<!@(<(pkg-config) --cflags x11)', - ], - }, - 'link_settings': { - 'ldflags': [ - '<!@(<(pkg-config) --libs-only-L --libs-only-other x11)', - ], - 'libraries': [ - '<!@(<(pkg-config) --libs-only-l x11)', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'direct_dependent_settings': { + 'cflags': [ + '<!@(<(pkg-config) --cflags x11)', + ], + }, + 'link_settings': { + 'ldflags': [ + '<!@(<(pkg-config) --libs-only-L --libs-only-other x11)', + ], + 'libraries': [ + '<!@(<(pkg-config) --libs-only-l x11)', + ], + }, + }]] }, { 'target_name': 'selinux', 'type': 'settings', - 'link_settings': { - 'libraries': [ - '-lselinux', - ], - }, + 'conditions': [ + ['_toolset=="target"', { + 'link_settings': { + 'libraries': [ + '-lselinux', + ], + }, + }]] }, # TODO(evanm): temporarily disabled while we figure out whether to depend # on gnome-keyring etc. |