File tree 3 files changed +24
-9
lines changed
compiler/rustc_codegen_ssa/src/back
3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -1560,17 +1560,13 @@ fn print_native_static_libs(
1560
1560
match out {
1561
1561
OutFileName :: Real ( path) => {
1562
1562
out. overwrite ( & lib_args. join ( " " ) , sess) ;
1563
- if !lib_args. is_empty ( ) {
1564
- sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifactsToFile { path } ) ;
1565
- }
1563
+ sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifactsToFile { path } ) ;
1566
1564
}
1567
1565
OutFileName :: Stdout => {
1568
- if !lib_args. is_empty ( ) {
1569
- sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifacts ) ;
1570
- // Prefix for greppability
1571
- // Note: This must not be translated as tools are allowed to depend on this exact string.
1572
- sess. dcx ( ) . note ( format ! ( "native-static-libs: {}" , lib_args. join( " " ) ) ) ;
1573
- }
1566
+ sess. dcx ( ) . emit_note ( errors:: StaticLibraryNativeArtifacts ) ;
1567
+ // Prefix for greppability
1568
+ // Note: This must not be translated as tools are allowed to depend on this exact string.
1569
+ sess. dcx ( ) . note ( format ! ( "native-static-libs: {}" , lib_args. join( " " ) ) ) ;
1574
1570
}
1575
1571
}
1576
1572
}
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
+
4
+ //@ compile-flags: -Cpanic=abort --print=native-static-libs
5
+ //@ build-pass
6
+ //@ ignore-windows-msvc libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt`
7
+ //@ ignore-cross-compile doesn't produce any output on i686-unknown-linux-gnu for some reason?
8
+
9
+ #![ crate_type = "staticlib" ]
10
+ #![ no_std]
11
+
12
+ #[ panic_handler]
13
+ fn panic ( _info : & core:: panic:: PanicInfo ) -> ! {
14
+ loop { }
15
+ }
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
+
You can’t perform that action at this time.
0 commit comments