Skip to content

Commit 56ae84b

Browse files
committed
rewrite used-cdylib-macos to rmake
1 parent 42f0b81 commit 56ae84b

File tree

6 files changed

+23
-16
lines changed

6 files changed

+23
-16
lines changed

src/tools/compiletest/src/command-list.rs

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
5353
"ignore-gnu",
5454
"ignore-haiku",
5555
"ignore-horizon",
56+
"ignore-i686-pc-windows-gnu",
5657
"ignore-i686-pc-windows-msvc",
5758
"ignore-illumos",
5859
"ignore-ios",
@@ -174,6 +175,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
174175
"only-bpf",
175176
"only-cdb",
176177
"only-gnu",
178+
"only-i686-pc-windows-gnu",
177179
"only-i686-pc-windows-msvc",
178180
"only-ios",
179181
"only-linux",

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ run-make/translation/Makefile
194194
run-make/type-mismatch-same-crate-name/Makefile
195195
run-make/unstable-flag-required/Makefile
196196
run-make/use-suggestions-rust-2018/Makefile
197-
run-make/used-cdylib-macos/Makefile
198197
run-make/volatile-intrinsics/Makefile
199198
run-make/wasm-exceptions-nostd/Makefile
200199
run-make/wasm-override-linker/Makefile

tests/run-make/raw-dylib-cross-compilation/rmake.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// way that previously failed due to this bug, and checks that it succeeds.
55
// See https://github.com/rust-lang/rust/pull/108355
66

7-
//@ ignore-i686-pc-windows-msvc
7+
//@ ignore-i686-pc-windows-gnu
88
// Reason: dlltool on this distribution is unable to produce x64 binaries
99
//@ needs-dlltool
1010
// Reason: this is the utility being checked by this test
@@ -29,12 +29,12 @@ fn main() {
2929
rustc()
3030
.crate_type("lib")
3131
.crate_name("x64_raw_dylib_test")
32-
.target("x86-64-pc-windows-gnu")
32+
.target("x86_64-pc-windows-gnu")
3333
.input("lib.rs")
3434
.run();
3535
llvm_objdump()
3636
.arg("-a")
37-
.input(rust_lib_name("i686_raw_dylib_test"))
37+
.input(rust_lib_name("x64_raw_dylib_test"))
3838
.run()
3939
.assert_stdout_not_contains("file format coff-i386")
4040
.assert_stdout_contains("file format coff-x86-64");

tests/run-make/textrel-on-minimal-lib/rmake.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// See https://github.com/rust-lang/rust/issues/68794
77

88
//@ ignore-cross-compile
9-
//FIXME(Oneirical): check that it works on more than just only-linux
9+
//@ ignore-windows
10+
// Reason: There is no `bar.dll` produced by CC to run readobj on
1011

1112
use run_make_support::{
1213
cc, dynamic_lib_name, extra_c_flags, extra_cxx_flags, llvm_readobj, rustc, static_lib_name,

tests/run-make/used-cdylib-macos/Makefile

-11
This file was deleted.
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// This checks that `#[used]` passes through to the linker on
2+
// Apple targets. This is subject to change in the future.
3+
// See https://github.com/rust-lang/rust/pull/93718
4+
5+
//@ only-apple
6+
7+
use run_make_support::{dynamic_lib_name, llvm_readobj, rustc};
8+
9+
fn main() {
10+
rustc().opt_level("3").input("dylib_used.rs").run();
11+
llvm_readobj()
12+
.input(dynamic_lib_name("dylib_used"))
13+
.arg("--all")
14+
.run()
15+
.assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
16+
}

0 commit comments

Comments
 (0)