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

Add custom additional_outputs to cc_common.link #24990

Open
lior10r opened this issue Jan 20, 2025 · 3 comments
Open

Add custom additional_outputs to cc_common.link #24990

lior10r opened this issue Jan 20, 2025 · 3 comments

Comments

@lior10r
Copy link
Contributor

lior10r commented Jan 20, 2025

Description of the feature request:

We have a custom toolchain that outputs more than one file in the linking action. We would like to access these files later in the build process.
Today we have no way of accessing these files because bazel doesn't declare them as outputs of the linking action.

ideally these additional output files would be taken from a definition in the cc toolchain.

Which category does this issue belong to?

C++ Rules

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

Retrieve additional (non-standard) output files from the sandbox when compiling via cc_common.link

Which operating system are you running Bazel on?

Linux

What is the output of bazel info release?

release 7.4.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 HEAD ?


Have you found anything relevant by searching the web?

I have found this issue: #22036 which asks for something very similar but for cc_common.compile

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

No response

@lior10r
Copy link
Contributor Author

lior10r commented Jan 21, 2025

Is it possible that we would develop this and someone would go over a PR?

@keith
Copy link
Member

keith commented Jan 21, 2025

this parameter already exists

, maybe try that one? it might be marked as private API in which case I would attempt to remove that mark and see if it would already do what you need

@lior10r
Copy link
Contributor Author

lior10r commented Jan 21, 2025

Yes the parameter exists but if you look in here:
cc_binary.bzl
You can see that they only pass predefined files (linkmap and pdb). We would like to add other additional outputs.
I needed to explain this better, after we saw the code we thought about using this parameter but being able to pass to it custom files that the toolchain would define.
It is more correct to say that we would like to add custom outputs to cc_binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants