Skip to content

Commit ad13f69

Browse files
[llvm-lit] Use the shell's ptxas if LLVM_PTXAS_EXECUTABLE isn't set
1 parent 1f27ff9 commit ad13f69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/test/lit.cfg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import re
88
import platform
9+
import shutil
910
import subprocess
1011

1112
import lit.util
@@ -345,7 +346,7 @@ def version_int(ver):
345346

346347

347348
ptxas_executable = (
348-
os.environ.get("LLVM_PTXAS_EXECUTABLE", None) or config.ptxas_executable
349+
os.environ.get("LLVM_PTXAS_EXECUTABLE", None) or config.ptxas_executable or shutil.which("ptxas")
349350
)
350351
if ptxas_executable:
351352
enable_ptxas(ptxas_executable)

0 commit comments

Comments
 (0)