[sledge] Adjust build system to allow building as a vendored dependency

Summary:
Move definitions of profiles from `dune-workspace` to `dune` since it
seems to be ok to use profiles in `dune-workspace` that are only
defined in `dune`. Since the `dune` but not `dune-workspace` file is
used when building as a vendored dependency, this seems to be
preferable.

Also, change the `opt` profile into a wildcard, which seems to be
preferable from the vendored-building perspective.

Also, set library public names such that including `sledge` in the
`libraries` phrase of `dune` files works.

Reviewed By: ngorogiannis

Differential Revision: D20376179

fbshipit-source-id: f2b634716
master
Josh Berdine 5 years ago committed by Facebook GitHub Bot
parent 8337097cf0
commit 134f9f930e

@ -3,6 +3,29 @@
; This source code is licensed under the MIT license found in the
; LICENSE file in the root directory of this source tree.
(env
(dbg
(flags
(-w +a-4-9-18-40-42-44-48@50-66 -strict-formats -strict-sequence
-short-paths -bin-annot -keep-locs -keep-docs -opaque))
(env-vars
(PPX_TRACE_ENABLED 1))
(inline_tests enabled))
(dbg-opt
(flags
(-w -a -noassert -unboxed-types))
(ocamlopt_flags (-O3))
(env-vars
(PPX_TRACE_ENABLED 1))
(inline_tests disabled))
(_
(flags
(-w -a -noassert -unboxed-types))
(ocamlopt_flags (-O3))
(env-vars
(PPX_TRACE_ENABLED 0))
(inline_tests disabled)))
(dirs :standard \ llvm test)
(rule

@ -5,29 +5,6 @@
; This source code is licensed under the MIT license found in the
; LICENSE file in the root directory of this source tree.
(env
(dbg
(flags
(-w +a-4-9-18-40-42-44-48@50-66 -strict-formats -strict-sequence
-short-paths -bin-annot -keep-locs -keep-docs -opaque))
(env-vars
(PPX_TRACE_ENABLED 1))
(inline_tests enabled))
(opt
(flags
(-w -a -noassert -unboxed-types))
(ocamlopt_flags (-O3))
(env-vars
(PPX_TRACE_ENABLED 0))
(inline_tests disabled))
(dbg-opt
(flags
(-w -a -noassert -unboxed-types))
(ocamlopt_flags (-O3))
(env-vars
(PPX_TRACE_ENABLED 1))
(inline_tests disabled)))
(context (opam (switch sledge) (name dbg) (profile dbg) (merlin)))
(context (opam (switch sledge) (name opt) (profile opt)))
(context (opam (switch sledge) (name dbg-opt) (profile dbg-opt)))
(context (opam (switch sledge) (name opt) (profile opt)))

@ -5,6 +5,7 @@
(library
(name sledgelib)
(public_name sledge)
(libraries trace import)
(flags
(:standard -open Import))

Loading…
Cancel
Save