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.
rust_stdlib_filegroup: update to support srcs from another package (b…
…azelbuild#2735) The `rust_stdlib_filegroup` rule would sometimes break when passing `.rlib`-s originating from another package to `srcs`. The root cause is the logic inside it that creates `.a` -> `.rlib` symlinks, where the `.a` symlink is declared sibling of the `.rlib`. Bazel only allows symlink siblings to be in the same package as the rule. This updates the logic to detect this and create an intermediary `.rlib` under the rule's package, allowing the `.a` to be symlinked to that. --------- Co-authored-by: scentini <[email protected]>
- Loading branch information
1 parent
4a530aa
commit 64a4b52
Showing
5 changed files
with
55 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
genrule( | ||
name = "dummy_rlib", | ||
outs = ["core.rlib"], | ||
cmd = "touch $@", | ||
) | ||
|
||
filegroup( | ||
name = "std_libs_srcs", | ||
srcs = [":dummy_rlib"], | ||
visibility = ["//test/unit/toolchain:__subpackages__"], | ||
) |
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