summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-12 04:29:59 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-12 04:29:59 +0000
commitcf185b3c56e9c3eec7290c7c035b215a2d540604 (patch)
tree61b3715d1e5ef4946affbafc8d1a7b40060ff624 /build/common.gypi
parent4458922b1e6d3b02a63bca68d0b286a5c36052ad (diff)
downloadchromium_src-cf185b3c56e9c3eec7290c7c035b215a2d540604.zip
chromium_src-cf185b3c56e9c3eec7290c7c035b215a2d540604.tar.gz
chromium_src-cf185b3c56e9c3eec7290c7c035b215a2d540604.tar.bz2
linux: add host_arch detection
BUG=31274 Review URL: http://codereview.chromium.org/547019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35993 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi33
1 files changed, 20 insertions, 13 deletions
diff --git a/build/common.gypi b/build/common.gypi
index 45bcd48..5b86952 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -35,19 +35,25 @@
# builds).
'buildtype%': 'Dev',
- # Compute the architecture that we're building for. Default to the
- # architecture that we're building on.
- 'conditions': [
- [ 'OS=="linux" or OS=="freebsd"', {
- # 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.
- 'target_arch%':
- '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
- }, { # OS!="linux"
- 'target_arch%': 'ia32',
- }],
- ],
+ 'variables': {
+ # Compute the architecture that we're building on.
+ 'conditions': [
+ [ 'OS=="linux" or OS=="freebsd"', {
+ # 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.
+ 'host_arch%':
+ '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
+ }, { # OS!="linux"
+ 'host_arch%': 'ia32',
+ }],
+ ],
+ },
+ 'host_arch%': '<(host_arch)',
+
+ # Default architecture we're building for is the architecture we're
+ # building on.
+ 'target_arch%': '<(host_arch)',
# We do want to build Chromium with Breakpad support in certain
# situations. I.e. for Chrome bot.
@@ -79,6 +85,7 @@
'branding%': '<(branding)',
'buildtype%': '<(buildtype)',
'target_arch%': '<(target_arch)',
+ 'host_arch%': '<(host_arch)',
'toolkit_views%': '<(toolkit_views)',
'chromeos%': '<(chromeos)',
'inside_chromium_build%': '<(inside_chromium_build)',