From f221595086f340f397a71bcb62313f5b70d16c2b Mon Sep 17 00:00:00 2001 From: Ell Date: Fri, 25 Oct 2019 17:03:38 +0300 Subject: [PATCH] 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. --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.30.2