vcpkg
vcpkg copied to clipboard
[snappy] Add feature BMI2 and SSSE3
Fixes #14520 Continuation of #25574
you might want to fix https://github.com/google/snappy/blob/af720f9a3b2c831f173b6074961737516f2d3a46/CMakeLists.txt#L113-L115 instead
you might want to fix https://github.com/google/snappy/blob/af720f9a3b2c831f173b6074961737516f2d3a46/CMakeLists.txt#L113-L115 instead
These variables are used only when SNAPPY_BUILD_TESTS
is enabled, no action needed.
These variables are used only when SNAPPY_BUILD_TESTS is enabled, no action needed.
Ok was wondering why nobody noticed that yet ;)
Also this is a problem for MSVC since it allows compiling intrinsics without the required flags. clang-cl will fail the check_cxx_source_compiles
check without the required flags.
Ping @Osyotr for response. Could you please resolve the conflicts?
I believe this is tagged vcpkg-team-review because we aren't sure if we want to dig the 'features used to control CPU features' hole deeper. We didn't have time to discuss this week but we'll probably do so next week.
Another 'features used to control CPU features' https://github.com/microsoft/vcpkg/pull/29093
If you don't like these options being features, let's disable them by default. Leaving these options enabled breaks binarycaching.
The vcpkg maintainers discussed this on Thursday. We would be happy with the following path forward:
- The BMI2 and SSSE3 behaviors are off by default.
- The port
snappy
looks forSNAPPY_BMI2' and 'SNAPPY_SSSE3' variables to be set before
portfile.cmake` starts running. These variables are intended to be set by the triplet. This goes for all other similar CPU feature tests in the future ('PORTNAME_CPUTHING') and allows a way for progress to be made here.
Note that while we have become less happy with 'half measures' like this over time, we don't expect to make meaningful progress on defining what the 'total matrix of triplet variables to control all the CPU things' is going to look like over time. Moreover, this path does not close the door on introducing a hypothetical VCPKG_BMI2
or similar triplet variable should we choose to add something like that in the future, as a new version of the port could look for either a port-specific setting or a vcpkg-wide setting, if applicable.
We are still in agreement that port features should not be used to control CPU features as there is no way to require that a feature is off.
The port
snappy
looks forSNAPPY_BMI2' and 'SNAPPY_SSSE3' variables to be set before
portfile.cmake` starts running. These variables are intended to be set by the triplet. This goes for all other similar CPU feature tests in the future ('PORTNAME_CPUTHING') and allows a way for progress to be made here.
I don't think it's worth introducing additional variables when we already have VCPKG_CMAKE_CONFIGURE_OPTIONS
.
I've added usage
file with an example.
Tested with the official and my custom triplets.
That resolution is even better, thanks!