Google’s crc32c library is pretty small and gives good performing crc32c implementations for arm and intel https://github.com/google/crc32c
It currently builds for Intel (everywhere) and arm on linux. My PR here gets it working for ARM on macOS https://github.com/google/crc32c/pull/43.
However it doesn’t work when using CMAKE_OSX_ARCHITECTURES=“arm64;x86_64” for a few reasons:
- try_compile of the intel or arm intrinsics fails when compiling the other platform so they return false
- if forced to true the arm compiler complains at being sent -msse4.2 for the intel file and the intel compile complains about the equivalent arm thing.
Does anyone have any good ideas of how to make a library like this work well?