Skip to content

Commit 08995b5

Browse files
committed
Configure flag to use the 5.x runtime; make the 5.x runtime build
1 parent 42fe5f9 commit 08995b5

39 files changed

+506
-479
lines changed

backend/amd64/emit.mlp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,13 +1761,13 @@ let emit_instr fallthrough i =
17611761
load_label_addr lbl_handler r11;
17621762
I.push r11;
17631763
cfi_adjust_cfa_offset 8;
1764-
I.push (domain_field Domainstate.Domain_exception_pointer);
1764+
I.push (domain_field Domainstate.Domain_exn_handler);
17651765
cfi_adjust_cfa_offset 8;
1766-
I.mov rsp (domain_field Domainstate.Domain_exception_pointer);
1766+
I.mov rsp (domain_field Domainstate.Domain_exn_handler);
17671767
stack_offset := !stack_offset + 16;
17681768
| Lpoptrap ->
17691769
emit_pop_trap_label ();
1770-
I.pop (domain_field Domainstate.Domain_exception_pointer);
1770+
I.pop (domain_field Domainstate.Domain_exn_handler);
17711771
cfi_adjust_cfa_offset (-8);
17721772
I.add (int 8) rsp;
17731773
cfi_adjust_cfa_offset (-8);
@@ -1787,8 +1787,8 @@ let emit_instr fallthrough i =
17871787
(* BACKPORT END *)
17881788
record_frame Reg.Set.empty (Dbg_raise i.dbg)
17891789
| Lambda.Raise_notrace ->
1790-
I.mov (domain_field Domainstate.Domain_exception_pointer) rsp;
1791-
I.pop (domain_field Domainstate.Domain_exception_pointer);
1790+
I.mov (domain_field Domainstate.Domain_exn_handler) rsp;
1791+
I.pop (domain_field Domainstate.Domain_exn_handler);
17921792
I.pop r11;
17931793
I.jmp r11
17941794
end

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AC_PREREQ([2.69])
22
AC_INIT([The Flambda backend for OCaml],
3-
5.1.1+jst-runtime4,
3+
5.1.1+jst,
44
55
[flambda_backend],
66
[http://github.com/ocaml-flambda/flambda_backend])
@@ -36,6 +36,12 @@ AC_ARG_ENABLE([middle-end],
3636
[*], [AC_MSG_ERROR([Bad middle end (not closure, flambda or flambda2)])])],
3737
[AC_MSG_ERROR([--enable-middle-end=closure|flambda|flambda2 must be provided])])
3838

39+
AC_ARG_ENABLE([runtime5],
40+
[AS_HELP_STRING([--enable-runtime5],
41+
[Use the OCaml 5 runtime])],
42+
[runtime5_arg=--enable-runtime5],
43+
[runtime5_arg=])
44+
3945
AC_ARG_ENABLE([coverage],
4046
[AS_HELP_STRING([--enable-coverage],
4147
[Run compiler tests instrumented to output coverage data using bisect_ppx
@@ -62,7 +68,7 @@ AC_SUBST([legacy_layout])
6268
AC_DISABLE_OPTION_CHECKING
6369

6470
AX_SUBDIRS_CONFIGURE([ocaml],
65-
[$middle_end_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
71+
[$middle_end_arg,$runtime5_arg,-C,--disable-ocamldoc,--disable-stdlib-manpages,--enable-ocamltest],
6672
[],
6773
[],
6874
[])

ocaml/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,6 @@ META
358358
/yacc/.gdb_history
359359

360360
/otherlibs/dynlink/natdynlinkops
361+
362+
dune.runtime_selection
363+

0 commit comments

Comments
 (0)