about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2025-08-26 11:34:12 -0700
committerAlex Crichton <alex@alexcrichton.com>2025-08-28 15:07:15 -0700
commitaa27cca79e7888deff3bafed84ea16a5a89cb7c7 (patch)
tree137db59ef135891f30fdcfea1e42b3848353a8de /src
parent35d55b34bffd51384ac430cc20852b7d16dd5a90 (diff)
downloadrust-aa27cca79e7888deff3bafed84ea16a5a89cb7c7.tar.gz
rust-aa27cca79e7888deff3bafed84ea16a5a89cb7c7.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/sanity.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs
index 099ec488397..04cf63f1c6d 100644
--- a/src/bootstrap/src/core/sanity.rs
+++ b/src/bootstrap/src/core/sanity.rs
@@ -397,6 +397,16 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
                 );
             }
         }
+
+        // For testing `wasm32-wasip2`-and-beyond it's required to have
+        // `wasm-component-ld`. This is enabled by default via `tool_enabled`
+        // but if it's disabled then double-check it's present on the system.
+        if target.contains("wasip")
+            && !target.contains("wasip1")
+            && !build.tool_enabled("wasm-component-ld")
+        {
+            cmd_finder.must_have("wasm-component-ld");
+        }
     }
 
     if let Some(ref s) = build.config.ccache {