File tree Expand file tree Collapse file tree 3 files changed +20
-9
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 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(
14951495 match out {
14961496 OutFileName :: Real ( path) => {
14971497 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 } ) ;
15011499 }
15021500 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( " " ) ) ) ;
15091505 }
15101506 }
15111507}
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+
You can’t perform that action at this time.
0 commit comments