| 13 Jan 2026 |
emily | and there's some dumb dependency too | 01:25:51 |
Randy Eckenrode | I’ve got the stdlib build with only the host shared libraries. Build platform stuff is staying with the compiler. | 01:26:09 |
Randy Eckenrode | So in theory you can make a cross-Swift using the new host’s stdlib. | 01:26:32 |
Randy Eckenrode | But cross won’t work out of the box with my work. It doesn’t now, and I don’t want to spend time on it right now. | 01:26:50 |
Randy Eckenrode | I want to get Swift updated to 6.2.x with the rewritten package set, so I can switch gears back to Darwin for a bit. | 01:27:39 |
Randy Eckenrode | I’d really like to get it using only LLVM bintools, but that requires some work on the wrapper. | 01:27:51 |
emily | ok, yeah, this is why the current lib patch is nonsense:
shion:/v/f/1/j/T/tmp.xaiYxboQnX
❭ l result-lib/lib/swift/
total 8
dr-xr-xr-x 5 root nixbld 160B 1 Jan 1970 _InternalSwiftScan/
dr-xr-xr-x 5 root nixbld 160B 1 Jan 1970 _InternalSwiftStaticMirror/
dr-xr-xr-x 5 root nixbld 160B 1 Jan 1970 apinotes/
dr-xr-xr-x 5 root nixbld 160B 1 Jan 1970 clang/
dr-xr-xr-x 6 root nixbld 192B 1 Jan 1970 FrameworkABIBaseline/
dr-xr-xr-x 3 root nixbld 96B 1 Jan 1970 host/
dr-xr-xr-x 40 root nixbld 1.3K 1 Jan 1970 macosx/
dr-xr-xr-x 12 root nixbld 384B 1 Jan 1970 migrator/
-r--r--r-- 1 root nixbld 186B 1 Jan 1970 module.modulemap
dr-xr-xr-x 27 root nixbld 864B 1 Jan 1970 shims/
dr-xr-xr-x 5 root nixbld 160B 1 Jan 1970 swiftToCxx/
| 01:28:02 |
emily | there's even header files in there | 01:28:13 |
emily | but ofc if you made the output less dumb in the rework that's another matter :) | 01:28:23 |
Randy Eckenrode | The reason why LLD currently “works” is it relies on Clang to pass the correct flags. It’s not even wrapped. | 01:28:29 |
Randy Eckenrode | $ nix build -f . swiftPackages.stdlib^\*
$ ls result/**
result/lib/lib_InternalSwiftStaticMirror.dylib*
result/lib/libswift_Builtin_float.dylib*
result/lib/libswift_Concurrency.dylib*
result/lib/libswift_Differentiation.dylib*
result/lib/libswift_RegexParser.dylib*
result/lib/libswift_StringProcessing.dylib*
result/lib/libswift_Volatile.dylib*
result/lib/libswiftCompatibilitySpan.dylib@
result/lib/libswiftCore.dylib*
result/lib/libswiftDistributed.dylib*
result/lib/libswiftObservation.dylib*
result/lib/libswiftRegexBuilder.dylib*
result/lib/libswiftRemoteMirror.dylib*
result/lib/libswiftRuntime.dylib*
result/lib/libswiftSwiftOnoneSupport.dylib*
result/lib/libswiftSynchronization.dylib*
result/lib/swift-6.2/macosx/libswiftCompatibilitySpan.dylib*
result/lib:
lib_InternalSwiftStaticMirror.dylib* libswiftDistributed.dylib*
libswift_Builtin_float.dylib* libswiftObservation.dylib*
libswift_Concurrency.dylib* libswiftRegexBuilder.dylib*
libswift_Differentiation.dylib* libswiftRemoteMirror.dylib*
libswift_RegexParser.dylib* libswiftRuntime.dylib*
libswift_StringProcessing.dylib* libswiftSwiftOnoneSupport.dylib*
libswift_Volatile.dylib* libswiftSynchronization.dylib*
libswiftCompatibilitySpan.dylib@ swift-6.2/
libswiftCore.dylib*
result/lib/swift-6.2:
macosx/
result/lib/swift-6.2/macosx:
libswiftCompatibilitySpan.dylib*
| 01:29:17 |
emily | an output with the runtime libraries required for Swift binaries (on Linux only, I guess?) would make sense, but the current lib ain't it | 01:29:20 |
emily | do those .dylibs even get used on macOS, where the Swift runtime is part of the OS dyld cache? | 01:29:44 |
Randy Eckenrode | All the Swift modules, embedded stuff, headers, and shims are in the dev output. | 01:29:57 |
emily | shouldn't it be the out output, as it's consumed by the compiler rather than things taking the compiler as a build input 🤔 | 01:30:26 |
Randy Eckenrode | They do some funky stuff to forward to the system. I don’t think we can avoid having them. We need the Span compatibility dylib for back deployment to 14.x and 15.x. | 01:30:33 |
Randy Eckenrode | The stdlib is a separate derivation. It has out and dev outputs. | 01:31:03 |
emily | ah | 01:31:11 |
Randy Eckenrode | The embedded stuff is kind of weird. It lets you build “bare metal” Darwin applications. | 01:31:58 |
Randy Eckenrode | Whatever the hell that means. | 01:32:03 |
emily | they're rewriting XNU in Swift! | 01:33:13 |
Randy Eckenrode | Then they couldn’t borrow code from FreeBSD as easily! | 01:39:25 |
Randy Eckenrode | I wouldn’t mind if they rewrote the core UNIX utils in Swift, but then they definitely wouldn’t be able to pick up code changes from FreeBSD. It’s a shame because they’re horrifying at times. | 02:04:25 |
samasaur | i wish i had to build fewer perls | 06:14:17 |
samasaur | they don't even take that long but it offends me at a deeper level | 06:14:28 |
samasaur | anyway this worked great! | 06:16:56 |
samasaur | and i feel like i have a better handle on how the stdenv is constructed | 06:17:40 |
samasaur | dropping kyua, atf, sqlite doesn't impact the output of nix-store -qR <stdenv.drv> | sed 's|/nix/store/[a-z0-9]*-||' | sort at all | 06:24:56 |
samasaur | and if I go through the list of stage1Packages in the darwin stdenv it seems like most of them aren't in that list??? | 06:25:19 |
samasaur | ack wait i may have screwed that up | 06:28:28 |