Skip to content

Apple: Handle generation and comsuption of text-based stubs (.tbd files)

This MR provides the full support of the text-based stubs (i.e. .tbd files). These files are handled similarly of the import libraries On Windows because the goal is the same.

When .tbd files are supported by the platform:

  • .tbd file will be generated if target property ENABLE_EXPORTS is defined with a true value. This property is relevant for SHARED libraries (standard and framework).
  • installation and export of .tbd files are managed using ARCHIVE type (same as on Windows). NAMELINK_ONLY and NAMELINK_SKIP are now supported for ARCHIVE type to handle versioning (same behavior as for LIBRARY).
  • For an IMPORTED target, ENABLE_EXPORTS must be defined to ensure .tbd file support: IMPORTED_IMPLIB property is used for specifying .tbd file for an imported library (shared or framework). IMPORTED_LOCATION property can also be specified to ensure a transparent consumption (The IMPORTED_LOCATION is used if the .tbd files are not supported by the platform).

Fixes: #24123 (closed)

Merge request reports

Loading