meson: cache the results of can_compile

the check for which files can be compiled are called again and again on
the same files over and over again. Caching this here shaves off 11s of
the build time of efl (which has grown in the last 3 versions to over 40
sec. again)
pull/6718/head
Marcel Hollerbach 5 years ago committed by Jussi Pakkanen
parent 4524088d38
commit 9e40a0125c
  1. 1
      mesonbuild/compilers/compilers.py

@ -731,6 +731,7 @@ class Compiler:
return repr_str.format(self.__class__.__name__, self.version,
' '.join(self.exelist))
@lru_cache(maxsize=None)
def can_compile(self, src) -> bool:
if hasattr(src, 'fname'):
src = src.fname

Loading…
Cancel
Save