docs: Add note for building with MSVC - #262
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Due to Snappy's non-standard microarchitecture detection,
SNAPPY_HAVE_SSSE3,SNAPPY_HAVE_X86_CRC32, andSNAPPY_HAVE_BMI2will always be true on MSVC and therefore cause illegal instructions to be produced. For example,_bzhi_u32insnappy::ExtractLowBytes().Solution
A full solution would be far too invasive and beyond the scope of this PR, so the temporary solution is to update the README's compilation instructions to inform users of this problem. They can solve this issue by setting
SNAPPY_HAVE_SSSE3,SNAPPY_HAVE_X86_CRC32,SNAPPY_HAVE_BMI2,SNAPPY_HAVE_NEON_CRC32, andSNAPPY_HAVE_NEONin their buildsystem while a proper solution is worked on.For instance, a CPU without BMI2 (but with SSSE3 and CRC32) will fail the
BM_UFlatbenchmarks and the following tests: