summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-09-04 16:07:48 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-09-04 16:10:56 +0200
commit1be03500d5bfaf3306b97a96595f2c526bdb063d (patch)
treeb2dd2d2a0ce9330dd0883f1e9ecda9f65e5bc96b /pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
parent2c5835b09a1d4966756212902d36b1b8ab242da6 (diff)
downloadnixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar.gz
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar.bz2
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar.lz
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar.xz
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.tar.zst
nixpkgs-1be03500d5bfaf3306b97a96595f2c526bdb063d.zip
meson: fix darwin patch
Somehow I missed this in https://github.com/NixOS/nixpkgs/pull/67596
Diffstat (limited to 'pkgs/development/tools/build-managers/meson/fix-objc-linking.patch')
-rw-r--r--pkgs/development/tools/build-managers/meson/fix-objc-linking.patch30
1 files changed, 16 insertions, 14 deletions
diff --git a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch b/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
index 60a205828f5..996e0c3420e 100644
--- a/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
+++ b/pkgs/development/tools/build-managers/meson/fix-objc-linking.patch
@@ -1,20 +1,22 @@
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index dc8f099b..d8581fcf 100644
 --- a/mesonbuild/environment.py
 +++ b/mesonbuild/environment.py
-@@ -795,7 +795,7 @@
+@@ -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, is_cross, exe_wrap, defines)
--            if out.startswith('Apple LLVM'):
-+            if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
-                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
-             if out.startswith('clang'):
-                 return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)
-@@ -822,7 +822,7 @@
+                 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, is_cross, exe_wrap, defines)
--            if out.startswith('Apple LLVM'):
-+            if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
-                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
-             if out.startswith('clang'):
-                 return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)
+                 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)