Skip to content

Commit 9455fe3

Browse files
authored
Don't lose gcc as a potential compiler choice on windows (#4712)
1 parent c104666 commit 9455fe3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/triton/runtime/build.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ def _build(name: str, src: str, srcdir: str, library_dirs: list[str], include_di
5757
if cc is None:
5858
clang = shutil.which("clang")
5959
gcc = shutil.which("gcc")
60-
cc = gcc if gcc is not None else clang
60+
cl = None
6161
if os.name == "nt":
62-
cc = shutil.which("cl")
62+
cl = shutil.which("cl")
63+
cc = cl or gcc or clang
6364
if cc is None:
6465
raise RuntimeError(
6566
"Failed to find C compiler. Please specify via CC environment variable or set triton.knobs.build.impl.")

0 commit comments

Comments
 (0)