Skip to content

Commit

Permalink
rewrite used-cdylib-macos to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jun 19, 2024
1 parent e64e326 commit 445eb08
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ run-make/translation/Makefile
run-make/type-mismatch-same-crate-name/Makefile
run-make/unstable-flag-required/Makefile
run-make/use-suggestions-rust-2018/Makefile
run-make/used-cdylib-macos/Makefile
run-make/volatile-intrinsics/Makefile
run-make/wasm-exceptions-nostd/Makefile
run-make/wasm-override-linker/Makefile
Expand Down
3 changes: 2 additions & 1 deletion tests/run-make/textrel-on-minimal-lib/rmake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/used-cdylib-macos/Makefile

This file was deleted.

16 changes: 16 additions & 0 deletions tests/run-make/used-cdylib-macos/rmake.rs
Original file line number Diff line number Diff line change
@@ -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("--dt")
.run()
.assert_stdout_contains("VERY_IMPORTANT_SYMBOL");
}

0 comments on commit 445eb08

Please sign in to comment.