From: Ell Date: Fri, 25 Oct 2019 14:03:38 +0000 (+0300) Subject: meson: only use "-Ofast" for optimized builds X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~10^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f221595086f340f397a71bcb62313f5b70d16c2b;p=babl.git meson: only use "-Ofast" for optimized builds Only use "-Ofast" when the build type is either "debugoptimized" or "release", so that unoptimized builds are possible. --- diff --git a/meson.build b/meson.build index f053863..1ada1a9 100644 --- a/meson.build +++ b/meson.build @@ -155,7 +155,8 @@ cc_can_run = not meson.is_cross_build() or meson.has_exe_wrapper() # Compiler arguments common_c_flags = [] -if cc.get_id().startswith('clang') or cc.get_id().startswith('gcc') + +if buildtype == 'debugoptimized' or buildtype == 'release' common_c_flags += cc.get_supported_arguments(['-Ofast']) endif