From 1645e65db96b055442ff1c8512d2dfc35e9d0417 Mon Sep 17 00:00:00 2001 From: Martin Boos Date: Fri, 1 Mar 2019 13:21:37 +0100 Subject: [PATCH 1/3] use LLVM linker --- python/tvm/contrib/cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py index 0ffa6c420243..906bf4cc5e53 100644 --- a/python/tvm/contrib/cc.py +++ b/python/tvm/contrib/cc.py @@ -91,7 +91,7 @@ def _windows_shared(output, objects, options): 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: From 7d0e60b2259f78a7eb4783a0311c6700440bcf2a Mon Sep 17 00:00:00 2001 From: Martin Boos Date: Tue, 5 Mar 2019 08:19:01 +0100 Subject: [PATCH 2/3] error message improved in case of filenotfound --- python/tvm/contrib/cc.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py index 906bf4cc5e53..4cf1a9df0413 100644 --- a/python/tvm/contrib/cc.py +++ b/python/tvm/contrib/cc.py @@ -85,7 +85,7 @@ 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" @@ -111,8 +111,10 @@ 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) From 6d8b694e55a141c2701280831b8c20f7e4934f2e Mon Sep 17 00:00:00 2001 From: Martin Boos Date: Tue, 5 Mar 2019 09:41:58 +0100 Subject: [PATCH 3/3] linting error fixed --- python/tvm/contrib/cc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/tvm/contrib/cc.py b/python/tvm/contrib/cc.py index 4cf1a9df0413..ee84da820902 100644 --- a/python/tvm/contrib/cc.py +++ b/python/tvm/contrib/cc.py @@ -112,7 +112,8 @@ def _windows_shared(output, objects, options): (out, _) = proc.communicate() except FileNotFoundError: 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 " + "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: