diff options
Diffstat (limited to 'src/bootstrap/util.rs')
| -rw-r--r-- | src/bootstrap/util.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index 2bc6f1939d9..a307ef39d03 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -14,17 +14,16 @@ use std::time::Instant; use build_helper::t; use crate::builder::Builder; -use crate::cache::Interned; -use crate::config::Config; +use crate::config::{Config, TargetSelection}; /// Returns the `name` as the filename of a static library for `target`. -pub fn staticlib(name: &str, target: &str) -> String { +pub fn staticlib(name: &str, target: TargetSelection) -> String { if target.contains("windows") { format!("{}.lib", name) } else { format!("lib{}.a", name) } } /// Given an executable called `name`, return the filename for the /// executable for a particular target. -pub fn exe(name: &str, target: &str) -> String { +pub fn exe(name: &str, target: TargetSelection) -> String { if target.contains("windows") { format!("{}.exe", name) } else { name.to_string() } } @@ -35,7 +34,7 @@ pub fn is_dylib(name: &str) -> bool { /// Returns the corresponding relative library directory that the compiler's /// dylibs will be found in. -pub fn libdir(target: &str) -> &'static str { +pub fn libdir(target: TargetSelection) -> &'static str { if target.contains("windows") { "bin" } else { "lib" } } @@ -294,7 +293,7 @@ pub fn forcing_clang_based_tests() -> bool { } } -pub fn use_host_linker(target: &Interned<String>) -> bool { +pub fn use_host_linker(target: TargetSelection) -> bool { // FIXME: this information should be gotten by checking the linker flavor // of the rustc target !(target.contains("emscripten") |
