Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-06-07 23:46:05 +0300
committerkcgen <kcgen@users.noreply.github.com>2022-06-07 23:48:14 +0300
commitf0fcbc528de21fd2334e955785341d5255358386 (patch)
tree12eb9a144cc4215d4335fffc62c6f38f0e71ed66 /meson.build
parent0d3f055261ad0ab6133e7f3e35ff41fa2a727297 (diff)
Add Meson developer options for narrowing and vectorization
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build15
1 files changed, 15 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 0e3a3d539..2d373d63e 100644
--- a/meson.build
+++ b/meson.build
@@ -80,6 +80,21 @@ if prefers_static_libs
else
extra_flags += ['-shared-libstdc++', '-shared-libgcc', '-fPIC']
endif
+
+if get_option('narrowing_warnings')
+ extra_flags += ['-Wconversion', '-Wnarrowing']
+endif
+
+if get_option('autovec_info')
+ # At least O2 is needed enable auto-vectorizion
+ extra_flags += ['-march=native',
+ '-O2',
+ '-Wno-system-headers',
+ '-Rpass-analysis=loop-vectorize',
+ '-fopt-info-vec-missed',
+ '-fopt-info-vec']
+endif
+
foreach flag : extra_flags
if cc.has_argument(flag)
add_project_arguments(flag, language : 'c')