Skip to content

Commit

Permalink
Define separate dune profiles for boot and main build stages (ocaml-f…
Browse files Browse the repository at this point in the history
…lambda#801)

Define separate dune profiles for boot and main build stage
  • Loading branch information
gretay-js authored Aug 31, 2022
1 parent 2b570b2 commit 30791e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ define dune_boot_context
(context (default
(name default)
; CR sdolan: profile dev might be faster, but the compiler currently fails to build in dev.
(profile release)))
(profile boot)))
endef

define dune_runtime_stdlib_context
(lang dune 2.8)
(context (default
(name runtime_stdlib)
(profile release)
(profile main)
(paths
(PATH ("$(CURDIR)/_build/_bootinstall/bin" :standard))
(OCAMLLIB ("$(CURDIR)/_build/_bootinstall/lib/ocaml")))
Expand All @@ -40,7 +40,7 @@ define dune_main_context
(lang dune 2.8)
(context (default
(name main)
(profile release)
(profile main)
(paths
(PATH ("$(CURDIR)/_build/_bootinstall/bin" :standard))
(OCAMLLIB ("$(CURDIR)/_build/install/runtime_stdlib/lib/ocaml_runtime_stdlib")))
Expand Down
5 changes: 4 additions & 1 deletion dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
; set warning as error in release profile

(env
(release
(main
(flags
(:standard -warn-error +A)))
(boot
(flags
(:standard -warn-error +A))))

Expand Down

0 comments on commit 30791e7

Please sign in to comment.