Use msvc toolchain when in Visual Studio env

This commit is contained in:
Xidorn Quan 2016-11-21 17:43:21 +11:00
parent dd611ef310
commit 63ec96a57d

View file

@ -107,7 +107,8 @@ def host_triple():
elif os_type == "android":
os_type = "linux-androideabi"
elif os_type == "windows":
if os.getenv("MSYSTEM") is None:
# If we are in a Visual Studio environment, use msvc
if os.getenv("VSInstallDir") is not None:
os_type = "pc-windows-msvc"
else:
os_type = "pc-windows-gnu"