diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-04 01:05:52 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-04 01:05:52 +0300 |
commit | 3bcb402b3c1419d78759b6980a3a2af0908251ee (patch) | |
tree | 111f038a281cf2fdb5310f49db37354ab8df0efa /environment.py | |
parent | c0bf3e8d46ff57d334331d9dadb6e4d064b4e1ec (diff) | |
download | meson-3bcb402b3c1419d78759b6980a3a2af0908251ee.zip meson-3bcb402b3c1419d78759b6980a3a2af0908251ee.tar.gz meson-3bcb402b3c1419d78759b6980a3a2af0908251ee.tar.bz2 |
Detect mingwness better.
Diffstat (limited to 'environment.py')
-rw-r--r-- | environment.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/environment.py b/environment.py index 493ee2c..db6d5a2 100644 --- a/environment.py +++ b/environment.py @@ -189,7 +189,12 @@ class Environment(): return GnuCCompiler(ccache + [compiler], version, GCC_OSX, is_cross, exe_wrap) if (out.startswith('cc') or 'gcc' in out) and \ 'Free Software Foundation' in out: - return GnuCCompiler(ccache + [compiler], version, GCC_STANDARD, is_cross, exe_wrap) + lowerout = out.lower() + if 'mingw' in lowerout or 'msys' in lowerout or 'mingw' in compiler.lower(): + gtype = GCC_MINGW + else: + gtype = GCC_STANDARD + return GnuCCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: return ClangCCompiler(ccache + [compiler], version, is_cross, exe_wrap) if 'Microsoft' in out: @@ -308,7 +313,12 @@ class Environment(): return GnuCPPCompiler(ccache + [compiler], version, GCC_OSX, is_cross, exe_wrap) if (out.startswith('c++ ') or 'g++' in out or 'GCC' in out) and \ 'Free Software Foundation' in out: - return GnuCPPCompiler(ccache + [compiler], version, GCC_STANDARD, is_cross, exe_wrap) + lowerout = out.lower() + if 'mingw' in lowerout or 'msys' in lowerout or 'mingw' in compiler.lower(): + gtype = GCC_MINGW + else: + gtype = GCC_STANDARD + return GnuCPPCompiler(ccache + [compiler], version, gtype, is_cross, exe_wrap) if 'clang' in out: return ClangCPPCompiler(ccache + [compiler], version, is_cross, exe_wrap) if 'Microsoft' in out: |