Skip to content

Commit

Permalink
Drop support for Visual Studio 11 (2012) (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaoliello committed Mar 6, 2024
1 parent 328f8d8 commit 9ac1dd8
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions src/windows/find_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
.or_else(|| impl_::find_msvc_15plus(tool, target))
.or_else(|| impl_::find_msvc_14(tool, target))
.or_else(|| impl_::find_msvc_12(tool, target))
.or_else(|| impl_::find_msvc_11(tool, target))
}

/// A version of Visual Studio
Expand Down Expand Up @@ -699,22 +698,6 @@ mod impl_ {
Some(tool.into_tool())
}

// For MSVC 11 we need to find the Windows 8 SDK.
pub(super) fn find_msvc_11(tool: &str, target: TargetArch<'_>) -> Option<Tool> {
let vcdir = get_vc_dir("11.0")?;
let mut tool = get_tool(tool, &vcdir, target)?;
let sub = lib_subdir(target)?;
let sdk8 = get_sdk8_dir()?;
tool.path.push(sdk8.join("bin").join(sub));
let sdk_lib = sdk8.join("lib").join("win8");
tool.libs.push(sdk_lib.join("um").join(sub));
let sdk_include = sdk8.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<PathBuf>) {
let prev = env::var_os(env).unwrap_or(OsString::new());
let prev = env::split_paths(&prev);
Expand Down Expand Up @@ -837,13 +820,6 @@ mod impl_ {
Some(root.into())
}

fn get_sdk8_dir() -> Option<PathBuf> {
let key = r"SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0";
let key = LOCAL_MACHINE.open(key.as_ref()).ok()?;
let root = key.query_str("InstallationFolder").ok()?;
Some(root.into())
}

const PROCESSOR_ARCHITECTURE_INTEL: u16 = 0;
const PROCESSOR_ARCHITECTURE_AMD64: u16 = 9;
const PROCESSOR_ARCHITECTURE_ARM64: u16 = 12;
Expand Down Expand Up @@ -1083,11 +1059,6 @@ mod impl_ {
None
}

// For MSVC 11 we need to find the Windows 8 SDK.
pub(super) fn find_msvc_11(_tool: &str, _target: TargetArch<'_>) -> Option<Tool> {
None
}

pub(super) fn has_msbuild_version(version: &str) -> bool {
match version {
"17.0" => false,
Expand Down

0 comments on commit 9ac1dd8

Please sign in to comment.