aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/backends.py8
-rw-r--r--test cases/nasm/1 configure file/meson.build6
2 files changed, 13 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:
diff --git a/test cases/nasm/1 configure file/meson.build b/test cases/nasm/1 configure file/meson.build
index e128325..85ecaf1 100644
--- a/test cases/nasm/1 configure file/meson.build
+++ b/test cases/nasm/1 configure file/meson.build
@@ -47,3 +47,9 @@ exe = executable('hello', asm_gen.process('hello.asm'),
)
test('test-nasm-configure-file', exe)
+
+exe2 = executable('hello2', objects : exe.extract_all_objects(),
+ link_args: link_args,
+)
+
+test('test-nasm-extract-all-objects', exe2)