Skip to content

Fix cargo-gpu in build script failing when called by Miri or Clippy #335

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tuguzT
Copy link

@tuguzT tuguzT commented Jul 16, 2025

cargo-gpu Rust-GPU/cargo-gpu#101

@Firestar99: I've added a new CargoCmd struct that should handle all env vars in one central place for both spirv-builder and cargo-gpu install. In case of a failure, it also debug! logs the env vars which were removed and which were inherited with their values, to make debugging these sort of issues easier in the future.

As stated in Rust-GPU/cargo-gpu#93, build script which uses rustc_codegen_spirv via cargo-gpu failed to build shader crate while using Miri.
This pull request fixes this issue by removing RUSTC_WRAPPER environment variable from cargo call.

@tuguzT tuguzT changed the title Make build succeed when called by Miri Make shader crate build succeed when called by Miri Jul 16, 2025
@Firestar99 Firestar99 changed the title Make shader crate build succeed when called by Miri Make shader crate build succeed when called by Miri or Clippy Jul 17, 2025
@Firestar99 Firestar99 changed the title Make shader crate build succeed when called by Miri or Clippy Fix cargo-gpu in build script failing when called by Miri or Clippy Jul 17, 2025
@tuguzT tuguzT marked this pull request as ready for review July 17, 2025 21:51
@tuguzT
Copy link
Author

tuguzT commented Jul 17, 2025

Please look at Rust-GPU/cargo-gpu#101 for additional context

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.

2 participants