about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOneirical <manchot@videotron.ca>2024-06-19 11:38:22 -0400
committerOneirical <manchot@videotron.ca>2024-06-28 16:28:57 -0400
commit4c9eeda36d24e1da8bdf74bd344cd98cb4b98c09 (patch)
tree47f25305b8161aa262e4968a3bf24d2456fbed09
parentec1ed26263b85fcc22eed85cb8836b14275e1e49 (diff)
downloadrust-4c9eeda36d24e1da8bdf74bd344cd98cb4b98c09.tar.gz
rust-4c9eeda36d24e1da8bdf74bd344cd98cb4b98c09.zip
rewrite used-cdylib-macos to rmake
-rw-r--r--src/tools/compiletest/src/command-list.rs2
-rw-r--r--src/tools/tidy/src/allowed_run_make_makefiles.txt1
-rw-r--r--tests/run-make/raw-dylib-cross-compilation/rmake.rs6
-rw-r--r--tests/run-make/textrel-on-minimal-lib/rmake.rs3
-rw-r--r--tests/run-make/used-cdylib-macos/Makefile11
-rw-r--r--tests/run-make/used-cdylib-macos/rmake.rs16
6 files changed, 23 insertions, 16 deletions
diff --git a/src/tools/compiletest/src/command-list.rs b/src/tools/compiletest/src/command-list.rs
index 6e1685a8a94..6735e9faa7a 100644
--- a/src/tools/compiletest/src/command-list.rs
+++ b/src/tools/compiletest/src/command-list.rs
@@ -53,6 +53,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "ignore-gnu",
     "ignore-haiku",
     "ignore-horizon",
+    "ignore-i686-pc-windows-gnu",
     "ignore-i686-pc-windows-msvc",
     "ignore-illumos",
     "ignore-ios",
@@ -174,6 +175,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
     "only-bpf",
     "only-cdb",
     "only-gnu",
+    "only-i686-pc-windows-gnu",
     "only-i686-pc-windows-msvc",
     "only-ios",
     "only-linux",
diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt
index 336d894ac75..73ef7c5ba25 100644
--- a/src/tools/tidy/src/allowed_run_make_makefiles.txt
+++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt
@@ -186,7 +186,6 @@ run-make/track-pgo-dep-info/Makefile
 run-make/translation/Makefile
 run-make/type-mismatch-same-crate-name/Makefile
 run-make/unstable-flag-required/Makefile
-run-make/used-cdylib-macos/Makefile
 run-make/volatile-intrinsics/Makefile
 run-make/wasm-exceptions-nostd/Makefile
 run-make/wasm-override-linker/Makefile
diff --git a/tests/run-make/raw-dylib-cross-compilation/rmake.rs b/tests/run-make/raw-dylib-cross-compilation/rmake.rs
index 994345a197c..3eb55546314 100644
--- a/tests/run-make/raw-dylib-cross-compilation/rmake.rs
+++ b/tests/run-make/raw-dylib-cross-compilation/rmake.rs
@@ -4,7 +4,7 @@
 // way that previously failed due to this bug, and checks that it succeeds.
 // See https://github.com/rust-lang/rust/pull/108355
 
-//@ ignore-i686-pc-windows-msvc
+//@ ignore-i686-pc-windows-gnu
 // Reason: dlltool on this distribution is unable to produce x64 binaries
 //@ needs-dlltool
 // Reason: this is the utility being checked by this test
@@ -29,12 +29,12 @@ fn main() {
     rustc()
         .crate_type("lib")
         .crate_name("x64_raw_dylib_test")
-        .target("x86-64-pc-windows-gnu")
+        .target("x86_64-pc-windows-gnu")
         .input("lib.rs")
         .run();
     llvm_objdump()
         .arg("-a")
-        .input(rust_lib_name("i686_raw_dylib_test"))
+        .input(rust_lib_name("x64_raw_dylib_test"))
         .run()
         .assert_stdout_not_contains("file format coff-i386")
         .assert_stdout_contains("file format coff-x86-64");
diff --git a/tests/run-make/textrel-on-minimal-lib/rmake.rs b/tests/run-make/textrel-on-minimal-lib/rmake.rs
index 4c272955915..eba664479f1 100644
--- a/tests/run-make/textrel-on-minimal-lib/rmake.rs
+++ b/tests/run-make/textrel-on-minimal-lib/rmake.rs
@@ -6,7 +6,8 @@
 // See https://github.com/rust-lang/rust/issues/68794
 
 //@ ignore-cross-compile
-//FIXME(Oneirical): check that it works on more than just only-linux
+//@ ignore-windows
+// Reason: There is no `bar.dll` produced by CC to run readobj on
 
 use run_make_support::{
     cc, dynamic_lib_name, extra_c_flags, extra_cxx_flags, llvm_readobj, rustc, static_lib_name,
diff --git a/tests/run-make/used-cdylib-macos/Makefile b/tests/run-make/used-cdylib-macos/Makefile
deleted file mode 100644
index bdf914a1ca9..00000000000
--- a/tests/run-make/used-cdylib-macos/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-include ../tools.mk
-
-# only-apple
-#
-# This checks that `#[used]` passes through to the linker on
-# Apple targets. This is subject to change in the future, see
-# https://github.com/rust-lang/rust/pull/93718 for discussion
-
-all:
-	$(RUSTC) -Copt-level=3 dylib_used.rs
-	nm $(TMPDIR)/libdylib_used.dylib | $(CGREP) VERY_IMPORTANT_SYMBOL
diff --git a/tests/run-make/used-cdylib-macos/rmake.rs b/tests/run-make/used-cdylib-macos/rmake.rs
new file mode 100644
index 00000000000..ad95ad640f0
--- /dev/null
+++ b/tests/run-make/used-cdylib-macos/rmake.rs
@@ -0,0 +1,16 @@
+// This checks that `#[used]` passes through to the linker on
+// Apple targets. This is subject to change in the future.
+// See https://github.com/rust-lang/rust/pull/93718
+
+//@ only-apple
+
+use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};
+
+fn main() {
+    rustc().opt_level("3").input("dylib_used.rs").run();
+    llvm_readobj()
+        .input(dynamic_lib_name("dylib_used"))
+        .arg("--all")
+        .run()
+        .assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
+}