From edda80cc75cac9ddd15ba2b8cefc93eefcb736ef Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Sat, 27 Oct 2018 21:34:20 -0700 Subject: 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. --- mesonbuild/compilers/cpp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/compilers/cpp.py') diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index ac44676ec..9dc28768b 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -202,7 +202,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): 'cpp_debugstl': coredata.UserBooleanOption('cpp_debugstl', 'STL debug mode', False)}) - if self.compiler_type == CompilerType.GCC_MINGW: + if self.compiler_type.is_windows_compiler: opts.update({ 'cpp_winlibs': coredata.UserArrayOption('cpp_winlibs', 'Standard Win libraries to link against', gnu_winlibs), }) @@ -218,7 +218,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler): 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['cpp_winlibs'].value[:] return [] -- cgit v1.2.3