Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace incomplete repository_os logic with get_host_triple #482

Merged
merged 1 commit into from Jun 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions tools/examples_repository.bzl
Expand Up @@ -2,6 +2,7 @@
actual vendored sources"""

load("@rules_rust//rust:repositories.bzl", "load_arbitrary_tool")
load("@rules_rust//rust/platform:triple.bzl", "get_host_triple")

def _examples_dir(repository_ctx):
"""Returns the path to the cargo-raze workspace root
Expand Down Expand Up @@ -34,12 +35,8 @@ def _examples_repository_impl(repository_ctx):

if repository_ctx.attr.target_triple:
target_triple = repository_ctx.attr.target_triple
elif "mac" in repository_ctx.os.name:
target_triple = "x86_64-apple-darwin"
elif "windows" in repository_ctx.os.name:
target_triple = "x86_64-pc-windows-msvc"
else:
target_triple = "x86_64-unknown-linux-gnu"
target_triple = get_host_triple(repository_ctx).str

# Download cargo
load_arbitrary_tool(
Expand Down