From 145d15e9cf2a5fcf0eb15bb906a73c7650ba00de Mon Sep 17 00:00:00 2001 From: Louis Gesbert Date: Thu, 29 Jul 2021 15:51:08 +0200 Subject: [PATCH] Fix linking dune no longer accepts manually setting `-custom` and doesn't allow us to set complete bytecode binaries to be installed :/ (see https://github.com/ocaml/dune/pull/4837) it seems this combination with manual install is the only layout that allows normal and static linking to work... --- src/main/dune | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/main/dune b/src/main/dune index 7d4e4bbb5..9c2140d2f 100644 --- a/src/main/dune +++ b/src/main/dune @@ -6,12 +6,12 @@ ) (executable - (package learn-ocaml) - (public_name learn-ocaml) +;; (package learn-ocaml) ;; missing support in dune, manually installed below +;; (public_name learn-ocaml) (name learnocaml_main) - (modes byte) - (flags (:standard -linkall - (:include linking_main.sexp))) + (modes byte_complete) + (ocamlc_flags -custom) + (flags :standard -linkall -verbose (:include linking_main.sexp)) (modules Learnocaml_main) (libraries cmdliner sha @@ -22,14 +22,18 @@ learnocaml_server_args learnocaml_report) ) +(install + (files (learnocaml_main.bc.exe as learn-ocaml)) + (section bin) + (package learn-ocaml)) (executable - (package learn-ocaml-client) - (public_name learn-ocaml-client) +;; (package learn-ocaml-client) ;; missing support in dune, manually installed below +;; (public_name learn-ocaml-client) (name learnocaml_client) - (modes byte) - (flags (:standard -linkall - (:include linking_client.sexp))) + (modes byte_complete) + (ocamlc_flags -custom) + (flags :standard -linkall (:include linking_client.sexp)) (modules Learnocaml_client) (libraries cmdliner sha @@ -42,6 +46,10 @@ learnocaml_store learnocaml_api) ) +(install + (files (learnocaml_client.bc.exe as learn-ocaml-client)) + (section bin) + (package learn-ocaml-client)) (executable (package learn-ocaml)