!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

182 Members
57 Servers

Load older messages


SenderMessageTime
27 Jun 2025
@emilazy:matrix.orgemilyI think that is generally hard to express in the toolchain information files build systems support20:45:32
@sielicki:matrix.orgsielickihmm, I'm not sure I see why -- what's something we can accomplish with cc-wrapper that we can't do otherwise?20:47:00
@emilazy:matrix.orgemily e.g., we look at -nostdlib/-nostdinc when deciding what flags to inject 20:55:05
@emilazy:matrix.orgemily which is import for things like getting libc to work without breaking freestanding builds (including libc itself) 20:55:58
@emilazy:matrix.orgemilyperhaps not a common use-case for CMake, but pretty critical for our compilers to work :)20:56:16
@emilazy:matrix.orgemilythere is also stuff about cross-compilation role variable demangling but theoretically a sufficiently clueful build system could handle that sort of thing (otoh CMake is pretty bad at cross in practice)20:57:16
@sielicki:matrix.orgsielickiI'm probably missing context on the specifics, but I'd think those would be different stdenvs (and different triples) -- freestanding corresponding to something like aarch64-none-elf and used to bootstrap something like aarch64-unknown-linux-eabi, right?21:04:29
@emilazy:matrix.orgemilynot quite – there are reasons to forego standard headers and libraries even on a hosted platform21:05:39
@emilazy:matrix.orgemily but the obvious example is that glibc for aarch64-unknown-linux-gnu is of course built without glibc :) 21:05:50
@emilazy:matrix.orgemily(but is definitely not building for bare metal)21:06:03
@emilazy:matrix.orgemily pkgs/build-support/bintools-wrapper/ld-wrapper.sh has an example of gnarly non-trivial logic we have in wrappers around the rpath stuff 21:08:27
@rosscomputerguy:matrix.orgTristan Ross
In reply to @sielicki:matrix.org
with the current stdenv, my main complaint is that it's imprecise with respect to the languages supported. ie: there's no stdenv.cxx/stdenv.fc/stdenv.objcc/stdenv.objcxx/stdenv.nvcc/stdenv.hipcc
This is something that's in the pipeline of changes we're working on. Hopefully soon we'll have some movement.
21:23:25
@emilazy:matrix.orgemilyit… is? :)21:27:44
@emilazy:matrix.orgemily I'm not aware of any current work on that front (for C-family languages I'm not sure it's a good idea to split up, though stdenvNoCC by default would obviously be great but is a hugely breaking change for external users) 21:28:07
@rosscomputerguy:matrix.orgTristan Ross
In reply to @emilazy:matrix.org
I'm not aware of any current work on that front (for C-family languages I'm not sure it's a good idea to split up, though stdenvNoCC by default would obviously be great but is a hugely breaking change for external users)
We've already got split GCC on the way and so far, it's doing good.
21:35:20
@rosscomputerguy:matrix.orgTristan RossI was thinking of having derivations which mirror the toolchain attributes21:35:46
@rosscomputerguy:matrix.orgTristan Ross So cc is your C/C++ compiler while cxxlib would be your C++ std implementation. 21:36:19
@rosscomputerguy:matrix.orgTristan Ross Ik it's something I've talked to Jon about 21:37:22
@rosscomputerguy:matrix.orgTristan RossAnd it's in the stdenv & CC improvements plan21:37:39
28 Jun 2025
@reckenrode:matrix.orgRandy EckenrodeI’ve been wondering if we should generate a sysroot when setting up the stdenv and point the compiler to that. It would simplify the Darwin SDK and let me drop some workarounds in the Swift compiler.00:30:39
@reckenrode:matrix.orgRandy Eckenrode I would also like to see the stdenv not assume a C compiler and require it (and autotools/make support) to be added just like for every other language and build system. 00:33:07
@rosscomputerguy:matrix.orgTristan Ross Yeah, it'll be great to disconnect stdenv and cc 00:33:53
@rosscomputerguy:matrix.orgTristan Rosshttps://github.com/NixOS/nixpkgs/pull/409851 this is a part of that work00:34:47
@emilazy:matrix.orgemily
In reply to @reckenrode:matrix.org
I’ve been wondering if we should generate a sysroot when setting up the stdenv and point the compiler to that. It would simplify the Darwin SDK and let me drop some workarounds in the Swift compiler.
I think that would help, yes. have you seen Clang's support for per-target config files?
08:24:50
@emilazy:matrix.orgemilythose will be another piece of the puzzle08:24:56
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
I think that would help, yes. have you seen Clang's support for per-target config files?
No. I was assuming we would do that then pass it with -sysroot (or whatever it is).
11:06:30
@reckenrode:matrix.orgRandy EckenrodeIf Clang lets us specify it in a config file, that’s better.11:06:50
@emilazy:matrix.orgemilyhttps://clang.llvm.org/docs/UsersManual.html#configuration-files we can set an env variable to a directory that it will automatically load a file with command line args from based on language and target11:10:06
@emilazy:matrix.orgemilythat doesn't quite solve cases where we have more complex logic based on other parameters or environment variables, but it is a substantial chunk of the no-compiler-wrappers puzzle11:11:35
@emilazy:matrix.orgemilyand we could hopefully work with LLVM to find ways to eliminate as much custom logic as possible and find ways to move the rest into LLVM drivers11:12:34

Show newer messages


Back to Room ListRoom Version: 9