From 8e48f232628a749efe393f92db0302c93d8496ca Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 20 Feb 2017 08:02:48 +0530 Subject: 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. --- mesonbuild/environment.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mesonbuild/environment.py') 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'): -- cgit v1.1