1# Copyright 2024 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15load("@bazel_skylib//rules:copy_file.bzl", "copy_file") 16load("per_platform_alias.bzl", "per_platform_alias") 17 18package(default_visibility = ["//visibility:public"]) 19 20licenses(["notice"]) 21 22per_platform_alias( 23 name = "probe-rs-alias", 24 platform_to_label = { 25 "aarch64-linux": "@probe-rs-tools-aarch64-unknown-linux-gnu//:probe-rs", 26 "aarch64-osx": "@probe-rs-tools-aarch64-apple-darwin//:probe-rs", 27 "x86_64-linux": "@probe-rs-tools-x86_64-unknown-linux-gnu//:probe-rs", 28 "x86_64-osx": "@probe-rs-tools-x86_64-apple-darwin//:probe-rs", 29 "x86_64-windows": "@probe-rs-tools-x86_64-pc-windows-msvc//:probe-rs", 30 }, 31) 32 33# Symlink the `probe-rs` binary (whose path is platform-specific) into a common 34# location. 35copy_file( 36 name = "probe-rs-create-symlink", 37 src = ":probe-rs-alias", 38 out = "probe-rs", 39 allow_symlink = True, 40 is_executable = True, 41) 42