nixpkgs/pkgs/stdenv
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
..
cross config.replaceCrossStdenv: add 2024-01-27 19:54:11 +02:00
custom
cygwin
darwin Merge pull request #267058 from toonn/bootstrap-tools-specify-llvm 2023-11-17 14:06:37 +03:00
freebsd
generic Merge branch 'master' into staging-next 2023-11-12 19:45:20 +01:00
linux stdenv: fix typo 2023-10-21 00:26:57 +03:00
native stdenv: fix stagesNative 2023-07-02 19:07:23 +10:00
nix
tests
adapters.nix Merge pull request #265307 from reckenrode/clang16-fixes-batch2 2023-11-04 17:14:36 +01:00
booter.nix pkgs/stdenv: fix typo in booter.nix docs 2023-09-04 22:24:12 +02:00
default.nix darwin.stdenv: refactor stdenv definition 2023-07-02 17:56:24 -04:00