3 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -1495,17 +1495,13 @@ fn print_native_static_libs(
1495
1495
match out {
1496
1496
OutFileName :: Real ( path) => {
1497
1497
out. overwrite ( & lib_args. join ( " " ) , sess) ;
1498
- if !lib_args. is_empty ( ) {
1499
- sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifactsToFile { path } ) ;
1500
- }
1498
+ sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifactsToFile { path } ) ;
1501
1499
}
1502
1500
OutFileName :: Stdout => {
1503
- if !lib_args. is_empty ( ) {
1504
- sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifacts ) ;
1505
- // Prefix for greppability
1506
- // Note: This must not be translated as tools are allowed to depend on this exact string.
1507
- sess. dcx ( ) . note ( format ! ( "native-static-libs: {}" , & lib_args. join( " " ) ) ) ;
1508
- }
1501
+ sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifacts ) ;
1502
+ // Prefix for greppability
1503
+ // Note: This must not be translated as tools are allowed to depend on this exact string.
1504
+ sess. dcx ( ) . note ( format ! ( "native-static-libs: {}" , & lib_args. join( " " ) ) ) ;
1509
1505
}
1510
1506
}
1511
1507
}
Original file line number Diff line number Diff line change
1
+ // Test that linking a no_std application still outputs the
2
+ // `native-static-libs: ` note, even though it's empty.
3
+ //@ compile-flags: -Cpanic=abort --print=native-static-libs
4
+ //@ build-pass
5
+ #![ crate_type = "staticlib" ]
6
+ #![ no_std]
7
+
8
+ #[ panic_handler]
9
+ fn panic ( _info : & core:: panic:: PanicInfo ) -> ! {
10
+ loop { }
11
+ }
Original file line number Diff line number Diff line change
1
+ note: Link against the following native artifacts when linking against this static library. The order and any duplication can be significant on some platforms.
2
+
3
+ note: native-static-libs:
4
+
0 commit comments