Skip to content

Commit

Permalink
Merge pull request #1108 from rgrinberg/fix-1107
Browse files Browse the repository at this point in the history
Fix #1107
  • Loading branch information
rgrinberg authored Aug 7, 2018
2 parents 0f18a6e + 12bf6bd commit 0ec0f4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ next
- Fix duplicate profile argument in suggested command when an external library
is missing (#1109, #1106, @emillon)

- Fix #1107. `-opaque` wasn't correctly being added to modules without
an interface. (#1108, fix #1107, @rgrinberg)

1.1.0 (06/08/2018)
------------------

Expand Down
4 changes: 3 additions & 1 deletion src/module_compilation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ let build_cm cctx ?sandbox ?(dynlink=true) ~dep_graphs ~cm_kind (m : Module.t) =
SC.add_rule sctx (Build.symlink ~src:in_obj_dir ~dst:in_dir))
end;
let opaque_arg =
if opaque && cm_kind = Cmi then
let intf_only = cm_kind = Cmi && not (Module.has_impl m) in
if opaque
|| (intf_only && Ocaml_version.supports_opaque_for_mli ctx.version) then
Arg_spec.A "-opaque"
else
As []
Expand Down

0 comments on commit 0ec0f4d

Please sign in to comment.