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

Unified Diff: ninja

Issue 26490004: Fix ninja wrapper script on non-x86 linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 years, 2 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: ninja
diff --git a/ninja b/ninja
index bd263b48ee02c91a5a2f59033eab859a93d43ccf..7b76038a1d3011ad835a2170f79acff92a201c13 100755
--- a/ninja
+++ b/ninja
@@ -20,12 +20,18 @@ EOF
case "$OS" in
Linux)
- MACHINE=$(getconf LONG_BIT)
+ MACHINE=$(uname -m)
case "$MACHINE" in
- 32|64) exec "${THIS_DIR}/ninja-linux${MACHINE}" "$@";;
- *) echo Unknown architecture \($MACHINE\) -- unable to run ninja.
- print_help
- exit 1;;
+ i?86|x86_64)
+ LONG_BIT=$(getconf LONG_BIT)
+ # We know we are on x86 but we need to use getconf to determine
+ # bittage of the userspace install (e.g. when runing 32-bit userspace
+ # on x86_64 kernel)
+ exec "${THIS_DIR}/ninja-linux${LONG_BIT}" "$@";;
+ *)
+ echo Unknown architecture \($MACHINE\) -- unable to run ninja.
+ print_help
+ exit 1;;
esac
;;
Darwin) exec "${THIS_DIR}/ninja-mac" "$@";;
« 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