-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 liblzma port #12990
base: main
Are you sure you want to change the base?
Add liblzma port #12990
Conversation
Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS. |
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.
tools/ports/liblzma.py
Outdated
shutil.rmtree(dest_path, ignore_errors=True) | ||
shutil.copytree(source_path, dest_path) | ||
|
||
config_args = ['./configure', '--disable-shared'] |
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.
It would be good to avoid configure, as that may not work on windows. Is there another build system there, or maybe we can run configure and bundle the output config.h
or such?
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.
I'll check if this works on Windows. I'd rather avoid pulling the guts from build system if possible. It is ugly and harder to maintain.
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.
Ok, obviously it won't work on Windows without MinGW shell. There's also cmake available, but if we want building on Windows without other dependencies that would miss the point.
I changed it to don't use any build system, by bundling necessary config defines.
Yes, I've been trying to push back on adding more ports until I can land the "contrib" ports system I've been working on. Its still very much WIP: #13002 Since I've not been prioritizing it I feel I have less sway in blocking these kind of changes in the mean time. But, is there some way we could hold of landing this for a few a while? i.e. maybe you can maintain a downstream patch for this for a bit? We could always land it and then transition it over to contrib I guess? but exactly how contrib ports will work, and how they will get built (for example in emsdk) is still not clear so anyone who started using it right away could get broken by a future move to contrib. |
212566d
to
b84c132
Compare
Well, it's nothing critical, but it would make building fully compatible OpenTTD client on emscripten easier. I think liblzma is used widely enough so it might be useful for others (and other compressors like zlib or bzip2 are already in ports). If not, I think there should be README in ports directory saying that no more ports are accepted for now. I'm slightly confused how to handle |
Most ports don't change their libname based on settings so don't need to worry about that. However of those that do it looks like only It also looks like For now, if you want a separate |
(do you need a separate pthreads build here?) |
With pthreads disabled it will be built without pthread dependency, and I think this is desired? Or it is OK to allow it to link to pthread stub, and let it decide in runtime that no extra cores are available? |
be34b1e
to
4579a3f
Compare
You can assume pthread stubs are always available if it the code purely uses pthreads it maybe OK to have a single build. The main issue would be if there is code in there that uses atomic (C11 or C++11 atomics or GNU builtins, etc). |
I've updated the build script to work in Emscripten 2.0.15 https://github.com/pelya/openttd-android/blob/1.11/os/emscripten/emsdk-liblzma.patch |
The patch updated for Emscripten 2.0.31: |
No description provided.