File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -753,10 +753,14 @@ fn dylib_path_envvar() -> &'static str {
753
753
}
754
754
}
755
755
fn dylib_path ( ) -> Vec < PathBuf > {
756
- match env:: var_os ( dylib_path_envvar ( ) ) {
756
+ let mut dylibs = match env:: var_os ( dylib_path_envvar ( ) ) {
757
757
Some ( var) => env:: split_paths ( & var) . collect ( ) ,
758
758
None => Vec :: new ( ) ,
759
+ } ;
760
+ if let Ok ( dir) = env:: current_dir ( ) {
761
+ dylibs. push ( dir) ;
759
762
}
763
+ dylibs
760
764
}
761
765
762
766
fn find_rustc_codegen_spirv ( ) -> Result < PathBuf , SpirvBuilderError > {
@@ -766,7 +770,8 @@ fn find_rustc_codegen_spirv() -> Result<PathBuf, SpirvBuilderError> {
766
770
env:: consts:: DLL_PREFIX ,
767
771
env:: consts:: DLL_SUFFIX
768
772
) ;
769
- for mut path in dylib_path ( ) {
773
+ let dylib_paths = dylib_path ( ) ;
774
+ for mut path in dylib_paths {
770
775
path. push ( & filename) ;
771
776
if path. is_file ( ) {
772
777
return Ok ( path) ;
You can’t perform that action at this time.
0 commit comments