if not config.root.clang_staticanalyzer:
config.unsupported = True
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+ 'FileCheck --allow-unused-prefixes=false'))
--- /dev/null
+# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
+from lit.llvm.subst import ToolSubst
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+ 'FileCheck --allow-unused-prefixes=false'))
+
--- /dev/null
+# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
+from lit.llvm.subst import ToolSubst
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+ 'FileCheck --allow-unused-prefixes=false'))
+
--- /dev/null
+from lit.llvm.subst import ToolSubst
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+ 'FileCheck --allow-unused-prefixes=false'))
+
+config.suffixes = ['.c', '.cpp', '.h', '.m', '.mm', '.S', '.s', '.f90', '.F90', '.f95',
+ '.cu', '.rs', '.cl', '.hip']
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+ ('%clang_cc1',
+ """*** Do not use 'clang -cc1' in Driver tests. ***""") )
+
+# Remove harmful environmental variables for clang Driver tests.
+# Some might be useful for other tests so they are only removed here.
+driver_overwrite_env_vars = ['MACOSX_DEPLOYMENT_TARGET',
+ 'IPHONEOS_DEPLOYMENT_TARGET',
+ 'SDKROOT', 'CCC_OVERRIDE_OPTIONS',
+ 'CC_PRINT_OPTIONS', 'CC_PRINT_HEADERS',
+ 'CC_LOG_DIAGNOSTICS']
+
+for name in driver_overwrite_env_vars:
+ if name in config.environment:
+ del config.environment[name]
+++ /dev/null
-# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
-from lit.llvm.subst import ToolSubst
-
-fc = ToolSubst('FileCheck', unresolved='fatal')
-# the parent introduced the opposite rule, so we replace it if we see it.
-if len(config.substitutions) > 0 and config.substitutions[0] == (fc.regex, 'FileCheck --allow-unused-prefixes=false'):
- config.substitutions[0] = (
- fc.regex, 'FileCheck --allow-unused-prefixes=true')
-else:
- config.substitutions.insert(0, (fc.regex, 'FileCheck --allow-unused-prefixes=true'))
llvm_config.use_clang()
-# FIXME: remove this when we flip the default value for --allow-unused-prefixes
-# to false.
-fc = ToolSubst('FileCheck', unresolved='fatal')
-# Insert this first. Then, we'll first update the blank FileCheck command; then,
-# the default substitution of FileCheck will replace it to its full path.
-config.substitutions.insert(0, (fc.regex,
- 'FileCheck --allow-unused-prefixes=false'))
-
config.substitutions.append(
('%src_include_dir', config.clang_src_dir + '/include'))