Skip to content

Commit

Permalink
llvmPackages.compiler_rt: Fix compiler_rt version tests for git
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
pwaller committed Nov 8, 2024
1 parent 6011527 commit 2c14728
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<stdlib.h>" "<stddef.h>"
'') + ''
Expand All @@ -180,7 +180,7 @@ stdenv.mkDerivation ({
''
substituteInPlace lib/builtins/clear_cache.c \
--replace "#include <assert.h>" ""
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 <assert.h>" ""
'')) + 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
Expand Down

0 comments on commit 2c14728

Please sign in to comment.