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.
Moved cargo_build_script test into appropriate dir. (bazelbuild#3024)
- Loading branch information
1 parent
43e5279
commit 4e54d34
Showing
7 changed files
with
35 additions
and
66 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
17 changes: 17 additions & 0 deletions
17
test/cargo_build_script/foreign_toolchain_make_variables/BUILD.bazel
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
load("//cargo:defs.bzl", "cargo_build_script") | ||
load(":toolchain.bzl", "dummy_env_var_toolchain") | ||
|
||
cargo_build_script( | ||
name = "bs", | ||
srcs = ["build.rs"], | ||
build_script_env = { | ||
"FROM_TOOLCHAIN": "$(FROM_TOOLCHAIN)", | ||
"MODIFIED_FROM_TOOLCHAIN": "modified$(FROM_TOOLCHAIN)", | ||
}, | ||
edition = "2021", | ||
toolchains = [":dummy_env_var_toolchain"], | ||
) | ||
|
||
dummy_env_var_toolchain( | ||
name = "dummy_env_var_toolchain", | ||
) |
File renamed without changes.
18 changes: 18 additions & 0 deletions
18
test/cargo_build_script/foreign_toolchain_make_variables/toolchain.bzl
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
"""Utilties for testing forwarding Make variables from toolchains.""" | ||
|
||
def _dummy_env_var_toolchain_impl(_ctx): | ||
make_variables = platform_common.TemplateVariableInfo({ | ||
"ALSO_FROM_TOOLCHAIN": "absent", | ||
"FROM_TOOLCHAIN": "present", | ||
}) | ||
|
||
return [ | ||
platform_common.ToolchainInfo( | ||
make_variables = make_variables, | ||
), | ||
make_variables, | ||
] | ||
|
||
dummy_env_var_toolchain = rule( | ||
implementation = _dummy_env_var_toolchain_impl, | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.