[PATCH] D36211: [cmake] Expose the dependencies of ExecutionEngine as PUBLIC

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 19:20:07 PDT 2017


chapuni added a comment.

I talked to @beanz in the irc and I understood the background.

At the moment, we may introduce a tweak to expose RuntimeDyld as convenience for **external **LLVM users.
Based on @beanz's https://reviews.llvm.org/P8013. It can be simplified since the keyword can be overridden.
@mgorny, could you confirm it works?

  --- a/llvm/lib/ExecutionEngine/CMakeLists.txt
  +++ b/llvm/lib/ExecutionEngine/CMakeLists.txt
  @@ -14,6 +14,10 @@ add_llvm_library(LLVMExecutionEngine
     intrinsics_gen
     )
  
  +if(BUILD_SHARED_LIBS)
  +  target_link_libraries(LLVMExecutionEngine PUBLIC LLVMRuntimeDyld)
  +endif()
  +
   add_subdirectory(Interpreter)
   add_subdirectory(MCJIT)
   add_subdirectory(Orc)

I strongly hope this tweak should be removed in the future.
I think we can make that llvm/ExecutionEngine/*.h (not implementations) doesn't emit implementations referring to RuntimeDyld.
At a glance, we may avoid "=default" ctor/dtor and stick them into certain modules w/o anchor().
@lhames, do you think we will do?


Repository:
  rL LLVM

https://reviews.llvm.org/D36211





More information about the llvm-commits mailing list