OpenTimelineIO icon indicating copy to clipboard operation
OpenTimelineIO copied to clipboard

Offer alternative for cxxabi on Windows (Swift+Clang).

Open furby-tm opened this issue 1 year ago • 3 comments
trafficstars

Summarize your change.

This fixes the clang compilation of OpenTimelineIO on Microsoft Windows, when compiling with Swift. Previously, the cxxabi.h header was erroneously getting included in the Windows clang compilation of OpenTimelineIO's stringUtils.cpp file because it was being conditionally compiled for clang across all platforms, and this header does not exist on the Windows platform.

  • The include for cxxabi.h is now guarded via __has_include(<cxxabi.h>).
  • A new preprocessor definition for OTIO_HAVE_DEMANGLER is set to 1 if cxxabi.h exists, and 0 if this header does not exist.
  • Previous checks against defined(__GNUC__) || defined(__clang__) are replaced with conditional compilation checks against the new OTIO_HAVE_DEMANGLER preprocessor define.

furby-tm avatar Jul 29 '24 19:07 furby-tm

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: furby-tm / name: furby™ (69144f24f6dd1f66b3b75047f4d2ea3fbdf20daa)

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.71%. Comparing base (c0e97b0) to head (69144f2). Report is 21 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1787      +/-   ##
==========================================
- Coverage   84.11%   81.71%   -2.41%     
==========================================
  Files         198      176      -22     
  Lines       22241    12319    -9922     
  Branches     4687     3022    -1665     
==========================================
- Hits        18709    10066    -8643     
+ Misses       2610     1717     -893     
+ Partials      922      536     -386     
Flag Coverage Δ
py-unittests 81.71% <ø> (-2.41%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/opentimelineio/stringUtils.cpp 44.44% <ø> (ø)

... and 67 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d213805...69144f2. Read the comment docs.

codecov-commenter avatar Jul 29 '24 20:07 codecov-commenter

If the team prefers to remove the cxxabi demangling, I can update this PR to deprecate it instead. Please feel free to ping me in this issue once the team has reached a consensus.

furby-tm avatar Aug 03 '24 18:08 furby-tm

From some offline discussion, it seems there is no objection to removing the demangling. @furby-tm we would gladly accept this PR as-is, or with the demangling removed. Please let us know which you'd like.

jminor avatar Oct 01 '24 19:10 jminor

I'll go ahead and remove the demangling @jminor

furby-tm avatar Oct 01 '24 21:10 furby-tm

Closing in favor of https://github.com/AcademySoftwareFoundation/OpenTimelineIO/pull/1800

furby-tm avatar Oct 01 '24 22:10 furby-tm