| 25 May 2025 |
Randy Eckenrode | Darwin’s stdenv bootstrap has changed a lot. The SDK update dropped several stages last fall. | 15:49:04 |
Randy Eckenrode | I wish the stdenv bootstrap could be structured like a cross from bootstrap tools to final environment. | 15:49:17 |
Randy Eckenrode | Let the standard cross-compilation machinery take care of building things for the right platforms instead of having to micromanage a bunch of overrides. | 15:49:38 |
Randy Eckenrode | Then from there you could cross to another platform. | 15:49:53 |
Randy Eckenrode | I wonder if some of the hard-coded stuff could be removed. Right now, stdenvNoCC is an override of stdenv. Could it be the other way? stdenv is stdenvNoCC with the requisite compilers as extra packages? | 15:51:19 |
Tristan Ross | Yeah, that's what I'm thinking | 15:51:36 |
Randy Eckenrode | IIRC wasn’t there some talk about that for libc++ once libstdc++ gets split out of gcc? | 15:51:42 |
Tristan Ross | Idk but probably | 15:52:01 |
Tristan Ross | It would be nice to be able to view the stdenv as just tools and CC as the actual C toolchain | 15:52:42 |
Tristan Ross | And you could override the unwinder, cxxlib, etc | 15:53:00 |
Tristan Ross | I think I've seen clang get rebuilt for cross so being able to not have to rebuild clang when doing cross would be nice | 15:54:05 |
Randy Eckenrode | Clang shouldn’t be rebuilt for cross anymore. Only the wrapper now. | 16:44:06 |
Randy Eckenrode | Darwin bintools shouldn’t need rebuilding either, but that work hadn’t been done yet. | 16:45:14 |
Tristan Ross | In reply to @reckenrode:matrix.org Clang shouldn’t be rebuilt for cross anymore. Only the wrapper now. Huh, it's rebuilt for me when I tried getting it to work with crossStdenv. But I've found a problem where the bintools wrapper for LLVM doesn't include as for target lol. | 16:52:05 |
Randy Eckenrode | Weird. There was work done early in the 25.05 cycle to reduce the Clang rebuilds. | 16:52:38 |
Randy Eckenrode | https://github.com/NixOS/nixpkgs/pull/355532
https://github.com/NixOS/nixpkgs/pull/356162
https://github.com/NixOS/nixpkgs/pull/357633 | 16:53:28 |
Randy Eckenrode | On Darwin, I get /nix/store/5ibsf7mwyci07f5kdxrzww43204y7ysv-clang-20.1.4.drv for every:
$ nix-instantiate . -A pkgsCross.gnu64.llvmPackages.libcxxStdenv.cc.cc
$ nix-instantiate . -A pkgsCross.gnu64.pkgsLLVM.stdenv.cc.cc
$ nix-instantiate . -A pkgsCross.x86_64-darwin.stdenv.cc.cc
$ nix-instantiate . -A stdenv.cc.cc
$ nix-instantiate . -A clang.cc
$ nix-instantiate . -A llvmPackages.clang.cc
$ nix-instantiate . -A llvmPackages_20.clang.cc
| 16:55:03 |