Skip to content

Commit

Permalink
rewrite export-executable-symbols to rmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneirical committed Jul 22, 2024
1 parent 639b56c commit 72dff16
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 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 @@ -13,7 +13,6 @@ run-make/dep-info-spaces/Makefile
run-make/dep-info/Makefile
run-make/dump-ice-to-disk/Makefile
run-make/emit-to-stdout/Makefile
run-make/export-executable-symbols/Makefile
run-make/extern-diff-internal-name/Makefile
run-make/extern-flag-disambiguates/Makefile
run-make/extern-fn-reachable/Makefile
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/export-executable-symbols/Makefile

This file was deleted.

18 changes: 18 additions & 0 deletions tests/run-make/export-executable-symbols/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// The unstable flag `-Z export-executable-symbols` exports symbols from executables, as if
// they were dynamic libraries. This test is a simple smoke test to check that this feature
// works by using it in compilation, then checking that the output binary contains the exported
// symbol.
// See https://github.com/rust-lang/rust/pull/85673

//@ ignore-wasm32
//@ ignore-wasm64
//@ ignore-none
// Reason: no-std is not supported
//FIXME(Oneirical): try it on more than only-linux

use run_make_support::{llvm_readobj, rustc};

fn main() {
rustc().arg("-Zexport-executable-symbols").input("main.rs").crate_type("bin").run();
llvm_readobj().symbols().input("main").run().assert_stdout_contains("exported_symbol");
}

0 comments on commit 72dff16

Please sign in to comment.