Skip to content

Commit 2a0fdef

Browse files
committed
fix: error message
1 parent e2d2926 commit 2a0fdef

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/bootstrap/src/core/sanity.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,14 @@ than building it.
333333
&& (build.config.optimized_compiler_builtins(*target)
334334
|| build.config.rust_std_features.contains("compiler-builtins-c"))
335335
{
336-
let is_clang = build.cc_tool(*target).is_like_clang();
337-
if !is_clang {
338-
panic!("only clang supports building c code for wasm targets");
336+
let cc_tool = build.cc_tool(*target);
337+
if !cc_tool.is_like_clang() {
338+
panic!(
339+
"Clang is required to build C code for Wasm targets, got `{}` instead\n\
340+
this is because compiler-builtins is configured to build C source. Either \
341+
ensure Clang is used, or adjust this configuration.",
342+
cc_tool.path().display()
343+
);
339344
}
340345
}
341346

0 commit comments

Comments
 (0)