cros-bazel: Make {host,target} cpu string optional

Simplify `bazel_setup_crosstool` usage by letting users not passing
arguments {host, target} cpu string and capture
- host_cpu_str from $(tc-arch "${CBUILD}") and
- target_cpu_str from $(tc-arch "${CHOST}")

Some ebuilds need to convert cpu str to its own supported toolchain,
so we leave the arguments optional for them.
(e.g. tensorflow needs to build `amd64` arch in `k8` toolchain or it'll
just fail)

Add `arm64` toolchain which is equivalent to `aarch64` setup, since
the results of `tc-arch` for 64-bit arm platform is usually `arm64`.

Changes:
- Add optional args support
- Add `arm64` platform and constraints which is equivalent to `aarch64`

BUG=b:191123602
TEST=emerge-${BOARD} -j <cros-bazel packages>
TEST=emerge-arm64-generic -j <cros-bazel packages>

Disallow-Recycled-Builds: drallion-cq
Cq-Depend: chromium:2983918
Change-Id: I477679b5e21ef353c0db137ae62f03b9dd596586
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2979091
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed