forked from bazelbuild/rules_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include all toolchain files in the current toolchain (bazelbuild#2336)
rustc assumes it can read things like librustc_driver, and if you don't include it, it gets sad.
- Loading branch information
1 parent
9e146e5
commit 5ceebc0
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
load(":toolchain_test.bzl", "toolchain_test_suite") | ||
|
||
toolchain_test_suite(name = "toolchain_test_suite") | ||
|
||
genrule( | ||
name = "inspect", | ||
outs = ["rustc-cfg"], | ||
# rustc assumes it can read things like librustc_driver in order to run this command. | ||
# This is a test to ensure we supply all of the files rustc needs as part of the current_rust_toolchain. | ||
cmd = "$(RUSTC) --print=cfg > $@", | ||
toolchains = ["@rules_rust//rust/toolchain:current_rust_toolchain"], | ||
tools = ["@rules_rust//rust/toolchain:current_rust_toolchain"], | ||
) | ||
|
||
build_test( | ||
name = "inspect_build_test", | ||
targets = [":inspect"], | ||
) |