mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
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
This commit is contained in:
16
ninja
16
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" "$@";;
|
||||
|
||||
Reference in New Issue
Block a user