From 21bf7a11b9b2878e130478d761e1811c895d28dd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 9 Dec 2013 19:27:46 +0000 Subject: [PATCH] check-clang-tools: Prune 'clang' stuff. Clang is not used here. llvm-svn: 196804 --- clang-tools-extra/test/CMakeLists.txt | 2 +- clang-tools-extra/test/lit.cfg | 59 --------------------------- 2 files changed, 1 insertion(+), 60 deletions(-) diff --git a/clang-tools-extra/test/CMakeLists.txt b/clang-tools-extra/test/CMakeLists.txt index 39f87cc5ae99..3d8a0097431b 100644 --- a/clang-tools-extra/test/CMakeLists.txt +++ b/clang-tools-extra/test/CMakeLists.txt @@ -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 diff --git a/clang-tools-extra/test/lit.cfg b/clang-tools-extra/test/lit.cfg index fe4231caa3b7..d43886ba206d 100644 --- a/clang-tools-extra/test/lit.cfg +++ b/clang-tools-extra/test/lit.cfg @@ -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.