From 1ae428cbb3200375d572e1b684241d760d1577a7 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 7 Oct 2025 16:06:00 +0200 Subject: 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 --- mesonbuild/backend/xcodebackend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mesonbuild/backend/xcodebackend.py') diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 7c040a613..87e1309a6 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -8,6 +8,7 @@ import typing as T from . import backends from .. import build +from .. import compilers from .. import mesonlib from .. import mlog from ..arglist import CompilerArgs @@ -1512,7 +1513,7 @@ class XCodeBackend(backends.Backend): phase_dict.add_item('files', file_arr) for s in self.build_targets[name].sources: s = os.path.join(s.subdir, s.fname) - if not self.environment.is_header(s): + if not compilers.is_header(s): file_arr.add_item(self.buildfile_ids[(name, s)], os.path.join(self.environment.get_source_dir(), s)) generator_id = 0 for gt in t.generated: @@ -1661,7 +1662,7 @@ class XCodeBackend(backends.Backend): # Swift can import declarations from C-based code using bridging headers. # There can only be one header, and it must be included as a source file. for i in target.get_sources(): - if self.environment.is_header(i) and is_swift: + if compilers.is_header(i) and is_swift: relh = i.rel_to_builddir(self.build_to_src) bridging_header = os.path.normpath(os.path.join(self.environment.get_build_dir(), relh)) break -- cgit v1.2.3