Windows: compile xz with CMake#6947
Merged
hugovk merged 8 commits intopython-pillow:mainfrom Mar 29, 2023
Merged
Conversation
hugovk
reviewed
Feb 13, 2023
Member
Sounds good! What sort of speedup do you see? |
Contributor
Author
Almost 2x on my 6 core 12 thread CPU. With Without |
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
for more information, see https://pre-commit.ci
hugovk
approved these changes
Feb 13, 2023
nulano
commented
Mar 6, 2023
| ".", | ||
| ] | ||
| ), | ||
| f"{{cmake}} --build . --clean-first --parallel --target {target}", |
Contributor
Author
There was a problem hiding this comment.
I originally updated the documentation in this PR to require CMake 3.13+ as that is what xz's CMake files specify.
I missed that the cmake --build command requires CMake 3.15+ when there are multiple targets, I've now updated the PR.
The previous CMake requirement was 3.12, which is what is included with VS2017 and was the oldest I tested when writing the documentation in #4495.
VS2019 includes CMake 3.20, but I've found that 3.15 is sufficient for this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
Compile liblzma with CMake instead of VS project file, for Updated xz to 5.4.1 #6883 (comment):
This might also help with Failed to build Windows ARM64 dependencies #6679 (comment)
Use Ninja instead of NMake to build dependencies by default. Unlike NMake, Ninja can build several files in parallel. This makes very little difference on GHA which only provides 2 CPU cores, but is almost 2x faster on my computer.
Rewrite argument parsing in
winbuild\build_prepare.pyusingargparsefor better maintainability.