diff options
author | lloyd <[email protected]> | 2014-01-04 13:41:28 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-04 13:41:28 +0000 |
commit | 3a39536532df93f62d26b1f4728a213d3693f1c5 (patch) | |
tree | 11d1dc0a7133b4af93cc7ce783b4b1fa15a4c55b | |
parent | eacd0ec9e948ad92b21b706cd32f527dae983180 (diff) |
Use same cc flag gen func
-rwxr-xr-x | configure.py | 10 |
1 files 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, |