Skip to content

Commit 3de4104

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 9dbfc30 commit 3de4104

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
@@ -397,6 +397,16 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
397397
);
398398
}
399399
}
400+
401+
// For testing `wasm32-wasip2`-and-beyond it's required to have
402+
// `wasm-component-ld`. This is enabled by default via `tool_enabled`
403+
// but if it's disabled then double-check it's present on the system.
404+
if target.contains("wasip")
405+
&& !target.contains("wasip1")
406+
&& !build.tool_enabled("wasm-component-ld")
407+
{
408+
cmd_finder.must_have("wasm-component-ld");
409+
}
400410
}
401411

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

0 commit comments

Comments
 (0)