Skip to content

Commit

Permalink
review feedback: add comments and use local flavor variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mfkl committed Aug 13, 2019
1 parent c9da160 commit 1581c43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_codegen_ssa/back/link.rs
Expand Up @@ -159,8 +159,11 @@ pub fn get_linker(sess: &Session, linker: &Path, flavor: LinkerFlavor) -> (PathB
}
};

// UWP apps have API restrictions enforced during Store submissions.
// To comply with the Windows App Certification Kit,
// MSVC needs to link with the Store versions of the runtime libraries (vcruntime, msvcrt, etc).
let t = &sess.target.target;
if t.linker_flavor == LinkerFlavor::Msvc && t.target_vendor == "uwp" {
if flavor == LinkerFlavor::Msvc && t.target_vendor == "uwp" {
if let Some(ref tool) = msvc_tool {
let original_path = tool.path();
if let Some(ref root_lib_path) = original_path.ancestors().skip(4).next() {
Expand Down

0 comments on commit 1581c43

Please sign in to comment.