summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
diff options
context:
space:
mode:
authorStephane Sezer <sas@cd80.net>2016-02-01 23:21:27 +0000
committerStephane Sezer <sas@cd80.net>2016-02-01 23:21:27 +0000
commit0f0f82e58c9f05059d3cee4c17963ce191804700 (patch)
treeeb8d79c528efc642d12881b40d4e821dbf9db340 /lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
parent13f7324b866d35a9f30c744aa047a7821f81a5c1 (diff)
downloadbcm5719-llvm-0f0f82e58c9f05059d3cee4c17963ce191804700.tar.gz
bcm5719-llvm-0f0f82e58c9f05059d3cee4c17963ce191804700.zip
Fix getCompiler in unit testing framework on compiler symlinks
Summary: Checks using the result of getCompiler() will fail to identify the compiler correctly if CC is a symlink path (ie /usr/bin/cc). Reviewers: zturner, emaste Subscribers: llvm-commits, sas Differential Revision: http://reviews.llvm.org/D16488 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 259433
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/plugins/builder_base.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/plugins/builder_base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py b/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
index c4e3dff5301..f4c80569208 100644
--- a/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
+++ b/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
@@ -22,7 +22,8 @@ def getArchitecture():
def getCompiler():
"""Returns the compiler in effect the test suite is running with."""
- return os.environ["CC"] if "CC" in os.environ else "clang"
+ compiler = os.environ.get("CC", "clang")
+ return os.path.realpath(compiler)
def getArchFlag():
"""Returns the flag required to specify the arch"""
OpenPOWER on IntegriCloud