[cfe-dev] [libcxx] test/lit.cfg patch

David Fang fang at csl.cornell.edu
Mon Jan 27 17:33:58 PST 2014


Hi,
 	I discovered that when testing libc++ with cmake/lit (make 
check-libcxx), it was choosing an installed clang++ from my $PATH over the 
value passed in ${builddir}/test/lit.site.cfg (which is an uninstalled 
clang++). The attached patch fixes this, and seems to match the comment in 
context. Ok to commit?

David

-- 
David Fang
http://www.csl.cornell.edu/~fang/
-------------- next part --------------
diff --git a/test/lit.cfg b/test/lit.cfg
index aa45439..a065e7b 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -182,7 +182,7 @@ if cxx_under_test is None:
 
     # If no specific cxx_under_test was given, attempt to infer it as clang++.
     clangxx = lit.util.which('clang++', config.environment['PATH'])
-    if clangxx is not None:
+    if cxx_under_test is None and clangxx is not None:
         cxx_under_test = clangxx
         lit_config.note("inferred cxx_under_test as: %r" % (cxx_under_test,))
 if cxx_under_test is None:


More information about the cfe-dev mailing list