diff options
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index e7ce8fac7c1b1..7d8bebf57ff62 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -44,7 +44,7 @@ else: config.test_format = lit.formats.ShTest(execute_external) # suffixes: A list of file extensions to treat as test files. -config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.S', '.modulemap', '.test', '.rs'] +config.suffixes = ['.c', '.cpp', '.cppm', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.S', '.modulemap', '.test', '.rs'] # excludes: A list of directories to exclude from the testsuite. The 'Inputs' # subdirectories contain auxiliary inputs for various tests in their parent @@ -102,10 +102,15 @@ if clang_obj_root is not None: path = os.path.pathsep.join(( clang_tools_dir, llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path + # in stand-alone builds, llvm_shlib_dir is clang's build tree + # while llvm_libs_dir is installed LLVM (and possibly older clang) + llvm_shlib_dir = getattr(config, 'llvm_shlib_dir', None) + if not llvm_shlib_dir: + lit_config.fatal('No LLVM shlib dir set!') llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set!') - path = os.path.pathsep.join((llvm_libs_dir, + path = os.path.pathsep.join((llvm_shlib_dir, llvm_libs_dir, config.environment.get('LD_LIBRARY_PATH',''))) config.environment['LD_LIBRARY_PATH'] = path @@ -268,6 +273,7 @@ config.substitutions.append( ('%clang', ' ' + config.clang + ' ') ) config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') ) config.substitutions.append( ('%itanium_abi_triple', makeItaniumABITriple(config.target_triple)) ) config.substitutions.append( ('%ms_abi_triple', makeMSABITriple(config.target_triple)) ) +config.substitutions.append( ('%resource_dir', getClangBuiltinIncludeDir(config.clang)) ) # The host triple might not be set, at least if we're compiling clang from # an already installed llvm. @@ -343,6 +349,9 @@ for pattern in tool_patterns: # Set available features we allow tests to conditionalize on. # +if config.clang_default_cxx_stdlib != '': + config.available_features.add('default-cxx-stdlib-set') + # Enabled/disabled features if config.clang_staticanalyzer != 0: config.available_features.add("staticanalyzer") @@ -372,6 +381,11 @@ if platform.system() not in ['Windows']: if platform.system() not in ['Windows']: config.available_features.add('utf8-capable-terminal') +# Support for libgcc runtime. Used to rule out tests that require +# clang to run with -rtlib=libgcc. +if platform.system() not in ['Darwin', 'Fuchsia']: + config.available_features.add('libgcc') + # Native compilation: Check if triples match. # FIXME: Consider cases that target can be executed # even if host_triple were different from target_triple. |