nixpkgs/pkgs/stdenv/cross
Artturin b9e5637ade config.replaceCrossStdenv: add
Example with `clangUseLLVM` which is the default when using `useLLVM`

```nix
config.replaceCrossStdenv = { buildPackages, baseStdenv }:
  if baseStdenv.targetPlatform.useLLVM or false
  then (buildPackages.stdenvAdapters.overrideCC baseStdenv buildPackages.llvmPackages_16.clangUseLLVM)
  else baseStdenv;
```

The conditional necessary, otherwise the other sets(such as `pkgsCross.aarch64-multiplatform.llvmPackages`)
without `useLLVM` will use the stdenv without the necessary conditions to avoid infinite
recursion because of [targetLlvmLibraries](644b234e1c/pkgs/development/compilers/llvm/16/default.nix (L208))
usage.

[`replaceStdenv` is not used when cross-compiling](d77bda728d/pkgs/stdenv/cross/default.nix (L12-L13))

`replaceStdenv` uses an additional stage to replace the stdenv to avoid
infinite recursion and other issues but that should not be necessary for cross.
2024-01-27 19:54:11 +02:00
..
default.nix config.replaceCrossStdenv: add 2024-01-27 19:54:11 +02:00