Refactor uv-toolchain::platform to use target-lexicon#4236
Merged
Conversation
b25aa0b to
b337590
Compare
zanieb
commented
Jun 11, 2024
Comment on lines
132
to
+133
| def normalize_os(os): | ||
| return OS_MAP.get(os, os) | ||
| return os |
Member
Author
There was a problem hiding this comment.
Just keeping this for consistency for now
konstin
approved these changes
Jun 11, 2024
konstin
left a comment
Member
There was a problem hiding this comment.
Setting the right default libc on linux is critical, the rest looks good
Member
There was a problem hiding this comment.
This file is one huge block, do we know if this affects compilation times?
Member
Author
There was a problem hiding this comment.
No clue, is there a good way to measure?
Member
There was a problem hiding this comment.
We could compare compile times with a dummy, but there aren't any good tools around.
b337590 to
b117095
Compare
b117095 to
8185c16
Compare
Member
Author
|
See #4242 for proper musl support. |
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.
Closes #3857
Instead of using custom
Arch,Os, andLibctypes I just usetarget-lexicon's which enumerate way more variants and implement display and parsing. We use a wrapper type to represent a couple special cases to support the "x86" alias for "i686" and "macos" for "darwin". Alternatively we could try to use ourplatform-tagstypes but those capture more information (like operating system versions) that we don't have for downloads.As discussed in #4160, this is not sufficient for proper libc detection but that work is larger and will be handled separately.