hedgie_ has joined #nix-darwin
hedgie has quit [Ping timeout: 260 seconds]
hedgie has joined #nix-darwin
hedgie_ has quit [Ping timeout: 260 seconds]
kalbasit has joined #nix-darwin
stephank has quit [Quit: stephank]
stephank has joined #nix-darwin
hedgie has quit [Ping timeout: 240 seconds]
hedgie has joined #nix-darwin
kalbasit has quit [Remote host closed the connection]
kalbasit has joined #nix-darwin
kalbasit has quit [Ping timeout: 246 seconds]
hedgie has quit [Read error: Connection reset by peer]
hedgie_ has joined #nix-darwin
__Sander__ has joined #nix-darwin
hedgie_ has quit [Read error: Connection reset by peer]
philr has quit [Ping timeout: 240 seconds]
eraserhd has joined #nix-darwin
<thefloweringash> hopefully silly question time: should stdenv.hostPlatform.useLLVM = true on darwin?
<thefloweringash> went looking for how libcxx/libcxxabi build without contamination from stdenv and found they have special stdenv overrides to use lldClangNoLibcxx as their stdenv
<thefloweringash> but it's only applied when useLLVM = true, and currently that's not the case on darwin
<thefloweringash> comments suggest it might only be for cross compiling
__Sander__ has quit [Ping timeout: 265 seconds]
<Mic92> thefloweringash: I don't have useLLVM is this new?
<thefloweringash> I'm still digging. All the consumers say `stdenv.hostPlatform.useLLVM or false`, so it's expected to be absent some times
<Mic92> It's not set on OS-X
<Mic92> wasi32 has it
<Mic92> so web-assembly
<thefloweringash> it looks like a solution to the problems I'm seeing, so I'm pondering if it should be set
<LnL> any particular reason we should? it's for the cross stdenv
<LnL> if you want to use that for conditionals stdenv.cc.isClang is the correct thing to use
<thefloweringash> the overall context is my effort to regenerate the bootstrap tools (have been distracted, but looking at it again now)
<thefloweringash> without compiler-rt the stage4 build of curl is missing that __isOSVersionAtLeast symbol, which I tried to address with #94427
<{^_^}> https://github.com/NixOS/nixpkgs/pull/94427 (by thefloweringash, 2 weeks ago, open): stdenv/darwin: assemble full clang toolchain
<LnL> using that would make things pretty messy, better to contain that stuff in the stdenv bootstrap stages IMHO
<thefloweringash> I suppose I can copy and paste the logic over.
__Sander__ has joined #nix-darwin
<thefloweringash> I figured that logic was the solution, and was surprised that macos didn't declare itself as using llvm
<LnL> do we need that tho?
<LnL> it's basically linux specific to build llvm with libstdc++ AFAIK
<thefloweringash> I don't yet understand what property `useLLVM` is conveying. Is it not a description, but instead a parameter that determines what the resulting platform should do?
<LnL> it's used for the linux -> risc cross stdenv
<LnL> which needs clang instead of gcc
<thefloweringash> libcxx has libcxxabi as a dependency, I was guessing that if you include it in your stdenv.cc's extraPackages as well as in it's buildDependencies that there would be conflicts
<thefloweringash> buildInputs*
<LnL> don't really follow, but the bootstrap stages handle that
<LnL> the first stage has libcxx = bootstrapTools; which makes all the default clang packages use that instead of an actual build
<thefloweringash> but the cc wrapper in the bootstrap stages diverges from the "regular" one in llvmPackages.libcxxClang; it doesn't include compiler-rt which I found breaks curl, and it doesn't include libcxxabi, and I'm not yet sure if that's a problem
<LnL> I don't know the exact steps but stage1 or 2 will be build a partial llvm environment and then 4 has a full one
<thefloweringash> IIUC the stage 4 cc-wrapper uses the same structure as all the other stages, so even though the packages have been rebuilt it's still missing compiler-rt
<LnL> btw what you're seeing could also be related to https://github.com/NixOS/nixpkgs/pull/87583
<{^_^}> #87583 (by Gaelan, 14 weeks ago, merged): stdenv-darwin: now with 50% less LLVM!
<LnL> as for the stages think of it like this stage0: no compiler, stage1: bootstrap, stage2: libc++, libc++abi, CF, stage3: binutils, stage4: everything to replace bootstrap references in the final stage
<LnL> this is pretty hand-wavy tho, it's possible this could be simplified a bunch
<thefloweringash> I had a go at writing a viewer for this kind of thing by categorizing each build by the name of the stdenv that produced it: https://github.com/thefloweringash/analyse-stdenv/blob/master/example-report.md
<thefloweringash> the spirit is more important than what it's actually doing though, so I appreciate the description :-)
<thefloweringash> I'm just a bit concerned that the structure of the clang wrappers and related stuff is evolving in the main nixpkgs, but in the darwin bootstrap it must remain fixed to the contents of the bootstrap tools binary blob.
hedgie_ has joined #nix-darwin
hedgie_ has quit [Client Quit]
hedgie has joined #nix-darwin
__Sander__ has quit [Read error: Connection reset by peer]
__Sander__ has joined #nix-darwin
__monty__ has joined #nix-darwin
hedgie_ has joined #nix-darwin
hedgie has quit [Ping timeout: 244 seconds]
hedgie_ has quit [Ping timeout: 240 seconds]
hedgie has joined #nix-darwin
kalbasit has joined #nix-darwin
kalbasit has quit [Ping timeout: 240 seconds]
__Sander__ has quit [Quit: Konversation terminated!]
__monty__ has quit [Quit: leaving]
philr has joined #nix-darwin