Fix two new failing tests

The updated wasi-sdk has debuginfo by default so be sure to strip the
debuginfo by default when testing the size of new executables.
This commit is contained in:
Alex Crichton 2024-07-19 10:27:14 -07:00
parent 5b0b4ff03c
commit 006c884480
2 changed files with 15 additions and 2 deletions

View File

@ -13,7 +13,14 @@ fn main() {
fn test(cfg: &str) { fn test(cfg: &str) {
eprintln!("running cfg {cfg:?}"); eprintln!("running cfg {cfg:?}");
rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").opt().cfg(cfg).run(); rustc()
.input("foo.rs")
.target("wasm32-wasip1")
.arg("-Clto")
.arg("-Cstrip=debuginfo")
.opt()
.cfg(cfg)
.run();
let bytes = rfs::read("foo.wasm"); let bytes = rfs::read("foo.wasm");
println!("{}", bytes.len()); println!("{}", bytes.len());

View File

@ -4,7 +4,13 @@
use run_make_support::{rfs, rustc}; use run_make_support::{rfs, rustc};
fn main() { fn main() {
rustc().input("foo.rs").target("wasm32-wasip1").arg("-Clto").opt().run(); rustc()
.input("foo.rs")
.target("wasm32-wasip1")
.arg("-Clto")
.arg("-Cstrip=debuginfo")
.opt()
.run();
let bytes = rfs::read("foo.wasm"); let bytes = rfs::read("foo.wasm");
println!("{}", bytes.len()); println!("{}", bytes.len());