-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Include implicit output targets from cc_binary
in cc_test
#18018
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-Rules-CPP
Issues for C++ rules
type: feature request
Comments
buildbreaker2021
added
P3
We're not considering working on this, but happy to review a PR. (No assignee)
and removed
untriaged
labels
Apr 25, 2023
copybara-service bot
pushed a commit
that referenced
this issue
May 8, 2023
#18018 implies that the implicit output targets added by the `cc_binary` rule (documented [here](https://bazel.build/reference/be/c-cpp#cc_binary_implicit_outputs)) are not mirrored by the `cc_test` rule. However, it appears that Bazel 6.0 does in fact have the implicit output targets of the `cc_binary` rule mirrored by the `cc_test` rule. Given that Bazel 6.0 already seems to have the implicit output targets mirrored by the `cc_test` rule, I figured that no source code changes are required for Bazel 6.0. However, I couldn't find documentation for this feature, and I couldn't find tests either. I did the following: - I added documentation for the implicit output targets under the `cc_test` rule. - I added unit tests for the implicit output targets under the `cc_test` rule. - I added integration tests for the implicit output targets under the `cc_test` rule. Closes #18275. PiperOrigin-RevId: 530248329 Change-Id: I46756464d29b6840c92df704a43f63c3030b71dc
fweikert
pushed a commit
to fweikert/bazel
that referenced
this issue
May 25, 2023
bazelbuild#18018 implies that the implicit output targets added by the `cc_binary` rule (documented [here](https://bazel.build/reference/be/c-cpp#cc_binary_implicit_outputs)) are not mirrored by the `cc_test` rule. However, it appears that Bazel 6.0 does in fact have the implicit output targets of the `cc_binary` rule mirrored by the `cc_test` rule. Given that Bazel 6.0 already seems to have the implicit output targets mirrored by the `cc_test` rule, I figured that no source code changes are required for Bazel 6.0. However, I couldn't find documentation for this feature, and I couldn't find tests either. I did the following: - I added documentation for the implicit output targets under the `cc_test` rule. - I added unit tests for the implicit output targets under the `cc_test` rule. - I added integration tests for the implicit output targets under the `cc_test` rule. Closes bazelbuild#18275. PiperOrigin-RevId: 530248329 Change-Id: I46756464d29b6840c92df704a43f63c3030b71dc
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale. |
github-actions
bot
added
the
stale
Issues or PRs that are stale (no activity for 30 days)
label
Aug 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
stale
Issues or PRs that are stale (no activity for 30 days)
team-Rules-CPP
Issues for C++ rules
type: feature request
Description of the feature request:
The
cc_binary
rule adds implicit output targets for each explicit output target, as documented here. In particular, for an explicit targetname
defined using thecc_binary
rule, the implicit targetname.stripped
outputs a stripped version of the binary. However, thecc_test
rule does not add any such implicit output targets.What underlying problem are you trying to solve with this feature?
In order to run a test on an auxiliary target, there are two steps to perform:
bazel build
on the test target with the appropriate options.The upload step takes longer the larger the binary is. Unstripped binaries can be significantly larger than stripped binaries. So uploading a stripped binary is one way to make the upload step faster. The
cc_binary
rule enables this through the implicitname.stripped
target. However, thecc_test
rule does not.Which operating system are you running Bazel on?
Linux Ubuntu 20.04
What is the output of
bazel info release
?release 4.2.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: