Skip to content

Commit

Permalink
Configure flag to use the 5.x runtime; make the 5.x runtime build
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell committed Nov 7, 2023
1 parent 42fe5f9 commit b999907
Show file tree
Hide file tree
Showing 28 changed files with 427 additions and 402 deletions.
10 changes: 5 additions & 5 deletions backend/amd64/emit.mlp
Original file line number Diff line number Diff line change
Expand Up @@ -1761,13 +1761,13 @@ let emit_instr fallthrough i =
load_label_addr lbl_handler r11;
I.push r11;
cfi_adjust_cfa_offset 8;
I.push (domain_field Domainstate.Domain_exception_pointer);
I.push (domain_field Domainstate.Domain_exn_handler);
cfi_adjust_cfa_offset 8;
I.mov rsp (domain_field Domainstate.Domain_exception_pointer);
I.mov rsp (domain_field Domainstate.Domain_exn_handler);
stack_offset := !stack_offset + 16;
| Lpoptrap ->
emit_pop_trap_label ();
I.pop (domain_field Domainstate.Domain_exception_pointer);
I.pop (domain_field Domainstate.Domain_exn_handler);
cfi_adjust_cfa_offset (-8);
I.add (int 8) rsp;
cfi_adjust_cfa_offset (-8);
Expand All @@ -1787,8 +1787,8 @@ let emit_instr fallthrough i =
(* BACKPORT END *)
record_frame Reg.Set.empty (Dbg_raise i.dbg)
| Lambda.Raise_notrace ->
I.mov (domain_field Domainstate.Domain_exception_pointer) rsp;
I.pop (domain_field Domainstate.Domain_exception_pointer);
I.mov (domain_field Domainstate.Domain_exn_handler) rsp;
I.pop (domain_field Domainstate.Domain_exn_handler);
I.pop r11;
I.jmp r11
end
Expand Down
10 changes: 8 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.69])
AC_INIT([The Flambda backend for OCaml],
5.1.1+jst-runtime4,
5.1.1+jst,
[mshinwell@janestreet.com],
[flambda_backend],
[http://github.com/ocaml-flambda/flambda_backend])
Expand Down Expand Up @@ -36,6 +36,12 @@ AC_ARG_ENABLE([middle-end],
[*], [AC_MSG_ERROR([Bad middle end (not closure, flambda or flambda2)])])],
[AC_MSG_ERROR([--enable-middle-end=closure|flambda|flambda2 must be provided])])

AC_ARG_ENABLE([runtime5],
[AS_HELP_STRING([--enable-runtime5],
[Use the OCaml 5 runtime])],
[runtime5_arg=--enable-runtime5],
[runtime5_arg=])

AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[Run compiler tests instrumented to output coverage data using bisect_ppx
Expand All @@ -62,7 +68,7 @@ AC_SUBST([legacy_layout])
AC_DISABLE_OPTION_CHECKING

AX_SUBDIRS_CONFIGURE([ocaml],
[$middle_end_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
[$middle_end_arg,$runtime5_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
[],
[],
[])
Expand Down
3 changes: 3 additions & 0 deletions ocaml/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,6 @@ META
/yacc/.gdb_history

/otherlibs/dynlink/natdynlinkops

dune.runtime_selection

Loading

0 comments on commit b999907

Please sign in to comment.