-
Notifications
You must be signed in to change notification settings - Fork 5
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
5 changed files
with
30 additions
and
17 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 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,25 @@ | ||
// 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 | ||
|
||
//@ only-unix | ||
// Reason: the export-executable-symbols flag only works on Unix | ||
// due to hardcoded platform-specific implementation | ||
// (See #85673) | ||
//@ ignore-wasm32 | ||
//@ ignore-wasm64 | ||
//@ ignore-none | ||
// Reason: no-std is not supported | ||
|
||
use run_make_support::{bin_name, llvm_readobj, rustc}; | ||
|
||
fn main() { | ||
rustc().arg("-Zexport-executable-symbols").input("main.rs").crate_type("bin").run(); | ||
llvm_readobj() | ||
.symbols() | ||
.input(bin_name("main")) | ||
.run() | ||
.assert_stdout_contains("exported_symbol"); | ||
} |
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