aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorJosh Gao <josh@insolit.us>2018-10-27 22:08:06 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-30 20:25:32 +0200
commitbeb1f00f3bca05a0d9bd30a115da2621f43e2b73 (patch)
treee00f10964b18902a5feda591ad5d986a62ae2d00 /mesonbuild/compilers
parentedda80cc75cac9ddd15ba2b8cefc93eefcb736ef (diff)
downloadmeson-beb1f00f3bca05a0d9bd30a115da2621f43e2b73.zip
meson-beb1f00f3bca05a0d9bd30a115da2621f43e2b73.tar.gz
meson-beb1f00f3bca05a0d9bd30a115da2621f43e2b73.tar.bz2
Hoist gen_vs_module_defs_args from Gnu to GnuLike.
Support vs_module_defs when cross-compiling to Windows with clang. Fixes #4434.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 137b3f7..8adacef 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1439,6 +1439,16 @@ class GnuLikeCompiler(abc.ABC):
def gnu_symbol_visibility_args(self, vistype):
return gnu_symbol_visibility_args[vistype]
+ 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.compiler_type.is_windows_compiler:
+ return [defsfile]
+ # For other targets, discard the .def file.
+ return []
+
class GnuCompiler(GnuLikeCompiler):
"""
@@ -1477,16 +1487,6 @@ class GnuCompiler(GnuLikeCompiler):
def get_pch_suffix(self):
return 'gch'
- 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.compiler_type.is_windows_compiler:
- return [defsfile]
- # For other targets, discard the .def file.
- return []
-
def get_gui_app_args(self, value):
if self.compiler_type.is_windows_compiler and value:
return ['-mwindows']