diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py index e05561664..ef74d6391 100644 --- a/mesonbuild/modules/pkgconfig.py +++ b/mesonbuild/modules/pkgconfig.py @@ -349,7 +349,7 @@ class PkgConfigModule(ExtensionModule): if dversions: compiler = state.environment.coredata.compilers.get('d') if compiler: - deps.add_cflags(compiler.get_feature_args({'versions': dversions})) + deps.add_cflags(compiler.get_feature_args({'versions': dversions}, None)) def parse_variable_list(stringlist): reserved = ['prefix', 'libdir', 'includedir'] diff --git a/test cases/d/3 shared library/meson.build b/test cases/d/3 shared library/meson.build index 78ad76635..461624248 100644 --- a/test cases/d/3 shared library/meson.build +++ b/test cases/d/3 shared library/meson.build @@ -10,3 +10,12 @@ endif ldyn = shared_library('stuff', 'libstuff.d', install : true) ed = executable('app_d', 'app.d', link_with : ldyn, install : true) test('linktest_dyn', ed) + +# test D attributes for pkg-config +pkgc = import('pkgconfig') +pkgc.generate(name: 'test', + libraries: ldyn, + subdirs: 'd/stuff', + description: 'A test of D attributes to pkgconfig.generate.', + d_module_versions: ['Use_Static'] +)