[babl] build: enable -ftree-vectorize always, and -mfpu=neon on aarch64
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] build: enable -ftree-vectorize always, and -mfpu=neon on aarch64
- Date: Fri, 21 Jan 2022 23:06:49 +0000 (UTC)
commit e237d2d473e94a83bc4f5f25680a8f08245f35e0
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Jan 22 00:06:37 2022 +0100
build: enable -ftree-vectorize always, and -mfpu=neon on aarch64
meson.build | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index a69250bcd..8c6eebf56 100644
--- a/meson.build
+++ b/meson.build
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]