Skip to content

Commit

Permalink
spirv-builder: add RUSTGPU_CARGOFLAGS, as a Cargo counterpart to `R…
Browse files Browse the repository at this point in the history
…USTGPU_RUSTFLAGS` (for `rustc`).
  • Loading branch information
eddyb committed Dec 23, 2024
1 parent f069c58 commit 2d1c3aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/spirv-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,10 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
profile,
]);

if let Ok(extra_cargoflags) = tracked_env_var_get("RUSTGPU_CARGOFLAGS") {
cargo.args(extra_cargoflags.split_whitespace());
}

// FIXME(eddyb) consider moving `target-specs` into `rustc_codegen_spirv_types`.
// FIXME(eddyb) consider the `RUST_TARGET_PATH` env var alternative.
cargo
Expand Down

0 comments on commit 2d1c3aa

Please sign in to comment.