Skip to content

gh-123748: Disable HACL SIMD256 on universal builds. #123927

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

Closed
wants to merge 1 commit into from

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742 freakboy3742 commented Sep 11, 2024

The native HACL implementation added in #119316 compiles fine on single architecture x86_64 and ARM64 macOS builds, but failed when compiled on universal2 builds. This is because the autoconf detection is based on the existence of the -mavx2 compiler flag; this flag is legal in universal builds (because the x86_64 compilation path supports the flag), but this then requires symbols that aren't available on ARM64 builds. A standalone ARM64 build disables this feature.

This PR modifies the autoconf check so that if -mavx2 support is detected and the build is universal2, the autoconf feature isn't enabled.

@ned-deily
Copy link
Member

I agree with the subsequent discussion on the issue that using some sort of compile-time #define check would be better than trying to handle this solely in configure.

@freakboy3742
Copy link
Contributor Author

Ok - closing on the basis that a #define approach is preferred; I'll try to get a separate PR up for that.

@freakboy3742 freakboy3742 deleted the universal-hacl branch September 12, 2024 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.14 new features, bugs and security fixes awaiting core review OS-mac
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants