| # Copyright 2023 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """The rules generated by @toolchain_sdk""" |
| |
| load("@cros//bazel/module_extensions/toolchains/files:sysroot.bzl", "sysroot") |
| load("@rules_rust//rust:toolchain.bzl", "rust_stdlib_filegroup") |
| |
| # buildifier: disable=unnamed-macro |
| def generate_sdk_files(): |
| """Called from @toolchain_sdk. Generates relevant rules.""" |
| |
| # TODO: implement platform-specific sysroots. |
| sysroot( |
| name = "sysroot_files", |
| srcs = native.glob(["**"], exclude = [ |
| "BUILD.bazel", |
| "WORKSPACE", |
| ]), |
| strip_prefix = "../_main~toolchains~toolchain_sdk", |
| ) |
| |
| rust_stdlib_filegroup( |
| name = "rust_stdlibs_host", |
| srcs = ["@@//bazel/module_extensions/toolchains/rust/host:stdlibs_files"], |
| visibility = ["//visibility:public"], |
| ) |