diff options
| author | Jayden Qi <jaydeniqv2@gmail.com> | 2025-07-01 14:12:01 -0700 |
|---|---|---|
| committer | Jayden Qi <jaydeniqv2@gmail.com> | 2025-07-01 14:12:01 -0700 |
| commit | 2a0fdef9260a72ded605ae1d980cad70644f25cb (patch) | |
| tree | fcae133cc6083bb6e4714640525104f95df3c582 /src | |
| parent | e2d2926e6840294fe2e0b1a72d162e8d9facf8ea (diff) | |
| download | rust-2a0fdef9260a72ded605ae1d980cad70644f25cb.tar.gz rust-2a0fdef9260a72ded605ae1d980cad70644f25cb.zip | |
fix: error message
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/src/core/sanity.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index 37b2d782931..295faa25e1c 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -333,9 +333,14 @@ than building it. && (build.config.optimized_compiler_builtins(*target) || build.config.rust_std_features.contains("compiler-builtins-c")) { - let is_clang = build.cc_tool(*target).is_like_clang(); - if !is_clang { - panic!("only clang supports building c code for wasm targets"); + let cc_tool = build.cc_tool(*target); + if !cc_tool.is_like_clang() { + panic!( + "Clang is required to build C code for Wasm targets, got `{}` instead\n\ + this is because compiler-builtins is configured to build C source. Either \ + ensure Clang is used, or adjust this configuration.", + cc_tool.path().display() + ); } } |
