Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(CMake): Fix msvc x86/arm64 detection #404

Merged

Conversation

BurningEnlightenment
Copy link
Collaborator

@BurningEnlightenment BurningEnlightenment commented Jul 2, 2024

Refactor architecture detection logic to allow user overrides via -DBLAKE3_SIMD_TYPE=xxx.

Add special cases for MSVC architecture detection. CMAKE_SYSTEM_PLATFORM is derived incorrectly outside of user supplied toolchain files[1][2].

Furthermore I went ahead and added convenience CMakePresets for MSVC.

Fixes #402

@oconnor663
Copy link
Member

CMAKE_SYSTEM_PLATFORM is derived incorrectly outside of user supplied toolchain files[1][2].

😰

@oconnor663
Copy link
Member

@leochou0729 do you have time to test whether this branch fixes the errors you were seeing?

@BurningEnlightenment
Copy link
Collaborator Author

FTR: I've tested the changes by cross-compiling from amd64 to x86 and arm64.

@oconnor663
Copy link
Member

Thanks for doing so much work to support this build. I feel bad about how little I understand it 😓

@oconnor663 oconnor663 merged commit 524ce1c into BLAKE3-team:master Jul 9, 2024
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to build c code with CMake on Windows
2 participants