This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-12
lines changed
tests/run-make/export-executable-symbols Expand file tree Collapse file tree 3 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ run-make/dep-info-spaces/Makefile
1313run-make/dep-info/Makefile
1414run-make/dump-ice-to-disk/Makefile
1515run-make/emit-to-stdout/Makefile
16- run-make/export-executable-symbols/Makefile
1716run-make/extern-diff-internal-name/Makefile
1817run-make/extern-flag-disambiguates/Makefile
1918run-make/extern-fn-reachable/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ // The unstable flag `-Z export-executable-symbols` exports symbols from executables, as if
2+ // they were dynamic libraries. This test is a simple smoke test to check that this feature
3+ // works by using it in compilation, then checking that the output binary contains the exported
4+ // symbol.
5+ // See https://github.com/rust-lang/rust/pull/85673
6+
7+ //@ ignore-wasm32
8+ //@ ignore-wasm64
9+ //@ ignore-none
10+ // Reason: no-std is not supported
11+ //FIXME(Oneirical): try it on more than only-linux
12+
13+ use run_make_support:: { llvm_readobj, rustc} ;
14+
15+ fn main ( ) {
16+ rustc ( ) . arg ( "-Zexport-executable-symbols" ) . input ( "main.rs" ) . crate_type ( "bin" ) . run ( ) ;
17+ llvm_readobj ( ) . symbols ( ) . input ( "main" ) . run ( ) . assert_stdout_contains ( "exported_symbol" ) ;
18+ }
You can’t perform that action at this time.
0 commit comments