Skip to content

Conversation

mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this 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

Copy link

codecov bot commented Jul 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.46%. Comparing base (0b1271a) to head (541711e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #672   +/-   ##
=======================================
  Coverage   81.46%   81.46%           
=======================================
  Files           9        9           
  Lines        4213     4213           
=======================================
  Hits         3432     3432           
  Misses        781      781           
Files with missing lines Coverage Δ
lib/CppInterOp/Compatibility.h 92.03% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 89.60% <100.00%> (ø)
Files with missing lines Coverage Δ
lib/CppInterOp/Compatibility.h 92.03% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 89.60% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton mcbarton force-pushed the Add-llvm-21-support branch from 086ee33 to 9f09f8a Compare July 15, 2025 18:57
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton mcbarton force-pushed the Add-llvm-21-support branch from fbd1215 to 410db40 Compare July 15, 2025 19:32
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

3 similar comments
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

Current progress with adding compatibility for llvm 21. Can build on all platforms. Can pass all tests for native Windows, native Linux and Emscripten platform. MacOS errors for the following test on both arm and x86

1: [ RUN ] InterpreterTest.IncludePaths
1: LLVM ERROR: Invalid option set!

@mcbarton mcbarton force-pushed the Add-llvm-21-support branch from c04a271 to 015f4f0 Compare July 17, 2025 13:14
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton mcbarton force-pushed the Add-llvm-21-support branch from 015f4f0 to 60df3d7 Compare July 21, 2025 07:15
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

For the MacOS failures we apear to be triggering this line

if (E.IsFramework && E.Group != frontend::Angled)
. Not entirely sure what that error is catching at first glance, and why its not triggered for other platforms, but will investigate.

@mcbarton mcbarton force-pushed the Add-llvm-21-support branch from 60df3d7 to 2a280d1 Compare August 6, 2025 21:49
Copy link
Contributor

github-actions bot commented Aug 6, 2025

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

mcbarton commented Aug 7, 2025

Something has happened to the llvm 21 release branch in the last 2 weeks to break the ScopeReflectionTest.GetNumBases test in CppInterOp. Also the Windows build of CppInterOp has broken somehow.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@anutosh491
Copy link
Collaborator

Hey @mcbarton ,

Are you working on this ?

I think I saw quite some errors errors while trying to build cppinterop against latest llvm 21 few days back.

Copy link
Contributor

github-actions bot commented Sep 9, 2025

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

mcbarton commented Sep 9, 2025

Hey @mcbarton ,

Are you working on this ?

I think I saw quite some errors errors while trying to build cppinterop against latest llvm 21 few days back.

@anutosh491 With the exception of the Windows native build you can build CppInterOp against llvm 21 with the changes in this PR (Windows fails building llvm). The tests do not pass however. Given the changes in this PR are minimal, then the source of these errors are likely on the llvm side. I will update this PR soon to get rid of the Windows Emscripten cross compile patch since it is no longer needed, and to update the documentation. Not sure I have any spare time at the moment though to work out the source of the failing tests.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@Vipul-Cariappa Vipul-Cariappa marked this pull request as ready for review September 15, 2025 09:22
Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

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

LGTM. Will approve if the CI is green.
@mcbarton, does this also test cppyy with LLVM 21?
@vgvassilev, could you take a look at the .patch files in this PR?

@@ -0,0 +1,20 @@
diff --git a/llvm/cmake/modules/CrossCompile.cmake b/llvm/cmake/modules/CrossCompile.cmake
Copy link
Collaborator Author

@mcbarton mcbarton Sep 15, 2025

Choose a reason for hiding this comment

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

This patch needs removing now since we no longer need it. The other llvm patch is one we have used for Emscripten builds for both llvm 19 and 20 (it isn't needed for functionality, but helps the xeus-cpp deployment have a clear folder when executing cells). I think we also need to add the exception handling patch to this PR too, so that the deployment will work correctly.

@mcbarton
Copy link
Collaborator Author

LGTM. Will approve if the CI is green. @mcbarton, does this also test cppyy with LLVM 21? @vgvassilev, could you take a look at the .patch files in this PR?

This PR doesn't test cppyy for llvm 21. This is normally done is 2 stages. First we update CppInterOp to a new llvm, and then once that is in, we open up another PR in cppyy to switch the cppyy option to on. We are still not testing cppyy for llvm 20 I believe.

@mcbarton
Copy link
Collaborator Author

The documentation still needs updating as part of this PR, so that people are aware they can build with llvm 21. This is usually done by updating the release branch cloned for llvm for both the native and emscripten builds in the documentation, and updating the names for the patches applied.

@mcbarton
Copy link
Collaborator Author

Once we have the ci green, we probably need to remove a few ci jobs, since we are hitting the maximum cache size again. My suggestion is to remove the Ubuntu x86 llvm 18 and osx x86 llvm 18 jobs. This will scrap us just under the maximum I think, and we can continue to support these from the cppyy repos.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@mcbarton
Copy link
Collaborator Author

I have opened up an issue in llvm about the failing Windows build for llvm 21 here llvm/llvm-project#158716

@mcbarton
Copy link
Collaborator Author

@anutosh491 Has this patch been moved upstream yet https://github.com/compiler-research/CppInterOp/blob/main/patches/llvm/emscripten-clang20-3-enable_exception_handling.patch or do I need to work out how to update this patch to work for the llvm 21 release branch?

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@anutosh491
Copy link
Collaborator

Hey @mcbarton does the patch not sit well with llvm 21 ? If that's the case feel free to update it accordingly if that's possible.

I shall revamp my PR on this (now that we have emscripten based tests) and try getting this upstream in a couple of days.

@anutosh491
Copy link
Collaborator

hey @mcbarton here's the updated pr on llvm for the patch : llvm/llvm-project#132670

Hope this helps if we need to keep it for some more time on llvm 21

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.

3 participants