-
Notifications
You must be signed in to change notification settings - Fork 20
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 meson option for a static build #46
Conversation
99c9fd2
to
757df84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a commit message comment:
Can you add a mention of e.g. pipx install meson
or pipx upgrade meson
in the commit message for Bump meson_version to 1.1 to support meson.options
? Just trying to help people out who might not realise that they're not constrained to their distro meson.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the commit message for Add meson option for a static build
to describe why this was necessary? What problems did you see and why did the resolve them?
757df84
to
edd7c79
Compare
Ah, so I did just find this: https://mesonbuild.com/Release-notes-for-0-63-0.html#new-prefer_static-builtin-option Looks like we can drop the change to the libfdt |
605255a
to
c3d4eb7
Compare
Static builds of the culvert binary allow it to run anywhere without having to worry about packaging up libraries. This is useful if sending the binary to 3rd parties to run or when trying to support multiple Linux distributions that may have very old system libraries. Signed-off-by: Ian Woloschin <[email protected]> [AJ: Drop static kwarg for libfdt dependency, fix actions] Signed-off-by: Andrew Jeffery <[email protected]>
I have a use case for a "run anywhere" build of
culvert
so I wanted to build a statically linked binary. I've added a meson option to support this and left the default as dynamically linked.To test, delete your
build
directory and run:meson setup build -Dstatic=true && meson compile -C build
An important note, to set up
meson.options
required bumping the meson_version to >= 1.1. I also fixed one new warning that came up after that change. I assume this is fine (it can easily be installed viapip3
), but if it is not I can refactor this PR to usemeson_options.txt
.