This is an archive of the discontinued LLVM Phabricator instance.

[clang] Do not override libclang.so's SOVERSION if CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION
ClosedPublic

Authored by mgorny on Oct 11 2022, 11:04 AM.

Details

Summary

Instead of setting libclang.so's SOVERSION to CLANG_MAJOR_VERSION
when CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION is enabled, do not override
it and let LLVM set the correct SOVERSION. This fixes libclang.so
missing LLVM_VERSION_SUFFIX, and harmonizes the SOVERSION with other
shared libraries.

Diff Detail

Event Timeline

mgorny created this revision.Oct 11 2022, 11:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 11:04 AM
mgorny requested review of this revision.Oct 11 2022, 11:04 AM
thesamesam accepted this revision.Oct 11 2022, 11:17 AM

It fixes a real-life issue I hit with Doxygen, as you know, so I'm happy with this - and I don't see a reason to treat libclang specially. I'll wait to see what any other reviewers say first though.

This revision is now accepted and ready to land.Oct 11 2022, 11:17 AM
MaskRay accepted this revision.EditedOct 11 2022, 11:21 AM

I don't understand this well, though. Is CLANG_VERSION_MAJOR wrong or not defined in some cases?

I don't understand this well, though. Is CLANG_VERSION_MAJOR wrong or not defined in some cases?

It's about LLVM_VERSION_SUFFIX. Normally, SOVERSION for all libraries is ${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 10:14 PM