Skip to content

Commit 2c14728

Browse files
committed
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 <[email protected]>
1 parent 6011527 commit 2c14728

File tree

1 file changed

+2
-2
lines changed
  • pkgs/development/compilers/llvm/common/compiler-rt

1 file changed

+2
-2
lines changed

pkgs/development/compilers/llvm/common/compiler-rt/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ stdenv.mkDerivation ({
167167
postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
168168
substituteInPlace cmake/builtin-config-ix.cmake \
169169
--replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
170-
'' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versionAtLeast release_version "18") ''
170+
'' + lib.optionalString (!haveLibc) ((lib.optionalString (lib.versions.major release_version == "18") ''
171171
substituteInPlace lib/builtins/aarch64/sme-libc-routines.c \
172172
--replace "<stdlib.h>" "<stddef.h>"
173173
'') + ''
@@ -180,7 +180,7 @@ stdenv.mkDerivation ({
180180
''
181181
substituteInPlace lib/builtins/clear_cache.c \
182182
--replace "#include <assert.h>" ""
183-
substituteInPlace lib/builtins/cpu_model${lib.optionalString (lib.versionAtLeast version "18") "/x86"}.c \
183+
substituteInPlace lib/builtins/cpu_model${lib.optionalString (lib.versionAtLeast release_version "18") "/x86"}.c \
184184
--replace "#include <assert.h>" ""
185185
'')) + lib.optionalString (lib.versionAtLeast release_version "13" && lib.versionOlder release_version "14") ''
186186
# https://github.com/llvm/llvm-project/blob/llvmorg-14.0.6/libcxx/utils/merge_archives.py

0 commit comments

Comments
 (0)