From 8a5671c01736e5ecbe5c7f5949e2560ab7092a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 18 Sep 2018 14:46:09 +0200 Subject: [PATCH] gnome: use project compiler flags in gtkdoc If add_project_arguments is used, gtkdoc will ignore it, so make sure we pick these flags for the compiler too. Fixes #2901 --- mesonbuild/modules/gnome.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index c07f6f6fd..5128de44b 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -326,7 +326,7 @@ class GnomeModule(ExtensionModule): for dep in deps: if isinstance(dep, InternalDependency): - cflags.update(dep.compile_args) + cflags.update(dep.get_compile_args()) cflags.update(get_include_args(dep.include_directories)) for lib in dep.libraries: if hasattr(lib, 'held_object'): @@ -1018,6 +1018,10 @@ This will become a hard error in the future.''') ldflags.update(state.environment.coredata.get_external_link_args('c')) compiler = state.environment.coredata.compilers.get('c') + compiler_flags = self._get_langs_compilers_flags(state, [('c', compiler)]) + cflags.update(compiler_flags[0]) + ldflags.update(compiler_flags[1]) + ldflags.update(compiler_flags[2]) if compiler: args += ['--cc=%s' % ' '.join(compiler.get_exelist())] args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())]