diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-04-03 18:12:18 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-04-03 18:12:18 +0300 |
commit | 873ffe782c178530e9c81da738d4b9ec9d13da86 (patch) | |
tree | f54327da69fce6788e9a5412258eadf444abf3d6 /mesonbuild/compilers.py | |
parent | e0792295bc6828ff9c603e8670628bce93ff248a (diff) | |
parent | 1713fa02970ca2a045b1635186fef718620bf1b3 (diff) | |
download | meson-873ffe782c178530e9c81da738d4b9ec9d13da86.zip meson-873ffe782c178530e9c81da738d4b9ec9d13da86.tar.gz meson-873ffe782c178530e9c81da738d4b9ec9d13da86.tar.bz2 |
Merge pull request #390 from nirbheek/msvc-module-defs
Add support for passing a module definitions file for exporting symbols while linking
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index e87f974..7bc59d8 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -1256,6 +1256,13 @@ class VisualStudioCCompiler(CCompiler): def get_std_shared_lib_link_args(self): return ['/DLL'] + def gen_vs_module_defs_args(self, defsfile): + if not isinstance(defsfile, str): + raise RuntimeError('Module definitions file should be str') + # With MSVC, DLLs only export symbols that are explicitly exported, + # so if a module defs file is specified, we use that to export symbols + return ['/DEF:' + defsfile] + def gen_pch_args(self, header, source, pchname): objname = os.path.splitext(pchname)[0] + '.obj' return (objname, ['/Yc' + header, '/Fp' + pchname, '/Fo' + objname ]) |