Skip to content

Commit 586d998

Browse files
[build] TRITON_LLVM_SYSTEM_SUFFIX to allow user-specified prebuilt llvm system (#7430)
On my machine, I have libc 2.34 (suggesting I can use ubuntu-x86), but glibcxx 3.4.29 (the llvm build on ubuntu 22.04 bakes in a dependency on GLIBCXX >= 3.4.30). This env variable (TRITON_LLVM_SYSTEM_SUFFIX) would allow a user to specify ubuntu-x86, centos-x86, almalinux-x86, etc. to specify one of the prebuilt LLVM packages. See also: #7431, which tries to automatically identify the llvm package based on GLIBCXX versions.
1 parent 4f6b11c commit 586d998

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ def get_llvm_package_info():
200200
arch = {"x86_64": "x64", "arm64": "arm64", "aarch64": "arm64"}[platform.machine()]
201201
except KeyError:
202202
arch = platform.machine()
203-
if system == "Darwin":
203+
if (env_system_suffix := os.environ.get("TRITON_LLVM_SYSTEM_SUFFIX", None)):
204+
system_suffix = env_system_suffix
205+
elif system == "Darwin":
204206
system_suffix = f"macos-{arch}"
205207
elif system == "Linux":
206208
if arch == 'arm64' and is_linux_os('almalinux'):

0 commit comments

Comments
 (0)