aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorJosh Gao <josh@insolit.us>2018-10-27 21:34:20 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-30 20:25:32 +0200
commitedda80cc75cac9ddd15ba2b8cefc93eefcb736ef (patch)
tree60b8e5300f2ad2c3c4be341161dc921f7bb15ad8 /mesonbuild/compilers/c.py
parentd505a68e3489a30ef12f59cbaeef2b9d1bbc3e66 (diff)
downloadmeson-edda80cc75cac9ddd15ba2b8cefc93eefcb736ef.zip
meson-edda80cc75cac9ddd15ba2b8cefc93eefcb736ef.tar.gz
meson-edda80cc75cac9ddd15ba2b8cefc93eefcb736ef.tar.bz2
Generalize gnulike-targeting-windows checks.
Replace several checks against GCC_MINGW or (GCC_MINGW, GCC_CYGWIN) with is_windows_compiler instead, so that clang and other gcc-like compilers using MinGW work appropriately with vs_module_defs, c_winlibs, and cpp_winlibs. Fixes #4434.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index c8e473a..a6ae4af 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -1179,7 +1179,7 @@ class GnuCCompiler(GnuCompiler, CCompiler):
['none', 'c89', 'c99', 'c11',
'gnu89', 'gnu99', 'gnu11'],
'none')})
- if self.compiler_type == CompilerType.GCC_MINGW:
+ if self.compiler_type.is_windows_compiler:
opts.update({
'c_winlibs': coredata.UserArrayOption('c_winlibs', 'Standard Win libraries to link against',
gnu_winlibs), })
@@ -1193,7 +1193,7 @@ class GnuCCompiler(GnuCompiler, CCompiler):
return args
def get_option_link_args(self, options):
- if self.compiler_type == CompilerType.GCC_MINGW:
+ if self.compiler_type.is_windows_compiler:
return options['c_winlibs'].value[:]
return []