Rollup merge of #127116 - GuillaumeGomez:run-make-return-non-c-like-enum, r=Kobzol,jieyouxu

Migrate `run-make/return-non-c-like-enum` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@Kobzol`
This commit is contained in:
Guillaume Gomez 2024-06-29 14:07:23 +02:00 committed by GitHub
commit 69f355a74b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 9 deletions

View file

@ -140,7 +140,6 @@ run-make/remap-path-prefix/Makefile
run-make/reproducible-build-2/Makefile
run-make/reproducible-build/Makefile
run-make/return-non-c-like-enum-from-c/Makefile
run-make/return-non-c-like-enum/Makefile
run-make/rlib-chain/Makefile
run-make/rlib-format-packed-bundled-libs-2/Makefile
run-make/rlib-format-packed-bundled-libs-3/Makefile

View file

@ -1,8 +0,0 @@
# ignore-cross-compile
include ../tools.mk
all:
$(RUSTC) --crate-type=staticlib nonclike.rs
$(CC) test.c $(call STATICLIB,nonclike) $(call OUT_EXE,test) \
$(EXTRACFLAGS) $(EXTRACXXFLAGS)
$(call RUN,test)

View file

@ -0,0 +1,18 @@
// Check that we treat enum variants like union members in call ABIs.
// Added in #68443.
// Original issue: #68190.
//@ ignore-cross-compile
use run_make_support::{cc, extra_c_flags, extra_cxx_flags, run, rustc, static_lib_name};
fn main() {
rustc().crate_type("staticlib").input("nonclike.rs").run();
cc().input("test.c")
.arg(&static_lib_name("nonclike"))
.out_exe("test")
.args(&extra_c_flags())
.args(&extra_cxx_flags())
.run();
run("test");
}