Fix performance regression in build file generation

Re-use any already determined rpaths for a target.

Fixes #9695
pull/7897/head
complexoctonion 3 years ago committed by Eli Schwartz
parent a21c7d54fb
commit 798f5ef178
  1. 3
      mesonbuild/backend/backends.py

@ -748,7 +748,8 @@ class Backend:
raise MesonException(f'Invalid arg for --just-symbols, {dir} is a directory.')
return dirs
def rpaths_for_bundled_shared_libraries(self, target: build.BuildTarget, exclude_system: bool = True) -> T.List[str]:
@lru_cache(maxsize=None)
def rpaths_for_bundled_shared_libraries(self, target: build.BuildTarget, exclude_system: bool = True) -> 'ImmutableListProtocol[str]':
paths: T.List[str] = []
for dep in target.external_deps:
if not isinstance(dep, (dependencies.ExternalLibrary, dependencies.PkgConfigDependency)):

Loading…
Cancel
Save