gnustep / libobjc2

Objective-C runtime library intended for use with Clang.
http://www.gnustep.org/
MIT License
434 stars 118 forks source link

Enable test ObjCXXEHInterop_arc on Windows for Clang 16+ #233

Closed weliveindetail closed 1 year ago

weliveindetail commented 1 year ago

This test used to fail on Windows, because Clang's codegen and transformation haven't been in-line with the requirements of the WinEH backend in LLVM. The following changes implement the missing pieces and let the test to pass in both debug and release mode:

https://reviews.llvm.org/D128190 [WinEH] Apply funclet operand bundles to nounwind intrinsics that lower to function calls in the course of IR transforms https://reviews.llvm.org/D134441 [ObjC][ARC] Fix target register for call expanded from CALL_RVMARKER on Windows https://reviews.llvm.org/D137939 [CGObjC] Open cleanup scope before SaveAndRestore CurrentFuncletPad and push CatchRetScope early https://reviews.llvm.org/D137944 [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

weliveindetail commented 1 year ago

This should be ready once D137939 and D137944 landed

weliveindetail commented 1 year ago
The following tests FAILED:
      7 - ARCTest_arc
      8 - ARCTest_arc_optimised
     41 - PropertyIntrospectionTest2_arc
     42 - PropertyIntrospectionTest2_arc_optimised

These tests will pass in release mode as well with Clang 16+

davidchisnall commented 1 year ago

Can you disable those for clang <16 and then we can merge this and have a follow-on to bump the clang version in CI once it's released?

weliveindetail commented 1 year ago

This should be ready to merge now. Thx Btw this is addressing https://github.com/gnustep/libobjc2/issues/222

weliveindetail commented 1 year ago

First 16.x Release Candidates are out: https://github.com/llvm/llvm-project/releases It might be worth double-checking that my CMake changes do enable the tests on Windows with Clang 16 and that they actually succeed in release mode (and not only work for me).

triplef commented 1 year ago

Confirmed with Clang 16 rc2: image