meson: fix darwin patch
Somehow I missed this in https://github.com/NixOS/nixpkgs/pull/67596
This commit is contained in:
parent
2c5835b09a
commit
1be03500d5
@ -60,6 +60,7 @@ python3Packages.buildPythonApplication rec {
|
|||||||
# pass it `-Wl,-O1` flag but optimizations are not recognized by
|
# pass it `-Wl,-O1` flag but optimizations are not recognized by
|
||||||
# Mac linker.
|
# Mac linker.
|
||||||
# https://github.com/mesonbuild/meson/issues/4784
|
# https://github.com/mesonbuild/meson/issues/4784
|
||||||
|
# Should be fixed in 0.52
|
||||||
./fix-objc-linking.patch
|
./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
|
--- a/mesonbuild/environment.py
|
||||||
+++ b/mesonbuild/environment.py
|
+++ b/mesonbuild/environment.py
|
||||||
@@ -795,7 +795,7 @@
|
@@ -944,7 +944,7 @@
|
||||||
compiler_type = self.get_gnu_compiler_type(defines)
|
compiler_type = self.get_gnu_compiler_type(defines)
|
||||||
version = self.get_gnu_version_from_defines(defines)
|
version = self.get_gnu_version_from_defines(defines)
|
||||||
return GnuObjCCompiler(ccache + compiler, version, compiler_type, is_cross, exe_wrap, defines)
|
return GnuObjCCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
|
||||||
- if out.startswith('Apple LLVM'):
|
- if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
|
||||||
+ if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
|
+ if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
|
||||||
return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
|
return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
|
||||||
if out.startswith('clang'):
|
if 'windows' in out:
|
||||||
return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)
|
return ClangObjCCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)
|
||||||
@@ -822,7 +822,7 @@
|
@@ -974,7 +974,7 @@
|
||||||
compiler_type = self.get_gnu_compiler_type(defines)
|
compiler_type = self.get_gnu_compiler_type(defines)
|
||||||
version = self.get_gnu_version_from_defines(defines)
|
version = self.get_gnu_version_from_defines(defines)
|
||||||
return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, is_cross, exe_wrap, defines)
|
return GnuObjCPPCompiler(ccache + compiler, version, compiler_type, for_machine, is_cross, exe_wrap, defines)
|
||||||
- if out.startswith('Apple LLVM'):
|
- if out.startswith('Apple LLVM') or out.startswith('Apple clang'):
|
||||||
+ if out.startswith('Apple LLVM') or mesonlib.for_darwin(want_cross, self):
|
+ if out.startswith('Apple LLVM') or out.startswith('Apple clang') or self.machines.build.is_darwin():
|
||||||
return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, is_cross, exe_wrap)
|
return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_OSX, for_machine, is_cross, exe_wrap)
|
||||||
if out.startswith('clang'):
|
if 'windows' in out:
|
||||||
return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_STANDARD, is_cross, exe_wrap)
|
return ClangObjCPPCompiler(ccache + compiler, version, CompilerType.CLANG_MINGW, for_machine, is_cross, exe_wrap)
|
||||||
|
Loading…
Reference in New Issue
Block a user