[6.2][cherrypick] OpenBSD support. #1254
Closed
3405691582 wants to merge 1 commit intoswiftlang:release/6.2from
Closed
[6.2][cherrypick] OpenBSD support. #12543405691582 wants to merge 1 commit intoswiftlang:release/6.2from
3405691582 wants to merge 1 commit intoswiftlang:release/6.2from
Conversation
* Advise porter on where to make necessary change. In swiftlang#1075 the change was already made for BSD (thank you!); my working edit had this guidance to ensure future porters get an error directing them where to make a necessary change. Otherwise, the FoundationEssentials build will fail and complain these variables are not defined but not have guidance as to where they are sourced from. * OpenBSD does not support extended attributes. * OpenBSD does not have secure_getenv. * Remaining OpenBSD changes. * OpenBSD also needs `pthread_mutex_t?`. * Originally I followed Darwin's check with `d_namlen`, but this should work too. * Correct statvfs type casts for OpenBSD. On OpenBSD, fsblkcnt_t -- the type of f_blocks -- is a UInt64; therefore, so must `blockSize` be. Ultimately, both sides of the `totalSizeBytes` multiplication should probably be type cast for all platforms, but that's a more significant functional change for another time. * Default activeProcessorCount to 1, not 0. After a rather tedious debugging session trying to figure out why swiftpm-bootstrap appeared to be deadlocked, this turned out to be the culprit. Perhaps this should be #error instead, but for now, set a sensible default. * Use sysconf for activeProcessorCount. This is what Dispatch does in some places for OpenBSD anyway, so do likewise here.
Member
Author
|
@swift-ci please test. |
1 similar comment
Member
Author
|
@swift-ci please test. |
Member
Author
|
@swift-ci please test macOS platform. |
1 similar comment
Member
Author
|
@swift-ci please test macOS platform. |
Contributor
|
I think we should actually be bulk merging main to 6.2 for the next few months. Cc @itingliu @shahmishal |
Member
|
@parkera We have a GitHub Action workflow that creates a PR every week from main to release/6.2 automerger. https://github.com/swiftlang/github-workflows/blob/main/.github/workflows/create_automerge_pr.yml If you would prefer this setup for the swift-foundation repository, we can configure it. |
Member
Author
|
Should I expect an automerge to be set up to take care of this change? |
Contributor
|
This was merged to |
Member
Author
|
Thanks! I'll close this. |
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.
Explanation:
Cherrypick OpenBSD support changes onto 6.2. This will help reduce the delta between the branch and an eventual OpenBSD platform port.
Scope:
Most of the changes are limited to OpenBSD or changing defaults that do not apply to other operating systems.
Issues:
See OpenBSD port issue in OpenBSD port tracking swift#78437
Original PRs:
OpenBSD support. #1126
Risk:
Minimal, since changes are mostly limited to OpenBSD.
Testing:
Original change has passed CI.
Reviewers:
@finagolfin
@parkera