Skip to content

Commit

Permalink
Switch default CPU to use host (#1154)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith authored Nov 29, 2021
1 parent 71c570c commit 99e5b63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apple/internal/transition_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ 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:
return "darwin_{}".format(cpu)
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:
Expand Down

0 comments on commit 99e5b63

Please sign in to comment.