From 3c2ea230bb446f3355383e205ae379ef5bb146c1 Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Thu, 24 Oct 2024 19:51:50 -0400 Subject: [PATCH 1/3] Revert "[lit][aix] Always use internal lit shell on AIX (#113355)" This reverts commit 4583dbc7b85d25bdda652ad1afe5ec3e95183a16. --- llvm/utils/lit/lit/llvm/config.py | 7 ------- 1 file changed, 7 deletions(-) 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") From a7a85bfbec84a775df9c232b1c78c6249a3c95d4 Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Thu, 24 Oct 2024 19:52:20 -0400 Subject: [PATCH 2/3] Use internal lit shell for TableGen only --- llvm/test/TableGen/lit.local.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/test/TableGen/lit.local.cfg b/llvm/test/TableGen/lit.local.cfg index 0e827479cd412..1993ff5f16cbe 100644 --- a/llvm/test/TableGen/lit.local.cfg +++ b/llvm/test/TableGen/lit.local.cfg @@ -1,2 +1,8 @@ +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 +config.test_format = lit.formats.ShTest() From 4332bc811e1ec94980ac2737923cc23e2532187f Mon Sep 17 00:00:00 2001 From: Abhina Sreeskantharajan Date: Fri, 25 Oct 2024 11:35:23 -0400 Subject: [PATCH 3/3] guard for AIX only --- llvm/test/TableGen/lit.local.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/test/TableGen/lit.local.cfg b/llvm/test/TableGen/lit.local.cfg index 1993ff5f16cbe..9d6dfdc14bbfb 100644 --- a/llvm/test/TableGen/lit.local.cfg +++ b/llvm/test/TableGen/lit.local.cfg @@ -1,3 +1,4 @@ +import platform import lit.formats config.suffixes = [".td"] @@ -5,4 +6,5 @@ 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 -config.test_format = lit.formats.ShTest() +if platform.system() == "AIX": + config.test_format = lit.formats.ShTest()