Replies: 6 comments 1 reply
-
Thanks for posting this issue. Closed as duplicate of #9139. |
Beta Was this translation helpful? Give feedback.
-
#9139 doesn't look like a duplicate, it merely allows setting |
Beta Was this translation helpful? Give feedback.
-
vcpkg/toolsrc/src/vcpkg/visualstudio.cpp Line 254 in 644ba5d it is strictly registered, you can't change it, reassign it only attempt
|
Beta Was this translation helpful? Give feedback.
-
try adding an option example msbuild
add VCToolsVersion |
Beta Was this translation helpful? Give feedback.
-
+1 To this feature request. We pin an exact compiler version in our builds to make sure that all devs in our team actually built the same thing. As far as I understand, this is currently not possible with vcpkg. Our own code is always built with the exact toolchain version we specify. But the vcpkg packages are built with whichever version happens to be the most recent on the developers machine. This is rather problematic for us and will probably force us to never run vcpkg on dev machines, but requires us to have a separate build machine that only has the correct msvc toolset version installed. |
Beta Was this translation helpful? Give feedback.
-
I created a PR for this: microsoft/vcpkg-tool#199 |
Beta Was this translation helpful? Give feedback.
-
Triplets may contain
VCPKG_PLATFORM_TOOLSET
to set the compiler toolchain to use, but this option is too coarse as it only allows v140, v141 and v142. In MSBuild or with VSDevCmd I can choose the exact version of the toolchain, e.g. 14.24.28314.There should be a way to set the exact version, either using
VCPKG_PLATFORM_TOOLSET
or another variable.Why is this important? Because AFAICT from the docs static linking of the runtime requires and whole program optimization requires the exact version for all libraries. An application built with a specific toolset may not link against vcpkg packates built with a newer toolchain.
And this is not theoretical, since I just recently had the case where a library built with vcpkg (toolset
14.25.28610
chosen automatically) failed to link with an application using14.24.28314
, as the required__dyn_tls_on_demand_init
symbol is not in the olderlibcmt.lib
.Beta Was this translation helpful? Give feedback.
All reactions