BUG #16825: When building on Windows, cl /? retrun 'x64' not AMD64 and the build does not create x64 environment

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: robionekenobi(at)bluewin(dot)ch
Subject: BUG #16825: When building on Windows, cl /? retrun 'x64' not AMD64 and the build does not create x64 environment
Date: 2021-01-15 07:48:31
Message-ID: 16825-c4f104bcebc67034@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16825
Logged by: Robert Grange
Email address: robionekenobi(at)bluewin(dot)ch
PostgreSQL version: 13.1
Operating system: Windows
Description:

Hi,

in src\tools\msvc\Solution.pm the following test is not sufficient
$self->{platform} =
($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
because the cl /? returns:
Microsoft (R) C/C++ Optimizing Compiler Version 19.28.29336 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

better to check like this ?
$self->{platform} =
($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : ($output =~ /.x64$/m) ?
'x64' : 'Win32';

Regards
Robert

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2021-01-15 08:00:31 Re: pg_upgrade test for binary compatibility of core data types
Previous Message Amit Kapila 2021-01-15 03:59:14 Re: BUG #16812: Logical decoding error