From 2c147282024849856d24cd3cfe892a4f639c2e9b Mon Sep 17 00:00:00 2001 From: Peter Waller Date: Fri, 8 Nov 2024 12:29:22 +0000 Subject: [PATCH] llvmPackages.compiler_rt: Fix compiler_rt version tests for git Without these fixes, the git build currently fails because the tests are out of date. One is updated since it was fixed upstream, the other is still needed for the git build, but testing `version` resulted in a test against the `unstable-*` string and not the one with the version number in it. Signed-off-by: Peter Waller --- .../development/compilers/llvm/common/compiler-rt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix index 241fad158c3c..f5480ca3f961 100644 --- a/pkgs/development/compilers/llvm/common/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/common/compiler-rt/default.nix @@ -167,7 +167,7 @@ stdenv.mkDerivation ({ postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' substituteInPlace cmake/builtin-config-ix.cmake \ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)' - '' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versionAtLeast release_version "18") '' + '' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versions.major release_version == "18") '' substituteInPlace lib/builtins/aarch64/sme-libc-routines.c \ --replace "" "" '') + '' @@ -180,7 +180,7 @@ stdenv.mkDerivation ({ '' substituteInPlace lib/builtins/clear_cache.c \ --replace "#include " "" - substituteInPlace lib/builtins/cpu_model${lib.optionalString (lib.versionAtLeast version "18") "/x86"}.c \ + substituteInPlace lib/builtins/cpu_model${lib.optionalString (lib.versionAtLeast release_version "18") "/x86"}.c \ --replace "#include " "" '')) + lib.optionalString (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "14") '' # https://github.com/llvm/llvm-project/blob/llvmorg-14.0.6/libcxx/utils/merge_archives.py