Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit

Permalink
Add support for HWAES in some CPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
inglor authored and jpakkane committed May 31, 2021
1 parent 46081b7 commit 2374600
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ cpp = meson.get_compiler('cpp')
cpp_flags = [
'-Wno-sign-compare'
]

if host_machine.cpu_family() == 'x86_64'
cpp_flags += [ '-maes', '-msse4.1' ]
elif host_machine.cpu_family() == 'aarch64' and cpp.sizeof('void*') == 8
cpp_flags += [ '-march=armv8-a+crypto' ]
elif host_machine.cpu_family() == 'arm' and cpp.sizeof('void*') == 4
cpp_flags += [ '-mfpu=neon' ]
endif

flags = cpp.get_supported_arguments(cpp_flags)

add_project_arguments(flags, language: 'cpp')
Expand Down

0 comments on commit 2374600

Please sign in to comment.