diff options
Diffstat (limited to 'lib/lit.common.cfg')
-rw-r--r-- | lib/lit.common.cfg | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/lit.common.cfg b/lib/lit.common.cfg index b410259a9e71..6c2b4cca4546 100644 --- a/lib/lit.common.cfg +++ b/lib/lit.common.cfg @@ -6,17 +6,17 @@ import os import platform +import lit.formats + # Setup test format execute_external = (platform.system() != 'Windows' - or lit.getBashPath() not in [None, ""]) + or lit_config.getBashPath() not in [None, ""]) config.test_format = lit.formats.ShTest(execute_external) # Setup clang binary. clang_path = getattr(config, 'clang', None) if (not clang_path) or (not os.path.exists(clang_path)): - lit.fatal("Can't find Clang on path %r" % clang_path) -if not lit.quiet: - lit.note("using clang: %r" % clang_path) + lit_config.fatal("Can't find Clang on path %r" % clang_path) # Clear some environment variables that might affect Clang. possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS', @@ -38,14 +38,12 @@ for name in possibly_dangerous_env_vars: # Tweak PATH to include llvm tools dir. llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)): - lit.fatal("Invalid llvm_tools_dir config attribute: %r" % llvm_tools_dir) + lit_config.fatal("Invalid llvm_tools_dir config attribute: %r" % llvm_tools_dir) path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path -# Define %clang and %clangxx substitutions to use in test RUN lines. -config.substitutions.append( ("%clang ", (" " + config.clang + " ")) ) -config.substitutions.append( ("%clangxx ", (" " + config.clang + - " -ccc-cxx ")) ) +# Define path to external llvm-symbolizer tool. +config.llvm_symbolizer_path = os.path.join(llvm_tools_dir, "llvm-symbolizer") # Use ugly construction to explicitly prohibit "clang", "clang++" etc. # in RUN lines. @@ -58,3 +56,7 @@ compiler_rt_arch = getattr(config, 'compiler_rt_arch', None) if compiler_rt_arch: for arch in compiler_rt_arch.split(";"): config.available_features.add(arch + "-supported-target") + +compiler_rt_debug = getattr(config, 'compiler_rt_debug', False) +if not compiler_rt_debug: + config.available_features.add('compiler-rt-optimized') |