diff options
author | Peter Waller <p@pwaller.net> | 2023-08-21 13:02:04 +0100 |
---|---|---|
committer | Peter Waller <p@pwaller.net> | 2023-08-22 17:34:16 +0100 |
commit | 044e8c4e443c6f5c9e4a8f763c6e6314bf90732c (patch) | |
tree | 2e15b4b7eae9d38b308fc559ef5f0c4e4865d023 | |
parent | 6ba1b5b0b3e57a7def4e837f5599aa3ac68589a8 (diff) | |
download | nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar.gz nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar.bz2 nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar.lz nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar.xz nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.tar.zst nixpkgs-044e8c4e443c6f5c9e4a8f763c6e6314bf90732c.zip |
llvmPackages_git: Port stdenv fix for cxx-headers
Signed-off-by: Peter Waller <p@pwaller.net>
-rw-r--r-- | pkgs/development/compilers/llvm/git/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix index 8cf311e9b23..5ec5d35dcec 100644 --- a/pkgs/development/compilers/llvm/git/default.nix +++ b/pkgs/development/compilers/llvm/git/default.nix @@ -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; }; |