-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite export-executable-symbols to rmake
- Loading branch information
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} |