1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

View File

@ -237,16 +237,7 @@ fn find_msvc(m64_target bool) ?MsvcResult {
'%ProgramFiles(x86)%'
}
host_arch := if processor_architecture == 'x86' { 'X86' } else { 'X64' }
mut target_arch := 'X64'
if host_arch == 'X86' {
if !m64_target {
target_arch = 'X86'
}
} else if host_arch == 'X64' {
if !m64_target {
target_arch = 'X86'
}
}
target_arch := if !m64_target { 'X86' } else { 'X64' }
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 {
return error('Unable to find visual studio')