aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-02-20 08:02:48 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-02-21 01:36:08 +0530
commit8e48f232628a749efe393f92db0302c93d8496ca (patch)
treeb59b6eead963cad255b4de8db52b7cd61620ab4e /mesonbuild/environment.py
parent01f207f34793cfdcff2b3cfe4da4a4e0e0d42cf7 (diff)
downloadmeson-8e48f232628a749efe393f92db0302c93d8496ca.zip
meson-8e48f232628a749efe393f92db0302c93d8496ca.tar.gz
meson-8e48f232628a749efe393f92db0302c93d8496ca.tar.bz2
Detect GCC type on macOS for ObjC/C++ too
These compilers are available in MinGW and can be built on macOS. More interestingly, `gcc` is a wrapper around `clang` on macOS, so we will detect the compiler type incorrectly on macOS without this.
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index b184b3f..88dc4cf 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -521,8 +521,9 @@ class Environment:
if not defines:
popen_exceptions[compiler] = 'no pre-processor defines'
continue
+ gtype = self.get_gnu_compiler_type(defines)
version = self.get_gnu_version_from_defines(defines)
- return GnuObjCCompiler(ccache + compiler, version, is_cross, exe_wrap, defines)
+ return GnuObjCCompiler(ccache + compiler, version, gtype, is_cross, exe_wrap, defines)
if out.startswith('Apple LLVM'):
return ClangObjCCompiler(ccache + compiler, version, CLANG_OSX, is_cross, exe_wrap)
if out.startswith('clang'):
@@ -545,8 +546,9 @@ class Environment:
if not defines:
popen_exceptions[compiler] = 'no pre-processor defines'
continue
+ gtype = self.get_gnu_compiler_type(defines)
version = self.get_gnu_version_from_defines(defines)
- return GnuObjCPPCompiler(ccache + compiler, version, is_cross, exe_wrap, defines)
+ return GnuObjCPPCompiler(ccache + compiler, version, gtype, is_cross, exe_wrap, defines)
if out.startswith('Apple LLVM'):
return ClangObjCPPCompiler(ccache + compiler, version, CLANG_OSX, is_cross, exe_wrap)
if out.startswith('clang'):