This is an archive of the discontinued LLVM Phabricator instance.

[Support/BLAKE3] Enable the SIMD implementations for macOS universal builds
ClosedPublic

Authored by akyrtzi on Jun 18 2022, 10:43 PM.

Details

Summary

To accomodate macOS universal configuration include the assembly files
and blake3_neon.c without a CMake check but instead guard their source
with architecture "#ifdef" checks.

Diff Detail

Event Timeline

akyrtzi created this revision.Jun 18 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2022, 10:43 PM
akyrtzi requested review of this revision.Jun 18 2022, 10:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 18 2022, 10:43 PM
akyrtzi updated this revision to Diff 438175.Jun 18 2022, 11:04 PM

Make sure to disable blake3 SIMD for i386 architecture.

mstorsjo accepted this revision.Jun 20 2022, 8:00 AM

This LGTM, it seems to build correctly for me in all my test environments!

This revision is now accepted and ready to land.Jun 20 2022, 8:00 AM

This LGTM, it seems to build correctly for me in all my test environments!

Thank you for testing! 🙇🏻‍♂️

This revision was landed with ongoing or failed builds.Jun 20 2022, 9:19 PM
This revision was automatically updated to reflect the committed changes.

We've just recently updated our version of LLVM (I know we're slow...), and this patch breaks our builds when building LLVM for macOS Universal and with LTO. Specifically, this is the error I get when building for such configuration.

error: archive member blake3_sse2_x86-64_unix.S.o is a MachO, while previous archive member blake3.c.o was an IR LLVM object

Is there anyway to support LTO configurations with this patch? I've added a temporary internal patch on top of our mirror of LLVM that disables the assembly files, but it would be nice if there's a way to have that be supported.