From Fedora Project Wiki
Line 60: Line 60:
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->


The individual component libraries will be removed from the clang-lib package in favor of libclang-cpp.so (which is already present in clang-libs).  The component shared libraries enabled by the BUILD_SHARED=ON CMake option is not supported as a distribution configuration by the upstream project and only recommended for use by clang developers[1]
The individual component libraries will be removed from the clang-lib package in favor of libclang-cpp.so (which is already present in clang-libs).  The component shared libraries enabled by the BUILD_SHARED=ON CMake option is not supported as a distribution configuration by the upstream project and only recommended for use by clang developers.[1]


The libclang-cpp.so shared object was added in clang 9.0 and now gives us an alternative shared library option that is supported by the upstream project, which allows us to stop using the component libraries.
The libclang-cpp.so shared object was added in clang 9.0 and now gives us an alternative shared library option that is supported by the upstream project and makes it possible for Fedora packages to stop using the component libraries.


[1] https://llvm.org/docs/CMake.html
[1] https://llvm.org/docs/CMake.html

Revision as of 04:28, 12 December 2019


Stop shipping individual component libraries in clang-lib package

Summary

Remove the individual component libraries (e.g. libclangBasic.so, libclangAST.so, etc.) from the clang-lib package. Packages that depend on the clang libraries should instead link against libclang-cpp.so.

Owner

Current status

  • Targeted release: Fedora 32
  • Last updated: 2019-12-12
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

The individual component libraries will be removed from the clang-lib package in favor of libclang-cpp.so (which is already present in clang-libs). The component shared libraries enabled by the BUILD_SHARED=ON CMake option is not supported as a distribution configuration by the upstream project and only recommended for use by clang developers.[1]

The libclang-cpp.so shared object was added in clang 9.0 and now gives us an alternative shared library option that is supported by the upstream project and makes it possible for Fedora packages to stop using the component libraries.

[1] https://llvm.org/docs/CMake.html

Benefit to Fedora

We will improve stability in Fedora by packaging a build configuration that is supported by the upstream project. In addition, the libclang-cpp.so will provide more LTO optimization opportunities than the component libraries if this option is enabled in Fedora builds. In order to access the clang API with the component libraries, and application might need to link with up to 37 different shared libraries, replacing these with a single shared library will help improve start-up times of applications that depend on clang.

Scope

  • Proposal owners:
    • The proposal owner will ensure that that all packages that depend on clang-libs(bcc, bpftrace, castxml, ccls, clazy, gnome-builder, ispc, kdevelop, lldb, mesa, pocl, qt-creator, qt5-doctools, shiboken2 tinygo) are updated to use libclang-cpp.so.
    • Once all packages have been updated, the clang package will be updated to pass -DBUILD_SHARED=OFF to cmake when configuring.
  • Other developers: The other maintainers will be responsible for reviewing and approving changes to their packages.
  • Release engineering: [1] (a check of an impact with Release Engineering is needed)
  • Policies and guidelines: No policies or guidelines will need to be updated as a result of this change.
  • Trademark approval: N/A (not needed for this Change)

Upgrade/compatibility impact

This change should not impact upgradeability.

How To Test

This can be tested using existing CI tests or tests in the %check section of spec files. The changes should not be visible to end users so tests should behave exactly as they did before the change.

User Experience

End users that develop applications using the clang libraries will need to update their applications to use libclang-cpp.so instead of the individual component libraries if they want to use libraries shipped with Fedora. This may be inconvenient, however we don't want users to continue using a configuration that's not supported by the upstream project. Once this change is made though, the applications will see the same benefits mentioned in the "Benefits to Fedora" section.

End users using Fedora packages that depend on clang libraries will not need to do anything different.

Dependencies

The following packages depend on clang-libs and will need to be updated:

bcc, bpftrace, castxml, ccls, clazy, gnome-builder, ispc, kdevelop, lldb, mesa, pocl, qt-creator, qt5-doctools, shiboken2, tinygo

Contingency Plan

  • Contingency mechanism: (What to do? Who will do it?) If we are unable to migrate all dependent packages in time, then we will postpone the final step of passing -DBUILD_SHARED_LIBS=OFF to cmake when configuring clang until a future Fedora release. In this case, packages that have already been migrated will continue to work, since libclang-cpp.so is including in the clang-libs package regardless of the value of BUILD_SHARED_LIBS passed to cmake.
  • Contingency deadline: Change Checkpoint: Completion deadline
  • Blocks release? No
  • Blocks product? None

Documentation

Release notes will be added for this change.

Release Notes

the individual component libraries (e.g. libclangBasic.so, libclangAST.so, etc.) have been removed from the clang-lib packages. Developers who want to link their application against the clang libraries should link against libclang-cpp.so instead.