# Copyright 2024 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations under # the License. load("@bazel_skylib//rules:copy_file.bzl", "copy_file") load("per_platform_alias.bzl", "per_platform_alias") package(default_visibility = ["//visibility:public"]) licenses(["notice"]) per_platform_alias( name = "probe-rs-alias", platform_to_label = { "aarch64-linux": "@probe-rs-tools-aarch64-unknown-linux-gnu//:probe-rs", "aarch64-osx": "@probe-rs-tools-aarch64-apple-darwin//:probe-rs", "x86_64-linux": "@probe-rs-tools-x86_64-unknown-linux-gnu//:probe-rs", "x86_64-osx": "@probe-rs-tools-x86_64-apple-darwin//:probe-rs", "x86_64-windows": "@probe-rs-tools-x86_64-pc-windows-msvc//:probe-rs", }, ) # Symlink the `probe-rs` binary (whose path is platform-specific) into a common # location. copy_file( name = "probe-rs-create-symlink", src = ":probe-rs-alias", out = "probe-rs", allow_symlink = True, is_executable = True, )