about summary refs log tree commit diff
path: root/tests/ui/codegen/empty-static-libs-issue-108825.rs
blob: 4f8e4420f724571df1e0d3089b293768845400af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Test that linking a no_std application still outputs the
//! `native-static-libs: ` note, even though it is empty.

//@ compile-flags: -Cpanic=abort --print=native-static-libs
//@ build-pass
//@ dont-check-compiler-stderr (libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt` on MSVC)
//@ ignore-pass (the note is emitted later in the compilation pipeline, needs build)

#![crate_type = "staticlib"]
#![no_std]

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    loop {}
}

//~? NOTE native-static-libs:
//~? NOTE link against the following native artifacts when linking against this static library