janestreet / bin_prot

Binary protocol generator
MIT License
73 stars 21 forks source link

add xen sublibrary to be used with MirageOS/Xen #11

Closed hannesm closed 8 years ago

hannesm commented 8 years ago

In order to use bin_prot on MirageOS/Xen, the included C files need to be recompiled with other flags (namely -mno-red-zone (since running in kernel mode, where there is no red zone) and no system-wide includes).

This patch adds a sublibrary bin_prot.xen, consisting of no ML modules, but solely for the purpose of providing the compiled and linked C files. Since OCamlbuild does only compile each target once, symbolic links are created for the C files.

samoht commented 8 years ago

This is needed to compile and run Irmin on Xen. We used to have patched versions but that'd be definitely nicer to integrate that upstream!

ghost commented 8 years ago

Thanks! I'll get this integrated for the next release

hannesm commented 8 years ago

@diml hmm, seems like 113.03.03 didn't include this change, but instead changed the build system in a way that this patch does not apply anymore.

ghost commented 8 years ago

Ah, I missed this patch in my todo list. Basically many of the files touched by this patch are generated by our public release process, so it's not straightforward to include it.

I imported the changes and added this to 113.33.03

hannesm commented 8 years ago

@diml thx! :D

ghost commented 7 years ago

I switched the build system to jbuilder and reimplemented this feature. It should work but I didn't test