ref: 3e0ec4cde1aecac8ded7ac49730d574f89341a4c
parent: 75558f8b2fadb34bda1481dd13c76066b2f979cb
author: Henrik Gramner <gramner@twoorioles.com>
date: Thu May 16 16:55:25 EDT 2019
build: Enable SSE2 by default on x86-32
--- a/meson.build
+++ b/meson.build
@@ -180,16 +180,23 @@
# Compiler flags that should be set
# But when the compiler does not supports them
# it is not an error and silently tolerated
-optional_arguments += [
- '-Wundef',
- '-Werror=vla',
- '-Wno-maybe-uninitialized',
- '-Wno-missing-field-initializers',
- '-Wno-unused-parameter',
- '-Werror=missing-prototypes',
- '-Wshorten-64-to-32',
-]
-if cc.get_id() == 'msvc'
+if cc.get_id() != 'msvc'
+ optional_arguments += [
+ '-Wundef',
+ '-Werror=vla',
+ '-Wno-maybe-uninitialized',
+ '-Wno-missing-field-initializers',
+ '-Wno-unused-parameter',
+ '-Werror=missing-prototypes',
+ '-Wshorten-64-to-32',
+ ]
+ if host_machine.cpu_family() == 'x86'
+ optional_arguments += [
+ '-msse2',
+ '-mfpmath=sse',
+ ]
+ endif
+else
optional_arguments += [
'-wd4028', # parameter different from declaration
'-wd4996' # use of POSIX functions