Skip to content

Commit 2a0091f

Browse files
authored
[AIX] fix unsupported diff flag on AIX (-strip-trailing-cr) (#120276)
#119666 adds the `-strip-trailing-cr` flag to diff which is not supported on AIX switch to use the python implementation of diff instead
1 parent c98e79d commit 2a0091f

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)