Skip to content

[toolchains] Add opt-in nightly rustc-dev toolchains#122

Open
andyscott wants to merge 1 commit into
hermeticbuild:mainfrom
andyscott:pr/nightly-rustc-dev-toolchains
Open

[toolchains] Add opt-in nightly rustc-dev toolchains#122
andyscott wants to merge 1 commit into
hermeticbuild:mainfrom
andyscott:pr/nightly-rustc-dev-toolchains

Conversation

@andyscott
Copy link
Copy Markdown

Summary

  • add opt-in rustc-dev support for generated nightly Rust toolchains
  • keep the default toolchain path unchanged, with separate dev-enabled variants selected only when requested
  • add regression coverage for dev-enabled versus ordinary nightly toolchain inputs

Motivation

Generated rules_rs toolchains currently cannot support nightly crates that depend on rustc_private, because those crates need the rustc-dev component in the compiler sysroot.

This adds that capability as an explicit nightly-only opt-in so downstream users can support rustc_private workloads without making ordinary toolchains larger or changing default selection behavior.

Details

  • add include_rustc_dev = True to the toolchain module extension
  • fetch rustc-dev separately from ordinary rustc
  • materialize merged rustc_with_dev sysroots only for dev-enabled toolchains
  • expose parallel *_with_dev toolchains behind @rules_rs//rs/toolchains/rustc_dev:enabled
  • document the required nightly/dev flags
  • add analysis tests covering presence and absence of compiler .rlib inputs

Validation

  • bazel build //rs/toolchains:module_extension //rs/private:rustc_dev_repository //rs/private:rustc_with_dev_repository

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