aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2018-11-01 16:56:57 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-02 21:40:04 +0200
commitf0e1342fb263fff8b2ec514ebc2a5a178739cd28 (patch)
treec64d05a1fa5700d3954e318f56bfc7e1cb633162 /mesonbuild
parent4fc1ca20b6347190e6f525c85bdf20998ca7bc75 (diff)
downloadmeson-f0e1342fb263fff8b2ec514ebc2a5a178739cd28.zip
meson-f0e1342fb263fff8b2ec514ebc2a5a178739cd28.tar.gz
meson-f0e1342fb263fff8b2ec514ebc2a5a178739cd28.tar.bz2
extract_all_sources: Also include generated object files
Closes #4281.
Diffstat (limited to 'mesonbuild')
-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: