aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-09-11 23:03:43 -0400
committerEli Schwartz <eschwartz@archlinux.org>2022-09-19 15:19:00 -0400
commitcc5ef6478ffe871eda6ad90f21d8e9d05613101d (patch)
tree98d5799aeaf2bd5a4bdea0b71d14df06522b62c9 /mesonbuild/backend
parentf6f876481f84867ba4150967c8966dcc29df6358 (diff)
downloadmeson-cc5ef6478ffe871eda6ad90f21d8e9d05613101d.zip
meson-cc5ef6478ffe871eda6ad90f21d8e9d05613101d.tar.gz
meson-cc5ef6478ffe871eda6ad90f21d8e9d05613101d.tar.bz2
compilers: perform targeted imports for detect
Only import the ones we need for the language we are detecting, once we actually detect that language. This will allow finally dropping the main imports of these files in a followup commit.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 89f3763..33f4970 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -37,7 +37,6 @@ from .. import mlog
from .. import compilers
from ..arglist import CompilerArgs
from ..compilers import Compiler
-from ..compilers.c import CCompiler
from ..linkers import ArLinker, AppleArLinker, RSPFileSyntax
from ..mesonlib import (
File, LibType, MachineChoice, MesonException, OrderedSet, PerMachine,
@@ -3042,6 +3041,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
@lru_cache(maxsize=None)
def guess_library_absolute_path(self, linker, libname, search_dirs, patterns) -> Path:
+ from ..compilers.c import CCompiler
for d in search_dirs:
for p in patterns:
trial = CCompiler._get_trials_from_pattern(p, d, libname)