diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-06-07 23:46:05 +0300 |
---|---|---|
committer | kcgen <kcgen@users.noreply.github.com> | 2022-06-07 23:48:14 +0300 |
commit | f0fcbc528de21fd2334e955785341d5255358386 (patch) | |
tree | 12eb9a144cc4215d4335fffc62c6f38f0e71ed66 /meson.build | |
parent | 0d3f055261ad0ab6133e7f3e35ff41fa2a727297 (diff) |
Add Meson developer options for narrowing and vectorization
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 15 |
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') |