servo: Merge #14303 - Use msvc toolchain when in Visual Studio env (from upsuper:triple-msvc); r=bholley
authorXidorn Quan <me@upsuper.org>
Mon, 21 Nov 2016 23:00:35 -0600
changeset 340197 20a06f77cf1b5ae29ede7d3c5f93febdb3bbcb37
parent 340196 12a337814fc42fce40439d841890e5fb3d65dbdf
child 340198 9fd386e81d6919fd06ba61d1834073ec80fd2ce7
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
servo: Merge #14303 - Use msvc toolchain when in Visual Studio env (from upsuper:triple-msvc); r=bholley <!-- Please describe your changes on the following line: --> r? @bholley Source-Repo: https://github.com/servo/servo Source-Revision: e97804986ad259083981db7d4f7995d822d693b5
servo/python/servo/command_base.py
--- a/servo/python/servo/command_base.py
+++ b/servo/python/servo/command_base.py
@@ -102,17 +102,18 @@ def host_triple():
     os_type = platform.system().lower()
     if os_type == "linux":
         os_type = "unknown-linux-gnu"
     elif os_type == "darwin":
         os_type = "apple-darwin"
     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"
     elif os_type.startswith("mingw64_nt-") or os_type.startswith("cygwin_nt-"):
         os_type = "pc-windows-gnu"
     elif os_type == "freebsd":
         os_type = "unknown-freebsd"
     else: