Explorar o código

Merge pull request #17536 from bruvzg/fix_mingw_build

Fix MinGW cross-build
Rémi Verschelde %!s(int64=7) %!d(string=hai) anos
pai
achega
a8147d0f8b
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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"):