[all-commits] [llvm/llvm-project] 741d3c: [libc] Add cmake target for linting libc.

Paula Toth via All-commits all-commits at lists.llvm.org
Thu Apr 16 17:42:23 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 741d3c20161ef5ebb68ede85e9f1a1150124952a
      https://github.com/llvm/llvm-project/commit/741d3c20161ef5ebb68ede85e9f1a1150124952a
  Author: Paula Toth <paulatoth at google.com>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M libc/CMakeLists.txt
    M libc/cmake/modules/LLVMLibCRules.cmake

  Log Message:
  -----------
  [libc] Add cmake target for linting libc.

Summary:
This patch implements running linting on llvm-libc using build rule targets.

1) adds a new target per entrypoint for linting with the naming convention `<qualified_target_name>.__lint__` e.g `libc.src.string.strlen.__lint__`.
2) makes the build target for each entrypoint depend on the linting targets so that they run along with compilation of each entrypoint.
3) adds a lint all target named `lint-libc`.  `check-libc` now depends on this new target.
4) linting creates a lot of additional targets from clang and clang-tidy that need to be built so an opt out flag can be passed to cmake: `LLVM_LIBC_ENABLE_LINTING`.

Reviewers: sivachandra, abrachet

Reviewed By: sivachandra

Subscribers: abrachet, mgorny, tschuett, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D77861




More information about the All-commits mailing list