Skip to content

Commit

Permalink
Port argument-non-c-like-enum to Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyouxu committed Apr 1, 2024
1 parent 142d02d commit fd7bc59
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/run-make/arguments-non-c-like-enum/Makefile

This file was deleted.

20 changes: 20 additions & 0 deletions tests/run-make/arguments-non-c-like-enum/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//! Check that non-trivial `repr(C)` enum in Rust has valid C layout.
//@ ignore-cross-compile

extern crate run_make_support;

use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib};

pub fn main() {
use std::path::Path;

rustc().input("nonclike.rs").crate_type("staticlib").run();
cc().input("test.c")
.input(static_lib("nonclike"))
.out_exe("test")
.args(&extra_c_flags())
.args(&extra_cxx_flags())
.inspect(|cmd| eprintln!("{cmd:?}"))
.run();
run("test");
}

0 comments on commit fd7bc59

Please sign in to comment.