Skip to content

Commit bf3773d

Browse files
mshinwellpoechsel
authored andcommitted
flambda-backend: To upstream: dune build fixes (depends on previous to-upstream patches)
1 parent 6fbc80e commit bf3773d

File tree

23 files changed

+2590
-232
lines changed

23 files changed

+2590
-232
lines changed

boot/menhir/menhirLib.mli

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[@@@ocaml.warning "-67"]
12
module General : sig
23
(******************************************************************************)
34
(* *)

bytecomp/dune

+7
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@
1818
(deps (:instr (file ../runtime/caml/instruct.h)))
1919
(action
2020
(bash "%{dep:../tools/make_opcodes.exe} -opcodes < %{instr} > %{targets}")))
21+
22+
(rule
23+
(targets opcodes.mli)
24+
(mode fallback)
25+
(deps (:instr (file opcodes.ml)))
26+
(action
27+
(bash "ocamlc -i %{instr} > %{targets}")))

debugger/dune

+15-12
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@
1212
;* *
1313
;**************************************************************************
1414

15-
; mshinwell: Disabled for now -- otherlibs/dynlink/dune needs fixing first.
15+
(ocamllex debugger_lexer)
16+
(ocamlyacc debugger_parser)
1617

17-
;(ocamllex lexer)
18-
;(ocamlyacc parser)
19-
;
20-
;(executable
21-
; (name main)
22-
; (modes byte)
23-
; (flags (:standard -w -9))
24-
; (modules_without_implementation parser_aux)
25-
; (libraries ocamlcommon ocamltoplevel runtime stdlib unix))
26-
;
27-
;(rule (copy main.exe ocamldebug.byte))
18+
(executable
19+
(name main)
20+
(modes byte)
21+
(flags (:standard -principal -w -9
22+
-nostdlib -cclib "-I ../runtime" -cclib "-L ../runtime" -cclib -lcamlrun))
23+
(link_deps (file ../stdlib/camlheader) (file ../runtime/libcamlrun.a))
24+
(modules_without_implementation parser_aux)
25+
(libraries ocamlcommon ocamltoplevel stdlib unix dynlink_internal))
26+
27+
(install
28+
(files (main.bc as ocamldebug))
29+
(section bin)
30+
(package ocaml))

driver/dune

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
; These rules work around a dune restriction which doesn't permit the same
2+
; compilation unit to be used in more than one executable or library.
3+
4+
(rule
5+
(targets main_native.ml)
6+
(action (copy main.ml %{targets})))
7+
8+
(rule
9+
(targets optmain_native.ml)
10+
(action (copy optmain.ml %{targets})))

0 commit comments

Comments
 (0)