[clang-tools-extra] r196804 - check-clang-tools: Prune 'clang' stuff. Clang is not used here.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Dec 9 11:27:47 PST 2013
Author: chapuni
Date: Mon Dec 9 13:27:46 2013
New Revision: 196804
URL: http://llvm.org/viewvc/llvm-project?rev=196804&view=rev
Log:
check-clang-tools: Prune 'clang' stuff. Clang is not used here.
Modified:
clang-tools-extra/trunk/test/CMakeLists.txt
clang-tools-extra/trunk/test/lit.cfg
Modified: clang-tools-extra/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/CMakeLists.txt?rev=196804&r1=196803&r2=196804&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/test/CMakeLists.txt Mon Dec 9 13:27:46 2013
@@ -24,7 +24,7 @@ endif()
set(CLANG_TOOLS_TEST_DEPS
# Base line deps.
- clang clang-headers FileCheck count not
+ FileCheck count not
# Individual tools we test.
clang-apply-replacements
Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=196804&r1=196803&r2=196804&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Mon Dec 9 13:27:46 2013
@@ -148,72 +148,13 @@ if config.test_exec_root is None:
###
-# Discover the 'clang' and 'clangcc' to use.
-
import os
-def inferClang(PATH):
- # Determine which clang to use.
- clang = os.getenv('CLANG')
-
- # If the user set clang in the environment, definitely use that and don't
- # try to validate.
- if clang:
- return clang
-
- # Otherwise look in the path.
- clang = lit.util.which('clang', PATH)
-
- if not clang:
- lit_config.fatal("couldn't find 'clang' program, try setting "
- "CLANG in your environment")
-
- return clang
-
# When running under valgrind, we mangle '-vg' onto the end of the triple so we
# can check it with XFAIL and XTARGET.
if lit_config.useValgrind:
config.target_triple += '-vg'
-config.clang = inferClang(config.environment['PATH']).replace('\\', '/')
-if not lit_config.quiet:
- lit_config.note('using clang: %r' % config.clang)
-
-# Note that when substituting %clang_cc1 also fill in the include directory of
-# the builtin headers. Those are part of even a freestanding environment, but
-# Clang relies on the driver to locate them.
-def getClangBuiltinIncludeDir(clang):
- # FIXME: Rather than just getting the version, we should have clang print
- # out its resource dir here in an easy to scrape form.
- cmd = subprocess.Popen([clang, '-print-file-name=include'],
- stdout=subprocess.PIPE)
- if not cmd.stdout:
- lit_config.fatal("Couldn't find the include dir for Clang ('%s')" % clang)
- return cmd.stdout.read().strip()
-
-config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
- % (config.clang,
- getClangBuiltinIncludeDir(config.clang))) )
-
-config.substitutions.append( ('%clangxx', ' ' + config.clang +
- ' -ccc-clang-cxx -ccc-cxx '))
-config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
-
-# FIXME: Find nicer way to prohibit this.
-config.substitutions.append(
- (' clang ', """*** Do not use 'clang' in tests, use '%clang'. ***""") )
-config.substitutions.append(
- (' clang\+\+ ', """*** Do not use 'clang++' in tests, use '%clangxx'. ***"""))
-config.substitutions.append(
- (' clang-cc ',
- """*** Do not use 'clang-cc' in tests, use '%clang_cc1'. ***""") )
-config.substitutions.append(
- (' clang -cc1 ',
- """*** Do not use 'clang -cc1' in tests, use '%clang_cc1'. ***""") )
-config.substitutions.append(
- (' %clang-cc1 ',
- """*** invalid substitution, use '%clang_cc1'. ***""") )
-
###
# Set available features we allow tests to conditionalize on.
More information about the cfe-commits
mailing list