-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More bazel --incompatible fixes (#161) #169
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ec6ee2f
Fix for --incompatible_depset_union
mfarrugi 9c9064c
Fix for args.add(directory)
mfarrugi 22e631e
fix --incompatible_depset_is_not_iterable
mfarrugi 4238918
refactor out some toolchain to_list calls
mfarrugi 2f5d70e
remove defunct indirect_crates
mfarrugi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -2,9 +2,6 @@ | |
The rust_toolchain rule definition and implementation. | ||
""" | ||
|
||
def _get_files(labels): | ||
return [f for l in labels for f in getattr(l, "files", [])] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not clear why this needed |
||
|
||
def _rust_toolchain_impl(ctx): | ||
compilation_mode_opts = {} | ||
for k, v in ctx.attr.opt_level.items(): | ||
|
@@ -18,8 +15,8 @@ def _rust_toolchain_impl(ctx): | |
toolchain = platform_common.ToolchainInfo( | ||
rustc = ctx.file.rustc, | ||
rust_doc = ctx.file.rust_doc, | ||
rustc_lib = _get_files(ctx.attr.rustc_lib), | ||
rust_lib = _get_files(ctx.attr.rust_lib), | ||
rustc_lib = ctx.attr.rustc_lib, | ||
rust_lib = ctx.attr.rust_lib, | ||
staticlib_ext = ctx.attr.staticlib_ext, | ||
dylib_ext = ctx.attr.dylib_ext, | ||
target_triple = ctx.attr.target_triple, | ||
|
@@ -33,10 +30,20 @@ def _rust_toolchain_impl(ctx): | |
rust_toolchain = rule( | ||
_rust_toolchain_impl, | ||
attrs = { | ||
"rustc": attr.label(allow_single_file = True), | ||
"rust_doc": attr.label(allow_single_file = True), | ||
"rustc_lib": attr.label_list(allow_files = True), | ||
"rust_lib": attr.label_list(allow_files = True), | ||
"rustc": attr.label( | ||
doc = "The rustc executable.", | ||
allow_single_file = True, | ||
), | ||
"rust_doc": attr.label( | ||
doc = "The rustdoc executable.", | ||
allow_single_file = True, | ||
), | ||
"rustc_lib": attr.label( | ||
doc = "Libraries used by rustc at runtime.", | ||
), | ||
"rust_lib": attr.label( | ||
doc = "The rust standard library.", | ||
), | ||
"staticlib_ext": attr.string(mandatory = True), | ||
"dylib_ext": attr.string(mandatory = True), | ||
"os": attr.string(mandatory = True), | ||
|
@@ -91,8 +98,8 @@ Example: | |
rust_toolchain( | ||
name = "rust_cpuX_impl", | ||
rustc = "@rust_cpuX//:rustc", | ||
rustc_lib = ["@rust_cpuX//:rustc_lib"], | ||
rust_lib = ["@rust_cpuX//:rust_lib"], | ||
rustc_lib = "@rust_cpuX//:rustc_lib", | ||
rust_lib = "@rust_cpuX//:rust_lib", | ||
rust_doc = "@rust_cpuX//:rustdoc", | ||
staticlib_ext = ".a", | ||
dylib_ext = ".so", | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a separate breakage