Skip to content

Commit e1939a1

Browse files
committed
Fixed compile command line for windows compilers
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 8bd95b8 commit e1939a1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

python/triton/runtime/build.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def quiet():
2727

2828
def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries):
2929
if cc in ["cl", "clang-cl"]:
30-
cc_cmd = [cc, src, "/nologo", "/O2", "/LD"]
30+
cc_cmd = [cc, src, "/nologo", "/O2", "/LD", "-std:c++20"]
3131
cc_cmd += [f"/I{dir}" for dir in include_dirs]
3232
cc_cmd += [f"/Fo{os.path.join(os.path.dirname(out), 'main.obj')}"]
3333
cc_cmd += ["/link"]
@@ -98,10 +98,7 @@ def _build(name, src, srcdir, library_dirs, include_dirs, libraries):
9898
cc_cmd = [cc]
9999

100100
# for -Wno-psabi, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111047
101-
cc_cmd += [src, "-O3", "-shared", "-fPIC", "-Wno-psabi", "-o", so]
102-
cc_cmd += [f'-l{lib}' for lib in libraries]
103-
cc_cmd += [f"-L{dir}" for dir in library_dirs]
104-
cc_cmd += [f"-I{dir}" for dir in include_dirs if dir is not None]
101+
cc_cmd = _cc_cmd(cc, src, so, include_dirs, library_dirs, libraries)
105102

106103
if os.getenv("VERBOSE"):
107104
print(" ".join(cc_cmd))

0 commit comments

Comments
 (0)