-
Notifications
You must be signed in to change notification settings - Fork 741
Explicit outputs for wasm_cc_binary #1047
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
Merged
walkingeyerobot
merged 7 commits into
emscripten-core:main
from
zaucy:feat/explicit-outputs
May 20, 2022
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
786915f
Explicit outputs for wasm_cc_binary
zaucy eb024cb
Backwards compatibility
zaucy be79950
data_runfiles restore
zaucy 472c676
restore test_bazel.sh
zaucy dda3493
Using wrong path on accident
zaucy c019018
two separate rules for legacy support
zaucy b25e9a1
Added name attribute to wasm_cc_binary rule
zaucy 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 hidden or 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 hidden or 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 hidden or 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
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.
can you set
name = "wasm_cc_binary"
for both of these?that way the target type matches for things that care about the rule type.
Uh oh!
There was an error while loading. Please reload this page.
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.
Done! I didn't know that existed. Thanks!
I read the doc about it, but I have two questions if you don't mind answering:
_wasm_cc_binary_legacy
and_wasm_cc_binary
have the samename
?name
attribute is set for any rule that is wrapped in this style? I'd like to update my internal rules if that's the case. I'm unsure what the consequences of not doing it is.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 is basically the only use for the
name
parameter AFAIK--when you need to do something spicy like this.See also: cc_test.bzl's usage
I dunno if it's "recommended" or not, but when you care about the rule type being the same (as, in this case, we do -- for things like
bazel query "kind(wasm_cc_binary...)"
ornative.existing_rules
), you have two options:a) either use
name
orb) do some file import dance like cc_binary does.
cc_binary
does this thing where it defines the rules in separate files so they can both be namedcc_binary
, but then imports them with a different name to do this macro wrap.I personally prefer using
name
, but I suppose both are correct so it might just be a matter of style.