Skip to content

Fallback to get_tool_for_action with empty tool_paths#699

Open
keith wants to merge 1 commit intobazelbuild:mainfrom
keith:ks/fallback-to-get_tool_for_action-with-empty-tool_paths
Open

Fallback to get_tool_for_action with empty tool_paths#699
keith wants to merge 1 commit intobazelbuild:mainfrom
keith:ks/fallback-to-get_tool_for_action-with-empty-tool_paths

Conversation

@keith
Copy link
Copy Markdown
Member

@keith keith commented Apr 22, 2026

If the toolchain doesn't configure tool_paths, these make variables
should still be set correctly

If the toolchain doesn't configure tool_paths, these make variables
should still be set correctly
else:
for tool in _REQUIRED_TOOLS:
if tool not in tool_paths_collector.keys():
fail("Tool path for '" + tool + "' is missing")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant