Revert "nodejs_18: fix build with clang 16 mk2"
libc++ 19 no longer supports Clang < 17.
This reverts commit b034e4cbf1.
This commit is contained in:
@@ -1,19 +1,8 @@
|
||||
{ callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python311, fetchpatch2, enableNpm ? true }:
|
||||
{ callPackage, lib, openssl, python311, fetchpatch2, enableNpm ? true }:
|
||||
|
||||
let
|
||||
# Clang 16+ cannot build Node v18 due to -Wenum-constexpr-conversion errors.
|
||||
# Use an older version of clang with the current libc++ for compatibility (e.g., with icu).
|
||||
ensureCompatibleCC = packages:
|
||||
if packages.stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion packages.stdenv.cc.cc) "16"
|
||||
then overrideCC packages.llvmPackages_15.stdenv (packages.llvmPackages_15.stdenv.cc.override {
|
||||
inherit (packages.llvmPackages) libcxx;
|
||||
})
|
||||
else packages.stdenv;
|
||||
|
||||
buildNodejs = callPackage ./nodejs.nix {
|
||||
inherit openssl;
|
||||
stdenv = ensureCompatibleCC pkgs;
|
||||
buildPackages = buildPackages // { stdenv = ensureCompatibleCC buildPackages; };
|
||||
python = python311;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user