From ac01eef7b19a8bdd22ef72ce4762bb0bf4e053a5 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 20 Apr 2024 17:36:14 +0200 Subject: [PATCH] v8: unpin llvmPackages_15.stdenv on darwin --- pkgs/development/libraries/v8/default.nix | 8 ++++++-- pkgs/top-level/all-packages.nix | 13 +++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/v8/default.nix b/pkgs/development/libraries/v8/default.nix index 37cc66834462..0eb3bda4286d 100644 --- a/pkgs/development/libraries/v8/default.nix +++ b/pkgs/development/libraries/v8/default.nix @@ -113,7 +113,7 @@ stdenv.mkDerivation rec { --replace 'current_toolchain == host_toolchain || !use_xcode_clang' \ 'false' ''} - ${lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) '' + ${lib.optionalString stdenv.isDarwin '' substituteInPlace build/config/compiler/BUILD.gn \ --replace "-Wl,-fatal_warnings" "" ''} @@ -143,7 +143,11 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.cc.isClang ''clang_base_path="${llvmCcAndBintools}"'' ++ lib.optional stdenv.isDarwin ''use_lld=false''; - env.NIX_CFLAGS_COMPILE = "-O2"; + env.NIX_CFLAGS_COMPILE = toString ([ + "-O2" + ] ++ lib.optionals stdenv.cc.isClang [ + "-Wno-error=enum-constexpr-conversion" + ]); FORCE_MAC_SDK_MIN = stdenv.hostPlatform.sdkVer or "10.12"; nativeBuildInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 693f6e5ff161..3e85bf8b26e3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24913,16 +24913,9 @@ with pkgs; ucommon = callPackage ../development/libraries/ucommon { }; - v8 = callPackage ../development/libraries/v8 ( - let - stdenv' = if stdenv.cc.isClang && lib.versionAtLeast (lib.getVersion stdenv.cc.cc) "16" - then overrideLibcxx llvmPackages_15.stdenv - else stdenv; - in - { - stdenv = if stdenv'.isDarwin then overrideSDK stdenv' "11.0" else stdenv'; - } - ); + v8 = callPackage ../development/libraries/v8 { + stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; + }; intel-vaapi-driver = callPackage ../development/libraries/intel-vaapi-driver { };