aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@collabora.com>2019-03-06 15:45:14 +0100
committerJakub Adam <jakub.adam@collabora.com>2019-10-09 15:50:20 +0200
commit1bf17824766230a8ad0b2fe56040ff860c841d50 (patch)
tree58ea79617302c036adf42b6eae7696f23fca0723 /mesonbuild/backend
parent217036f2d9d7f90b47e6d9cad43f3144882a3b91 (diff)
downloadmeson-1bf17824766230a8ad0b2fe56040ff860c841d50.zip
meson-1bf17824766230a8ad0b2fe56040ff860c841d50.tar.gz
meson-1bf17824766230a8ad0b2fe56040ff860c841d50.tar.bz2
Fix *.pdb files missing in meson introspect --installed output
On Windows, make sure the introspect command lists all Program database (PDB) files containing debugging information that Meson will install.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py41
1 files changed, 25 insertions, 16 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 4d3f5d9..947be1c 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1091,22 +1091,31 @@ class Backend:
t.get_aliases(), should_strip, mappings,
t.install_rpath, install_mode)
d.targets.append(i)
- # On toolchains/platforms that use an import library for
- # linking (separate from the shared library with all the
- # code), we need to install that too (dll.a/.lib).
- if isinstance(t, (build.SharedLibrary, build.SharedModule, build.Executable)) and t.get_import_filename():
- if custom_install_dir:
- # If the DLL is installed into a custom directory,
- # install the import library into the same place so
- # it doesn't go into a surprising place
- implib_install_dir = outdirs[0]
- else:
- implib_install_dir = self.environment.get_import_lib_dir()
- # Install the import library; may not exist for shared modules
- i = TargetInstallData(self.get_target_filename_for_linking(t),
- implib_install_dir, {}, False, {}, '', install_mode,
- optional=isinstance(t, build.SharedModule))
- d.targets.append(i)
+
+ if isinstance(t, (build.SharedLibrary, build.SharedModule, build.Executable)):
+ # On toolchains/platforms that use an import library for
+ # linking (separate from the shared library with all the
+ # code), we need to install that too (dll.a/.lib).
+ if t.get_import_filename():
+ if custom_install_dir:
+ # If the DLL is installed into a custom directory,
+ # install the import library into the same place so
+ # it doesn't go into a surprising place
+ implib_install_dir = outdirs[0]
+ else:
+ implib_install_dir = self.environment.get_import_lib_dir()
+ # Install the import library; may not exist for shared modules
+ i = TargetInstallData(self.get_target_filename_for_linking(t),
+ implib_install_dir, {}, False, {}, '', install_mode,
+ optional=isinstance(t, build.SharedModule))
+ d.targets.append(i)
+
+ if not should_strip and t.get_debug_filename():
+ debug_file = os.path.join(self.get_target_dir(t), t.get_debug_filename())
+ i = TargetInstallData(debug_file, outdirs[0],
+ {}, False, {}, '',
+ install_mode, optional=True)
+ d.targets.append(i)
# Install secondary outputs. Only used for Vala right now.
if num_outdirs > 1:
for output, outdir in zip(t.get_outputs()[1:], outdirs[1:]):