| 19 Jan 2026 |
Katalin 🔪 | though ime that's sorta broken on 5.10, or at least I didn't get it to work when I built 5.10 for bootstrapping 6.x on gentoo | 20:15:30 |
samasaur | the new issue is that 5.10 is failing on darwin now with a crash in the bootstrapped swiftc | 20:16:13 |
samasaur | on staging-next | 20:16:27 |
Randy Eckenrode | I think libstdc++ is the intended C++ stdlib on Linux. If we built against libc++, we couldn’t interop with anything in the default package set. | 20:16:40 |
Randy Eckenrode | Swift can’t target multiple C++ implementations for interop. You have to pick one when building the compiler. | 20:17:32 |
Katalin 🔪 | yeah', that's true. I thought about having a swiftStdenv of some kind which would select the correct compiler/STL but you would still have to compile packages you wanted to use from swift with that. so yeah. not ideal. scratch that | 20:19:12 |
Randy Eckenrode | Given that Swift is broken upstream by GCC 15, I may just land working Darwin support with enough Linux to get to the point of failing. | 20:19:18 |
Randy Eckenrode | That’s how it is today (but for other reasons). | 20:20:04 |
Randy Eckenrode | I do provide a swiftPackages.stdenv in the rewrite, but it’s just a clangStdenv because I’m not even wasting my time building with GCC. | 20:20:28 |
samasaur | that would be great (from my end at least), given that the existing upstream 5.10 is in maintenance mode only so to speak | 20:20:56 |
Randy Eckenrode | I could also make Swift propagate Clang and support regular stdenvs. I’m not super thrilled about that, but it would avoid misuse. | 20:21:02 |
Katalin 🔪 | yeah, and for bidirectional interop you do need clang anyway | 20:21:06 |
Katalin 🔪 | or swift clang, even | 20:21:19 |
Randy Eckenrode | You lose some features, but it works with regular Clang. | 20:21:37 |
Randy Eckenrode | Anyway, after fighting with sqlite, I’m finally back at a Swift environment based on staging from Sunday. Now I just need to figure out a way to hack in prebuilts. | 20:22:15 |
Katalin 🔪 | oh cool, is that new? last time I tried it errored on some part of the generated header | 20:22:25 |
Katalin 🔪 | with c++ interop, that is | 20:23:09 |
Randy Eckenrode | Do you have an example I can test? | 20:24:00 |
Katalin 🔪 | oof, not a ready one | 20:25:26 |
Katalin 🔪 | I'd have to strip down The Project | 20:25:33 |
samasaur | there is a cxx-interop example in nixpkgs i think? | 20:25:38 |
samasaur | if that is what you're looking for | 20:25:44 |
samasaur | though a simplistic one | 20:25:47 |
Randy Eckenrode | Simple is fine. I just want to confirm it works. | 20:27:46 |
Katalin 🔪 | actually, of course I have something | 20:28:33 |
Katalin 🔪 | hold on | 20:28:37 |
Katalin 🔪 | I literally test for this in Meson | 20:28:43 |
samasaur | the nixpkgs one is at pkgs/development/compilers/swift/cxx-interop-test/default.nix, exposed at swift.tests.cxx-interop-test though that second fact probably isn't helpful to you anymore | 20:29:13 |
Katalin 🔪 | https://github.com/dblsaiko/meson/blob/d4d45660ca56631f7c628810e2c3579e3adf0497/mesonbuild/interpreter/interpreter.py#L1560 | 20:29:36 |
Katalin 🔪 | oh that's not too useful without the actual arg list | 20:30:01 |