[Feature] Default to x64-windows triplet on x64 Windows #17254
Replies: 12 comments 5 replies
-
Duplicated to issue #1254 Related PR #11610 |
Beta Was this translation helpful? Give feedback.
-
if I have commit permission, I will change vcpkg/toolsrc/src/vcpkg/triplet.cpp Lines 99 to 100 in 22c8e3a to #if defined(_WIN64)
return Triplet::X64_WINDOWS;
#elif defined(_WIN32)
return Triplet::X86_WINDOWS; right now and force push it... See how many thumb ups in #1254 |
Beta Was this translation helpful? Give feedback.
-
@cloudhan This is wrong, See my implementation recommendation above instead. |
Beta Was this translation helpful? Give feedback.
-
@VelocityRa Good point, and seems the bootstrap script indeed build 32bit version of vcpkg.exe on a 64bit platform. Another feature request, here you go. |
Beta Was this translation helpful? Give feedback.
-
This has just caught me out on a fresh install (again). 64-bit by default on 64-bit machines seems like a sensible choice. |
Beta Was this translation helpful? Give feedback.
-
Why was the issue closed? A note in the README it is not a fix to the actual problem. |
Beta Was this translation helpful? Give feedback.
-
The strangest thing in my experience:
|
Beta Was this translation helpful? Give feedback.
-
FTR From a MSYS2/Ming-w64 point of view they dropped supporting 32-bit hosts over a year ago - however their toolchains are available for both 32-bit and 64-bit targets. Obviously, due to Windows-On-Windows64 a 32-bit product compiled by that toolchain should run (with the inherit limitations that that number of bits imposes) on both architectures whereas a 64-bit one won't... |
Beta Was this translation helpful? Give feedback.
-
This is the second most impressive x86 default configuration I have ever come across. And the 1st place belongs to Microsoft Office. Compatibility hurts. |
Beta Was this translation helpful? Give feedback.
-
Bumping this to state that in September we will be changing the default triplet to a detected host system triplet (which on x64 devices will be x64). For now, there is a warning message so users can prepare in case their scripts are calling vcpkg and are assuming the current default. More details: https://devblogs.microsoft.com/cppblog/vcpkg-2023-02-24-release-default-triplet-changes-risc-v-support-bug-fixes-and-more/ |
Beta Was this translation helpful? Give feedback.
-
The default has been changed since version 2023-10-19. |
Beta Was this translation helpful? Give feedback.
-
Most people don't use 32-bit builds these days, so we have to always specify the triplet which is cumbersome, or set the env-var which is not elegant.
Implementation
Instead of this:
vcpkg/toolsrc/src/vcpkg/triplet.cpp
Line 100 in 22c8e3a
there should be a check to see if the host is 64-bit and use the
x64-windows
triplet if so.IsWow64Process
orIsWow64Process2
can be used for this (will work even if vcpkg is compiled as 32-bit).Beta Was this translation helpful? Give feedback.
All reactions