]> git.lizzy.rs Git - rust.git/commitdiff
review feedback: add comments and use local flavor variable
authorMartin Finkel <finkel2804@gmail.com>
Tue, 13 Aug 2019 09:11:35 +0000 (11:11 +0200)
committerMartin Finkel <finkel2804@gmail.com>
Tue, 13 Aug 2019 09:11:35 +0000 (11:11 +0200)
src/librustc_codegen_ssa/back/link.rs

index 076283d521ffb3bafb3c8c59377d7dda1d0883e2..3a0d5261d0c8620ed1019be73477e12448d9ca93 100644 (file)
@@ -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() {