From 54f5798b83a25bdbf0b8bc51ae2806d01c529efc Mon Sep 17 00:00:00 2001 From: RootHide <134120506+RootHide@users.noreply.github.com> Date: Sun, 7 Jan 2024 08:54:46 +0800 Subject: [PATCH] Update clike.py fix an issue where -isystem parameter could be removed incorrectly --- mesonbuild/compilers/mixins/clike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 76c8e041341c..513780ddd174 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -104,7 +104,7 @@ def to_native(self, copy: bool = False) -> T.List[str]: bad_idx_list += [i, i + 1] elif each.startswith('-isystem=') and self._cached_realpath(each[9:]) in real_default_dirs: bad_idx_list += [i] - elif self._cached_realpath(each[8:]) in real_default_dirs: + elif len(each)>8 and self._cached_realpath(each[8:]) in real_default_dirs: bad_idx_list += [i] for i in reversed(bad_idx_list): new.pop(i)