Skip to content

Commit 3888fbe

Browse files
authored
Add compile error when both use-compiled-tools and use-installed-tools are enabled (EmbarkStudios#269)
* Add compile error when both use-compiled-tools and use-installed-tools are enabled The compile error is located in the build.rs for rustc-codegen-spirv so that the error happens early, rather than after compiling spirv-tools. * lint * lint
1 parent 28f604e commit 3888fbe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

crates/rustc_codegen_spirv/build.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Putting this check here causes compilation failure seconds into the build,
2+
// putting it in lib.rs fails after minutes because spirv-tools gets compiled first.
3+
#[cfg(all(feature = "use-compiled-tools", feature = "use-installed-tools"))]
4+
compile_error!(
5+
"Either \"use-compiled-tools\" (enabled by default) or \"use-installed-tools\" may be enabled."
6+
);
7+
8+
fn main() {}

0 commit comments

Comments
 (0)