Skip to content

Commit 3f9da14

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

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

Diff for: src/windows/find_tools.rs

+3-36
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,12 @@ 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 {
97-
/// Visual Studio 12 (2013)
98-
Vs12,
9996
/// Visual Studio 14 (2015)
10097
Vs14,
10198
/// Visual Studio 15 (2017)
@@ -117,7 +114,6 @@ pub fn find_vs_version() -> Result<VsVers, String> {
117114
"16.0" => Ok(VsVers::Vs16),
118115
"15.0" => Ok(VsVers::Vs15),
119116
"14.0" => Ok(VsVers::Vs14),
120-
"12.0" => Ok(VsVers::Vs12),
121117
vers => Err(format!(
122118
"\n\n\
123119
unsupported or unknown VisualStudio version: {}\n\
@@ -139,8 +135,6 @@ pub fn find_vs_version() -> Result<VsVers, String> {
139135
Ok(VsVers::Vs15)
140136
} else if impl_::has_msbuild_version("14.0") {
141137
Ok(VsVers::Vs14)
142-
} else if impl_::has_msbuild_version("12.0") {
143-
Ok(VsVers::Vs12)
144138
} else {
145139
Err(format!(
146140
"\n\n\
@@ -695,22 +689,6 @@ mod impl_ {
695689
Some(())
696690
}
697691

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-
714692
fn add_env(tool: &mut Tool, env: &str, paths: Vec<PathBuf>) {
715693
let prev = env::var_os(env).unwrap_or(OsString::new());
716694
let prev = env::split_paths(&prev);
@@ -960,7 +938,7 @@ mod impl_ {
960938
|| find_msbuild_vs15(TargetArch("i686")).is_some()
961939
|| find_msbuild_vs15(TargetArch("aarch64")).is_some()
962940
}
963-
"12.0" | "14.0" => LOCAL_MACHINE
941+
"14.0" => LOCAL_MACHINE
964942
.open(&OsString::from(format!(
965943
"SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}",
966944
version
@@ -1067,18 +1045,7 @@ mod impl_ {
10671045
None
10681046
}
10691047

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-
}
1048+
pub(super) fn has_msbuild_version(_version: &str) -> bool {
1049+
false
10831050
}
10841051
}

0 commit comments

Comments
 (0)