Skip to content

Commit 1581c43

Browse files
committed
review feedback: add comments and use local flavor variable
1 parent c9da160 commit 1581c43

File tree

1 file changed

+4
-1
lines changed
  • src/librustc_codegen_ssa/back

1 file changed

+4
-1
lines changed

src/librustc_codegen_ssa/back/link.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,11 @@ pub fn get_linker(sess: &Session, linker: &Path, flavor: LinkerFlavor) -> (PathB
159159
}
160160
};
161161

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

0 commit comments

Comments
 (0)