Skip to content

Commit

Permalink
Compiler options for windows env (apache#49)
Browse files Browse the repository at this point in the history
Co-authored-by: Siva <quic_sivb@quicinc.com>
  • Loading branch information
B, Siva Rama Krishna Reddy and srkreddy1238 committed Aug 8, 2024
1 parent f09a0aa commit 7dd77e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/tvm/contrib/cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,11 @@ def _linux_compile(


def _windows_compile(output, objects, options, cwd=None, ccache_env=None):
cmd = ["clang"]
cmd += ["-O2 --target=x86_64"]
compiler = os.getenv("TVM_WIN_CC", default="clang")
win_target = os.getenv("TVM_WIN_TARGET", default="x86_64")
cmd = [compiler]
cmd += ["-O2"]
cmd += ["--target=" + win_target]

if output.endswith(".so") or output.endswith(".dll"):
cmd += ["-shared"]
Expand Down

0 comments on commit 7dd77e6

Please sign in to comment.