[babl] meson: only use "-Ofast" for optimized builds



commit f221595086f340f397a71bcb62313f5b70d16c2b
Author: Ell <ell_se yahoo com>
Date:   Fri Oct 25 17:03:38 2019 +0300

    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 f0538637f..1ada1a996 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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]