From e1ea2a9a345d8068baf2d2ad74664bea49b3c03e Mon Sep 17 00:00:00 2001 From: Chenchu Kolli Date: Mon, 9 May 2022 19:18:57 -0500 Subject: [PATCH] Fix android emulator darwin_arm64 select (#15445) This fixes this condition printing a strange error if you try to run these on macOS. In general this still doesn't work because of https://github.com/bazelbuild/bazel/issues/7069 but if we ever want to support it this is a pre-requisite to supporting arm macs Closes #15092. PiperOrigin-RevId: 444912275 Co-authored-by: Keith Smiley --- .../bazel/rules/android/android_sdk_repository_template.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_sdk_repository_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_sdk_repository_template.txt index 57576bd61edf82..761bc274b88dce 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_sdk_repository_template.txt +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/android_sdk_repository_template.txt @@ -69,7 +69,8 @@ filegroup( filegroup( name = "qemu2_x86", srcs = ["emulator/emulator"] + select({ - "@bazel_tools//src/conditions:darwin": ["emulator/qemu/darwin-x86_64/qemu-system-i386"], + "@bazel_tools//src/conditions:darwin_x86_64": ["emulator/qemu/darwin-x86_64/qemu-system-i386"], + "@bazel_tools//src/conditions:darwin_arm64": ["emulator/qemu/darwin-aarch64/qemu-system-aarch64"], "//conditions:default": ["emulator/qemu/linux-x86_64/qemu-system-i386"], }), )