[PATCH] D139644: [InlineAdvisor] Allow loading advisors as plugins

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 10:33:43 PST 2022


mtrofin added a comment.

In D139644#4001765 <https://reviews.llvm.org/D139644#4001765>, @IBricchi wrote:

> I think your suggestions make sense, I've updated the cmake file to address those points.

Thanks, looks good - just the thing about llvm-config.h.cmake, it's the canonical way to "convert" cmake flags to macro directives - so you wouldn't need to  do :

  if (LLVM_ENABLE_PLUGINS)
    add_definitions(-DLLVM_ENABLE_PLUGINS)
  endif()

and, added bonus, others in the future that would want to `#ifdef LLVM_ENABLE_PLUGINS` would be able to do so.



================
Comment at: llvm/unittests/Analysis/CMakeLists.txt:68
+if (LLVM_ENABLE_PLUGINS)
+  add_definitions(-DLLVM_ENABLE_PLUGINS)
+endif()
----------------
see the early comment about using llvm-configlh.cmake here


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

https://reviews.llvm.org/D139644



More information about the llvm-commits mailing list