• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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(":kt_jvm_toolchains.bzl", "kt_jvm_toolchains")
18load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
19
20licenses(["notice"])
21
22package(default_visibility = ["//:internal"])
23
24toolchain_type(name = kt_jvm_toolchains.name)
25
26# Toolchain resolution must match :kt_jvm_toolchain_impl. Therefore, there's no
27# need for platform-specific toolchain declarations.
28toolchain(
29    name = "kt_jvm_toolchain",
30    toolchain = ":kt_jvm_toolchain_impl",
31    toolchain_type = kt_jvm_toolchains.type,
32)
33
34alias(
35    name = "kt_jvm_toolchain_impl",
36    actual = select({
37        "@bazel_platforms//os:macos": ":kt_jvm_toolchain_macos_impl",
38        "//conditions:default": ":kt_jvm_toolchain_default_impl",
39    }),
40    visibility = ["//visibility:public"],
41)
42
43kt_jvm_toolchains.declare(
44    name = "kt_jvm_toolchain_macos_impl",
45    enable_turbine_direct = False,
46)
47
48kt_jvm_toolchains.declare(
49    name = "kt_jvm_toolchain_default_impl",
50)
51