Closed dinosaure closed 4 years ago
The bad point is a use of ln -s
to be able to use the same directory which contains *.h
. This is the less expensive way where dune
is not able to copy a directory.
thanks for the update. What I do not really like about this:
kremlin/include/kremlin/internal/target.h:53:19: warning: implicit declaration of function 'time' is invalid in C99 [-Wimplicit-function-declaration]
return (int32_t)time(NULL);
^
I don't see a good solution for (1) (since there's no recursive copy and -I ..
does not work IIRC - please correct me if I'm wrong); (2) we could manually remove the not used code (from Hacl_hash.c); (3) pass -DKRML_HOST_TIME
(at least for the cross-build(s) -- the function is not used at all).
The resulting libhacl_stubs_x25519.a is actually smaller than the one from master, this is good.
Thanks for review, so about: 1) I'm not a big fan too but we need to wait https://github.com/ocaml/dune/issues/3387 2) [ ] Ok to delete unused codes in fact :+1: 3) [ ] Ok to pass this option too
So, I will update the PR tonight I think
@dinosaure I pushed two commits about (2) and (3) here.
Thanks, CI is happy so ready to merge I think.
@dinosaure one remaining item before merge is to update README where the extracted stuff was taken from. IIUC, it uses the hacl-star-raw opam package in version 0.2.1? (and then maybe refer to this PR, and mention that Hacl_Hash.{c,h} were manually modified)
Ah you did it already :D, ok let's merge so.
I'm not very happy with this PR which integrates so much
*.h
but they are needed to be able to compile*.c
. The C code comes from the local extraction ofhacl-star
used byhacl-star-raw
OPAM package (reproducible with a simple a call to./build-local.sh
).It should fix, at least, #34 but I did not test yet.