aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-09-23 06:56:09 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-09-26 23:48:11 +0530
commitf5caf40f661485c3a814907f10ef630129300d57 (patch)
tree04e68434737554a98c543633428c12fa4f4640e3
parentcfbffc6ba1dde802a06ab591d53f74cbb274010b (diff)
downloadmeson-f5caf40f661485c3a814907f10ef630129300d57.zip
meson-f5caf40f661485c3a814907f10ef630129300d57.tar.gz
meson-f5caf40f661485c3a814907f10ef630129300d57.tar.bz2
ninja: Also add generated sources to the source list
The generated sources should also be used for determining the linker
-rw-r--r--mesonbuild/backend/ninjabackend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 8663dfe..71b37cf 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -270,6 +270,7 @@ int dummy;
unity_src = []
unity_deps = [] # Generated sources that must be built before compiling a Unity target.
header_deps += self.get_generated_headers(target)
+ src_list = []
# Get a list of all generated *sources* (sources files, headers,
# objects, etc). Needed to determine the linker.
@@ -318,11 +319,11 @@ int dummy;
# this target. We create the Ninja build file elements for this here
# because we need `header_deps` to be fully generated in the above loop.
for src in generated_source_files:
+ src_list.append(src)
obj_list.append(self.generate_single_compile(target, outfile, src, True,
header_deps=header_deps))
# Generate compilation targets for sources belonging to this target that
# are generated by other rules (this is only used for Vala right now)
- src_list = []
for src in gen_src_deps:
src_list.append(src)
if is_unity: