Skip to content

Conversation

@3405691582
Copy link
Member

@3405691582 3405691582 commented Nov 13, 2025

Summary

Add preliminary OpenBSD support.

There is potential for simplifying some of these conditional chains. For now, I have avoided doing this since this should be picked onto the release branch and simply extending the chains limits the risk scope slightly.

Dependencies

None.

Testing

CI testing should be sufficient to ensure the change does not affect other platforms.
Testing on OpenBSD requires the platform and the toolchain and the details of setting up an environment are out of scope.

I have run swift build locally on OpenBSD and this succeeds after this change. swift test on Linux with this change passes normally. On OpenBSD, LMDB needs to be patched locally to ensure most tests pass due LMDB depending on a unified buffer cache by default. Individual test failures and LMDB patching should probably be dealt with outside of this change and/or locally.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • [n/a] Added tests (not applicable)
  • Ran the ./bin/test script and it succeeded (on linux at least)
  • [n/a] Updated documentation if necessary (not applicable)

@3405691582
Copy link
Member Author

@swift-ci please test.

There is potential for simplifying some of these conditional chains.
For now, I have avoided doing this since this should be picked onto the
release branch and simply extending the chains limits the risk scope
slightly.
@3405691582
Copy link
Member Author

@swift-ci please test.

@d-ronnqvist
Copy link
Contributor

My main question about these change would be:

  • What else is planning to use/depend on this?
  • Specifically; will some part of the Swift toolchain depend on these changes and build DocC for OpenBSD? If so, what's the timeframe for that?

@3405691582
Copy link
Member Author

3405691582 commented Dec 3, 2025

My main question about these change would be:

  • What else is planning to use/depend on this?

docc is part of the Swift toolchain for FreeBSD for example, and it would be nice if we could also include this as part of the Swift toolchain for OpenBSD. That aside, it seems reasonable to permit docc to be built on this platform as a general portability goal.

  • Specifically; will some part of the Swift toolchain depend on these changes and build DocC for OpenBSD? If so, what's the timeframe for that?

docc can just be built normally by either the cmake-build-script toolchain build from the Swift side or with swiftpm.

@d-ronnqvist
Copy link
Contributor

d-ronnqvist commented Dec 3, 2025

  • Specifically; will some part of the Swift toolchain depend on these changes and build DocC for OpenBSD? If so, what's the timeframe for that?

docc can just be built normally by either the cmake-build-script toolchain build from the Swift side or with swiftpm.

What I'm trying to understand is this; if we merge this and some other code in DocC doesn't work with OpenBSD. What other projects will fail? I would have some concerns about merging this if the answer was either "the Swift toolchain" or "cross-repo CI tests for the Swift repo".

@3405691582
Copy link
Member Author

3405691582 commented Dec 3, 2025

  • Specifically; will some part of the Swift toolchain depend on these changes and build DocC for OpenBSD? If so, what's the timeframe for that?

docc can just be built normally by either the cmake-build-script toolchain build from the Swift side or with swiftpm.

What I'm trying to understand is this; if we merge this and some other code in DocC doesn't work with OpenBSD. What other projects will fail? Specifically I would be concerned it the answer was either "the Swift toolchain" or "cross-repo CI tests Swift".

I'm not sure I follow. If there is a bug in docc, then what other projects will fail, outside of the platform-specific case? My understanding is that docc is relatively independent, but perhaps my understanding is wrong?

There is no CI for OpenBSD; CI testing right now ensures that any platform-specific changes made don't break other platforms, so there is no risk of platform-specific changes for OpenBSD breaking other platforms.

No other projects break if docc doesn't build for OpenBSD as far as I understand. docc already doesn't build for OpenBSD right now.

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.

2 participants