r314013 - [lit.cfg] Avoid concatenating which(clang-func-mapping) if it's missing
Vedant Kumar via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 22 11:42:28 PDT 2017
Author: vedantk
Date: Fri Sep 22 11:42:28 2017
New Revision: 314013
URL: http://llvm.org/viewvc/llvm-project?rev=314013&view=rev
Log:
[lit.cfg] Avoid concatenating which(clang-func-mapping) if it's missing
This un-breaks a lit workflow where you run lit tests from a test
sub-directory within clang without first building clang-func-mapping.
Modified:
cfe/trunk/test/lit.cfg.py
Modified: cfe/trunk/test/lit.cfg.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg.py?rev=314013&r1=314012&r2=314013&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg.py (original)
+++ cfe/trunk/test/lit.cfg.py Fri Sep 22 11:42:28 2017
@@ -125,7 +125,11 @@ config.substitutions.append( ('%clang_cl
' --driver-mode=cl '))
config.substitutions.append( ('%clangxx', ' ' + config.clang +
' --driver-mode=g++ '))
-config.substitutions.append( ('%clang_func_map', ' ' + lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') )
+
+clang_func_map = lit.util.which('clang-func-mapping', config.environment['PATH'])
+if clang_func_map:
+ config.substitutions.append( ('%clang_func_map', ' ' + clang_func_map + ' ') )
+
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
config.substitutions.append( ('%test_debuginfo',
' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )
More information about the cfe-commits
mailing list