mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 05:28:42 +00:00
Fix windows target detection for abi gnullvm
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
ec6f81935c
commit
8e58398f57
1 changed files with 4 additions and 3 deletions
|
@ -220,9 +220,10 @@ mod windows {
|
|||
use guess_host_triple::guess_host_triple;
|
||||
|
||||
pub(super) fn detect_alternative_targets(target: &str) -> Option<String> {
|
||||
target
|
||||
.contains("gnu")
|
||||
.then(|| target.replace("gnu", "msvc"))
|
||||
let (prefix, abi) = target.rsplit_once('-').expect("Invalid target triple");
|
||||
|
||||
// detect abi in ["gnu", "gnullvm", ...]
|
||||
(abi != "msvc").then(|| format!("{prefix}-msvc"))
|
||||
}
|
||||
|
||||
pub(super) fn detect_targets_windows() -> Vec<String> {
|
||||
|
|
Loading…
Add table
Reference in a new issue