From 161eb731b07b3604e5fbf96375ad2dc8f5a520d0 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Sun, 15 Jan 2023 12:58:24 -0800 Subject: [PATCH] llvmPackages_git.libcxxabi: fix cycles that arise when `stdenv` is the LLVM stdenv Port of 8db72e3b7eac911b4c14a24c56741d98ac7eac94 ("llvmPackages_15.libcxxabi: fix cycles that arise when `stdenv` is the LLVM stdenv"). --- pkgs/development/compilers/llvm/git/libcxx/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/git/libcxx/default.nix b/pkgs/development/compilers/llvm/git/libcxx/default.nix index 84902c68eda32..af4bd85a1b6df 100644 --- a/pkgs/development/compilers/llvm/git/libcxx/default.nix +++ b/pkgs/development/compilers/llvm/git/libcxx/default.nix @@ -74,7 +74,13 @@ stdenv.mkDerivation rec { "-DLIBCXX_ENABLE_THREADS=OFF" "-DLIBCXX_ENABLE_FILESYSTEM=OFF" "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" - ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF"; + ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" + # If we're only building the headers we don't actually *need* a functioning + # C/C++ compiler: + ++ lib.optionals (headersOnly) [ + "-DCMAKE_C_COMPILER_WORKS=ON" + "-DCMAKE_CXX_COMPILER_WORKS=ON" + ]; ninjaFlags = lib.optional headersOnly "generate-cxx-headers"; installTargets = lib.optional headersOnly "install-cxx-headers";