You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(toolchains): register native_build_toolchain per exec/target platform for sdist builds (#928)
## Problem
`native_build_toolchain` (used by `pep517_whl` for sdist builds) was not
registered with `@rules_py_tools//:all` and it was a single static
toolchain with `use_target_platform_constraints = True`. This only
matches when exec == target, but Bazel needs one registered entry per
exec platform so it can resolve `native_build_toolchain_type` for each
build host.
## Fix
Generate one `native_build_toolchain` entry per exec platform in
`toolchains_repo` (`repo.bzl`), so they land in `@rules_py_tools//:all`
which is already registered by all users.
`native_build_toolchain_type` now resolves automatically on all
supported exec platforms via the existing
`register_toolchains("@rules_py_tools//:all")`.
---------
Co-authored-by: Jason Bedard <jason+github@jbedard.ca>
0 commit comments