aboutsummaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg27
1 files changed, 14 insertions, 13 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index ccefb70f7300..846a6e92ca51 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -73,7 +73,6 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None)
# safe_env_vars = ('TMPDIR', 'TEMP', 'TMP', 'USERPROFILE', 'PWD',
# 'MACOSX_DEPLOYMENT_TARGET', 'IPHONEOS_DEPLOYMENT_TARGET',
-# 'IOS_SIMULATOR_DEPLOYMENT_TARGET',
# 'VCINSTALLDIR', 'VC100COMNTOOLS', 'VC90COMNTOOLS',
# 'VC80COMNTOOLS')
possibly_dangerous_env_vars = ['COMPILER_PATH', 'RC_DEBUG_OPTIONS',
@@ -115,11 +114,6 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
if symbolizer in os.environ:
config.environment[symbolizer] = os.environ[symbolizer]
-# Propagate options for sanitizers.
-for options in ['ASAN_OPTIONS']:
- if options in os.environ:
- config.environment[options] = os.environ[options]
-
###
# Check that the object root is known.
@@ -223,7 +217,8 @@ 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)
+ stdout=subprocess.PIPE,
+ env=config.environment)
if not cmd.stdout:
lit_config.fatal("Couldn't find the include dir for Clang ('%s')" % clang)
dir = cmd.stdout.read().strip()
@@ -258,7 +253,8 @@ def makeMSABITriple(triple):
# -win32 is not supported for non-x86 targets; use a default.
return 'i686-pc-win32'
-config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
+config.substitutions.append( ('%clang_cc1',
+ '%s -cc1 -internal-isystem %s -nostdsysteminc'
% (config.clang,
getClangBuiltinIncludeDir(config.clang))) )
config.substitutions.append( ('%clang_cpp', ' ' + config.clang +
@@ -310,14 +306,14 @@ tool_dirs = os.path.pathsep.join((clang_tools_dir, llvm_tools_dir))
# For example, don't match 'clang-check-' or '.clang-format'.
NoPreHyphenDot = r"(?<!(-|\.))"
NoPostHyphenDot = r"(?!(-|\.))"
+NoPostBar = r"(?!(/|\\))"
for pattern in [r"\bFileCheck\b",
r"\bc-index-test\b",
NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot,
- # FIXME: Some clang test uses opt?
- NoPreHyphenDot + r"\bopt\b" + NoPostHyphenDot,
+ NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
# Handle these specially as they are strings searched
# for during testing.
r"\| \bcount\b",
@@ -408,11 +404,11 @@ if not re.match(r'.*-win32$', config.target_triple):
config.available_features.add('non-ms-sdk')
# [PR8833] LLP64-incompatible tests
-if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple):
+if not re.match(r'^x86_64.*-(win32|mingw32|windows-gnu)$', config.target_triple):
config.available_features.add('LP64')
# [PR12920] "clang-driver" -- set if gcc driver is not used.
-if not re.match(r'.*-(cygwin|mingw32)$', config.target_triple):
+if not re.match(r'.*-(cygwin|mingw32|windows-gnu)$', config.target_triple):
config.available_features.add('clang-driver')
# [PR18856] Depends to remove opened file. On win32, a file could be removed
@@ -430,7 +426,8 @@ def get_llvm_config_props():
'--assertion-mode',
'--targets-built',
],
- stdout=subprocess.PIPE
+ stdout=subprocess.PIPE,
+ env=config.environment
)
# 1st line corresponds to --assertion-mode, "ON" or "OFF".
line = cmd.stdout.readline().strip().decode('ascii')
@@ -457,6 +454,10 @@ else:
if (config.llvm_use_sanitizer == "Memory" or
config.llvm_use_sanitizer == "MemoryWithOrigins"):
config.available_features.add("msan")
+if config.llvm_use_sanitizer == "Undefined":
+ config.available_features.add("ubsan")
+else:
+ config.available_features.add("not_ubsan")
# Check if we should run long running tests.
if lit_config.params.get("run_long_tests", None) == "true":