summary refs log blame commit diff
path: root/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
blob: 996e0c3420e2f630bf6bd4a55da3401235ce624a (plain) (tree)
1
2
3
4
5
6
7

                                                                  

                               
                   

                                                                     






                                                                                                                                

                                                                     





                                                                                                                                  
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index dc8f099b..d8581fcf 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -944,7 +944,7 @@
                 compiler_type = self.get_gnu_compiler_type(defines)
                 version = self.get_gnu_version_from_defines(defines)
                 return GnuObjCCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
-            if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
+            if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
             if 'windows' in out:
                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)
@@ -974,7 +974,7 @@
                 compiler_type = self.get_gnu_compiler_type(defines)
                 version = self.get_gnu_version_from_defines(defines)
                 return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
-            if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
+            if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
             if 'windows' in out:
                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)