[libcxx-commits] [PATCH] D93201: [libc++] Install git-clang-format on CI nodes.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Dec 14 03:32:21 PST 2020


curdeius created this revision.
curdeius added a reviewer: ldionne.
Herald added a subscriber: arichardson.
curdeius requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Two problems fixed:

- an old version of clang-format get installed by default (6.0).
- git-clang-format is not present, only git-clang-format-<version> (e.g. git-clang-format-6.0).

Solution:

- install clang-format-11 with explicit version
- make symlink git-clang-format to the latest version of git-clang-format-<version>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93201

Files:
  libcxx/utils/ci/Dockerfile


Index: libcxx/utils/ci/Dockerfile
===================================================================
--- libcxx/utils/ci/Dockerfile
+++ libcxx/utils/ci/Dockerfile
@@ -45,8 +45,10 @@
 RUN apt-get update && apt-get install -y bash curl
 
 # Install various tools used by the build or the test suite
-RUN apt-get update && apt-get install -y ninja-build python3 python3-sphinx python3-distutils git gdb clang-format
+RUN apt-get update && apt-get install -y ninja-build python3 python3-sphinx python3-distutils git gdb clang-format-11
 RUN apt-get update && apt-get install -y libc6-dev-i386 # Required to cross-compile to 32 bits
+# Make a symbolic link to git-clang-format (pointing to git-clang-format-<version>), if it doesn't exist.
+RUN which git-clang-format || $(cd /usr/bin/ && ln -s $(ls git-clang-format-* | sort -rV | head -n 1) git-clang-format)
 
 # Install the most recently released LLVM
 RUN apt-get update && apt-get install -y lsb-release wget software-properties-common


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93201.311539.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201214/6be2da0b/attachment.bin>


More information about the libcxx-commits mailing list