-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable CppInterOp #16814
base: master
Are you sure you want to change the base?
Enable CppInterOp #16814
Conversation
[CppInterOp](https://github.com/compiler-research/CppInterOp) exposes API from Clang and LLVM in a mostly backward compatibe way. The API support downstream tools that utilize interactive C++ by using the compiler as a service. Adopting more of CppInterOp in ROOT will help simplify the LLVM migration process and allow us to upstream more patches to either CppInterOp or LLVM.
This uses provides InterOp with the TInterpreter instance created by ROOT in TCling. The InterOp API can now be used without providing interpreter ownership.
9392e07
to
2d038e7
Compare
Test Results 5 files 5 suites 19h 57m 10s ⏱️ For more details on these failures, see this check. Results for commit 2d038e7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The direction looks good to me! In addition to the test failures that need fixing, some comments inline for consideration
core/metacling/src/CMakeLists.txt
Outdated
add_dependencies(MetaCling CLING clangCppInterOp) | ||
# target_include_directories(MetaCling SYSTEM PUBLIC ${source_dir}/include/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move these modifications to the next commit, where CppInterOp is used?
set(LLVM_DIR "${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/lib/cmake/llvm") | ||
set(Clang_DIR "${CMAKE_BINARY_DIR}/interpreter/llvm-project/llvm/tools/clang/lib/cmake/clang") | ||
set(Cling_DIR "${CMAKE_BINARY_DIR}/interpreter/cling") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need adapting for externally built LLVM, Clang, and / or Cling. For LLVM and Clang, I believe this should already be taken care of above, no?
@@ -0,0 +1,372 @@ | |||
<div align="center"> | |||
|
|||
# CppInterOp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, we probably want a similar workflow as .github/workflows/llvm-diff.yml
to make sure our copies are not diverging
#include "clang/Interpreter/CppInterOp.h" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed yet
CppInterOp exposes API from Clang and LLVM in a mostly backward compatibe way. The API support downstream tools that utilize interactive C++ by using the compiler as a service.
This PR is the first step in using pure clang based reflection API in meta, and part of eventually integrating the JITCall and DynamicLibraryManager infrastructure.
Adopting more of CppInterOp in ROOT will help simplify the LLVM migration process and allow us to upstream more patches to either CppInterOp or LLVM.