Skip to content

Commit 445eb08

Browse files
committed
rewrite used-cdylib-macos to rmake
1 parent e64e326 commit 445eb08

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ run-make/translation/Makefile
212212
run-make/type-mismatch-same-crate-name/Makefile
213213
run-make/unstable-flag-required/Makefile
214214
run-make/use-suggestions-rust-2018/Makefile
215-
run-make/used-cdylib-macos/Makefile
216215
run-make/volatile-intrinsics/Makefile
217216
run-make/wasm-exceptions-nostd/Makefile
218217
run-make/wasm-override-linker/Makefile

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("--dt")
14+
.run()
15+
.assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
16+
}

0 commit comments

Comments
 (0)