Skip to content

[FreeBSD] Enable CFRunLoop support#5188

Merged
michael-yuji merged 2 commits intoswiftlang:mainfrom
michael-yuji:freebsd-cfrunloop
Jun 17, 2025
Merged

[FreeBSD] Enable CFRunLoop support#5188
michael-yuji merged 2 commits intoswiftlang:mainfrom
michael-yuji:freebsd-cfrunloop

Conversation

@michael-yuji
Copy link
Copy Markdown
Member

This patch enables CFRunLoop for FreeBSD.
Related libdispatch PR: swiftlang/swift-corelibs-libdispatch#861

Comment thread Sources/CoreFoundation/CFRunLoop.c
@jakepetroules jakepetroules moved this from Done to In Progress in Swift on FreeBSD Mar 18, 2025
@parkera
Copy link
Copy Markdown
Contributor

parkera commented Jun 4, 2025

@swift-ci test

// Make sure we honor the override -- var currentCFRunLoop will do so on platforms where overrides are available.

// TODO: This has been removed as public API in port to the package, because CoreFoundation cannot be available as both toolchain "CoreFoundation" and package "_CoreFoundation"
#if os(Linux) || os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(OpenBSD)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this just be #if !os(Windows)? Otherwise it seems like we'll just need to keep tweaking this over and over again. We probably want to take this code path on visionOS, NetBSD, Solaris, Android, and so on, right?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not necessarily true, since whether we should enable this code path depends on if such platform implemented the bits to support CFRunLoop, which is not necessarily true and by default we should assume it does not have support.

@etcwilde
Copy link
Copy Markdown
Member

@swift-ci please test

@michael-yuji
Copy link
Copy Markdown
Member Author

@swift-ci please test

@etcwilde
Copy link
Copy Markdown
Member

The crash on Linux should be fixed by swiftlang/swift#82176.

@etcwilde
Copy link
Copy Markdown
Member

@swift-ci please test Linux

@etcwilde
Copy link
Copy Markdown
Member

@swift-ci please test Windows

@etcwilde
Copy link
Copy Markdown
Member

swiftlang/swift-driver#1931
@swift-ci please test Linux

@michael-yuji
Copy link
Copy Markdown
Member Author

@swift-ci please test Windows

@michael-yuji
Copy link
Copy Markdown
Member Author

@swift-ci please test windows

@michael-yuji michael-yuji merged commit 7d21208 into swiftlang:main Jun 17, 2025
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Swift on FreeBSD Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants