浏览代码

Fix MinGW cross-build

bruvzg 7 年之前
父节点
当前提交
e337eecd17
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      platform/windows/detect.py

+ 3 - 2
platform/windows/detect.py

@@ -320,8 +320,9 @@ def configure(env):
 
     print("Configuring for Windows: target=%s, bits=%s" % (env['target'], env['bits']))
 
-    env['ENV'] = os.environ # this makes build less repeatable, but simplifies some things
-    env['ENV']['TMP'] = os.environ['TMP']
+    if (os.name == "nt"):
+        env['ENV'] = os.environ # this makes build less repeatable, but simplifies some things
+        env['ENV']['TMP'] = os.environ['TMP']
 
     # First figure out which compiler, version, and target arch we're using
     if os.getenv("VCINSTALLDIR"):