Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
  • Loading branch information
nojb committed Mar 13, 2019
1 parent 5bd0506 commit 0942858
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/exe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ let link_exe
?(js_of_ocaml=Dune_file.Js_of_ocaml.default)
cctx
=
let linkage, has_js =
if linkage = Linkage.js then
Linkage.byte, true
let linkage, js =
if linkage.ext = ".bc.js" then
{linkage with ext = ".bc"}, true
else
linkage, false
in
Expand Down Expand Up @@ -193,7 +193,7 @@ let link_exe
]);
if linkage.ext = ".bc" then
let rules =
if not explicit_js_mode || (explicit_js_mode && has_js) then
if not explicit_js_mode || js then
Js_of_ocaml_rules.build_exe cctx ~js_of_ocaml ~src:exe
else
[]
Expand Down

0 comments on commit 0942858

Please sign in to comment.