Commit a9f824da authored by sbc@chromium.org's avatar sbc@chromium.org

Fix ninja wrapper script on non-x86 linux.

The script would previously attempt to run
the x86_32 version of ninja on 32-bit arches
such as mips and arm rather than display the
error message.

This error showed up an ARM builder:
/mnt/data/b/depot_tools/ninja: line 25: /mnt/data/b/depot_tools/ninja-linux32: cannot execute binary file

Review URL: https://codereview.chromium.org/26490004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@227549 0039d316-1c4b-4281-b951-d872f2087c98
parent 4fa02461
......@@ -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" "$@";;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment