Index: packages/Python/lldbsuite/test/plugins/builder_base.py =================================================================== --- packages/Python/lldbsuite/test/plugins/builder_base.py +++ packages/Python/lldbsuite/test/plugins/builder_base.py @@ -15,6 +15,7 @@ import os, sys import platform import lldbsuite.test.lldbtest as lldbtest +from subprocess import check_output, STDOUT def getArchitecture(): """Returns the architecture in effect the test suite is running with.""" @@ -22,7 +23,20 @@ def getCompiler(): """Returns the compiler in effect the test suite is running with.""" - return os.environ["CC"] if "CC" in os.environ else "clang" + if not "CC" in os.environ: + return "clang" + + compiler = os.environ["CC"] + if "gcc" in compiler or "clang" in compiler: + return compiler + + version = check_output([compiler, "-v"], stderr=STDOUT); + if version.find("clang") != -1: + return "clang" + if version.find("gcc") != -1: + return "gcc" + + return compiler def getArchFlag(): """Returns the flag required to specify the arch"""