Skip to content

Commit b2bed0b

Browse files
committed
Drop support for Visual Studio 12 (2013)
1 parent 2c85112 commit b2bed0b

File tree

1 file changed

+6
-34
lines changed

1 file changed

+6
-34
lines changed

src/windows/find_tools.rs

+6-34
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,16 @@ pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
8787
impl_::find_msvc_environment(tool, target)
8888
.or_else(|| impl_::find_msvc_15plus(tool, target))
8989
.or_else(|| impl_::find_msvc_14(tool, target))
90-
.or_else(|| impl_::find_msvc_12(tool, target))
9190
}
9291

9392
/// A version of Visual Studio
9493
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
9594
#[non_exhaustive]
9695
pub enum VsVers {
9796
/// Visual Studio 12 (2013)
97+
#[deprecated(
98+
note = "Visual Studio 12 is no longer supported. cc will never return this value."
99+
)]
98100
Vs12,
99101
/// Visual Studio 14 (2015)
100102
Vs14,
@@ -117,7 +119,6 @@ pub fn find_vs_version() -> Result<VsVers, String> {
117119
"16.0" => Ok(VsVers::Vs16),
118120
"15.0" => Ok(VsVers::Vs15),
119121
"14.0" => Ok(VsVers::Vs14),
120-
"12.0" => Ok(VsVers::Vs12),
121122
vers => Err(format!(
122123
"\n\n\
123124
unsupported or unknown VisualStudio version: {}\n\
@@ -139,8 +140,6 @@ pub fn find_vs_version() -> Result<VsVers, String> {
139140
Ok(VsVers::Vs15)
140141
} else if impl_::has_msbuild_version("14.0") {
141142
Ok(VsVers::Vs14)
142-
} else if impl_::has_msbuild_version("12.0") {
143-
Ok(VsVers::Vs12)
144143
} else {
145144
Err(format!(
146145
"\n\n\
@@ -695,22 +694,6 @@ mod impl_ {
695694
Some(())
696695
}
697696

698-
// For MSVC 12 we need to find the Windows 8.1 SDK.
699-
pub(super) fn find_msvc_12(tool: &str, target: TargetArch<'_>) -> Option<Tool> {
700-
let vcdir = get_vc_dir("12.0")?;
701-
let mut tool = get_tool(tool, &vcdir, target)?;
702-
let sub = lib_subdir(target)?;
703-
let sdk81 = get_sdk81_dir()?;
704-
tool.path.push(sdk81.join("bin").join(sub));
705-
let sdk_lib = sdk81.join("lib").join("winv6.3");
706-
tool.libs.push(sdk_lib.join("um").join(sub));
707-
let sdk_include = sdk81.join("include");
708-
tool.include.push(sdk_include.join("shared"));
709-
tool.include.push(sdk_include.join("um"));
710-
tool.include.push(sdk_include.join("winrt"));
711-
Some(tool.into_tool())
712-
}
713-
714697
fn add_env(tool: &mut Tool, env: &str, paths: Vec<PathBuf>) {
715698
let prev = env::var_os(env).unwrap_or(OsString::new());
716699
let prev = env::split_paths(&prev);
@@ -960,7 +943,7 @@ mod impl_ {
960943
|| find_msbuild_vs15(TargetArch("i686")).is_some()
961944
|| find_msbuild_vs15(TargetArch("aarch64")).is_some()
962945
}
963-
"12.0" | "14.0" => LOCAL_MACHINE
946+
"14.0" => LOCAL_MACHINE
964947
.open(&OsString::from(format!(
965948
"SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}",
966949
version
@@ -1067,18 +1050,7 @@ mod impl_ {
10671050
None
10681051
}
10691052

1070-
// For MSVC 12 we need to find the Windows 8.1 SDK.
1071-
pub(super) fn find_msvc_12(_tool: &str, _target: TargetArch<'_>) -> Option<Tool> {
1072-
None
1073-
}
1074-
1075-
pub(super) fn has_msbuild_version(version: &str) -> bool {
1076-
match version {
1077-
"17.0" => false,
1078-
"16.0" => false,
1079-
"15.0" => false,
1080-
"12.0" | "14.0" => false,
1081-
_ => false,
1082-
}
1053+
pub(super) fn has_msbuild_version(_version: &str) -> bool {
1054+
false
10831055
}
10841056
}

0 commit comments

Comments
 (0)