summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-06-02 17:59:29 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-07 12:57:39 +0000
commite9462ce2064f5ec38a628e6e310d459d42f58d9c (patch)
treeac0e064b9751ea6c780324d8a8c7ae741df64677
parent1f5c6d62bf1e88ae24dce79b5d7a586e8f783371 (diff)
downloadmeson-e9462ce2064f5ec38a628e6e310d459d42f58d9c.tar.gz
Install shared_module implibs
On Windows, if we are going to link with a shared module, we need the implib. Use case: The Xorg server builds some X protocol extensions as modules. The implibs for these modules need to be shipped as part of the SDK, to enable building of 3rd party extensions which reference symbols in (and hence on Windows, need to be linked with) these modules.
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rw-r--r--mesonbuild/build.py1
-rw-r--r--test cases/windows/8 dll versioning/installed_files.txt2
3 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 0398401a7..401ad1955 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -747,7 +747,7 @@ int dummy;
# 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) or isinstance(t, build.Executable)) and t.get_import_filename():
+ 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
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 36e2e3c0d..331b5524a 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1625,7 +1625,6 @@ class SharedModule(SharedLibrary):
if 'soversion' in kwargs:
raise MesonException('Shared modules must not specify the soversion kwarg.')
super().__init__(name, subdir, subproject, is_cross, sources, objects, environment, kwargs)
- self.import_filename = None
class CustomTarget(Target):
known_kwargs = set([
diff --git a/test cases/windows/8 dll versioning/installed_files.txt b/test cases/windows/8 dll versioning/installed_files.txt
index a1e9b2d7a..20482bff5 100644
--- a/test cases/windows/8 dll versioning/installed_files.txt
+++ b/test cases/windows/8 dll versioning/installed_files.txt
@@ -11,6 +11,7 @@
?msvc:usr/libexec/customdir.dll
?msvc:usr/libexec/customdir.lib
?msvc:usr/lib/module.dll
+?msvc:usr/lib/module.lib
?gcc:usr/bin/?libsome-0.dll
?gcc:usr/lib/libsome.dll.a
?gcc:usr/bin/?libnoversion.dll
@@ -22,3 +23,4 @@
?gcc:usr/libexec/?libcustomdir.dll
?gcc:usr/libexec/libcustomdir.dll.a
?gcc:usr/lib/?libmodule.dll
+?gcc:usr/lib/libmodule.dll.a