@ -34,7 +34,8 @@ from pathlib import Path
from unittest import mock
import typing as T
from mesonbuild import compilers
from mesonbuild . compilers . c import CCompiler
from mesonbuild . compilers . detect import detect_c_compiler
from mesonbuild import dependencies
from mesonbuild import mesonlib
from mesonbuild import mesonmain
@ -160,7 +161,7 @@ def get_convincing_fake_env_and_cc(bdir, prefix):
Useful for running compiler checks in the unit tests .
'''
env = get_fake_env ( ' ' , bdir , prefix )
cc = compilers . detect_c_compiler ( env , mesonlib . MachineChoice . HOST )
cc = detect_c_compiler ( env , mesonlib . MachineChoice . HOST )
# Detect machine info
env . machines . host = detect_machine_info ( { ' c ' : cc } )
return ( env , cc )
@ -290,8 +291,8 @@ def run_mtest_inprocess(commandlist: T.List[str]) -> T.Tuple[int, str, str]:
return returncode , stdout . getvalue ( )
def clear_meson_configure_class_caches ( ) - > None :
compilers . CCompiler . find_library_cache = { }
compilers . CCompiler . find_framework_cache = { }
CCompiler . find_library_cache = { }
CCompiler . find_framework_cache = { }
dependencies . PkgConfigDependency . pkgbin_cache = { }
dependencies . PkgConfigDependency . class_pkgbin = mesonlib . PerMachine ( None , None )
mesonlib . project_meson_versions = collections . defaultdict ( str )