tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
ocamlPackages.hacl-star-raw: use _mm_malloc on darwin
Weijia Wang
2 years ago
093fcd16
360ab51e
+18
2 changed files
expand all
collapse all
unified
split
pkgs
development
ocaml-modules
hacl-star
aligned-alloc.patch
raw.nix
+14
pkgs/development/ocaml-modules/hacl-star/aligned-alloc.patch
reviewed
···
1
1
+
diff --git a/hacl-star-raw/karamel/include/krml/internal/target.h b/hacl-star-raw/karamel/include/krml/internal/target.h
2
2
+
index 695873a..c0aed18 100644
3
3
+
--- a/hacl-star-raw/karamel/include/krml/internal/target.h
4
4
+
+++ b/hacl-star-raw/karamel/include/krml/internal/target.h
5
5
+
@@ -82,6 +82,9 @@
6
6
+
# endif
7
7
+
# if (defined(_MSC_VER) || (defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR)))
8
8
+
# define KRML_ALIGNED_MALLOC(X, Y) _aligned_malloc(Y, X)
9
9
+
+# elif defined(__APPLE__)
10
10
+
+# include <mm_malloc.h>
11
11
+
+# define KRML_ALIGNED_MALLOC(X, Y) _mm_malloc(Y, X)
12
12
+
# else
13
13
+
# define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y)
14
14
+
# endif
+4
pkgs/development/ocaml-modules/hacl-star/raw.nix
reviewed
···
20
20
stripRoot = false;
21
21
};
22
22
23
23
+
patches = [
24
24
+
./aligned-alloc.patch
25
25
+
];
26
26
+
23
27
minimalOCamlVersion = "4.08";
24
28
25
29
# strictoverflow is disabled because it breaks aarch64-darwin