rust/tests/ui/asan-odr-win/asan_odr_windows.rs
Jakob Koschel 61013f040e PassWrapper: disable UseOdrIndicator for Asan Win32
As described here UseOdrIndicator should be disabled on Windows
since link.exe does not support duplicate weak definitions
(https://reviews.llvm.org/D137227).

Co-Authored-By: Bastian Kersting <bkersting@google.com>
2024-11-14 04:20:18 +08:00

19 lines
434 B
Rust

//! Check that crates can be linked together with `-Z sanitizer=address` on msvc.
//! See <https://github.com/rust-lang/rust/issues/124390>.
//@ run-pass
//@ compile-flags:-Zsanitizer=address
//@ aux-build: asan_odr_win-2.rs
//@ only-windows-msvc
extern crate othercrate;
fn main() {
let result = std::panic::catch_unwind(|| {
println!("hello!");
});
assert!(result.is_ok());
othercrate::exposed_func();
}