Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versioning support and update CMake configuration #3933

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lum1n0us
Copy link
Collaborator

No description provided.

@lum1n0us lum1n0us marked this pull request as ready for review December 23, 2024 23:51
@lum1n0us
Copy link
Collaborator Author

@jirutka Please inform me if platforms other than Linux require the SONAME feature.

@jirutka
Copy link

jirutka commented Dec 24, 2024

The same applies to all Unix and Unix-like systems, so also BSDs and macOS.

@yamt
Copy link
Collaborator

yamt commented Dec 24, 2024

maybe you can do it for all platforms and let cmake do whatever appropriate?
https://cmake.org/cmake/help/latest/prop_tgt/SOVERSION.html

@yamt
Copy link
Collaborator

yamt commented Dec 24, 2024

build-tested for macOS.

master:

libiwasm.dylib:
        @rpath/libiwasm.dylib (compatibility version 0.0.0, current version 0.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)

with this PR:

libiwasm.dylib:
        @rpath/libiwasm.2.dylib (compatibility version 2.0.0, current version 2.2.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1351.0.0)

iirc, on macOS, a dylib can be loaded if

  • the filename matches
  • and compatibility version is larger than requested

Copy link
Collaborator

@yamt yamt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable to me

* version.h.in is a template file. version.h is a generated file.
* Please do not edit both files directly.
*
* Any changes to the version should be done in the version.cmake file.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you document the procedure?
eg. 1. update version.cmake, 2. run something (what?) to regen this file, 3. commit this generated file as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants