From be1003a8e92718fab4d51ae1de5a3e2ebfa0ff16 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 9 Sep 2018 17:21:58 +0200 Subject: build: try to cache the result of the link deps this safes in the efl meson build about 20 sec. --- mesonbuild/build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 585a8d3fb..e8af2b641 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): -- cgit v1.2.3