File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -283,11 +283,15 @@ fn find_rustc_codegen_nvvm() -> PathBuf {
283
283
fn get_new_path_var ( ) -> OsString {
284
284
let split_paths = env:: var_os ( dylib_path_envvar ( ) ) . unwrap_or_default ( ) ;
285
285
let mut paths = env:: split_paths ( & split_paths) . collect :: < Vec < _ > > ( ) ;
286
- let libnvvm_path = find_cuda_helper:: find_cuda_root ( )
287
- . unwrap ( )
288
- . join ( "nvvm" )
289
- . join ( "bin" ) ;
290
- paths. push ( libnvvm_path) ;
286
+ let possible_paths = if cfg ! ( target_os = "windows" ) {
287
+ vec ! [ find_cuda_helper:: find_cuda_root( )
288
+ . unwrap( )
289
+ . join( "nvvm" )
290
+ . join( "bin" ) ]
291
+ } else {
292
+ find_cuda_helper:: find_cuda_lib_dirs ( )
293
+ } ;
294
+ paths. extend ( possible_paths) ;
291
295
env:: join_paths ( & paths) . expect ( "Failed to join paths for PATH" )
292
296
}
293
297
You can’t perform that action at this time.
0 commit comments