Skip to content

Commit

Permalink
To upstream: dune build fixes (depends on previous to-upstream patches)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell authored and poechsel committed Jun 25, 2021
1 parent dab926e commit f1481c4
Show file tree
Hide file tree
Showing 23 changed files with 2,590 additions and 232 deletions.
1 change: 1 addition & 0 deletions ocaml/boot/menhir/menhirLib.mli
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[@@@ocaml.warning "-67"]
module General : sig
(******************************************************************************)
(* *)
Expand Down
7 changes: 7 additions & 0 deletions ocaml/bytecomp/dune
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
(deps (:instr (file ../runtime/caml/instruct.h)))
(action
(bash "%{dep:../tools/make_opcodes.exe} -opcodes < %{instr} > %{targets}")))

(rule
(targets opcodes.mli)
(mode fallback)
(deps (:instr (file opcodes.ml)))
(action
(bash "ocamlc -i %{instr} > %{targets}")))
27 changes: 15 additions & 12 deletions ocaml/debugger/dune
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@
;* *
;**************************************************************************

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

;(ocamllex lexer)
;(ocamlyacc parser)
;
;(executable
; (name main)
; (modes byte)
; (flags (:standard -w -9))
; (modules_without_implementation parser_aux)
; (libraries ocamlcommon ocamltoplevel runtime stdlib unix))
;
;(rule (copy main.exe ocamldebug.byte))
(executable
(name main)
(modes byte)
(flags (:standard -principal -w -9
-nostdlib -cclib "-I ../runtime" -cclib "-L ../runtime" -cclib -lcamlrun))
(link_deps (file ../stdlib/camlheader) (file ../runtime/libcamlrun.a))
(modules_without_implementation parser_aux)
(libraries ocamlcommon ocamltoplevel stdlib unix dynlink_internal))

(install
(files (main.bc as ocamldebug))
(section bin)
(package ocaml))
10 changes: 10 additions & 0 deletions ocaml/driver/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
; These rules work around a dune restriction which doesn't permit the same
; compilation unit to be used in more than one executable or library.

(rule
(targets main_native.ml)
(action (copy main.ml %{targets})))

(rule
(targets optmain_native.ml)
(action (copy optmain.ml %{targets})))
Loading

0 comments on commit f1481c4

Please sign in to comment.