1# Copyright 2022 Google LLC. 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"""Kotlin/JVM toolchain.""" 16 17load("//bazel:stubs.bzl", "integration_test_filegroup") 18load("@bazel_skylib//rules:common_settings.bzl", "string_flag") 19load(":kt_jvm_toolchains.bzl", "kt_jvm_toolchains") 20 21licenses(["notice"]) 22 23package( 24 default_visibility = ["//visibility:public"], 25) 26 27toolchain_type(name = kt_jvm_toolchains.name) 28 29toolchain( 30 name = "kt_jvm_toolchain_linux", 31 exec_compatible_with = [ 32 "@platforms//os:linux", 33 ], 34 toolchain = ":kt_jvm_toolchain_linux_sts_jdk", 35 toolchain_type = kt_jvm_toolchains.type, 36 visibility = ["//visibility:public"], 37) 38 39kt_jvm_toolchains.declare( 40 name = "kt_jvm_toolchain_linux_sts_jdk", 41 # TODO: Required due to magic attribute for DexArchiveAspect, remove once that 42 # attribute is removed. 43 visibility = ["//visibility:public"], 44) 45 46toolchain( 47 name = "kt_jvm_toolchain_macos", 48 exec_compatible_with = [ 49 "@platforms//os:macos", 50 ], 51 toolchain = ":kt_jvm_toolchain_no_turbine_darwin_jdk", 52 toolchain_type = kt_jvm_toolchains.type, 53 visibility = ["//visibility:public"], 54) 55 56kt_jvm_toolchains.declare( 57 name = "kt_jvm_toolchain_no_turbine_darwin_jdk", 58) 59 60# Turn on profiling of Kotlin/JVM actions 61# 62# Matches if the value is a substring of the target label. Empty string matches nothing. 63string_flag( 64 name = "profiling_filter", 65 build_setting_default = "", 66) 67 68integration_test_filegroup( 69 name = "bazel_osx_p4deps", 70 deps = [ 71 "//:visibility_bzl", 72 "//tools:bazel_osx_p4deps", 73 ], 74) 75