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

Support rule based cc_toolchains with dwp actions #25071

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AustinSchuh
Copy link
Contributor

dwp actions are built up solely from tool_paths. Rule based toolchains have no tool paths, resulting in an error when trying to find the dwp executable.

Unfortunately, we can't just switch to cc_common.get_tool_for_action because the old toolchains only have the path for dwp in tool_paths. So, try the old API first, and if it fails, try the new one.

dwp actions are built up solely from tool_paths.  Rule based toolchains
have no tool paths, resulting in an error when trying to find the dwp
executable.

Unfortunately, we can't just switch to cc_common.get_tool_for_action
because the old toolchains only have the path for dwp in tool_paths.
So, try the old API first, and if it fails, try the new one.

Signed-off-by: Austin Schuh <[email protected]>
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Jan 25, 2025
@AustinSchuh
Copy link
Contributor Author

FYI, @fmeum

@fmeum
Copy link
Collaborator

fmeum commented Jan 25, 2025

@pzembrod

@AustinSchuh
Copy link
Contributor Author

Looking around for similar patterns, _get_toolchain_global_make_variables in cc_helper.bzl looks like it will have a similar problem at some point. It also looks like it is in a less common code path than dwp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review PR is awaiting review from an assigned reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants