[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesupport/emerge/bin
From:       Sascha Lothar Teichmann <sascha.teichmann () intevation ! de>
Date:       2011-01-14 11:31:37
Message-ID: 20110114113137.49767AC8B3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1214364 by slteichmann:

cache compiler.getGCCTarget

 M  +8 -2      compiler.py  


--- trunk/kdesupport/emerge/bin/compiler.py #1214363:1214364
@@ -7,17 +7,23 @@
 import utils
 import subprocess
 import emergePlatform
+import threading    
 
 COMPILER = os.getenv("KDECOMPILER")
 
 def getGCCTarget():
+    tl = threading.local()
+    if hasattr(tl, "gcc_target"):
+        return tl.gcc_target
     try:
         result = subprocess.Popen("gcc -dumpmachine", stdout=subprocess.PIPE).communicate()[0]
         utils.debug("GCC Target Processor:%s" % result, 1 )
-        return result.strip()
+        gcc_target = result.strip()
     except:
         #if no mingw is installed return mingw-w32 it is part of base
-        return "i686-w64-mingw32"
+        gcc_target = "i686-w64-mingw32"
+    tl.gcc_target = gcc_target
+    return gcc_target
 
 def isMinGW():
     return COMPILER.startswith("mingw")
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic