Skip to content

Commit c41db00

Browse files
committed
difftest: unify num-traits features on cpu to prevent rustc_codegen_spirv.so rebuilds
1 parent 16dd91e commit c41db00

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ in with pkgs; stdenv.mkDerivation rec {
1111
# Allow cargo to download crates (even inside `nix-shell --pure`).
1212
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
1313

14-
nativeBuildInputs = [ rustup ];
14+
nativeBuildInputs = [ rustup spirv-tools ];
1515
buildInputs = [ cargo-nextest ];
1616

1717
# Runtime dependencies (for the example runners).

tests/difftests/tests/Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/difftests/tests/lib/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ use-compiled-tools = [
1313
"spirv-builder/use-compiled-tools"
1414
]
1515

16+
[dependencies]
17+
# DO NOT REMOVE
18+
# These dependencies are needed for feature unification on the cpu target ever since we added `rustc_codegen_spirv` ->
19+
# `naga` dependency, as naga transitively depends on `num-traits` with a different feature set than we do.
20+
spirv-std.workspace = true
21+
glam.workspace = true
22+
1623
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
1724
spirv-builder.workspace = true
1825
difftest-types.workspace = true

0 commit comments

Comments
 (0)