@@ -0,0 +1,20 @@
1+--- a/mesonbuild/environment.py
2++++ b/mesonbuild/environment.py
4+ compiler_type = self.get_gnu_compiler_type(defines)
5+ version = self.get_gnu_version_from_defines(defines)
6+ return GnuObjCCompiler(ccache + compiler, version, compiler_type, is_cross, exe_wrap, defines)
7+- if out.startswith('Apple LLVM'):
8++ if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
9+ return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
10+ if out.startswith('clang'):
11+ return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)
13+ compiler_type = self.get_gnu_compiler_type(defines)
14+ version = self.get_gnu_version_from_defines(defines)
15+ return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, is_cross, exe_wrap, defines)
16+- if out.startswith('Apple LLVM'):
17++ if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
18+ return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
19+ if out.startswith('clang'):
20+ return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)