Skip to content

Commit

Permalink
pack+package: workaround ocamlbuild#272
Browse files Browse the repository at this point in the history
ocamlbuild should pass -package(...) flags to ocamlfind when building
a -pack-ed file, see

  ocaml/opam-repository#11628 (comment)
  • Loading branch information
gasche committed Mar 26, 2018
1 parent 1c4fb7a commit 39a20d4
Showing 1 changed file with 8 additions and 0 deletions.
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 -msse2 -maes"
& ocamlfind_and_pack
)

0 comments on commit 39a20d4

Please sign in to comment.