Python: fix Apple Clang +optimizations build (#39412)
This commit is contained in:
		| @@ -308,7 +308,7 @@ class Python(Package): | ||||
|     conflicts("%nvhpc") | ||||
| 
 | ||||
|     # https://bugs.python.org/issue45405 | ||||
|     conflicts("@:3.7.2,3.8.0:3.8.12,3.9.0:3.9.10,3.10.0:3.10.2", when="%apple-clang@13:") | ||||
|     conflicts("@:3.7.12,3.8.0:3.8.12,3.9.0:3.9.7,3.10.0", when="%apple-clang@13:") | ||||
| 
 | ||||
|     # See https://github.com/python/cpython/issues/106424 | ||||
|     # datetime.now(timezone.utc) segfaults | ||||
| @@ -435,6 +435,11 @@ def setup_build_environment(self, env): | ||||
|             if spec.satisfies("%gcc") or spec.satisfies("%fj"): | ||||
|                 env.unset("LC_ALL") | ||||
| 
 | ||||
|         # https://github.com/python/cpython/issues/87275 | ||||
|         if spec.satisfies("@:3.9.5 +optimizations %apple-clang"): | ||||
|             xcrun = Executable("/usr/bin/xcrun") | ||||
|             env.set("LLVM_AR", xcrun("-find", "ar", output=str).strip()) | ||||
| 
 | ||||
|     def flag_handler(self, name, flags): | ||||
|         # python 3.8 requires -fwrapv when compiled with intel | ||||
|         if self.spec.satisfies("@3.8: %intel"): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Adam J. Stewart
					Adam J. Stewart