diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml --- a/libcxx/utils/ci/buildkite-pipeline.yml +++ b/libcxx/utils/ci/buildkite-pipeline.yml @@ -23,6 +23,7 @@ # Theses numbers are available in all runners, making it easier to update the # version number. env: + LLVM_STABLE_VERSION: "15" LLVM_HEAD_VERSION: "16" GCC_STABLE_VERSION: "12" steps: @@ -34,6 +35,8 @@ command: "libcxx/utils/ci/run-buildbot check-format" artifact_paths: - "**/clang-format.patch" + env: + GIT_CLANG_FORMAT: "/usr/bin/git-clang-format-${LLVM_STABLE_VERSION}" agents: queue: "libcxx-builders" os: "linux" diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -156,8 +156,11 @@ echo "+++ Checking formatting" # We need to set --extensions so that clang-format checks extensionless files. mkdir -p ${BUILD_DIR} - git-clang-format \ - --binary /usr/bin/clang-format --diff \ + if [ -z "${GIT_CLANG_FORMAT}" ]; then + GIT_CLANG_FORMAT=git-clang-format + fi + ${GIT_CLANG_FORMAT} \ + --diff \ --extensions ',h,hh,hpp,hxx,c,cc,cxx,cpp' HEAD~1 \ -- \ libcxx/{benchmarks,include,src,test} \