build: enable -ftree-vectorize always, and -mfpu=neon on aarch64
authorØyvind Kolås <pippin@gimp.org>
Fri, 21 Jan 2022 23:06:37 +0000 (00:06 +0100)
committerØyvind Kolås <pippin@gimp.org>
Fri, 21 Jan 2022 23:06:37 +0000 (00:06 +0100)
meson.build

index a69250bcd38203c759301d8600f2e2a9a2cf45bf..8c6eebf56ed304c96c117d0e21b663ac8c9c3272 100644 (file)
@@ -93,8 +93,12 @@ elif host_cpu_family == 'ppc64'
   have_ppc = true
   conf.set10('ARCH_PPC',    true)
   conf.set10('ARCH_PPC64',  true)
+elif host_cpu_family == 'arm'
+  have_arm = true
+  config.set10('ARCH_ARM',  true)
 endif
 
+
 host_os = host_machine.system()
 message('Host os: ' + host_os)
 
@@ -159,7 +163,7 @@ if buildtype == 'debugoptimized' or buildtype == 'release'
   common_c_flags += cc.get_supported_arguments(['-Ofast'])
 endif
 common_c_flags += cc.get_supported_arguments(
-  ['-fno-unsafe-math-optimizations']
+  ['-fno-unsafe-math-optimizations','-ftree-vectorize']
 )
 
 extra_warnings_list = [
@@ -181,6 +185,12 @@ else
   no_undefined = []
 endif
 
+if host_cpu_family == 'arm'
+  arm_neon_flags = cc.get_supported_arguments(['-mfpu=neon'])
+elif host_cpu_family == 'aarch64'
+  common_cflags += cc.get_supported_arguments(['-mfpu=neon'])
+endif
+
 
 ################################################################################
 # Check for compiler CPU extensions