#[test]
fn doit() {
+ if
+ // Skip musl which is by default statically linked and doesn't support
+ // dynamic libraries.
+ !cfg!(target_env = "musl")
+ // Skip MinGW on libbacktrace which doesn't have support for DLLs.
+ && !(cfg!(windows) && cfg!(target_env = "gnu") && cfg!(feature = "libbacktrace"))
+ {
+ // TODO(#238) this shouldn't have to happen first in this function, but
+ // currently it does.
+ let mut dir = std::env::current_exe().unwrap();
+ dir.pop();
+ if cfg!(windows) {
+ dir.push("dylib_dep.dll");
+ } else if cfg!(target_os = "macos") {
+ dir.push("libdylib_dep.dylib");
+ } else {
+ dir.push("libdylib_dep.so");
+ }
+ let lib = libloading::Library::new(&dir).unwrap();
+ let api = unsafe { lib.get::<extern "C" fn(Pos, fn(Pos, Pos))>(b"foo").unwrap() };
+ api(pos!(), |a, b| {
+ check!(a, b);
+ });
+ }
+
outer(pos!());
}
}
#[inline(always)]
-#[cfg_attr(feature = "coresymbolication", inline(never))]
#[rustfmt::skip]
fn inner_inlined(main_pos: Pos, outer_pos: Pos) {
check!(main_pos, outer_pos);
check!(main_pos, outer_pos);
#[inline(always)]
- #[cfg_attr(feature = "coresymbolication", inline(never))]
fn inner_further_inlined(main_pos: Pos, outer_pos: Pos, inner_pos: Pos) {
check!(main_pos, outer_pos, inner_pos);
}