forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#126880 - Rejyr:migrate-rmake-vw, r=Kobzol
Migrate `volatile-intrinsics`, `weird-output-filenames`, `wasm-override-linker`, `wasm-exceptions-nostd` to `rmake` Also refactors `wasm-abi` and `compressed-debuginfo`. Part of rust-lang#121876. r? `@jieyouxu` try-job: x86_64-gnu-debug try-job: dist-various-2
- Loading branch information
Showing
12 changed files
with
80 additions
and
69 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,18 @@ | ||
//@ ignore-cross-compile | ||
|
||
use run_make_support::fs_wrapper::read; | ||
use run_make_support::{assert_contains, run, rustc}; | ||
|
||
fn main() { | ||
// The tests must pass... | ||
rustc().input("main.rs").run(); | ||
run("main"); | ||
|
||
// ... and the loads/stores must not be optimized out. | ||
rustc().input("main.rs").emit("llvm-ir").run(); | ||
|
||
let raw_llvm_ir = read("main.ll"); | ||
let llvm_ir = String::from_utf8_lossy(&raw_llvm_ir); | ||
assert_contains(&llvm_ir, "load volatile"); | ||
assert_contains(&llvm_ir, "store volatile"); | ||
} |
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 @@ | ||
//@ only-wasm32-bare | ||
|
||
use std::path::Path; | ||
|
||
use run_make_support::{cmd, env_var, rustc}; | ||
|
||
fn main() { | ||
// Add a few command line args to make exceptions work | ||
rustc() | ||
.input(Path::new("src").join("lib.rs")) | ||
.target("wasm32-unknown-unknown") | ||
.panic("unwind") | ||
.arg("-Cllvm-args=-wasm-enable-eh") | ||
.arg("-Ctarget-feature=+exception-handling") | ||
.run(); | ||
|
||
cmd(&env_var("NODE")).arg("verify.mjs").arg("lib.wasm").run(); | ||
} |
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,17 @@ | ||
// How to run this | ||
// $ RUSTBUILD_FORCE_CLANG_BASED_TESTS=1 ./x.py test tests/run-make/wasm-override-linker/ | ||
|
||
//@ needs-force-clang-based-tests | ||
|
||
use run_make_support::{env_var, rustc, target}; | ||
|
||
fn main() { | ||
if matches!(target().as_str(), "wasm32-unknown-unknown" | "wasm64-unknown-unknown") { | ||
rustc() | ||
.input("foo.rs") | ||
.crate_type("cdylib") | ||
.target(&target()) | ||
.linker(&env_var("CLANG")) | ||
.run(); | ||
} | ||
} |
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,19 @@ | ||
use run_make_support::fs_wrapper::copy; | ||
use run_make_support::regex::Regex; | ||
use run_make_support::{cwd, rustc}; | ||
|
||
fn main() { | ||
let invalid_characters = [".foo.rs", ".foo.bar", "+foo+bar.rs"]; | ||
let re = Regex::new(r"invalid character.*in crate name:").unwrap(); | ||
for f in invalid_characters { | ||
copy("foo.rs", f); | ||
let stderr = rustc().input(f).run_fail().stderr_utf8(); | ||
assert!(re.is_match(&stderr)); | ||
} | ||
|
||
copy("foo.rs", "-foo.rs"); | ||
rustc() | ||
.input(cwd().join("-foo.rs")) | ||
.run_fail() | ||
.assert_stderr_contains("crate names cannot start with a `-`"); | ||
} |