diff options
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r-- | mesonbuild/compilers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index a36f184..c30e8fb 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -2451,6 +2451,16 @@ class GnuCompiler: def get_link_whole_for(self, args): return ['-Wl,--whole-archive'] + args + ['-Wl,--no-whole-archive'] + def gen_vs_module_defs_args(self, defsfile): + if not isinstance(defsfile, str): + raise RuntimeError('Module definitions file should be str') + # On Windows targets, .def files may be specified on the linker command + # line like an object file. + if self.gcc_type in (GCC_CYGWIN, GCC_MINGW): + return [defsfile] + # For other targets, discard the .def file. + return [] + class GnuCCompiler(GnuCompiler, CCompiler): def __init__(self, exelist, version, gcc_type, is_cross, exe_wrapper=None, defines=None): |