Skip to content

Commit bf8fe96

Browse files
committed
Fix linking
dune no longer accepts manually setting `-custom` and doesn't allow us to set complete bytecode binaries to be installed :/ (see ocaml/dune#4837) it seems this combination with manual install is the only layout that allows normal and static linking to work...
1 parent 885ea38 commit bf8fe96

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

src/main/dune

+18-10
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
)
77

88
(executable
9-
(package learn-ocaml)
10-
(public_name learn-ocaml)
9+
;; (package learn-ocaml) ;; missing support in dune, manually installed below
10+
;; (public_name learn-ocaml)
1111
(name learnocaml_main)
12-
(modes byte)
13-
(flags (:standard -linkall
14-
(:include linking_main.sexp)))
12+
(modes byte_complete)
13+
(ocamlc_flags -custom)
14+
(flags :standard -linkall -verbose (:include linking_main.sexp))
1515
(modules Learnocaml_main)
1616
(libraries cmdliner
1717
sha
@@ -22,14 +22,18 @@
2222
learnocaml_server_args
2323
learnocaml_report)
2424
)
25+
(install
26+
(files (learnocaml_main.bc.exe as learn-ocaml))
27+
(section bin)
28+
(package learn-ocaml))
2529

2630
(executable
27-
(package learn-ocaml-client)
28-
(public_name learn-ocaml-client)
31+
;; (package learn-ocaml-client) ;; missing support in dune, manually installed below
32+
;; (public_name learn-ocaml-client)
2933
(name learnocaml_client)
30-
(modes byte)
31-
(flags (:standard -linkall
32-
(:include linking_client.sexp)))
34+
(modes byte_complete)
35+
(ocamlc_flags -custom)
36+
(flags :standard -linkall (:include linking_client.sexp))
3337
(modules Learnocaml_client)
3438
(libraries cmdliner
3539
sha
@@ -42,6 +46,10 @@
4246
learnocaml_store
4347
learnocaml_api)
4448
)
49+
(install
50+
(files (learnocaml_client.bc.exe as learn-ocaml-client))
51+
(section bin)
52+
(package learn-ocaml-client))
4553

4654
(executable
4755
(package learn-ocaml)

0 commit comments

Comments
 (0)