From e2836e702c9573290dd7676b99c81c92e7030b6c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sun, 16 Oct 2016 12:55:05 -0700 Subject: [PATCH] Add support for i586 msvc Closes #108 --- src/windows_registry.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/windows_registry.rs b/src/windows_registry.rs index c2d3a53..b2c719d 100644 --- a/src/windows_registry.rs +++ b/src/windows_registry.rs @@ -314,7 +314,9 @@ pub fn find_tool(target: &str, tool: &str) -> Option { fn bin_subdir(target: &str) -> Vec<(&'static str, &'static str)> { let arch = target.split('-').next().unwrap(); match (arch, host_arch()) { + ("i586", X86) | ("i686", X86) => vec![("", "")], + ("i586", X86_64) | ("i686", X86_64) => vec![("amd64_x86", "amd64"), ("", "")], ("x86_64", X86) => vec![("x86_amd64", "")], ("x86_64", X86_64) => vec![("amd64", "amd64"), ("x86_amd64", "")], @@ -327,7 +329,7 @@ pub fn find_tool(target: &str, tool: &str) -> Option { fn lib_subdir(target: &str) -> Option<&'static str> { let arch = target.split('-').next().unwrap(); match arch { - "i686" => Some("x86"), + "i586" | "i686" => Some("x86"), "x86_64" => Some("x64"), "arm" => Some("arm"), _ => None, @@ -338,7 +340,7 @@ pub fn find_tool(target: &str, tool: &str) -> Option { fn vc_lib_subdir(target: &str) -> Option<&'static str> { let arch = target.split('-').next().unwrap(); match arch { - "i686" => Some(""), + "i586" | "i686" => Some(""), "x86_64" => Some("amd64"), "arm" => Some("arm"), _ => None,