soiferj commented on a change in pull request #4857: Windows Support for cpp_rpc URL: https://github.com/apache/incubator-tvm/pull/4857#discussion_r380402254
########## File path: apps/cpp_rpc/rpc_env.cc ########## @@ -20,141 +20,139 @@ * \file rpc_env.cc * \brief Server environment of the RPC. */ +#include <cerrno> #include <tvm/runtime/registry.h> -#include <errno.h> -#ifndef _MSC_VER -#include <sys/stat.h> +#ifndef _WIN32 #include <dirent.h> +#include <sys/stat.h> #include <unistd.h> #else #include <Windows.h> +#include <direct.h> +namespace { + int mkdir(const char* path, int /* ignored */) { return _mkdir(path); } +} #endif +#include <cstring> #include <fstream> -#include <vector> #include <iostream> #include <string> -#include <cstring> +#include <vector> +#include <string> -#include "rpc_env.h" #include "../../src/support/util.h" #include "../../src/runtime/file_util.h" +#include "rpc_env.h" + +namespace { +#if defined(__linux__) || defined(__ANDROID__) + const std::string untar_cmd = "tar -C "; +#elif defined(_WIN32) + const std::string untar_cmd = "wsl tar -C "; Review comment: I don't think it's ideal to have to force Windows users to enable WSL. Can we use Python [tarfile](https://docs.python.org/2/library/tarfile.html#examples) instead? Are there any other options? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services