2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00

Do not cache Waf tools in configure

This commit is contained in:
Thomas Nagy 2016-03-07 23:38:14 +01:00
parent 3cac9c7077
commit 42622a6e52
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
3 changed files with 10 additions and 8 deletions

View File

@ -9,6 +9,7 @@ NEW IN WAF 1.9
- Change cflags in the beginning / cppflags at the end #1505
- Merge ${FOO}${BAR} flags in commands executed without a shell (no space added)
- Interpret empty command-line defines as integer values #1704
- Waf tools are not cached on "waf configure" by default anymore; pass conf.load(.., cache=True)
* Performance highlights:
- Reduce the key size in bld.task_sigs by adding bld.node_sigs and bld.imp_sigs
@ -27,4 +28,3 @@ NEW IN WAF 1.9
- Modify Utils.run_once so that it accepts a list of *args
- Improve the task consumer in Runner.py

1
TODO
View File

@ -1,7 +1,6 @@
Waf 1.9
-------
* Do not cache waf tool detection
* Fix the vala detection
* Better consistency between check_cfg and check_cc variables
* Let more context commands depend on the configuration

View File

@ -228,7 +228,7 @@ class ConfigurationContext(Context.Context):
tmpenv = self.all_envs[key]
tmpenv.store(os.path.join(self.cachedir.abspath(), key + Build.CACHE_SUFFIX))
def load(self, input, tooldir=None, funs=None, with_sys_path=True):
def load(self, input, tooldir=None, funs=None, with_sys_path=True, cache=False):
"""
Load Waf tools, which will be imported whenever a build is started.
@ -238,6 +238,8 @@ class ConfigurationContext(Context.Context):
:type tooldir: list of string
:param funs: functions to execute from the waf tools
:type funs: list of string
:param cache: whether to prevent the tool from running twice
:type cache: bool
"""
tools = Utils.to_list(input)
@ -246,6 +248,7 @@ class ConfigurationContext(Context.Context):
# avoid loading the same tool more than once with the same functions
# used by composite projects
if cache:
mag = (tool, id(self.env), tooldir, funs)
if mag in self.tool_cache:
self.to_log('(tool %s is already loaded, skipping)' % tool)