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

Detect appropriate HWAES flags for gcc builds #393

Closed
wants to merge 1 commit into from
Closed

Detect appropriate HWAES flags for gcc builds #393

wants to merge 1 commit into from

Conversation

amrox
Copy link

@amrox amrox commented Oct 23, 2019

Fixes: #365

If the compiler was detected as gcc, the CMake scripts would
automatically apply the hardware acceleration flags for x86_64. This
merely checks the CMAKE_SYSTEM_PROCESSOR variable and applies the
appropriate flags for the target system.

Fixes: #365

If the compiler was detected as gcc, the CMake scripts would
automatically apply the hardware acceleration flags for x86_64. This
merely checks the CMAKE_SYSTEM_PROCESSOR variable and applies the
appropriate flags for the target system.
@asoffer
Copy link
Contributor

asoffer commented Oct 23, 2019

Thanks for this, looks good! We have a change that landed internally a few days ago and will be pushed with our next release. I believe that what you have here will be an added improvement on top of that, so once that gets pushed to GitHub, I'll pull this change in as well.

@asoffer asoffer self-assigned this Oct 23, 2019
@lilianmoraru
Copy link

For some reason, "CMAKE_SYSTEM_PROCESSOR" for me is always unset(x86_64 or cross-compiling to ARM with a Toolchain file).

@amrox
Copy link
Author

amrox commented Oct 24, 2019

@lilianmoraru Interesting. It seems to be set when I compile natively on macOS, and it's also set by the Emscripten and arm64 toolchains I use. What toolchain are you using for cross compiling?

@amrox
Copy link
Author

amrox commented Oct 24, 2019

@asoffer Happy to help, and open to feedback. I also noticed that the ABSL_RANDOM_HWAES_X64_FLAGS is set explicitly here too

set(ABSL_RANDOM_RANDEN_COPTS "${ABSL_RANDOM_HWAES_X64_FLAGS}")
so that may need to be updated.

@amrox
Copy link
Author

amrox commented Oct 25, 2019

It looks like a more robust fixed landed in commit 078b89b#diff-34f9b8e4d402381f2a234c311b7fbca6R8

Its working for me, so I'm going to go ahead and close this PR.

@amrox amrox closed this Oct 25, 2019
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.

Abseil fails to compile on ARM with CMake, because it forces x86_64 flags
4 participants