File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -418,12 +418,10 @@ pub(crate) fn find_library_file(
418418 manifest_path : & Path ,
419419 build_command_messages : & [ CargoMessage ] ,
420420) -> eyre:: Result < PathBuf > {
421- use std:: env:: consts:: { DLL_EXTENSION , DLL_SUFFIX } ;
421+ use std:: env:: consts:: DLL_EXTENSION ;
422422
423- // cargo sometimes decides to change whether targets are kebab-case or snake_case in metadata,
424- // so normalize away the difference
425- let target_name = manifest. target_name ( ) ?. replace ( '-' , "_" ) ;
426423 let manifest_path = std:: path:: absolute ( manifest_path) ?;
424+ let lib_filename = manifest. lib_filename ( ) ?;
427425
428426 // no hard and fast rule for the lib.so output filename exists, so we implement this routine
429427 // which is essentially a cope for cargo's disinterest in writing down any docs so far.
@@ -448,7 +446,7 @@ pub(crate) fn find_library_file(
448446 . map ( |filename| filename. to_string ( ) )
449447 } )
450448 . ok_or_else ( || {
451- eyre ! ( "Could not get shared object file `{target_name}{DLL_SUFFIX} ` from Cargo output." )
449+ eyre ! ( "Could not get shared object file `{lib_filename} ` from Cargo output." , )
452450 } ) ?;
453451 let library_file_path = PathBuf :: from ( library_file) ;
454452
You can’t perform that action at this time.
0 commit comments