From 3a39536532df93f62d26b1f4728a213d3693f1c5 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 4 Jan 2014 13:41:28 +0000 Subject: Use same cc flag gen func --- configure.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.py b/configure.py index 5061a4a25..b6ab6e814 100755 --- a/configure.py +++ b/configure.py @@ -841,7 +841,7 @@ class CompilerInfo(object): """ Return the optimization flags to use for the library """ - def library_opt_flags(self, options): + def opt_flags(self, who, options): def gen_flags(): if options.debug_build: yield self.debug_flags @@ -851,6 +851,10 @@ class CompilerInfo(object): if options.no_optimizations: return + if who != 'lib': + yield self.app_opt_flags + return + yield self.lib_opt_flags def submodel_fixup(flags, tup): @@ -1167,8 +1171,8 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'cc': (options.compiler_binary or cc.binary_name) + cc.mach_abi_link_flags(options) + ('' if not options.via_amalgamation else all_isa_specific_flags()), - 'lib_opt': cc.library_opt_flags(options), - 'app_opt': '' if options.no_optimizations else cc.app_opt_flags, + 'lib_opt': cc.opt_flags('lib', options), + 'app_opt': cc.opt_flags('app', options), 'lang_flags': cc.lang_flags, 'warn_flags': warning_flags(cc.warning_flags, cc.maintainer_warning_flags, -- cgit v1.2.3