]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/lib.rs
Add a new wasm32-unknown-wasi target
[rust.git] / src / bootstrap / lib.rs
index 0c3daea7a3cd60f44a30d1a20d09d5314267cb56..167455af1f2e64815ee0257223ef378e52449b4a 100644 (file)
@@ -190,6 +190,7 @@ pub unsafe fn setup(_build: &mut crate::Build) {
     "llvm-readobj", // used to get information from ELFs/objects that the other tools don't provide
     "llvm-size", // used to prints the size of the linker sections of a program
     "llvm-strip", // used to discard symbols from binary files to reduce their size
+    "llvm-ar" // used for creating and modifying archive files
 ];
 
 /// A structure representing a Rust compiler.
@@ -860,6 +861,13 @@ fn musl_root(&self, target: Interned<String>) -> Option<&Path> {
             .map(|p| &**p)
     }
 
+    /// Returns the sysroot for the wasi target, if defined
+    fn wasi_root(&self, target: Interned<String>) -> Option<&Path> {
+        self.config.target_config.get(&target)
+            .and_then(|t| t.wasi_root.as_ref())
+            .map(|p| &**p)
+    }
+
     /// Returns `true` if this is a no-std `target`, if defined
     fn no_std(&self, target: Interned<String>) -> Option<bool> {
         self.config.target_config.get(&target)