llvmPackages_16.libcxx: fix wasi32 build

+2 -1
+2 -1
pkgs/development/compilers/llvm/16/libcxx/default.nix
··· 62 62 63 63 buildInputs = 64 64 lib.optionals (!headersOnly) [ cxxabi ] 65 - ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ libunwind ]; 65 + ++ lib.optionals (stdenv.hostPlatform.useLLVM or false && !stdenv.hostPlatform.isWasm) [ libunwind ]; 66 66 67 67 cmakeFlags = let 68 68 # See: https://libcxx.llvm.org/BuildingLibcxx.html#cmdoption-arg-libcxx-cxx-abi-string ··· 87 87 "-DLIBCXX_ENABLE_THREADS=OFF" 88 88 "-DLIBCXX_ENABLE_FILESYSTEM=OFF" 89 89 "-DLIBCXX_ENABLE_EXCEPTIONS=OFF" 90 + "-DUNIX=ON" # Required otherwise libc++ fails to detect the correct linker 90 91 ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" 91 92 # If we're only building the headers we don't actually *need* a functioning 92 93 # C/C++ compiler: