From 9e737939fb00f17a76b62d40aac468c9f2e59c26 Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Fri, 31 Jul 2015 15:25:11 +0000 Subject: [PATCH] [libc++abi] Allow use just compiled clang++ for tests Currently, the tests assume the system compiler is the one we want to test, but if we build libcxxabi together with LLVM+Clang, it'll get the wrong compiler. This patch allows us to test if we have clang++ in our /bin directory, and if so, use it. llvm-svn: 243752 --- libcxxabi/test/lit.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libcxxabi/test/lit.cfg b/libcxxabi/test/lit.cfg index ae462884a3df..e10dfe107691 100644 --- a/libcxxabi/test/lit.cfg +++ b/libcxxabi/test/lit.cfg @@ -53,6 +53,11 @@ if obj_root is None: config.test_exec_root = os.path.join(obj_root, 'test') +# Check if we have produced a Clang with this build (in-tree) +this_clang = os.path.join(obj_root, '../../bin/clang++') +if os.path.exists(this_clang): + config.cxx_under_test = this_clang + cfg_variant = getattr(config, 'configuration_variant', 'libcxxabi') if cfg_variant: print 'Using configuration variant: %s' % cfg_variant