[libcxx-commits] [PATCH] D117268: [libc++] Install clang-tidy in docker containers and create command db symlink

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 14 11:48:38 PST 2022


philnik updated this revision to Diff 400097.
philnik marked 4 inline comments as done.
philnik added a comment.
Herald added a subscriber: mgorny.

- Address comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117268

Files:
  libcxx/CMakeLists.txt
  libcxx/utils/ci/Dockerfile


Index: libcxx/utils/ci/Dockerfile
===================================================================
--- libcxx/utils/ci/Dockerfile
+++ libcxx/utils/ci/Dockerfile
@@ -70,6 +70,10 @@
 RUN ln -s /usr/bin/clang-format-$LLVM_LATEST_VERSION /usr/bin/clang-format && [ -e $(readlink /usr/bin/clang-format) ]
 RUN ln -s /usr/bin/git-clang-format-$LLVM_LATEST_VERSION /usr/bin/git-clang-format && [ -e $(readlink /usr/bin/git-clang-format) ]
 
+# Install clang-tidy
+RUN apt-get install -y clang-tidy-$LLVM_LATEST_VERSION
+RUN ln -s /usr/bin/clang-tidy-$LLVM_LATEST_VERSION /usr/bin/clang-tidy && [ -e $(readlink /usr/bin/clang-tidy) ]
+
 # Install the most recent GCC
 ENV GCC_LATEST_VERSION=11
 RUN add-apt-repository ppa:ubuntu-toolchain-r/test
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -22,6 +22,8 @@
 
 set(CMAKE_FOLDER "libc++")
 
+set(CMAKE_EXPORT_COMPILE_COMMANDS On)
+
 set(LIBCXX_SOURCE_DIR  ${CMAKE_CURRENT_SOURCE_DIR})
 set(LIBCXX_BINARY_DIR  ${CMAKE_CURRENT_BINARY_DIR})
 set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117268.400097.patch
Type: text/x-patch
Size: 1159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220114/fcc14543/attachment-0001.bin>


More information about the libcxx-commits mailing list