stdenv.adapters: fixx overrideLibcxx
to refer to existing compiler-rt
Before the change `pkgsLLVM` attributes were failing to pull in `compiler-rt` on `x86_64-linux`: $ nix build --no-link -f. pkgsLLVM.asciidoc-full error: error: attribute 'llvmPackages_13' missing at pkgs/stdenv/adapters.nix:86:32: 85| inherit libcxx; 86| extraPackages = [ cxxabi pkgs.pkgsTargetTarget."llvmPackages_${lib.versions.major llvmLibcxxVersion}".compiler-rt ]; | ^ 87| }); It happens because `pkgs.pkgsTargetTarget` are always empty for cross-packages like `pkgsLLVM.`, `pkgsCross.*.` or `--arg crossSystem '...'`.
This commit is contained in:
parent
88f163d662
commit
55249c817f
1 changed files with 4 additions and 1 deletions
|
@ -83,7 +83,10 @@ rec {
|
||||||
in
|
in
|
||||||
overrideCC stdenv (stdenv.cc.override {
|
overrideCC stdenv (stdenv.cc.override {
|
||||||
inherit libcxx;
|
inherit libcxx;
|
||||||
extraPackages = [ cxxabi pkgs.pkgsTargetTarget."llvmPackages_${lib.versions.major llvmLibcxxVersion}".compiler-rt ];
|
extraPackages = [
|
||||||
|
cxxabi
|
||||||
|
pkgs.buildPackages.targetPackages."llvmPackages_${lib.versions.major llvmLibcxxVersion}".compiler-rt
|
||||||
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
# Override the setup script of stdenv. Useful for testing new
|
# Override the setup script of stdenv. Useful for testing new
|
||||||
|
|
Loading…
Reference in a new issue