v.builder: simplify target architecture logic for msvc ()

pull/11487/head^2 weekly.2021.37
Ekopalypse 2021-09-14 16:47:26 +02:00 committed by GitHub
parent 0c0e28df6e
commit 41fc4c55c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 10 deletions
vlib/v/builder

View File

@ -237,16 +237,7 @@ fn find_msvc(m64_target bool) ?MsvcResult {
'%ProgramFiles(x86)%' '%ProgramFiles(x86)%'
} }
host_arch := if processor_architecture == 'x86' { 'X86' } else { 'X64' } host_arch := if processor_architecture == 'x86' { 'X86' } else { 'X64' }
mut target_arch := 'X64' target_arch := if !m64_target { 'X86' } else { 'X64' }
if host_arch == 'X86' {
if !m64_target {
target_arch = 'X86'
}
} else if host_arch == 'X64' {
if !m64_target {
target_arch = 'X86'
}
}
wk := find_windows_kit_root(target_arch) or { return error('Unable to find windows sdk') } wk := find_windows_kit_root(target_arch) or { return error('Unable to find windows sdk') }
vs := find_vs(vswhere_dir, host_arch, target_arch) or { vs := find_vs(vswhere_dir, host_arch, target_arch) or {
return error('Unable to find visual studio') return error('Unable to find visual studio')