Skip to content

Commit

Permalink
llvmPackages_git: Port stdenv fix for cxx-headers
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Waller <p@pwaller.net>
  • Loading branch information
pwaller committed Aug 22, 2023
1 parent 6ba1b5b commit 044e8c4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/development/compilers/llvm/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,19 @@ in let
# what stdenv we use here, as long as CMake is happy.
cxx-headers = callPackage ./libcxx {
inherit llvm_meta;
# Note that if we use the regular stdenv here we'll get cycle errors
# when attempting to use this compiler in the stdenv.
#
# The final stdenv pulls `cxx-headers` from the package set where
# hostPlatform *is* the target platform which means that `stdenv` at
# that point attempts to use this toolchain.
#
# So, we use `stdenv_` (the stdenv containing `clang` from this package
# set, defined below) to sidestep this issue.
#
# Because we only use `cxx-headers` in `libcxxabi` (which depends on the
# clang stdenv _anyways_), this is okay.
stdenv = stdenv_;
headersOnly = true;
};

Expand Down

0 comments on commit 044e8c4

Please sign in to comment.