diff --git a/llvm/test/TableGen/lit.local.cfg b/llvm/test/TableGen/lit.local.cfg index 0e827479cd412..9d6dfdc14bbfb 100644 --- a/llvm/test/TableGen/lit.local.cfg +++ b/llvm/test/TableGen/lit.local.cfg @@ -1,2 +1,10 @@ +import platform +import lit.formats + config.suffixes = [".td"] config.excludes = ["Common", "Inputs"] + +# AIX 'diff' command doesn't support --strip-trailing-cr, but the internal +# python implementation does, so use that for cross platform compatibility +if platform.system() == "AIX": + config.test_format = lit.formats.ShTest() diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py index 1ef5796cd32e4..5f762ec7f3514 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -57,13 +57,6 @@ def __init__(self, lit_config, config): self.lit_config.note("using lit tools: {}".format(path)) lit_path_displayed = True - if platform.system() == "AIX": - # Diff on AIX doesn't have all the required features (see - # https://github.com/llvm/llvm-project/pull/108871 and - # https://github.com/llvm/llvm-project/pull/112997#issuecomment-2429656192) - # so always use the internal shell. - self.use_lit_shell = True - if platform.system() == "OS/390": self.with_environment("_BPXK_AUTOCVT", "ON") self.with_environment("_TAG_REDIR_IN", "TXT")