Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for ocamlbuild's pack+ocamlfind handling #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions _tags
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ true: warn(A-4-29-33-40-41-42-43-34-44-48)
true: package(bytes cstruct)

<src>: include
<src/*.ml{,i}>: package(zarith sexplib ppx_sexp_conv)
<src/*.ml{,i}>: package(zarith sexplib ppx_sexp_conv ocplib-endian)
<src/*.cm{x,o}> and not <src/nocrypto.cmx>: for-pack(Nocrypto)
<src/*.cm{,x}a>: link_stubs(src/libnocrypto_stubs)
<src/nocrypto.cm{x,o}>: package(ppx_sexp_conv)

<unix>: include
<unix/*.ml{,i}>: package(unix bytes)
Expand All @@ -20,7 +21,7 @@ true: package(bytes cstruct)
<**/*.c>: ccopt(-D_DEFAULT_SOURCE --std=c99 -Wall -Wextra -O3)
<**/aes_aesni.c>: ccopt(-Wno-implicit-fallthrough)

<bench/*>: use_nocrypto, package(zarith)
<tests/*>: use_nocrypto, package(zarith oUnit)
<bench/*>: use_nocrypto, package(zarith ppx_sexp_conv ocplib-endian)
<tests/*>: use_nocrypto, package(zarith ppx_sexp_conv ocplib-endian oUnit)

<rondom>: -traverse
8 changes: 8 additions & 0 deletions myocamlbuild.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
open Ocamlbuild_plugin

let ocamlfind_and_pack = function
| After_rules ->
if !Options.use_ocamlfind then
pflag ["ocaml"; "pack"] "package"
(fun pkg -> S [A "-package"; A pkg]);
| _ -> ()

let () = dispatch Ocb_stubblr.(
init & ccopt ~tags:["accelerate"] "-DACCELERATE -mssse3 -maes -mpclmul"
& ocamlfind_and_pack
)
2 changes: 1 addition & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ depends: [
"cpuid" {build}
"ocb-stubblr" {build}
"ppx_deriving" {build}
"ppx_sexp_conv" {build}
"ppx_sexp_conv"
"ounit" {test}
"cstruct" {>="3.0.0" & <"3.2.0"}
"zarith"
Expand Down
2 changes: 1 addition & 1 deletion pkg/META
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version = "%%VERSION_NUM%%"
description = "Simple crypto for the modern age"
requires = "cstruct zarith sexplib"
requires = "cstruct zarith sexplib ppx_sexp_conv"
archive(byte) = "nocrypto.cma"
archive(native) = "nocrypto.cmxa"
plugin(byte) = "nocrypto.cma"
Expand Down