diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py index 0ffa6c420243..ee84da820902 100644 --- a/python/tvm/contrib/cc.py +++ b/python/tvm/contrib/cc.py @@ -85,13 +85,13 @@ def _windows_shared(output, objects, options): cl_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (out, _) = proc.communicate() except FileNotFoundError: - raise RuntimeError("can not found cl.exe," + raise RuntimeError("Can not find cl.exe," "please run this in Vistual Studio Command Prompt.") if proc.returncode != 0: msg = "Compilation error:\n" msg += py_str(out) raise RuntimeError(msg) - link_cmd = ["link"] + link_cmd = ["lld-link"] link_cmd += ["-dll", "-FORCE:MULTIPLE"] for obj in objects: @@ -111,8 +111,11 @@ def _windows_shared(output, objects, options): link_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (out, _) = proc.communicate() except FileNotFoundError: - raise RuntimeError("can not found link.exe," - "please run this in Vistual Studio Command Prompt.") + raise RuntimeError("Can not find the LLVM linker for Windows (lld-link.exe)." + "Make sure it's installed" + " and the installation directory is in the %PATH% environment " + "variable. Prebuilt binaries can be found at: https://llvm.org/" + "For building the linker on your own see: https://lld.llvm.org/#build") if proc.returncode != 0: msg = "Compilation error:\n" msg += py_str(out)