From 99e5b631bf060358241a8eaabd285be5c120490f Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 29 Nov 2021 10:37:12 -0800 Subject: [PATCH] Switch default CPU to use host (#1154) --- apple/internal/transition_support.bzl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apple/internal/transition_support.bzl b/apple/internal/transition_support.bzl index c96ce3f52..e39f70323 100644 --- a/apple/internal/transition_support.bzl +++ b/apple/internal/transition_support.bzl @@ -41,6 +41,8 @@ def _cpu_string(*, cpu, platform_type, settings = {}): cpu_value = settings["//command_line_option:cpu"] if cpu_value.startswith("ios_"): return cpu_value + if cpu_value == "darwin_arm64": + return "ios_sim_arm64" return "ios_x86_64" if platform_type == "macos": if cpu: @@ -48,6 +50,9 @@ def _cpu_string(*, cpu, platform_type, settings = {}): macos_cpus = settings["//command_line_option:macos_cpus"] if macos_cpus: return "darwin_{}".format(macos_cpus[0]) + cpu_value = settings["//command_line_option:cpu"] + if cpu_value.startswith("darwin_"): + return cpu_value return "darwin_x86_64" if platform_type == "tvos": if cpu: