diff options
author | Marcel Hollerbach <m.hollerbach@partner.samsung.com> | 2018-09-09 17:21:58 +0200 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-09-11 03:03:30 -0700 |
commit | be1003a8e92718fab4d51ae1de5a3e2ebfa0ff16 (patch) | |
tree | b3c4fac099bb780778218d609493614681ba5fa7 | |
parent | c486670e5621776d54f798808a70f6333be5ef4c (diff) | |
download | meson-be1003a8e92718fab4d51ae1de5a3e2ebfa0ff16.zip meson-be1003a8e92718fab4d51ae1de5a3e2ebfa0ff16.tar.gz meson-be1003a8e92718fab4d51ae1de5a3e2ebfa0ff16.tar.bz2 |
build: try to cache the result of the link deps
this safes in the efl meson build about 20 sec.
-rw-r--r-- | mesonbuild/build.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 585a8d3..e8af2b6 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -16,6 +16,7 @@ import copy, os, re from collections import OrderedDict import itertools, pathlib import pickle +from functools import lru_cache from . import environment from . import dependencies @@ -668,6 +669,7 @@ class BuildTarget(Target): def get_all_link_deps(self): return self.get_transitive_link_deps() + @lru_cache(maxsize=None) def get_transitive_link_deps(self): result = [] for i in self.link_targets: @@ -950,6 +952,7 @@ You probably should put it in link_with instead.''') raise InvalidArguments('Tried to mix cross built and native libraries in target {!r}'.format(self.name)) self.link_targets.append(t) + def link_whole(self, target): for t in listify(target, unholder=True): if not isinstance(t, StaticLibrary): |