Skip to content

Conversation

@kkebo
Copy link

@kkebo kkebo commented Jan 26, 2026

This PR adds support for FreeBSD to the CNIOSHA1 target and the NIOConcurrencyHelpers target.

Motivation:

This PR is partial because the NIOCore target still can't be built, and the existing PR #3398 includes almost the same changes too.

However, #3398 is a little bit old. Besides, the source code in NIOConcurrencyHelpers is used in other repositories now, for example:

So I think it's important to fix NIOConcurrencyHelpers first, even if the entire swift-nio is yet to be fixed.

Modifications:

  • Make swift build --target NIOConcurrencyHelpers work on FreeBSD
  • Make swift build --target CNIOSHA1 work on FreeBSD

Result:

The following commands finished successfully.

swift build --target NIOConcurrencyHelpers
swift build --target CNIOSHA1

Environment:

  • FreeBSD 15.0-RELEASE-p1 x86_64
  • Swift on FreeBSD Preview toolchain
    Swift version 6.3-dev (LLVM b58b2a34d509492, Swift cf535d8b998d09b)
    Target: x86_64-unknown-freebsd14.3
    Build config: +assertions
    

kukushechkin pushed a commit to apple/swift-distributed-tracing that referenced this pull request Feb 11, 2026
#210)

Ports changes to `Lock` from `swift-nio` and `swift-log` to
`swift-distributed-tracing`.

### Motivation:

The copy-paste of `Lock` in `swift-distributed-tracing` should be
updated with changes from swift-nio.

### Modifications:

- This is a near straight copy of the changes brought from swift-nio to
swift-log in apple/swift-log#408.

### Result:

`Lock` implementation will have the same or nearly the same
implementation as swift-nio (assuming
apple/swift-nio#3494 merges). `Lock` will also
have the same implementation as swift-log, once
apple/swift-log#408 merges.
kukushechkin pushed a commit to apple/swift-log that referenced this pull request Feb 12, 2026
…408)

Ports changes to `Lock` from swift-nio to swift-log.

### Motivation:

The copy-paste of `Lock` in swift-log should be updated with changes
from swift-nio.

### Modifications:

- Rolls back changed [made previously for
FreeBSD](https://github.com/apple/swift-log/pull/387/changes#diff-7b1bd45403dd1a7418287bd60682bf05ba2e4bf75dca1c0ca55a86d0477c9af5L73)
in favor of a consolidated implementation in swift-nio that will be in
place once apple/swift-nio#3494 merges. @kkebo
Please confirm this works. After both of our PR's merge, swift-log and
swift-nio will have the same implementation as far as FreeBSD is
concerned.
- Brought the following recent changes from swift-nio over to swift-log:

  - apple/swift-nio#3482
  - apple/swift-nio#3480
  - apple/swift-nio#3483

- Removed stale `// SRWLOCK does not need to be free'd` comment.

### Result:

`Lock` implementation will have the same implementation as swift-nio
(assuming apple/swift-nio#3494 merges).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant