Skip to content

Conversation

@mcbarton
Copy link
Collaborator

@mcbarton mcbarton commented Oct 21, 2025

Description

Please include a summary of changes, motivation and context for this PR.

-DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off tells CppInterOp to use Cling in the clang-repl based instructions. Found this while working on the llvm 21 PR.

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

@mcbarton mcbarton requested a review from vgvassilev October 21, 2025 10:20
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.83%. Comparing base (2ec0b9a) to head (7140c95).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #734   +/-   ##
=======================================
  Coverage   79.83%   79.83%           
=======================================
  Files           9        9           
  Lines        3963     3963           
=======================================
  Hits         3164     3164           
  Misses        799      799           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@aaronj0 aaronj0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These flags are unecessary as well..
Cling_DIR for sure, iirc we are no longer required to pass Clang_DIR. But thats based on how I build locally so there could be cases where it is required that I don't know of

mkdir CppInterOp/build/
cd CppInterOp/build/
cmake -DBUILD_SHARED_LIBS=ON -DCPPINTEROP_USE_CLING=ON -DCPPINTEROP_USE_REPL=Off -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
cmake -DBUILD_SHARED_LIBS=ON -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmake -DBUILD_SHARED_LIBS=ON -DCling_DIR=$LLVM_DIR/build/tools/cling -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DClang_DIR=$LLVM_DIR/build/lib/cmake/clang -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..
cmake -DBUILD_SHARED_LIBS=ON -DLLVM_DIR=$LLVM_DIR/build/lib/cmake/llvm -DCMAKE_INSTALL_PREFIX=$CPPINTEROP_DIR ..

@mcbarton
Copy link
Collaborator Author

@aaronj0 Thanks for the review. Good catch with the leftover Cling dir reference. Somehow I completely forgot about that. I think your right about clang_dir not being necessary. I think the cmake logic is such that as long as you pass either llvm_dir or clang_dir then it should be able to find the other. I will check this is true, and if yes, purge any reference to clang_dir from the documentation and ci so everything is consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants