Skip to content

Commit 733d670

Browse files
committed
Switch "cl /?" to "cl /help" in MSVC scripts for platform detection
"cl /?" produces a different output if run on a real or a virtual drive (this can be set with a simple subst command), causing an error in the MSVC scripts if building on a virtual drive because the platform to use cannot be detected. "cl /help", on the contrary, produces a consistent output if used on a real or virtual drive. Changing to "/help" allows the compilation to work with a virtual drive as long as the top of the code repository is part of the drive, without impacting the build on real drives. Reported-by: Robert Grange Author: Juan José Santamaría Flecha Discussion: https://postgr.es/m/16825-c4f104bcebc67034@postgresql.org
1 parent b663a41 commit 733d670

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/msvc/Solution.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ sub DeterminePlatform
6262
if ($^O eq "MSWin32")
6363
{
6464
# Examine CL help output to determine if we are in 32 or 64-bit mode.
65-
my $output = `cl /? 2>&1`;
65+
my $output = `cl /help 2>&1`;
6666
$? >> 8 == 0 or die "cl command not found";
6767
$self->{platform} =
6868
($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy