aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python313/files/patch-Tools_jit___llvm.py
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
commit2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch)
tree25f0138e1af8902b92dacc8cce09b267447c17db /lang/python313/files/patch-Tools_jit___llvm.py
parentf85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff)
parent1a30da80670973368b399f2b01fe9c04b91a1273 (diff)
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'lang/python313/files/patch-Tools_jit___llvm.py')
-rw-r--r--lang/python313/files/patch-Tools_jit___llvm.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/lang/python313/files/patch-Tools_jit___llvm.py b/lang/python313/files/patch-Tools_jit___llvm.py
new file mode 100644
index 000000000000..c002680ed55b
--- /dev/null
+++ b/lang/python313/files/patch-Tools_jit___llvm.py
@@ -0,0 +1,31 @@
+--- Tools/jit/_llvm.py.orig 2025-06-11 15:36:57 UTC
++++ Tools/jit/_llvm.py
+@@ -68,20 +68,7 @@ async def _find_tool(tool: str, *, echo: bool = False)
+ async def _find_tool(tool: str, *, echo: bool = False) -> str | None:
+ # Unversioned executables:
+ path = tool
+- if await _check_tool_version(path, echo=echo):
+- return path
+- # Versioned executables:
+- path = f"{tool}-{_LLVM_VERSION}"
+- if await _check_tool_version(path, echo=echo):
+- return path
+- # Homebrew-installed executables:
+- prefix = await _get_brew_llvm_prefix(echo=echo)
+- if prefix is not None:
+- path = os.path.join(prefix, "bin", tool)
+- if await _check_tool_version(path, echo=echo):
+- return path
+- # Nothing found:
+- return None
++ return path
+
+
+ async def maybe_run(
+@@ -96,5 +83,5 @@ async def run(tool: str, args: typing.Iterable[str], e
+ """Run an LLVM tool if it can be found. Otherwise, raise RuntimeError."""
+ output = await maybe_run(tool, args, echo=echo)
+ if output is None:
+- raise RuntimeError(f"Can't find {tool}-{_LLVM_VERSION}!")
++ raise RuntimeError(f"Can't find {tool}!")
+ return output