[PATCH] D68172: Don't install example analyzer plugins

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 28 05:56:17 PDT 2019


aaronpuchert added a comment.

In D68172#1686960 <https://reviews.llvm.org/D68172#1686960>, @Szelethus wrote:

> The patch looks alright, I won't formally accept because if I knew how these worked, it wouldn't have caused so much pain to so many people :)


If it helps, this is from `add_llvm_library` in llvm/cmake/modules/AddLLVM.cmake:

  if (ARG_MODULE AND NOT TARGET ${name})
    # Add empty "phony" target
    add_custom_target(${name})
  elseif( EXCLUDE_FROM_ALL )
    set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
  elseif(ARG_BUILDTREE_ONLY)
    set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name})
  else()
    # ... installation code ... 
    set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
  endif()

The plugins are modules, but the targets exist, so we don't run into the first branch. With `EXCLUDE_FROM_ALL` we would make the target not being build by default, and with `ARG_BUILDTREE_ONLY` we make them build, but not install.

> I honestly feel bad about these plugins. The first analyzer plugin laid in the `examples/` folder, but I was cautioned against adding more there as we're not really supporting them, but I think all the trouble of moving them wasn't worth it at all for such a negligible "gain".

Moving them out of `test` was probably necessary, but the current location should be fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68172





More information about the cfe-commits mailing list