Repository navigation
refactor(spirv-builder): split flag building out of invoke_rustc - #693
Closed
sorinirimies wants to merge 1 commit into
Closed
sorinirimies wants to merge 1 commit into
sorinirimies wants to merge 1 commit into
Conversation
`invoke_rustc` was ~270 lines mixing env var reads, flag building and running cargo, so flag building was only tested through difftests. - `RUSTGPU_*` env vars are read once into `EnvOverrides`. - New pure `rustflags`, `llvm_args` and `target_features` methods, with unit tests. No behavior change: the resulting rustc invocation is identical.
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.
Summary
SpirvBuilder::invoke_rustcwas ~270 lines mixingRUSTGPU_*env reads, flag building and running cargo, so the flag logic was only covered indirectly by difftests. Pure refactor, no behavior change.Evidence
Same
rustcinvocation before/after —sky-shaderviamultibuilderwithRUSTGPU_CARGOFLAGS=-v, diffing theRunning \rustc --crate-name sky_shader ...`` line:New
tests::rustflags:cargo test -p spirv-builder --features watch,clap: 8 passed. Clippy-D warningsclean (watch,clapand--no-default-features).Merge Danger
Door: two-way
Blast Radius: small — internal methods only; the only observable difference is that the three
cargo:rerun-if-env-changedlines are now printed together before cargo runs.