Use separate lib build paths for different configurations - #27694
Merged
Conversation
Libraries with different configurations use different directories in the sysroot (e.g. wasm64-emscripten/pic) but currently all use the same build directory across configurations. When using Ninja, these intermediate directories persist and can result in corruption if one configuration is built after another. We could solve this by just clearing them, but keeping the build directories around can be useful for local development, and will also allow building all the configurations at once (in a future PR). This PR just makes the build directory share the path logic with the lib directory. (The ports system has its own separate logic).
kripken
reviewed
Sep 9, 2026
| @staticmethod | ||
| def get_build_dir(): | ||
| return system_libs.get_build_dir() | ||
| return cache.get_path('build') |
Member
Author
There was a problem hiding this comment.
The ports system has its own method of mangling library build paths (see the top lines of build_port above) and I wasn't intending to change that in this PR.
We could further merge the logic to standardize on the structure used by the system libs; one thing that would have to change is that when a port is upgraded or redownloaded, it deletes all the builds at once from the shared build directory, so we'd have to update that logic. It might be better as a separate PR.
kripken
approved these changes
Sep 9, 2026
| @staticmethod | ||
| def get_build_dir(): | ||
| return system_libs.get_build_dir() | ||
| return cache.get_path('build') |
dschuff
enabled auto-merge (squash)
September 9, 2026 23:51
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.
Libraries with different configurations use different directories in the sysroot (e.g. wasm64-emscripten/pic) but currently all use the same build directory across configurations. When using Ninja, these intermediate directories persist and can result in corruption if one configuration is built after another. We could solve this by just clearing them, but keeping the build directories around can be useful for local development, and will also allow building all the configurations at once (in a future PR).
This PR just makes the build directory share the path logic with the lib directory. (The ports system has its own separate logic).