@@ -101,14 +101,14 @@ pub enum SpirvBuilderError {
101
101
UnsupportedSpirvTargetEnv { target_env : String } ,
102
102
#[ error( "`path_to_crate` must be set" ) ]
103
103
MissingCratePath ,
104
- #[ error( "crate path {0} does not exist" ) ]
104
+ #[ error( "crate path ' {0}' does not exist" ) ]
105
105
CratePathDoesntExist ( PathBuf ) ,
106
106
#[ error(
107
- "Without feature `compile_codegen `, you need to set the path of the codegen dylib using `rustc_codegen_spirv_location(...)`"
107
+ "Without feature `rustc_codegen_spirv `, you need to set the path of the dylib using `rustc_codegen_spirv_location(...)`"
108
108
) ]
109
- MissingCodegenBackendDylib ,
109
+ MissingRustcCodegenSpirvDylib ,
110
110
#[ error( "`rustc_codegen_spirv_location` path '{0}' is not a file" ) ]
111
- CodegenBackendDylibDoesNotExist ( PathBuf ) ,
111
+ RustcCodegenSpirvDylibDoesNotExist ( PathBuf ) ,
112
112
#[ error( "build failed" ) ]
113
113
BuildFailed ,
114
114
#[ error( "multi-module build cannot be used with print_metadata = MetadataPrintout::Full" ) ]
@@ -353,7 +353,7 @@ pub struct SpirvBuilder {
353
353
/// Set additional "codegen arg". Note: the `RUSTGPU_CODEGEN_ARGS` environment variable
354
354
/// takes precedence over any set arguments using this function.
355
355
pub extra_args : Vec < String > ,
356
- // Optional location of a known `rustc_codegen_spirv` dylib
356
+ // Location of a known `rustc_codegen_spirv` dylib, only required without feature `rustc_codegen_spirv`.
357
357
pub rustc_codegen_spirv_location : Option < std:: path:: PathBuf > ,
358
358
359
359
/// The path of the "target specification" file.
@@ -641,7 +641,7 @@ fn dylib_path() -> Vec<PathBuf> {
641
641
}
642
642
643
643
fn find_rustc_codegen_spirv ( ) -> Result < PathBuf , SpirvBuilderError > {
644
- if cfg ! ( feature = "compile_codegen " ) {
644
+ if cfg ! ( feature = "rustc_codegen_spirv " ) {
645
645
let filename = format ! (
646
646
"{}rustc_codegen_spirv{}" ,
647
647
env:: consts:: DLL_PREFIX ,
@@ -655,7 +655,7 @@ fn find_rustc_codegen_spirv() -> Result<PathBuf, SpirvBuilderError> {
655
655
}
656
656
panic ! ( "Could not find {filename} in library path" ) ;
657
657
} else {
658
- Err ( SpirvBuilderError :: MissingCodegenBackendDylib )
658
+ Err ( SpirvBuilderError :: MissingRustcCodegenSpirvDylib )
659
659
}
660
660
}
661
661
@@ -726,7 +726,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
726
726
. transpose ( )
727
727
. unwrap_or_else ( find_rustc_codegen_spirv) ?;
728
728
if !rustc_codegen_spirv. is_file ( ) {
729
- return Err ( SpirvBuilderError :: CodegenBackendDylibDoesNotExist (
729
+ return Err ( SpirvBuilderError :: RustcCodegenSpirvDylibDoesNotExist (
730
730
rustc_codegen_spirv,
731
731
) ) ;
732
732
}
0 commit comments