[Analyzer] Use CC environment variable to select analyzer path in SATestBuild.

This change is required to easily test the given checkout of the analyzer,
rather than the one bundled with a system compiler.

Differential Revision: https://reviews.llvm.org/D38155

llvm-svn: 313927
This commit is contained in:
George Karpenkov 2017-09-21 22:12:49 +00:00
parent 91ebfac486
commit be6c329515
1 changed files with 4 additions and 1 deletions

View File

@ -142,7 +142,10 @@ def getSBOutputDirName(IsReferenceBuild) :
#------------------------------------------------------------------------------
# Find Clang for static analysis.
Clang = which("clang", os.environ['PATH'])
if 'CC' in os.environ:
Clang = os.environ['CC']
else:
Clang = which("clang", os.environ['PATH'])
if not Clang:
print "Error: cannot find 'clang' in PATH"
sys.exit(-1)