aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 374b7fb..7dc1b83 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -443,7 +443,13 @@ class Backend:
sources.append(File(True, dirpart, fnamepart))
# Filter out headers and all non-source files
- sources = [s for s in sources if self.environment.is_source(s) and not self.environment.is_header(s)]
+ filtered_sources = []
+ for s in sources:
+ if self.environment.is_source(s) and not self.environment.is_header(s):
+ filtered_sources.append(s)
+ elif self.environment.is_object(s):
+ result.append(s.relative_name())
+ sources = filtered_sources
# extobj could contain only objects and no sources
if not sources: