This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Fix the build on OpenBSD by removing LLVM_VERSION_SUFFIX from created shared library names
Needs ReviewPublic

Authored by brad on Nov 17 2022, 7:18 PM.

Details

Summary

This fixes building on OpenBSD. Having a string at the end of a filename (.e.g. libclang.so.15.0.0git) of a library like this is not valid and breaks linking.

https://github.com/llvm/llvm-project/issues/53932

Diff Detail

Event Timeline

brad created this revision.Nov 17 2022, 7:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2022, 7:18 PM
Herald added a subscriber: krytarowski. · View Herald Transcript
brad requested review of this revision.Nov 17 2022, 7:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 17 2022, 7:18 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
brad retitled this revision from [llvm] Remove LLVM_VERSION_SUFFIX from created shared library names to [llvm] Fix the build on OpenBSD by removing LLVM_VERSION_SUFFIX from created shared library names.Nov 29 2022, 1:11 PM
brad edited the summary of this revision. (Show Details)
thieta added a comment.Dec 6 2022, 8:40 AM

If this fixes OpenBSD it looks fine I think. But I wonder if we shouldn't just do this if we are on OpenBSD, changing the SOVERSION has been fraught with problems before since people have scripts that expect certain layouts.

Without having more tests and more investigation I will only accept this if the change only happens on OpenBSD.

thieta added a comment.Feb 9 2023, 2:08 AM

@brad is this something you still need for OpenBSD?