Skip to content

Commit 476d815

Browse files
committed
vala: Pass --shared-library to valac when generating a .gir file
This is required to make sure that the generated .gir file actually contains all the information to be used dynamically. Valac supports this argument since 0.29.3 released in 2015.
1 parent f36d680 commit 476d815

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mesonbuild/backend/ninjabackend.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1765,6 +1765,9 @@ def generate_vala_compile(self, target: build.BuildTarget) -> \
17651765
girname = os.path.join(self.get_target_dir(target), target.vala_gir)
17661766
args += ['--gir', os.path.join('..', target.vala_gir)]
17671767
valac_outputs.append(girname)
1768+
shared_target = target.get('shared')
1769+
if isinstance(shared_target, build.SharedLibrary):
1770+
args += ['--shared-library', self.get_target_filename_for_linking(shared_target)]
17681771
# Install GIR to default location if requested by user
17691772
if len(target.install_dir) > 3 and target.install_dir[3] is True:
17701773
target.install_dir[3] = os.path.join(self.environment.get_datadir(), 'gir-1.0')

0 commit comments

Comments
 (0)