Skip to content

Commit ca0ecc2

Browse files
committed
spirv-builder: add RUSTGPU_CARGOFLAGS, as a Cargo counterpart to RUSTGPU_RUSTFLAGS (for rustc).
1 parent 561d2eb commit ca0ecc2

File tree

1 file changed

+4
-0
lines changed
  • crates/spirv-builder/src

1 file changed

+4
-0
lines changed

crates/spirv-builder/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,10 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
805805
profile,
806806
]);
807807

808+
if let Ok(extra_cargoflags) = tracked_env_var_get("RUSTGPU_CARGOFLAGS") {
809+
cargo.args(extra_cargoflags.split_whitespace());
810+
}
811+
808812
// FIXME(eddyb) consider moving `target-specs` into `rustc_codegen_spirv_types`.
809813
// FIXME(eddyb) consider the `RUST_TARGET_PATH` env var alternative.
810814
cargo

0 commit comments

Comments
 (0)