Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Commit

Permalink
Merge pull request #80 from webmaster128/processDirect
Browse files Browse the repository at this point in the history
Pull out processDirect()
  • Loading branch information
frerich committed May 16, 2016
2 parents a34dc99 + fa8f3ac commit dc63c22
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,8 +1156,14 @@ def processCompileRequest(cache, compiler, args):
stats.registerCallForExternalDebugInfo()
stats.save()
return invokeRealCompiler(compiler, args[1:])

if 'CLCACHE_NODIRECT' in os.environ:
return processNoDirect(cache, outputFile, compiler, cmdLine)
else:
return processDirect(cache, outputFile, compiler, cmdLine, sourceFile)


def processDirect(cache, outputFile, compiler, cmdLine, sourceFile):
manifestHash = ObjectCache.getManifestHash(compiler, cmdLine, sourceFile)
with cache.lock:
manifest = cache.getManifest(manifestHash)
Expand Down Expand Up @@ -1195,6 +1201,7 @@ def processCompileRequest(cache, compiler, args):
printTraceStatement("Finished. Exit code %d" % compilerResult[0])
return compilerResult


def processNoDirect(cache, outputFile, compiler, cmdLine):
cachekey = ObjectCache.computeKey(compiler, cmdLine)
with cache.lock:
Expand Down

0 comments on commit dc63c22

Please sign in to comment.