Add a dependency on the cc_wrapper, so it's present when rust_binary …#19
Merged
Conversation
…is executed Otherwise, the local_config_cc isn't written to the execroot on OS X because it isn't a dependency of the build rule. Fixes bazelbuild/bazel#1556.
Member
|
LGTM. Thanks! |
walter-zeromatter
added a commit
to walter-zeromatter/rules_rust
that referenced
this pull request
May 8, 2026
) * When '--strategy=Rustc=local' is used with pipelined compilation, rustc's -Ldependency scan can pick up the _meta.rlib alongside the full '.rlbi', producing undefined-symbol link errors. To avoid this, emit the hollow metadata rlibs into a '_meta/' subdirectory, and add an explicit link to that directory for any metadata-consuming actions. (bazelbuild#17) * Add RUSTC_BOOTSTRAP guardrail for -Zno-codegen pipelining Injects RUSTC_BOOTSTRAP=1 + -Zallow-features= (empty list) on the metadata and full compile actions when pipelined_compilation is enabled on a stable/beta toolchain. The bootstrap env is required for -Zno-codegen on non-nightly rustc and must match across both actions for SVH compatibility. The empty allow-features list prevents the bootstrap env from silently unlocking #![feature(...)] in user code. Nightly toolchains skip both injections: unstable features are already allowed, and the guardrail would break legitimate #![feature(...)] usage. Escape hatch: if the user sets RUSTC_BOOTSTRAP in rustc_env / shell env or passes -Zallow-features=... via rustc_flags / extra_rustc_flag, rules_rust treats their configuration as authoritative and skips both injections. Tests: - //test/pipelining_bootstrap_gate: manual target that #![feature(trait_alias)] to validate E0725 fires on stable under the guardrail. - //test/unit/pipelined_compilation: guardrail_{baseline,user_env,user_flag, space_form,global_env,global_flag}_optout_test variants.
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.
…is executed
Otherwise, the local_config_cc isn't written to the execroot on OS X because it
isn't a dependency of the build rule.
Fixes bazelbuild/bazel#1556.