Skip to content

Commit

Permalink
tests/run-make: update mte-ffi to use gcc as the c compiler expli…
Browse files Browse the repository at this point in the history
…citly
  • Loading branch information
jieyouxu committed Nov 10, 2024
1 parent 21a4792 commit ce79835
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/run-make/mte-ffi/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// Tests that MTE tags and values stored in the top byte of a pointer (TBI) are
// preserved across FFI boundaries (C <-> Rust).
// This test does not require MTE: whilst the test will use MTE if available, if it is not,
// arbitrary tag bits are set using TBI.
//! Tests that MTE tags and values stored in the top byte of a pointer (TBI) are preserved across
//! FFI boundaries (C <-> Rust). This test does not require MTE: whilst the test will use MTE if
//! available, if it is not, arbitrary tag bits are set using TBI.
// This test is only valid for AArch64.
// The linker must be explicitly specified when cross-compiling, so it is limited to
// `aarch64-unknown-linux-gnu`.
//@ only-aarch64-unknown-linux-gnu
// Reason: this test is only valid for AArch64 with `gcc`. The linker must be explicitly specified
// when cross-compiling, so it is limited to `aarch64-unknown-linux-gnu`.

use run_make_support::{cc, dynamic_lib_name, extra_c_flags, run, rustc, target};
use run_make_support::{dynamic_lib_name, extra_c_flags, gcc, run, rustc, target};

fn main() {
run_test("int");
Expand All @@ -29,7 +27,8 @@ fn run_test(variant: &str) {
.target(target())
.linker("aarch64-linux-gnu-gcc")
.run();
cc().input(format!("bar_{variant}.c"))
gcc()
.input(format!("bar_{variant}.c"))
.input(dynamic_lib_name("foo"))
.out_exe("test")
.args(&flags)
Expand Down

0 comments on commit ce79835

Please sign in to comment.