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

Unified Diff: build/common.gypi

Issue 547019: linux: add host_arch detection (Closed)
Patch Set: Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 45bcd484047ce790a09955117ddbde28b2a0b2d3..5b8695249089a1890c9dd6737e3e376a3c20d418 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)',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698