fork/rules_rust

git clone https://git.julia.blue/fork/rules_rust

Daniel Wagner-HallInclude all toolchain files in the current toolchain (#2336)5ceebc08

patching
678 B19 linesraw
1load("@bazel_skylib//rules:build_test.bzl", "build_test")
2load(":toolchain_test.bzl", "toolchain_test_suite")
3
4toolchain_test_suite(name = "toolchain_test_suite")
5
6genrule(
7    name = "inspect",
8    outs = ["rustc-cfg"],
9    # rustc assumes it can read things like librustc_driver in order to run this command.
10    # This is a test to ensure we supply all of the files rustc needs as part of the current_rust_toolchain.
11    cmd = "$(RUSTC) --print=cfg > $@",
12    toolchains = ["@rules_rust//rust/toolchain:current_rust_toolchain"],
13    tools = ["@rules_rust//rust/toolchain:current_rust_toolchain"],
14)
15
16build_test(
17    name = "inspect_build_test",
18    targets = [":inspect"],
19)