[Lldb-commits] [lldb] r259433 - Fix getCompiler in unit testing framework on compiler symlinks

Stephane Sezer via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 1 15:21:28 PST 2016

Author: sas
Date: Mon Feb  1 17:21:27 2016
New Revision: 259433

URL: http://llvm.org/viewvc/llvm-project?rev=259433&view=rev
Fix getCompiler in unit testing framework on compiler symlinks

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 at fb.com>


Modified: lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py?rev=259433&r1=259432&r2=259433&view=diff
--- lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/plugins/builder_base.py Mon Feb  1 17:21:27 2016
@@ -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"""

More information about the lldb-commits mailing list