-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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 solaris rustbuild support #39759
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ee54be3
Add Solaris as recognized ostype
binarycrusader 33b655e
fix copy pasta
binarycrusader 4a618fe
fix exception handling for isainfo execution failure
binarycrusader 3807e1f
fix portability issue in error handling of build_triple
binarycrusader File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
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.
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.
Perhaps this could remain the same? (or does it break solaris?)
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 can remain the same if you wish, it does not break Solaris (which is how I missed it the first time). Well, it doesn't break it when it works, but it could break if that error case is tripped. Let me check.
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.
Yes, as I suspected if the execution of 'isainfo' fails then Python will trip over the Exception handler at runtime:
...and annoyingly, despite pydoc's claims otherwise, Python doesn't raise CalledProcessError here; it raises an OSError() (if the command is missing for some reason). My guess is that it will only raise CalledProcessError() if execution of the command returns failure, as opposed to being unable to execute the process at all. So this should actually catch both CalledProcessError and OSError. I will apply that fix and your other requested change and try the full build again.
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.
Ah yeah so this clause was added in ad88d50 specifically for Windows, so it'd be great to at least have the Windows behavior here stay the same (although I'm not sure how to do that best)
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.
WindowsError is just a subclass of OSError, so that would be the portable equivalent:
So I'll just change it to use that, avoiding the portability issues entirely.
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.
Also, as of Python 3.3, WindowsError was merged into OSError, so this definitely seems like the right fix: