aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <m.hollerbach@partner.samsung.com>2018-09-09 18:42:10 +0200
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-09-11 03:03:30 -0700
commitc68460e2eeee5194cc81f3afdb213c11f11895ee (patch)
tree0eb2e65321da3524ffcc6e19946a0cba5b43ccd9
parentbe1003a8e92718fab4d51ae1de5a3e2ebfa0ff16 (diff)
downloadmeson-c68460e2eeee5194cc81f3afdb213c11f11895ee.zip
meson-c68460e2eeee5194cc81f3afdb213c11f11895ee.tar.gz
meson-c68460e2eeee5194cc81f3afdb213c11f11895ee.tar.bz2
backends: save up the dylib generated names
this saves about 6 sec.
-rw-r--r--mesonbuild/backend/backends.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 5232b65..a6bec06 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -26,6 +26,12 @@ from ..mesonlib import File
from ..compilers import CompilerArgs, get_macos_dylib_install_name
from collections import OrderedDict
import shlex
+from functools import lru_cache
+
+@lru_cache(maxsize=None)
+def get_target_macos_dylib_install_name(ld):
+ return get_macos_dylib_install_name(ld.prefix, ld.name, ld.suffix, ld.soversion)
+
class CleanTrees:
'''
@@ -1006,7 +1012,7 @@ class Backend:
for ld in t.get_all_link_deps():
if ld is t or not isinstance(ld, build.SharedLibrary):
continue
- old = get_macos_dylib_install_name(ld.prefix, ld.name, ld.suffix, ld.soversion)
+ old = get_target_macos_dylib_install_name(ld)
if old in result:
continue
fname = ld.get_filename()