Skip to content

Commit

Permalink
[Analyzer] Use CC environment variable to select analyzer path in SAT…
Browse files Browse the repository at this point in the history
…estBuild.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313927 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
George Karpenkov committed Sep 21, 2017
1 parent 2f6a914 commit 551a3cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/analyzer/SATestBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 551a3cb

Please sign in to comment.