Skip to content

Commit 257815a

Browse files
committed
Search LLVM_ROOT for llvm binaries
1 parent f319f4b commit 257815a

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

recipe/build_base.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
setlocal EnableDelayedExpansion
22
echo on
33

4+
set LLVM_ROOT=%BUILD_PREFIX%\Library
5+
46
:: Compile python, extensions and external libraries
57
if "%ARCH%"=="64" (
68
set PLATFORM=x64

recipe/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ source:
7676
- patches/0023-Brand-conda-forge.patch
7777
{% endif %}
7878
- patches/0024-Do-not-define-pid_t-as-it-might-conflict-with-the-ac.patch
79+
- patches/0025-Search-LLVM_ROOT-for-llvm-binaries.patch
7980

8081
build:
8182
number: {{ build_number }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 90e02e1f70b1ba2f1035b88e14fa26be2f63f7a0 Mon Sep 17 00:00:00 2001
2+
From: "Uwe L. Korn" <uwe.korn@quantco.com>
3+
Date: Wed, 3 Sep 2025 13:32:24 +0200
4+
Subject: [PATCH 25/25] Search LLVM_ROOT for llvm binaries
5+
6+
---
7+
Tools/jit/_llvm.py | 5 +++++
8+
1 file changed, 5 insertions(+)
9+
10+
diff --git a/Tools/jit/_llvm.py b/Tools/jit/_llvm.py
11+
index 606f280..6694c52 100644
12+
--- a/Tools/jit/_llvm.py
13+
+++ b/Tools/jit/_llvm.py
14+
@@ -66,6 +66,11 @@ async def _get_brew_llvm_prefix(*, echo: bool = False) -> str | None:
15+
16+
@_async_cache
17+
async def _find_tool(tool: str, *, echo: bool = False) -> str | None:
18+
+ # Explicitly defined LLVM installation location
19+
+ if llvm_root := os.getenv("LLVM_ROOT") is not None:
20+
+ path = os.path.join(llvm_root, "bin", tool)
21+
+ if await _check_tool_version(path, echo=echo):
22+
+ return path
23+
# Unversioned executables:
24+
path = tool
25+
if await _check_tool_version(path, echo=echo):

0 commit comments

Comments
 (0)