Skip to content

Commit 1b0eb89

Browse files
committed
Add a sanity check to bootstrap for wasm-component-ld
For `wasm32-wasip2`-and-beyond this tool is required, so in case it's disabled in `config.toml` add a sanity-check that it's present in the environment.
1 parent b08d151 commit 1b0eb89

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/bootstrap/src/core/sanity.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,16 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
396396
);
397397
}
398398
}
399+
400+
// For testing `wasm32-wasip2`-and-beyond it's required to have
401+
// `wasm-component-ld`. This is enabled by default via `tool_enabled`
402+
// but if it's disabled then double-check it's present on the system.
403+
if target.contains("wasip")
404+
&& !target.contains("wasip1")
405+
&& !build.tool_enabled("wasm-component-ld")
406+
{
407+
cmd_finder.must_have("wasm-component-ld");
408+
}
399409
}
400410

401411
if let Some(ref s) = build.config.ccache {

0 commit comments

Comments
 (0)