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

cc_binary: linkmap support #20966

Closed
t-8ch opened this issue Jan 21, 2024 · 5 comments
Closed

cc_binary: linkmap support #20966

t-8ch opened this issue Jan 21, 2024 · 5 comments
Labels
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request

Comments

@t-8ch
Copy link
Contributor

t-8ch commented Jan 21, 2024

Description of the feature request:

Our development process relies on linkmaps for binaries.
Currently cc_binary is not able to generate those.
While the necessary plumbing exists in cc_common with addition_linker_outputs this is not exposed as interface via cc_binary.

The generate_linkmap feature as used by the objc toolchain could be reused.

Which category does this issue belong to?

C++/Objective-C Rules

What underlying problem are you trying to solve with this feature?

Debugging of binaries.

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 7.0.1

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 master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

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

No response

t-8ch added a commit to t-8ch/bazel that referenced this issue Jan 21, 2024
@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label Jan 22, 2024
t-8ch added a commit to t-8ch/bazel that referenced this issue Jan 22, 2024
t-8ch added a commit to t-8ch/bazel that referenced this issue Jan 22, 2024
t-8ch added a commit to t-8ch/bazel that referenced this issue Jan 22, 2024
@comius comius added P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) and removed untriaged labels Jan 23, 2024
@comius
Copy link
Contributor

comius commented Jan 23, 2024

Unfortunately Bazel team is very short on C++ rules support, so we can't accept new features ATM.

@t-8ch
Copy link
Contributor Author

t-8ch commented Jan 23, 2024

That it unfortunate as there is no generic way to make cc_binary expose more linker artifacts.
(The same way cc_common.link does with additional_linker_outputs.

Do you have a very rough estimation on how long "ATM" could be?
So we can determine if we should wait or try to come up with some different/hacky solution.

@comius
Copy link
Contributor

comius commented Jan 23, 2024

That it unfortunate as there is no generic way to make cc_binary expose more linker artifacts. (The same way cc_common.link does with additional_linker_outputs.

Do you have a very rough estimation on how long "ATM" could be? So we can determine if we should wait or try to come up with some different/hacky solution.

I don't know, I don't have any rough estimates.

t-8ch added a commit to t-8ch/bazel that referenced this issue Jan 23, 2024
copybara-service bot pushed a commit that referenced this issue Mar 18, 2024
See #20966.

~I'm not entirely sure how to test the unix-only functionality.~

Closes #20967.

PiperOrigin-RevId: 616728419
Change-Id: I0b8eaa8245becebe2047bfc2bd7725f3fd45b8f1
bazel-io pushed a commit to bazel-io/bazel that referenced this issue Mar 25, 2024
See bazelbuild#20966.

~I'm not entirely sure how to test the unix-only functionality.~

Closes bazelbuild#20967.

PiperOrigin-RevId: 616728419
Change-Id: I0b8eaa8245becebe2047bfc2bd7725f3fd45b8f1
github-merge-queue bot pushed a commit that referenced this issue Apr 30, 2024
See #20966.

~I'm not entirely sure how to test the unix-only functionality.~

Closes #20967.

PiperOrigin-RevId: 616728419
Change-Id: I0b8eaa8245becebe2047bfc2bd7725f3fd45b8f1

Commit
e6b8adb

Co-authored-by: Thomas Weischuh <thomas@t-8ch.de>
Co-authored-by: Ian (Hee) Cha <heec@google.com>
@t-8ch
Copy link
Contributor Author

t-8ch commented Apr 30, 2024

Closing, as my PR got merged.

@t-8ch t-8ch closed this as completed Apr 30, 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
P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) team-Rules-CPP Issues for C++ rules type: feature request
Projects
None yet
Development

No branches or pull requests

5 participants