Skip to content

Commit

Permalink
Avoid name collision on get_cpu_value
Browse files Browse the repository at this point in the history
  • Loading branch information
aherrmann committed Apr 14, 2022
1 parent 0563ddf commit 63e7748
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ def ensure_constraints(repository_ctx):
exec_constraints, The generated list of exec constraints
target_constraints, The generated list of target constraints
"""
cpu = get_cpu_value(repository_ctx)
cpu_value = get_cpu_value(repository_ctx)
cpu = {
"darwin": "@platforms//cpu:x86_64",
"darwin_arm64": "@platforms//cpu:arm64",
}.get(cpu, "@platforms//cpu:x86_64")
}.get(cpu_value, "@platforms//cpu:x86_64")
os = {
"darwin": "@platforms//os:osx",
"darwin_arm64": "@platforms//os:osx",
}.get(cpu, "@platforms//os:linux")
}.get(cpu_value, "@platforms//os:linux")
if not repository_ctx.attr.target_constraints and not repository_ctx.attr.exec_constraints:
target_constraints = [cpu, os]
exec_constraints = target_constraints
Expand Down

0 comments on commit 63e7748

Please sign in to comment.