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

Commit 2374600

Browse files
inglorjpakkane
authored andcommitted
Add support for HWAES in some CPUs
Fixes: mesonbuild/wrapdb#90
1 parent 46081b7 commit 2374600

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

meson.build

+9
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ cpp = meson.get_compiler('cpp')
1010
cpp_flags = [
1111
'-Wno-sign-compare'
1212
]
13+
14+
if host_machine.cpu_family() == 'x86_64'
15+
cpp_flags += [ '-maes', '-msse4.1' ]
16+
elif host_machine.cpu_family() == 'aarch64' and cpp.sizeof('void*') == 8
17+
cpp_flags += [ '-march=armv8-a+crypto' ]
18+
elif host_machine.cpu_family() == 'arm' and cpp.sizeof('void*') == 4
19+
cpp_flags += [ '-mfpu=neon' ]
20+
endif
21+
1322
flags = cpp.get_supported_arguments(cpp_flags)
1423

1524
add_project_arguments(flags, language: 'cpp')

0 commit comments

Comments
 (0)