rust/tests/run-make/used-cdylib-macos/rmake.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
486 B
Rust
Raw Normal View History

2024-06-19 10:38:22 -05:00
// This checks that `#[used]` passes through to the linker on
// Apple targets. This is subject to change in the future.
// See https://github.com/rust-lang/rust/pull/93718
//@ only-apple
use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};
fn main() {
rustc().opt_level("3").input("dylib_used.rs").run();
llvm_readobj()
.input(dynamic_lib_name("dylib_used"))
.arg("--all")
.run()
.assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
}