-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add platform_transition_binary rule #289
Conversation
@f0rmiga and @illicitonion would be good reviewers |
Looks great, thanks! Test-wise, I'd suggest an integration test in lib/tests/transitions/BUILD.bazel that looks something like: go_binary(
name = "generic_go_binary",
srcs = [...],
tags = ["manual"],
)
platform_transition_binary(
name = "transitioned_go_binary_x86_64",
target_platform = ":x86_64_linux",
)
platform_transition_binary(
name = "transitioned_go_binary_armv7_linux",
target_platform = ":armv7_linux",
)
sh_test(
name = "test_go_binary_is_x86_64",
srcs = [...],
data = [":transitioned_go_binary_x86_64"],
args = ["$(rootpath :transitioned_go_binary_x86_64)"],
) and then a |
add me back as a reviewer once the test is added? |
Yup, sorry I've been meaning to get back to this one. |
I'm getting this error when I try to declare a
Is there something I need to do to register a cpp toolchain? |
It depends. You may be able to disable CGO if no C code is being used. What target needs it? |
Yeah, I suspect setting |
a483864
to
8b0fb6b
Compare
@illicitonion I tried |
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 should fix the issue :)
I've also filed bazel-contrib/rules_go#3390 to make this work slightly more by default
4a8685a
to
0e11922
Compare
0e11922
to
7ba024f
Compare
c506641
to
2ea8077
Compare
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.
Wonderful, thanks so much!!
@alexeagle this was mostly copy-pasta'ed from bazelbuild/rules_rust#276 (comment).
Transitions are a new topic in Bazel for me. I'm not sure how to properly exercise or test the rule