summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-10-07 16:06:00 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-10-29 18:59:30 +0200
commit1ae428cbb3200375d572e1b684241d760d1577a7 (patch)
treec169421b29572d0192129750be3feb80e32a765b /mesonbuild/backend/backends.py
parent10cc5d9ceef64a536c301eb3bdfa3584568aa8dc (diff)
downloadmeson-1ae428cbb3200375d572e1b684241d760d1577a7.tar.gz
environment, backends: remove is_* methods
They are duplicates of what is already in compilers and have no state. Just use compilers. Fixes: #15082 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 19f856b68..5be2ade27 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -24,6 +24,7 @@ from .. import dependencies
from .. import programs
from .. import mesonlib
from .. import mlog
+from .. import compilers
from ..compilers import detect, lang_suffixes
from ..mesonlib import (
File, MachineChoice, MesonException, MesonBugException, OrderedSet,
@@ -812,9 +813,9 @@ class Backend:
# Filter out headers and all non-source files
sources: T.List['FileOrString'] = []
for s in raw_sources:
- if self.environment.is_source(s):
+ if compilers.is_source(s):
sources.append(s)
- elif self.environment.is_object(s):
+ elif compilers.is_object(s):
result.append(s.relative_name())
# MSVC generate an object file for PCH
@@ -1393,7 +1394,7 @@ class Backend:
def get_custom_target_provided_by_generated_source(self, generated_source: build.CustomTarget) -> 'ImmutableListProtocol[str]':
libs: T.List[str] = []
for f in generated_source.get_outputs():
- if self.environment.is_library(f):
+ if compilers.is_library(f):
libs.append(os.path.join(self.get_target_dir(generated_source), f))
return libs