]> 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 d245b3e98d3193125b83b15fd353983b416190f0..167455af1f2e64815ee0257223ef378e52449b4a 100644 (file)
@@ -861,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)