Allow to use utop when the library has C stubs

This commit is contained in:
Jeremie Dimino 2017-09-22 02:22:46 +01:00
parent b965c66af5
commit e37e630da5
1 changed files with 5 additions and 1 deletions

View File

@ -85,4 +85,8 @@ let utop_exe_dir ~dir = Path.relative dir ".utop"
let utop_exe dir =
Path.relative (utop_exe_dir ~dir) exe_name
|> Path.extend_basename ~suffix:(Mode.exe_ext Mode.Byte)
(* Use the [.exe] version. As the utop executable is declared with
[(modes (byte))], the [.exe] correspond the bytecode linked in
custom mode. We do that so that it works without hassle when
generating a utop for a library with C stubs. *)
|> Path.extend_basename ~suffix:(Mode.exe_ext Mode.Native)