[PATCH] D153920: [clang] Move the clang formatting job to run-buildbot to fix the CI

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 7 11:33:20 PDT 2023


ldionne requested changes to this revision.
ldionne added a comment.
This revision now requires changes to proceed.

I really like where this is going, this will create a framework where Clang can add more pre-commit CI checks if they desire.



================
Comment at: clang/utils/ci/run-buildbot:31-34
+--osx-roots <DIR>   Path to pre-downloaded macOS dylibs. By default, we download
+                    them from Green Dragon. This is only relevant at all when
+                    running back-deployment testing if one wants to override
+                    the old dylibs we use to run the tests with different ones.
----------------
This should go away.


================
Comment at: clang/utils/ci/run-buildbot:36-42
+CC                  The C compiler to use, this value is used by CMake. This
+                    variable is optional.
+
+CXX                 The C++ compiler to use, this value is used by CMake. This
+                    variable is optional.
+
+CMAKE               The CMake binary to use. This variable is optional.
----------------
Let's remove those since they are not enforced.


================
Comment at: clang/utils/ci/run-buildbot:65-68
+        --osx-roots)
+            OSX_ROOTS="${2}"
+            shift; shift
+            ;;
----------------
This too.


================
Comment at: clang/utils/ci/run-buildbot:80-101
+# If we can find Ninja/CMake provided by Xcode, use those since we know their
+# version will generally work with the Clang shipped in Xcode (e.g. if Clang
+# knows about -std=c++20, the CMake bundled in Xcode will probably know about
+# that flag too).
+if xcrun --find ninja &>/dev/null; then
+    NINJA="$(xcrun --find ninja)"
+elif which ninja &>/dev/null; then
----------------
Let's get rid of all this.


================
Comment at: clang/utils/ci/run-buildbot:104-105
+# Print the version of a few tools to aid diagnostics in some cases
+${CMAKE} --version
+${NINJA} --version
+
----------------



================
Comment at: clang/utils/ci/run-buildbot:107
+
+if [ ! -z "${CXX}" ]; then ${CXX} --version; fi
+
----------------
Let's remove this line entirely, CMake prints the version of the compiler in use.


================
Comment at: libcxx/utils/ci/run-buildbot:206
 ;;
+check-format-clang)
+    ! grep -rnI '[[:blank:]]$' clang/lib clang/include clang/docs
----------------
This can be removed now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153920/new/

https://reviews.llvm.org/D153920



More information about the cfe-commits mailing list