From 2dc1e87caeeefa5f15f0b8b6454ee65c18012c06 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Sat, 31 Mar 2018 20:53:27 +0200 Subject: Ensure D feature flags get applied to all D files This resolves issue #3337 --- mesonbuild/backend/ninjabackend.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mesonbuild/backend') diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index bfac4c7..2eff796 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2199,6 +2199,11 @@ rule FORTRAN_DEP_HACK # near the end since these are supposed to override everything else. commands += self.escape_extra_args(compiler, target.get_extra_args(compiler.get_language())) + + # D specific additional flags + if compiler.language == 'd': + commands += compiler.get_feature_args(target.d_features, self.build_to_src) + # Add source dir and build dir. Project-specific and target-specific # include paths must override per-target compile args, include paths # from external dependencies, internal dependencies, and from @@ -2292,9 +2297,6 @@ rule FORTRAN_DEP_HACK depelem.write(outfile) commands += compiler.get_module_outdir_args(self.get_target_private_dir(target)) - if compiler.language == 'd': - commands += compiler.get_feature_args(target.d_features, self.build_to_src) - element = NinjaBuildElement(self.all_outputs, rel_obj, compiler_name, rel_src) for d in header_deps: if isinstance(d, File): -- cgit v1.1