1# Copyright 2023 The Bazel Authors. All rights reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://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, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15# ==================== 16# NOTE: You probably want to use the constants in test_platforms.bzl 17# Otherwise, you'll probably have to manually call Label() on these targets 18# to force them to resolve in the proper context. 19# ==================== 20 21load(":sh_py_run_test.bzl", "current_build_settings") 22 23package( 24 default_visibility = ["//:__subpackages__"], 25) 26 27platform( 28 name = "mac", 29 constraint_values = [ 30 "@platforms//os:macos", 31 ], 32) 33 34platform( 35 name = "linux", 36 constraint_values = [ 37 "@platforms//os:linux", 38 ], 39) 40 41platform( 42 name = "windows", 43 constraint_values = [ 44 "@platforms//os:windows", 45 ], 46) 47 48# Used when testing downloading of toolchains for a different platform 49 50platform( 51 name = "linux_x86_64", 52 constraint_values = [ 53 "@platforms//cpu:x86_64", 54 "@platforms//os:linux", 55 ], 56) 57 58platform( 59 name = "linux_aarch64", 60 constraint_values = [ 61 "@platforms//cpu:aarch64", 62 "@platforms//os:linux", 63 ], 64) 65 66platform( 67 name = "mac_x86_64", 68 constraint_values = [ 69 "@platforms//cpu:x86_64", 70 "@platforms//os:macos", 71 ], 72) 73 74platform( 75 name = "windows_x86_64", 76 constraint_values = [ 77 "@platforms//cpu:x86_64", 78 "@platforms//os:windows", 79 ], 80) 81 82platform( 83 name = "win_aarch64", 84 constraint_values = [ 85 "@platforms//os:windows", 86 "@platforms//cpu:aarch64", 87 ], 88) 89 90current_build_settings( 91 name = "current_build_settings", 92) 93