]> git.proxmox.com Git - rustc.git/blobdiff - src/compiletest/util.rs
Imported Upstream version 1.1.0+dfsg1
[rustc.git] / src / compiletest / util.rs
index a8b26cb3ef76835a5fb498ca76a347eabcfee5e8..184d62db45114682d21ffe8303424c89e7f5405e 100644 (file)
@@ -60,6 +60,10 @@ pub fn get_arch(triple: &str) -> &'static str {
     panic!("Cannot determine Architecture from triple");
 }
 
+pub fn get_env(triple: &str) -> Option<&str> {
+    triple.split('-').nth(3)
+}
+
 pub fn make_new_path(path: &str) -> String {
     assert!(cfg!(windows));
     // Windows just uses PATH as the library search path, so we have to