aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-02-15 09:05:10 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-03-30 16:24:35 +0530
commit1713fa02970ca2a045b1635186fef718620bf1b3 (patch)
tree6e0395fd46efec1338dab2db8f5b984e7115c1de /mesonbuild/backend/ninjabackend.py
parent8945c85f968e851010b101ac2654aa3758470589 (diff)
downloadmeson-1713fa02970ca2a045b1635186fef718620bf1b3.zip
meson-1713fa02970ca2a045b1635186fef718620bf1b3.tar.gz
meson-1713fa02970ca2a045b1635186fef718620bf1b3.tar.bz2
Add shared_library argument for a Visual Studio module definitions file
On MSVC, shared libraries only export symbols that have been explicitly exported either as part of the symbol prototype or via a module definitions file. On compilers other than MSVC, all symbols are exported in the shared library by default and the format for the list of symbols to export is different, so this is only used with the VisualStudio compiler. The module defs file path can either be relative to the current source directory or an absolute path using meson.source_root() + '/some/path'
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 8e8fa42..29ce8cd 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1657,6 +1657,8 @@ rule FORTRAN_DEP_HACK
else:
soversion = None
commands += linker.get_soname_args(target.name, abspath, soversion)
+ if target.vs_module_defs and hasattr(linker, 'gen_vs_module_defs_args'):
+ commands += linker.gen_vs_module_defs_args(target.vs_module_defs.rel_to_builddir(self.build_to_src))
elif isinstance(target, build.StaticLibrary):
commands += linker.get_std_link_args()
else: