Add compile error when both use-compiled-tools and use-installed-tools are enabled (#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
This commit is contained in:
Henno 2020-11-23 01:37:47 -05:00 committed by GitHub
parent 28f604eb77
commit 3888fbe51f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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