mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
ocamlPackages.hacl-star-raw: use _mm_malloc on darwin
This commit is contained in:
parent
360ab51ee7
commit
093fcd1629
14
pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch
Normal file
14
pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/hacl-star-raw/karamel/include/krml/internal/target.h b/hacl-star-raw/karamel/include/krml/internal/target.h
|
||||
index 695873a..c0aed18 100644
|
||||
--- a/hacl-star-raw/karamel/include/krml/internal/target.h
|
||||
+++ b/hacl-star-raw/karamel/include/krml/internal/target.h
|
||||
@@ -82,6 +82,9 @@
|
||||
# endif
|
||||
# if (defined(_MSC_VER) || (defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR)))
|
||||
# define KRML_ALIGNED_MALLOC(X, Y) _aligned_malloc(Y, X)
|
||||
+# elif defined(__APPLE__)
|
||||
+# include <mm_malloc.h>
|
||||
+# define KRML_ALIGNED_MALLOC(X, Y) _mm_malloc(Y, X)
|
||||
# else
|
||||
# define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y)
|
||||
# endif
|
@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./aligned-alloc.patch
|
||||
];
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
# strictoverflow is disabled because it breaks aarch64-darwin
|
||||
|
Loading…
Reference in New Issue
Block a user