Ben Hamilton c902f6b1c9 Fix Crashpad CI failures on mac, linux, and fuchsia
Crashpad CI is currently failing the mac, linux, and fuchsia builds:

https://ci.chromium.org/ui/p/crashpad/builders/try/crashpad_mac_x64_rel/811/overview
https://ci.chromium.org/ui/p/crashpad/builders/try/crashpad_linux_x64_rel/828/overview
https://ci.chromium.org/ui/p/crashpad/builders/try/crashpad_fuchsia_x64_rel/802/overview

The breakage was introduced by https://crrev.com/c/3990128, but CI
didn't start failing until depot_tools started using it in
https://crrev.com/c/3925341 .

This CL fixes two issues in that CL:

1) Bash-specific syntax in the third_party/ninja/ninja script
2) host_cpu in DEPS is x64, not amd64, for x86_64 platforms

Change-Id: If5723b4389b6abbb0a70eccaa5f06990594ebf90
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4052882
Commit-Queue: Ben Hamilton <benhamilton@google.com>
Reviewed-by: Mark Mentovai <mark@chromium.org>
2022-11-23 20:15:55 +00:00

44 lines
909 B
Bash
Executable File

#!/bin/sh
# Copyright 2022 Google Inc. All rights reserved
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -eu
OS="$(uname -s)"
THIS_DIR="$(dirname "${0}")"
print_help() {
cat <<EOF >&2
No ninja binary is available for this system.
Try building your own binary by doing:
cd ~
git clone https://github.com/ninja-build/ninja.git
cd ninja && ./configure.py --bootstrap
Then add ~/ninja/ to your PATH.
EOF
}
case "${OS}" in
Linux)
exec "${THIS_DIR}/linux/ninja" "$@";;
Darwin)
ARCH="$(uname -m)"
case "${ARCH}" in
x86_64)
exec "${THIS_DIR}/mac-amd64/ninja" "$@";;
arm64)
exec "${THIS_DIR}/mac-arm64/ninja" "$@";;
*)
echo "Unsupported architecture ${ARCH}" >&2
print_help
exit 1;;
esac
;;
*)
echo "Unsupported OS ${OS}" >&2
print_help
exit 1;;
esac