[llvm-commits] [llvm] r98859 - /llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg
Daniel Dunbar
daniel at zuster.org
Thu Mar 18 13:06:05 PDT 2010
Author: ddunbar
Date: Thu Mar 18 15:06:05 2010
New Revision: 98859
URL: http://llvm.org/viewvc/llvm-project?rev=98859&view=rev
Log:
lit: Tweak example tests config.
Modified:
llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg
Modified: llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg?rev=98859&r1=98858&r2=98859&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg (original)
+++ llvm/trunk/utils/lit/lit/ExampleTests/Clang/lit.cfg Thu Mar 18 15:06:05 2010
@@ -41,40 +41,7 @@
return clang
-def inferClangCC(clang, PATH):
- clangcc = os.getenv('CLANGCC')
-
- # If the user set clang in the environment, definitely use that and don't
- # try to validate.
- if clangcc:
- return clangcc
-
- # Otherwise try adding -cc since we expect to be looking in a build
- # directory.
- if clang.endswith('.exe'):
- clangccName = clang[:-4] + '-cc.exe'
- else:
- clangccName = clang + '-cc'
- clangcc = lit.util.which(clangccName, PATH)
- if not clangcc:
- # Otherwise ask clang.
- res = lit.util.capture([clang, '-print-prog-name=clang-cc'])
- res = res.strip()
- if res and os.path.exists(res):
- clangcc = res
-
- if not clangcc:
- lit.fatal("couldn't find 'clang-cc' program, try setting "
- "CLANGCC in your environment")
-
- return clangcc
-
clang = inferClang(config.environment['PATH'])
if not lit.quiet:
lit.note('using clang: %r' % clang)
config.substitutions.append( (' clang ', ' ' + clang + ' ') )
-
-clang_cc = inferClangCC(clang, config.environment['PATH'])
-if not lit.quiet:
- lit.note('using clang-cc: %r' % clang_cc)
-config.substitutions.append( (' clang-cc ', ' ' + clang_cc + ' ') )
More information about the llvm-commits
mailing list