@@ -377,12 +377,8 @@ fn link_rlib<'a>(
377
377
find_native_static_library ( name. as_str ( ) , lib. verbatim , & lib_search_paths, sess) ;
378
378
if sess. opts . unstable_opts . packed_bundled_libs && flavor == RlibFlavor :: Normal {
379
379
let filename = lib. filename . unwrap ( ) ;
380
- let lib_path = find_native_static_library (
381
- filename. as_str ( ) ,
382
- Some ( true ) ,
383
- & lib_search_paths,
384
- sess,
385
- ) ;
380
+ let lib_path =
381
+ find_native_static_library ( filename. as_str ( ) , true , & lib_search_paths, sess) ;
386
382
let src = read ( lib_path)
387
383
. map_err ( |e| sess. emit_fatal ( errors:: ReadFileError { message : e } ) ) ?;
388
384
let ( data, _) = create_wrapper_file ( sess, b".bundled_lib" . to_vec ( ) , & src) ;
@@ -465,7 +461,7 @@ fn collate_raw_dylibs<'a, 'b>(
465
461
466
462
for lib in used_libraries {
467
463
if lib. kind == NativeLibKind :: RawDylib {
468
- let ext = if matches ! ( lib. verbatim, Some ( true ) ) { "" } else { ".dll" } ;
464
+ let ext = if lib. verbatim { "" } else { ".dll" } ;
469
465
let name = format ! ( "{}{}" , lib. name. expect( "unnamed raw-dylib library" ) , ext) ;
470
466
let imports = dylib_table. entry ( name. clone ( ) ) . or_default ( ) ;
471
467
for import in & lib. dll_imports {
@@ -1335,7 +1331,7 @@ fn print_native_static_libs(sess: &Session, all_native_libs: &[NativeLib]) {
1335
1331
NativeLibKind :: Static { bundle : Some ( false ) , .. }
1336
1332
| NativeLibKind :: Dylib { .. }
1337
1333
| NativeLibKind :: Unspecified => {
1338
- let verbatim = lib. verbatim . unwrap_or ( false ) ;
1334
+ let verbatim = lib. verbatim ;
1339
1335
if sess. target . is_like_msvc {
1340
1336
Some ( format ! ( "{}{}" , name, if verbatim { "" } else { ".lib" } ) )
1341
1337
} else if sess. target . linker_flavor . is_gnu ( ) {
@@ -2306,7 +2302,7 @@ fn add_native_libs_from_crate(
2306
2302
_ => & codegen_results. crate_info . native_libraries [ & cnum] ,
2307
2303
} ;
2308
2304
2309
- let mut last = ( None , NativeLibKind :: Unspecified , None ) ;
2305
+ let mut last = ( None , NativeLibKind :: Unspecified , false ) ;
2310
2306
for lib in native_libs {
2311
2307
let Some ( name) = lib. name else {
2312
2308
continue ;
@@ -2323,7 +2319,7 @@ fn add_native_libs_from_crate(
2323
2319
} ;
2324
2320
2325
2321
let name = name. as_str ( ) ;
2326
- let verbatim = lib. verbatim . unwrap_or ( false ) ;
2322
+ let verbatim = lib. verbatim ;
2327
2323
match lib. kind {
2328
2324
NativeLibKind :: Static { bundle, whole_archive } => {
2329
2325
if link_static {
0 commit comments