diff --git a/src/windows/find_tools.rs b/src/windows/find_tools.rs index b0061948b..ff42e92a8 100644 --- a/src/windows/find_tools.rs +++ b/src/windows/find_tools.rs @@ -87,7 +87,6 @@ pub fn find_tool(target: &str, tool: &str) -> Option { impl_::find_msvc_environment(tool, target) .or_else(|| impl_::find_msvc_15plus(tool, target)) .or_else(|| impl_::find_msvc_14(tool, target)) - .or_else(|| impl_::find_msvc_12(tool, target)) } /// A version of Visual Studio @@ -95,6 +94,9 @@ pub fn find_tool(target: &str, tool: &str) -> Option { #[non_exhaustive] pub enum VsVers { /// Visual Studio 12 (2013) + #[deprecated( + note = "Visual Studio 12 is no longer supported. cc will never return this value." + )] Vs12, /// Visual Studio 14 (2015) Vs14, @@ -117,7 +119,6 @@ pub fn find_vs_version() -> Result { "16.0" => Ok(VsVers::Vs16), "15.0" => Ok(VsVers::Vs15), "14.0" => Ok(VsVers::Vs14), - "12.0" => Ok(VsVers::Vs12), vers => Err(format!( "\n\n\ unsupported or unknown VisualStudio version: {}\n\ @@ -139,8 +140,6 @@ pub fn find_vs_version() -> Result { Ok(VsVers::Vs15) } else if impl_::has_msbuild_version("14.0") { Ok(VsVers::Vs14) - } else if impl_::has_msbuild_version("12.0") { - Ok(VsVers::Vs12) } else { Err(format!( "\n\n\ @@ -695,22 +694,6 @@ mod impl_ { Some(()) } - // For MSVC 12 we need to find the Windows 8.1 SDK. - pub(super) fn find_msvc_12(tool: &str, target: TargetArch<'_>) -> Option { - let vcdir = get_vc_dir("12.0")?; - let mut tool = get_tool(tool, &vcdir, target)?; - let sub = lib_subdir(target)?; - let sdk81 = get_sdk81_dir()?; - tool.path.push(sdk81.join("bin").join(sub)); - let sdk_lib = sdk81.join("lib").join("winv6.3"); - tool.libs.push(sdk_lib.join("um").join(sub)); - let sdk_include = sdk81.join("include"); - tool.include.push(sdk_include.join("shared")); - tool.include.push(sdk_include.join("um")); - tool.include.push(sdk_include.join("winrt")); - Some(tool.into_tool()) - } - fn add_env(tool: &mut Tool, env: &str, paths: Vec) { let prev = env::var_os(env).unwrap_or(OsString::new()); let prev = env::split_paths(&prev); @@ -960,7 +943,7 @@ mod impl_ { || find_msbuild_vs15(TargetArch("i686")).is_some() || find_msbuild_vs15(TargetArch("aarch64")).is_some() } - "12.0" | "14.0" => LOCAL_MACHINE + "14.0" => LOCAL_MACHINE .open(&OsString::from(format!( "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}", version @@ -1067,18 +1050,7 @@ mod impl_ { None } - // For MSVC 12 we need to find the Windows 8.1 SDK. - pub(super) fn find_msvc_12(_tool: &str, _target: TargetArch<'_>) -> Option { - None - } - - pub(super) fn has_msbuild_version(version: &str) -> bool { - match version { - "17.0" => false, - "16.0" => false, - "15.0" => false, - "12.0" | "14.0" => false, - _ => false, - } + pub(super) fn has_msbuild_version(_version: &str) -> bool { + false } }