File tree 2 files changed +6
-28
lines changed
2 files changed +6
-28
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,13 @@ no-default-features = true
18
18
# that optional dependency, from being automatically created by Cargo, see:
19
19
# https://doc.rust-lang.org/cargo/reference/features.html#optional-dependencies
20
20
[features ]
21
- # See `rustc_codegen_spirv/Cargo.toml` for details on these features.
22
21
default = [" use-compiled-tools" ]
23
- use-installed-tools = [" dep:rustc_codegen_spirv" , " rustc_codegen_spirv?/use-installed-tools" ]
24
- use-compiled-tools = [" dep:rustc_codegen_spirv" , " rustc_codegen_spirv?/use-compiled-tools" ]
22
+ # Compile `rustc_codegen_spirv`, allows constructing SpirvBuilder without
23
+ # explicitly passing in a path to a compiled `rustc_codegen_spirv.so` (or dll)
24
+ compile_codegen = [" dep:rustc_codegen_spirv" ]
25
+ # See `rustc_codegen_spirv/Cargo.toml` for details on these features.
26
+ use-installed-tools = [" compile_codegen" , " rustc_codegen_spirv?/use-installed-tools" ]
27
+ use-compiled-tools = [" compile_codegen" , " rustc_codegen_spirv?/use-compiled-tools" ]
25
28
skip-toolchain-check = [" rustc_codegen_spirv?/skip-toolchain-check" ]
26
29
27
30
watch = [" dep:notify" ]
Original file line number Diff line number Diff line change 72
72
// #![allow()]
73
73
#![ doc = include_str ! ( "../README.md" ) ]
74
74
75
- // HACK(eddyb) try to catch misuse of Cargo package features very early on
76
- // (see `spirv-builder/Cargo.toml` for why we go through all of this).
77
- #[ cfg( all(
78
- not( any( feature = "use-compiled-tools" , feature = "use-installed-tools" ) ) ,
79
- not( doc)
80
- ) ) ]
81
- compile_error ! (
82
- "at least one of `use-compiled-tools` or `use-installed-tools` features must be enabled
83
- (outside of documentation builds, which require disabling both to build on stable)"
84
- ) ;
85
-
86
- #[ cfg( doc) ]
87
- fn _ensure_cfg_doc_means_rustdoc ( ) {
88
- // HACK(eddyb) this relies on specific `rustdoc` behavior (i.e. it skips
89
- // type-checking function bodies, so we trigger a compile-time `panic! from
90
- // a type) to check that we're in fact under `rustdoc`, not just `--cfg doc`.
91
- #[ rustfmt:: skip]
92
- let _: [ ( ) ; panic ! ( "
93
-
94
- `--cfg doc` was set outside of `rustdoc`
95
- (if you are running `rustdoc` or `cargo doc`, please file an issue)
96
-
97
- " ) ] ;
98
- }
99
-
100
75
mod depfile;
101
76
#[ cfg( feature = "watch" ) ]
102
77
mod watch;
You can’t perform that action at this time.
0 commit comments