-
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 raw-dylib-custom-dlltool to rmake
- Loading branch information
Showing
3 changed files
with
25 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,25 @@ | ||
// Instead of using the default dlltool, the rust compiler can also accept a custom | ||
// command file with the -C dlltool flag. This test uses it to compile some rust code | ||
// with the raw_dylib Windows-exclusive feature, and checks that the output contains | ||
// the string passed from the custom dlltool, confirming that the default dlltool was | ||
// successfully overridden. | ||
// See https://github.com/rust-lang/rust/pull/109677 | ||
|
||
//@ only-windows | ||
//@ only-gnu | ||
//@ needs-dlltool | ||
// Reason: this test specifically checks the custom dlltool feature, only | ||
// available on Windows-gnu. | ||
|
||
use run_make_support::{diff, rustc}; | ||
|
||
fn main() { | ||
let out = rustc() | ||
.crate_type("lib") | ||
.crate_name("raw_dylib_test") | ||
.input("lib.rs") | ||
.arg("-Cdlltool=script.cmd") | ||
.run() | ||
.stdout_utf8(); | ||
diff().expected_file("output.txt").actual_text("actual_text", out).run(); | ||
} |