diff --git a/llvm/test/Analysis/lit.local.cfg b/llvm/test/Analysis/lit.local.cfg new file mode 100644 --- /dev/null +++ b/llvm/test/Analysis/lit.local.cfg @@ -0,0 +1,9 @@ +# -*- 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')) + diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -82,6 +82,10 @@ return '' return found_dylibs[0] +# Define this first. Afterwards, use_default_substitutions will add the rule for +# expanding FileCheck to the full path. +config.substitutions.append(('%FileCheckWithUnusedPrefixes%', + 'FileCheck --allow-unused-prefixes=true')) llvm_config.use_default_substitutions() @@ -90,7 +94,6 @@ config.substitutions.append(('%shlibext', config.llvm_shlib_ext)) config.substitutions.append(('%exeext', config.llvm_exe_ext)) - lli_args = [] # The target triple used by default by lli is the process target triple (some # triple appropriate for generating code for the current process) but because