diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 51711c2bf..d33fdc3b0 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -63,17 +63,21 @@ sub DeterminePlatform my $self = shift; if ($^O eq "MSWin32") { # Examine CL help output to determine if we are in 32 or 64-bit mode. my $output = `cl /help 2>&1`; $? >> 8 == 0 or die "cl command not found"; - $self->{platform} = - ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32'; + if ($output =~ m/x64\s/) { $self->{platform} = 'x64'; + } elsif ($output =~ m/x86\s/) { $self->{platform} = 'Win32'; + } elsif ($output =~ m/ARM64\s/) { $self->{platform} = 'ARM64'; + } elsif ($output =~ m/ARM\s/) { $self->{platform} = 'ARM'; + } else { $self->{platform} = 'Unknown' + } } else { $self->{platform} = 'FAKE'; } print "Detected hardware platform: $self->{platform}\n"; return; } @@ -757,14 +757,14 @@ EOF || confess "Could not open pg_config_paths.h"; print $o <