Skip to content

Commit 3e89e6c

Browse files
tuguzTFirestar99
authored andcommitted
Remove env var duplicates, add missing comments
1 parent 53c627b commit 3e89e6c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/spirv-builder/src/cargo_cmd.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ impl CargoCmd {
4343
// which could affect its functionality and break the build process.
4444
cargo.env_remove("RUSTC_WRAPPER");
4545

46-
// overwritten by spirv-builder anyway
47-
cargo.env_remove("CARGO_ENCODED_RUSTFLAGS");
48-
46+
// NOTE(firestar99, tuguzT) Other environment variables that we don't want to
47+
// leak into the inner invocation of Cargo & break the build process.
4948
cargo
50-
.env_remove("RUSTC")
51-
.env_remove("RUSTC_WRAPPER")
5249
.env_remove("RUSTC_WORKSPACE_WRAPPER")
5350
.env_remove("RUSTFLAGS")
5451
.env_remove("CARGO")
5552
.env_remove("RUSTUP_TOOLCHAIN");
5653

57-
// ignore any externally supplied target dir
58-
// spirv-builder: we overwrite it with `SpirvBuilder.target_dir_path` anyway
59-
// cargo-gpu: we want to build it in our cache dir
54+
// NOTE(firestar99) Overwritten by spirv-builder anyway
55+
cargo.env_remove("CARGO_ENCODED_RUSTFLAGS");
56+
57+
// NOTE(firestar99) Ignore any externally supplied target dir:
58+
// - spirv-builder: we overwrite it with `SpirvBuilder.target_dir_path` anyway
59+
// - cargo-gpu: we want to build it in our cache dir
6060
cargo.env_remove("CARGO_TARGET_DIR");
6161

6262
cargo

0 commit comments

Comments
 (0)