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

find_cc_toolchain: Don't fail on missing toolchain if mandatory = False #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yannic
Copy link
Contributor

@Yannic Yannic commented Jan 2, 2025

find_cc_toolchain is sometimes used by helper functions that may not have knowledge of the rule calling them. Making the function not fail if the calling rule did not use use_cc_toolchain() allows callers to avoid checking if CC_TOOLCHAIN_TYPE is in ctx.toolchains before calling find_cc_toolchain.

…False`

`find_cc_toolchain` is sometimes used by helper functions that may not have
knowledge of the rule calling them. Making the function not fail if the calling
rule did not use `use_cc_toolchain()` allows callers to avoid checking if
`CC_TOOLCHAIN_TYPE` is in `ctx.toolchains` before calling `find_cc_toolchain`.
@Yannic
Copy link
Contributor Author

Yannic commented Jan 2, 2025

The test failure looks unrelated

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