diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index c2864e189a8a7..03d28e03b7f4e 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -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 diff --git a/tests/run-make/export-executable-symbols/Makefile b/tests/run-make/export-executable-symbols/Makefile deleted file mode 100644 index c4d29aa2bf450..0000000000000 --- a/tests/run-make/export-executable-symbols/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -include ../tools.mk - -# ignore-wasm32 -# ignore-wasm64 -# ignore-none no-std is not supported -# only-linux - -all: - $(RUSTC) -Zexport-executable-symbols main.rs --target $(TARGET) --crate-type=bin - nm $(TMPDIR)/main | $(CGREP) exported_symbol - diff --git a/tests/run-make/export-executable-symbols/rmake.rs b/tests/run-make/export-executable-symbols/rmake.rs new file mode 100644 index 0000000000000..a01380ac917f0 --- /dev/null +++ b/tests/run-make/export-executable-symbols/rmake.rs @@ -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"); +}