Skip to content
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

pdb_file not added to cc_shared_library output group #21602

Closed
peakschris opened this issue Mar 7, 2024 · 3 comments
Closed

pdb_file not added to cc_shared_library output group #21602

peakschris opened this issue Mar 7, 2024 · 3 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: bug

Comments

@peakschris
Copy link

Description of the bug:

When generate_pdb_file feature is enabled, the pdb_file is built. However, it is not added to the output group of cc_shared_library. The cc_binary rule seems to be ok.

The code in cc_binary that is missing from cc_shared library is:

# If PDB file is generated by the link action, we add it to pdb_file output group
if pdb_file != None:
output_groups["pdb_file"] = depset([pdb_file])
if generated_def_file != None:
output_groups["def_file"] = depset([generated_def_file])

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Trivial issue, but I can provide a git repo to reproduce this if it helps

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

release 7.0.2

If bazel info release returns development 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 HEAD ?

No response

Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.

No

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

The code in cc_binary that is missing from cc_shared library is:

# If PDB file is generated by the link action, we add it to pdb_file output group
if pdb_file != None:
output_groups["pdb_file"] = depset([pdb_file])
if generated_def_file != None:
output_groups["def_file"] = depset([generated_def_file])

@fmeum
Copy link
Collaborator

fmeum commented Mar 7, 2024

Would you be interested in submitting a PR? You could add test coverage here:

@peakschris
Copy link
Author

fmeum, I would love to be able to contribute. Sadly my employer will not sign the google agreement, so I cannot contribute to this repo.

@comius comius added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed untriaged labels Mar 15, 2024
fmeum added a commit to fmeum/bazel that referenced this issue May 10, 2024
Kila2 pushed a commit to Kila2/bazel that referenced this issue May 13, 2024
@iancha1992
Copy link
Member

A fix for this issue has been included in Bazel 7.2.0 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.2.0rc1. Thanks!

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) team-Rules-CPP Issues for C++ rules type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants