2024-03-27 18:34:16 -05:00
|
|
|
//! Check that non-trivial `repr(C)` enum in Rust has valid C layout.
|
|
|
|
//@ ignore-cross-compile
|
|
|
|
|
2024-06-07 07:10:27 -05:00
|
|
|
use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name};
|
2024-03-27 18:34:16 -05:00
|
|
|
|
|
|
|
pub fn main() {
|
|
|
|
rustc().input("nonclike.rs").crate_type("staticlib").run();
|
|
|
|
cc().input("test.c")
|
2024-06-07 07:10:27 -05:00
|
|
|
.input(static_lib_name("nonclike"))
|
2024-03-27 18:34:16 -05:00
|
|
|
.out_exe("test")
|
2024-06-30 05:40:24 -05:00
|
|
|
.args(extra_c_flags())
|
|
|
|
.args(extra_cxx_flags())
|
2024-03-27 18:34:16 -05:00
|
|
|
.inspect(|cmd| eprintln!("{cmd:?}"))
|
|
|
|
.run();
|
|
|
|
run("test");
|
|
|
|
}
|