about summary refs log tree commit diff
path: root/tests/ui/linkage-attr/raw-dylib/elf/verbatim.rs
blob: 72cba18d841144a04631f78f598f7ab7b0c06bdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//@ only-elf
//@ needs-dynamic-linking
// FIXME(raw_dylib_elf): Debug the failures on other targets.
//@ only-gnu
//@ only-x86_64

//@ revisions: with without

//@ [without] build-fail
//@ [without] regex-error-pattern:error: linking with `.*` failed
//@ [without] dont-check-compiler-stderr

//@ [with] build-pass

//! Ensures that linking fails when there's an undefined symbol,
//! and that it does succeed with raw-dylib, but with verbatim.

#![feature(raw_dylib_elf)]
#![allow(incomplete_features)]

#[cfg_attr(with, link(name = "rawdylibbutforcats", kind = "raw-dylib", modifiers = "+verbatim"))]
#[cfg_attr(without, link(name = "rawdylibbutforcats", modifiers = "+verbatim"))]
unsafe extern "C" {
  safe fn meooooooooooooooow();
}

fn main() {
  meooooooooooooooow();
}