[libcxx-commits] [PATCH] D117357: [libc++] Add the "lint" scripts to libcxx-generate-files.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 14 13:57:11 PST 2022


ldionne added a comment.

I would like to retain the notion that these are tests, they are not generating anything. How about this:

  diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
  index 1375bf45e7c7..b45a39ce832b 100644
  --- a/libcxx/test/CMakeLists.txt
  +++ b/libcxx/test/CMakeLists.txt
  @@ -138,10 +138,13 @@ if (LIBCXX_INCLUDE_TESTS)
       DEPENDS cxx ${LIBCXX_TEST_DEPS}
       COMMENT "Builds dependencies required to run the test suite.")
   
  +  add_lit_target(check-cxx-lint "Lint the header files, CMakeLists.txt, and modulemap."
  +                 "${LIBCXX_SOURCE_DIR}/test/libcxx/lint")
  +
     add_lit_testsuite(check-cxx
       "Running libcxx tests"
       ${CMAKE_CURRENT_BINARY_DIR}
  -    DEPENDS cxx-test-depends)
  +    DEPENDS cxx-test-depends check-cxx-lint)
   endif()
   
   if (LIBCXX_GENERATE_COVERAGE)

This will have a couple of downsides, like that it runs all of Lit just for linting (which is slow and verbose). But both of these problems have solutions and we need to fix them anyways (I have a patch that caches Lit configuration locally, let me update that to see what people think).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117357



More information about the libcxx-commits mailing list