Skip to content

Commit 7cd97c3

Browse files
madanial0github-actions[bot]
authored andcommitted
Automerge: [AIX] fix unsupported diff flag on AIX (-strip-trailing-cr) (#120276)
llvm/llvm-project#119666 adds the `-strip-trailing-cr` flag to diff which is not supported on AIX switch to use the python implementation of diff instead
2 parents d4df5be + 2a0091f commit 7cd97c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/test/Format/lit.local.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import platform
2+
import lit.formats
3+
14
# Suffixes supported by clang-format.
25
config.suffixes = [
36
".c",
@@ -19,3 +22,8 @@ config.suffixes = [
1922
".td",
2023
".test"
2124
]
25+
26+
# AIX 'diff' command doesn't support --strip-trailing-cr, but the internal
27+
# python implementation does, so use that for cross platform compatibility
28+
if platform.system() == "AIX":
29+
config.test_format = lit.formats.ShTest()

0 commit comments

Comments
 (0)