From 3c6f6f031600dce97d2fd61a51afb17ff7f453ec Mon Sep 17 00:00:00 2001 From: Martin Finkel Date: Wed, 31 Jul 2019 17:15:26 +0700 Subject: [PATCH] Fix tidy checks --- src/librustc_target/spec/aarch64_uwp_windows_msvc.rs | 9 +++++++-- src/librustc_target/spec/i686_uwp_windows_msvc.rs | 11 ++++++++--- src/librustc_target/spec/windows_uwp_msvc_base.rs | 2 +- src/librustc_target/spec/x86_64_uwp_windows_msvc.rs | 11 ++++++++--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/librustc_target/spec/aarch64_uwp_windows_msvc.rs b/src/librustc_target/spec/aarch64_uwp_windows_msvc.rs index cb1e710ed187..9309f287dc71 100644 --- a/src/librustc_target/spec/aarch64_uwp_windows_msvc.rs +++ b/src/librustc_target/spec/aarch64_uwp_windows_msvc.rs @@ -9,9 +9,14 @@ pub fn target() -> TargetResult { // FIXME: this shouldn't be panic=abort, it should be panic=unwind base.panic_strategy = PanicStrategy::Abort; - let lib_root_path = env::var("VCToolsInstallDir").expect("VCToolsInstallDir not found in env"); + let lib_root_path = env::var("VCToolsInstallDir") + .expect("VCToolsInstallDir not found in env"); + base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap() - .push(format!("{}{}{}", "/LIBPATH:".to_string(), lib_root_path, "lib\\arm64\\store".to_string())); + .push(format!("{}{}{}", + "/LIBPATH:".to_string(), + lib_root_path, + "lib\\arm64\\store".to_string())); Ok(Target { llvm_target: "aarch64-pc-windows-msvc".to_string(), diff --git a/src/librustc_target/spec/i686_uwp_windows_msvc.rs b/src/librustc_target/spec/i686_uwp_windows_msvc.rs index d09c9d5d2dbb..d05aee547591 100644 --- a/src/librustc_target/spec/i686_uwp_windows_msvc.rs +++ b/src/librustc_target/spec/i686_uwp_windows_msvc.rs @@ -7,9 +7,14 @@ pub fn target() -> TargetResult { base.max_atomic_width = Some(64); base.has_elf_tls = true; - let lib_root_path = env::var("VCToolsInstallDir").expect("VCToolsInstallDir not found in env"); + let lib_root_path = env::var("VCToolsInstallDir") + .expect("VCToolsInstallDir not found in env"); + base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap() - .push(format!("{}{}{}", "/LIBPATH:".to_string(), lib_root_path, "lib\\x86\\store".to_string())); + .push(format!("{}{}{}", + "/LIBPATH:".to_string(), + lib_root_path, + "lib\\x86\\store".to_string())); Ok(Target { llvm_target: "i686-pc-windows-msvc".to_string(), @@ -24,4 +29,4 @@ pub fn target() -> TargetResult { linker_flavor: LinkerFlavor::Msvc, options: base, }) -} \ No newline at end of file +} diff --git a/src/librustc_target/spec/windows_uwp_msvc_base.rs b/src/librustc_target/spec/windows_uwp_msvc_base.rs index e643513a1a7f..1121916e68f5 100644 --- a/src/librustc_target/spec/windows_uwp_msvc_base.rs +++ b/src/librustc_target/spec/windows_uwp_msvc_base.rs @@ -30,4 +30,4 @@ pub fn opts() -> TargetOptions { .. Default::default() } -} \ No newline at end of file +} diff --git a/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs b/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs index 7d89c73a0e23..174d13327eb1 100644 --- a/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs +++ b/src/librustc_target/spec/x86_64_uwp_windows_msvc.rs @@ -7,9 +7,14 @@ pub fn target() -> TargetResult { base.max_atomic_width = Some(64); base.has_elf_tls = true; - let lib_root_path = env::var("VCToolsInstallDir").expect("VCToolsInstallDir not found in env"); + let lib_root_path = env::var("VCToolsInstallDir") + .expect("VCToolsInstallDir not found in env"); + base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap() - .push(format!("{}{}{}", "/LIBPATH:".to_string(), lib_root_path, "lib\\x64\\store".to_string())); + .push(format!("{}{}{}", + "/LIBPATH:".to_string(), + lib_root_path, + "lib\\x64\\store".to_string())); Ok(Target { llvm_target: "x86_64-pc-windows-msvc".to_string(), @@ -24,4 +29,4 @@ pub fn target() -> TargetResult { linker_flavor: LinkerFlavor::Msvc, options: base, }) -} \ No newline at end of file +}