!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1167 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org189 Servers

Load older messages


SenderMessageTime
29 Nov 2025
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/search?q=repo%3Aswiftlang%2Fswift%20-O3&type=code05:17:39
@reckenrode:matrix.orgRandy EckenrodeI wonder if I’m hitting the LLVM 21 codegen bug.05:17:48
@reckenrode:matrix.orgRandy EckenrodeNope, hitting https://github.com/swiftlang/swift/pull/80920#issuecomment-283065622918:05:40
@reckenrode:matrix.orgRandy EckenrodeI really didn’t want to have to maintain Swift 5.x just to bootstrap Swift 6.x, especially with the 14.4 SDK due for removal in the future.18:07:12
@reckenrode:matrix.orgRandy Eckenrode * 18:07:30
@reckenrode:matrix.orgRandy Eckenrode * 18:07:45
@reckenrode:matrix.orgRandy Eckenrode
$ nix build -f . swiftPackages.swiftc
$ result/bin/swiftc -version
<unknown>:0: warning: using (deprecated) legacy driver, Swift installation does not contain swift-driver at: '/nix/store/qv81mmcyl52jzgy32pnq41kxx6v575j9-swift-6.2.1/bin/swift-driver-new'
Swift version 6.2.1 (swift-6.2.1-RELEASE)
Target: arm64-apple-darwin25.1.0
19:18:34
@reckenrode:matrix.orgRandy EckenrodeProgress!19:18:53
@reckenrode:matrix.orgRandy Eckenrode
$ SDKROOT=$(nix eval --raw -f . apple-sdk_26.sdkroot) result/bin/swiftc ../test-cli.swift -o ../test-cli
$ ../test-cli
Hello, Swift!
19:23:51
@reckenrode:matrix.orgRandy EckenrodeNext is swift-driver and swiftpm. Also, the bootstrap story.20:23:55
@reckenrode:matrix.orgRandy Eckenrode One thing I am doing differently is (trying to) build dependencies as packages. I also want to see if I can have actual swift-driver and swift-syntax packages. swiftPackages.swift will just symlink together swiftc and swift-driver. 20:25:55
@reckenrode:matrix.orgRandy EckenrodeOnce I have this working, I want to go back and split out the stdlib into its own package, which should help make cross-compilation possible. It’s not supported currently.20:26:45
@reckenrode:matrix.orgRandy EckenrodeI am working on this for 6.2.1, but I plan to land the changes for 5.10.1 first (moving it into the new pattern). 6.2.1 will be a separate PR.20:27:38
@toonn:matrix.orgtoonn That sounds like a solid plan. 22:55:28
30 Nov 2025
@reckenrode:matrix.orgRandy EckenrodeSo far the alternate approach seems to be working. I can patch sources in Swift packages and then use a hook to expose them to SwiftPM. Unfortunately, the SDK requires observability, which makes the C++-only bootstrap compiler pretty useless.04:05:33
@reckenrode:matrix.orgRandy EckenrodeActually, just importing Foundation blows up the build.04:19:57
@reckenrode:matrix.orgRandy EckenrodeThis sucks. The 26.0 SDK appears to use macros unconditionally in the Observation module. The 14.4 SDK has guards for when macros are disabled, so the module doesn’t blow up.04:25:47
@reckenrode:matrix.orgRandy EckenrodeI don’t know how this bootstrap is going to work in that case.04:26:55
@reckenrode:matrix.orgRandy EckenrodeWe could use the 14.4 SDK for bootstrapping, but we’ll have problems next year when that SDK is dropped. It’s the same problem that Swift 5.8 had this year but worse.04:27:33
@robert:funklause.dedotlambdaDoes anyone want to step up to maintain python3Packages.psutil? It's a dependency of the Darwin stdenv04:29:06
@toonn:matrix.orgtoonn What is different about Apple's bootstrapping method that they don't run into the problem? Or do they just never bootstrap? 11:15:35
@reckenrode:matrix.orgRandy EckenrodeThey already have a Swift compiler lying around.11:32:16
@reckenrode:matrix.orgRandy EckenrodeIf you have an existing Swift compiler, you can go straight to building the Swift-in-Swift stuff.11:33:15
@reckenrode:matrix.orgRandy Eckenrode * 11:40:02
@toonn:matrix.orgtoonn So the macro issue only happens at build time? 11:55:50
@reckenrode:matrix.orgRandy EckenrodeBuilding a compiler with macro support requires swift-syntax, which requires a Swift compiler.12:15:55
@reckenrode:matrix.orgRandy EckenrodeThe easy path would be to use the 14.4 SDK, but our removal schedule means we can’t rely on that or have to do something really hacky to build the bootstrap compiler with it.12:18:33
@reckenrode:matrix.orgRandy Eckenrode * 12:18:52
@reckenrode:matrix.orgRandy Eckenrode It’s possible we don’t need early swift-driver. I need to see what we lose by not building it until the end. 12:19:26
@reckenrode:matrix.orgRandy Eckenrode My current thinking is to have a special boot.nix that builds a fully functional Swift 5.10.1, which can then be used to build Swift 6.x. 12:59:48

Show newer messages


Back to Room ListRoom Version: 6