Skip to content

Commit 74118d5

Browse files
committed
Eanble debug-info for wasmtime
1 parent 78a4d90 commit 74118d5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bootstrap/src/lib.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -1395,16 +1395,19 @@ impl Build {
13951395
// its caching system since we're executing quite a lot of tests and
13961396
// ideally shouldn't pollute the cache too much.
13971397
if let Some(path) = finder.maybe_have("wasmtime") {
1398-
if let Ok(mut path) = path.into_os_string().into_string() {
1399-
path.push_str(" run -C cache=n --dir .");
1398+
if let Ok(mut cmd) = path.into_os_string().into_string() {
1399+
cmd.push_str(" run -C cache=n --dir .");
14001400
// Make sure that tests have access to RUSTC_BOOTSTRAP. This (for example) is
14011401
// required for libtest to work on beta/stable channels.
14021402
//
14031403
// NB: with Wasmtime 20 this can change to `-S inherit-env` to
14041404
// inherit the entire environment rather than just this single
14051405
// environment variable.
1406-
path.push_str(" --env RUSTC_BOOTSTRAP");
1407-
return Some(path);
1406+
cmd.push_str(" --env RUSTC_BOOTSTRAP");
1407+
// Make sure debug-info is enabled so we can have backtraces with file names and
1408+
// line numbers.
1409+
cmd.push_str(" -D debug-info=y");
1410+
return Some(cmd);
14081411
}
14091412
}
14101413

0 commit comments

Comments
 (0)