[clang] 2a0091f - [AIX] fix unsupported diff flag on AIX (-strip-trailing-cr) (#120276)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 17 12:43:53 PST 2024


Author: Mark Danial
Date: 2024-12-17T15:43:50-05:00
New Revision: 2a0091fb4abb5f89198d7e9c039da01921e2b7ee

URL: https://github.com/llvm/llvm-project/commit/2a0091fb4abb5f89198d7e9c039da01921e2b7ee
DIFF: https://github.com/llvm/llvm-project/commit/2a0091fb4abb5f89198d7e9c039da01921e2b7ee.diff

LOG: [AIX] fix unsupported diff flag on AIX (-strip-trailing-cr) (#120276)

https://github.com/llvm/llvm-project/pull/119666 adds the
`-strip-trailing-cr` flag to diff which is not supported on AIX switch
to use the python implementation of diff instead

Added: 
    

Modified: 
    clang/test/Format/lit.local.cfg

Removed: 
    


################################################################################
diff  --git a/clang/test/Format/lit.local.cfg b/clang/test/Format/lit.local.cfg
index 8acf02725d701b..b060c79226cbda 100644
--- a/clang/test/Format/lit.local.cfg
+++ b/clang/test/Format/lit.local.cfg
@@ -1,3 +1,6 @@
+import platform
+import lit.formats
+
 # Suffixes supported by clang-format.
 config.suffixes = [
     ".c",
@@ -19,3 +22,8 @@ config.suffixes = [
     ".td",
     ".test"
 ]
+
+# 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()


        


More information about the cfe-commits mailing list