[all-commits] [llvm/llvm-project] 6d7b3d: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all ...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Mon Sep 20 04:56:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d7b3d6b3a8dbd62650b6c3dae1fe904a8ae9048
      https://github.com/llvm/llvm-project/commit/6d7b3d6b3a8dbd62650b6c3dae1fe904a8ae9048
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-09-20 (Mon, 20 Sep 2021)

  Changed paths:
    M clang/cmake/modules/AddClang.cmake
    M clang/lib/StaticAnalyzer/CMakeLists.txt
    M llvm/cmake/modules/AddLLVM.cmake

  Log Message:
  -----------
  Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source

Since https://reviews.llvm.org/D87118, the StaticAnalyzer directory is
added unconditionally. In theory this should not cause the static analyzer
sources to be built unless they are referenced by another target. However,
the clang-cpp target (defined in clang/tools/clang-shlib) uses the
CLANG_STATIC_LIBS global property to determine which libraries need to
be included. To solve this issue, this patch avoids adding libraries to
that property if EXCLUDE_FROM_ALL is set.

In case something like this comes up again: `cmake --graphviz=targets.dot`
is quite useful to see why a target is included as part of `ninja all`.

Reviewed By: thakis

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


  Commit: 7b68c0725d89ac9bd48b9b6a51d9cd0bc7146829
      https://github.com/llvm/llvm-project/commit/7b68c0725d89ac9bd48b9b6a51d9cd0bc7146829
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-09-20 (Mon, 20 Sep 2021)

  Changed paths:
    A llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-condbr.mir
    A llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-condbr.mir.expected
    A llvm/test/tools/UpdateTestChecks/update_mir_test_checks/lit.local.cfg
    A llvm/test/tools/UpdateTestChecks/update_mir_test_checks/x86-condbr.test

  Log Message:
  -----------
  pre-commit test for D109767

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


  Commit: 817e23d481be52e6e0fd779efce2beb105e8c7b6
      https://github.com/llvm/llvm-project/commit/817e23d481be52e6e0fd779efce2beb105e8c7b6
  Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
  Date:   2021-09-20 (Mon, 20 Sep 2021)

  Changed paths:
    M llvm/test/CodeGen/X86/GlobalISel/select-phi.mir
    M llvm/test/tools/UpdateTestChecks/update_mir_test_checks/Inputs/x86-condbr.mir.expected
    M llvm/utils/update_mir_test_checks.py

  Log Message:
  -----------
  [update_mir_test_checks.py] Use -NEXT FileCheck directories

Previously the script emitted output using plain CHECK directives. This
can result in a test passing even if there are some instructions between
CHECK directives that should have been removed. It also makes debugging
tests that have the output in a different order more difficult since
FileCheck can match with a later line and then complain about the "wrong"
directive not being found.

This will cause quite large diffs when updating existing tests, but I'm not sure we need an opt-in flag here.

Depends on D109765 (pre-commit tests)

Reviewed By: MaskRay

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


Compare: https://github.com/llvm/llvm-project/compare/7fc12b822c5d...817e23d481be


More information about the All-commits mailing list