From 6dc23afaf80f5917f11ccc8ea66f59b10aef98d4 Mon Sep 17 00:00:00 2001 From: Eduard-Mihai Burtescu Date: Tue, 4 Oct 2022 15:19:44 +0300 Subject: [PATCH] Avoid rebuilding rustc_codegen_spirv between example runners. --- Cargo.lock | 2 ++ crates/rustc_codegen_spirv/Cargo.toml | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cce13bf0e0..0ac029327e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2002,8 +2002,10 @@ dependencies = [ "indexmap", "libc", "num-traits", + "once_cell", "pipe", "pretty_assertions", + "regex", "rspirv", "rustc-demangle", "rustc_codegen_spirv-types", diff --git a/crates/rustc_codegen_spirv/Cargo.toml b/crates/rustc_codegen_spirv/Cargo.toml index 0c8694b885..a2317da940 100644 --- a/crates/rustc_codegen_spirv/Cargo.toml +++ b/crates/rustc_codegen_spirv/Cargo.toml @@ -32,14 +32,21 @@ use-compiled-tools = ["spirv-tools/use-compiled-tools"] # Enable this feature to be able to experiment with other versions. skip-toolchain-check = [] +# HACK(eddyb) these are not real "build dependencies", but rather dependencies +# of proc macros, which we want to enable extra features in (without having +# a proc macro crate to do that through), for the same reasons as the list at +# the start of `[dependencies]` (avoiding unnecessary rebuilds). +[build-dependencies] +syn = { version = "1", features = ["extra-traits", "full"] } [dependencies] # HACK(eddyb) these only exist to unify features across dependency trees, # in order to avoid multiple separate instances of `rustc_codegen_spirv`. -hashbrown = { version = "0.11", features = ["default"] } +hashbrown = "0.11" libc = { version = "0.2", features = ["align", "extra_traits"] } num-traits = { version = "0.2", features = ["libm"] } -syn = { version = "1", features = ["visit", "visit-mut"] } +once_cell = "1" +regex = { version = "1", features = ["perf"] } # Normal dependencies. ar = "0.9.0" @@ -50,7 +57,7 @@ rustc-demangle = "0.1.21" sanitize-filename = "0.4" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" -smallvec = "1.6.1" +smallvec = { version = "1.6.1", features = ["union"] } spirv-tools = { version = "0.8", default-features = false } rustc_codegen_spirv-types = { path = "../rustc_codegen_spirv-types", version = "0.4.0-alpha.15" }