Fallback to get_tool_for_action with empty tool_paths#699
Open
keith wants to merge 1 commit intobazelbuild:mainfrom
Open
Fallback to get_tool_for_action with empty tool_paths#699keith wants to merge 1 commit intobazelbuild:mainfrom
keith wants to merge 1 commit intobazelbuild:mainfrom
Conversation
If the toolchain doesn't configure tool_paths, these make variables should still be set correctly
keith
commented
Apr 22, 2026
| else: | ||
| for tool in _REQUIRED_TOOLS: | ||
| if tool not in tool_paths_collector.keys(): | ||
| fail("Tool path for '" + tool + "' is missing") |
Member
Author
There was a problem hiding this comment.
this part of this change scares me. idk what the state of custom toolchains relying on this in google is, but the gist of this logic is that if you don't provide "gcc": tool_path("gcc") it would default to crosstool_top_path / "gcc"
This meant tool_paths always had all values, even though in most places I see it used it's assumed to be optional. This is required for the change to work since I put the other logic after checking tool_paths to ensure backwards compat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the toolchain doesn't configure tool_paths, these make variables
should still be set correctly