about summary refs log tree commit diff
path: root/tests/run-make/used-proc-macro/rmake.rs
blob: 58b2760e64dbb79926c077519f916016535a09cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Test that #[used] statics are included in the final dylib for proc-macros too.

//@ ignore-cross-compile
//@ ignore-windows llvm-readobj --all doesn't show local symbols on Windows
//@ needs-crate-type: proc-macro
//@ ignore-musl (FIXME: can't find `-lunwind`)

use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};

fn main() {
    rustc().input("dep.rs").run();
    rustc().input("proc_macro.rs").run();
    llvm_readobj()
        .input(dynamic_lib_name("proc_macro"))
        .arg("--all")
        .run()
        .assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
}