提交 99e068eb authored 作者: Nazar Mokrynskyi's avatar Nazar Mokrynskyi

Prefer MSVC compiler on Windows by default

上级 66be3ebc
...@@ -183,7 +183,19 @@ function execute(command) ...@@ -183,7 +183,19 @@ function execute(command)
try try
{ {
execSync(command, { stdio: [ 'ignore', process.stdout, process.stderr ] }); // Set MSVC compiler as default on Windows
const env = isWindows ? {
CC : process.env.CC || 'cl',
CXX : process.env.CXX || 'cl',
...process.env
} : process.env;
execSync(
command,
{
env : env,
stdio : [ 'ignore', process.stdout, process.stderr ]
});
} }
catch (error) catch (error)
{ {
......
...@@ -20,7 +20,7 @@ export PYTHONDONTWRITEBYTECODE = 1 ...@@ -20,7 +20,7 @@ export PYTHONDONTWRITEBYTECODE = 1
# Instruct `meson` where to look for ninja binary. # Instruct `meson` where to look for ninja binary.
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
# Windows is, of course, special. # Windows is, of course, special.
export NINJA = $(PIP_DIR)/bin/ninja.exe export NINJA = $(PIP_DIR)/bin/ninja.exe
else else
export NINJA = $(PIP_DIR)/bin/ninja export NINJA = $(PIP_DIR)/bin/ninja
endif endif
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论