From 53822697f9392323fa4c4e09a5b853066d96ad58 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Mon, 20 Apr 2020 13:46:50 -0700 Subject: [PATCH] [sledge] Rename contexts/profiles to be more conventional Reviewed By: jvillard Differential Revision: D21107642 fbshipit-source-id: 22cbec493 --- sledge/HACKING.adoc | 6 ++--- sledge/Makefile | 54 +++++++++++++++++++++---------------------- sledge/dune | 4 ++-- sledge/dune-workspace | 6 ++--- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/sledge/HACKING.adoc b/sledge/HACKING.adoc index 8000abaec..6f56453ad 100644 --- a/sledge/HACKING.adoc +++ b/sledge/HACKING.adoc @@ -6,11 +6,11 @@ - `make check` while coding to run the type-checker and populate the data merlin needs as fast as possible -- `make dbg` to build the _debug_ binary (`_build/_install/dbg/bin/sledge`), which enables debug tracing (calls to functions in the `Trace` module) and executes `assert`ions +- `make debug` to build the _debug_ binary (`_build/_install/debug/bin/sledge`), which enables debug tracing (calls to functions in the `Trace` module) and executes `assert`ions -- `make dbg-opt` to build the _optimized debug_ binary (`_build/_install/dbg-opt/bin/sledge`), which enables debug tracing but does not execute `assert`ions +- `make trace` to build the _optimized debug_ binary (`_build/_install/trace/bin/sledge`), which enables debug tracing but does not execute `assert`ions -- `make opt` to build the _optimized_ binary (`_build/_install/opt/bin/sledge`), which disables debug tracing and does not execute `assert`ions +- `make release` to build the _optimized_ binary (`_build/_install/release/bin/sledge`), which disables debug tracing and does not execute `assert`ions - `make exes`, the default target, to build all 3 binaries diff --git a/sledge/Makefile b/sledge/Makefile index b755cbe5a..ccecdf939 100644 --- a/sledge/Makefile +++ b/sledge/Makefile @@ -9,18 +9,18 @@ default: exes EXES = bin/sledge_cli INSTALLS = sledge -DBG_TARGETS = $(patsubst %,_build/dbg/%.exe,$(EXES)) $(patsubst %,_build/dbg/%.install,$(INSTALLS)) +DEBUG_TARGETS = $(patsubst %,_build/debug/%.exe,$(EXES)) $(patsubst %,_build/debug/%.install,$(INSTALLS)) -TARGETS = $(DBG_TARGETS) $(subst dbg,dbg-opt,$(DBG_TARGETS)) $(subst dbg,opt,$(DBG_TARGETS)) _build/opt/sledge-help.txt +TARGETS = $(DEBUG_TARGETS) $(subst debug,trace,$(DEBUG_TARGETS)) $(subst debug,release,$(DEBUG_TARGETS)) _build/release/sledge-help.txt -dune_build_dbg = dune build $(DBG_TARGETS) -dune_install_dbg = dune install --context=dbg --prefix=_build/_install/dbg sledge 2>/dev/null +dune_build_debug = dune build $(DEBUG_TARGETS) +dune_install_debug = dune install --context=debug --prefix=_build/_install/debug sledge 2>/dev/null -dune_build_dbg_opt = $(subst dbg,dbg-opt,$(dune_build_dbg)) -dune_install_dbg_opt = $(subst dbg,dbg-opt,$(dune_install_dbg)) +dune_build_debug_release = $(subst debug,trace,$(dune_build_debug)) +dune_install_debug_release = $(subst debug,trace,$(dune_install_debug)) -dune_build_opt = $(subst dbg,opt,$(dune_build_dbg)) -dune_install_opt = $(subst dbg,opt,$(dune_install_dbg)) +dune_build_release = $(subst debug,release,$(dune_build_debug)) +dune_install_release = $(subst debug,release,$(dune_install_debug)) .PHONY: check check: @@ -29,24 +29,24 @@ check: .PHONY: exes exes: dune build $(TARGETS) - $(dune_install_dbg) - $(dune_install_dbg_opt) - $(dune_install_opt) + $(dune_install_debug) + $(dune_install_debug_release) + $(dune_install_release) -.PHONY: dbg -dbg: - $(dune_build_dbg) - $(dune_install_dbg) +.PHONY: debug +debug: + $(dune_build_debug) + $(dune_install_debug) -.PHONY: dbg-opt -dbg-opt: - $(dune_build_dbg_opt) - $(dune_install_dbg_opt) +.PHONY: trace +trace: + $(dune_build_debug_release) + $(dune_install_debug_release) -.PHONY: opt -opt: - $(dune_build_opt) - $(dune_install_opt) +.PHONY: release +release: + $(dune_build_release) + $(dune_install_release) .PHONY: watch watch: @@ -54,12 +54,12 @@ watch: .PHONY: test test: - -dune build @_build/dbg/runtest --auto-promote - dune build @_build/dbg/fmt --auto-promote 2>/dev/null + -dune build @_build/debug/runtest --auto-promote + dune build @_build/debug/fmt --auto-promote 2>/dev/null .PHONY: ci-test ci-test: - dune build @_build/dbg/runtest + dune build @_build/debug/runtest .PHONY: clean clean: @@ -67,7 +67,7 @@ clean: .PHONY: fmt fmt: - -dune build @_build/dbg/fmt --auto-promote 2>/dev/null + -dune build @_build/debug/fmt --auto-promote 2>/dev/null clang-format -i model/llair_intrinsics.h model/cxxabi.cpp ${MAKE} -C test fmt diff --git a/sledge/dune b/sledge/dune index 868c7cc4a..8867d990f 100644 --- a/sledge/dune +++ b/sledge/dune @@ -4,14 +4,14 @@ ; LICENSE file in the root directory of this source tree. (env - (dbg + (debug (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 + (trace (flags (-w -a -noassert -unboxed-types)) (ocamlopt_flags (-O3)) diff --git a/sledge/dune-workspace b/sledge/dune-workspace index 852c5860b..11b1a69f1 100644 --- a/sledge/dune-workspace +++ b/sledge/dune-workspace @@ -5,6 +5,6 @@ ; This source code is licensed under the MIT license found in the ; LICENSE file in the root directory of this source tree. -(context (opam (switch sledge) (name dbg) (profile dbg) (merlin))) -(context (opam (switch sledge) (name dbg-opt) (profile dbg-opt))) -(context (opam (switch sledge) (name opt) (profile opt))) +(context (opam (switch sledge) (name debug) (profile debug) (merlin))) +(context (opam (switch sledge) (name trace) (profile trace))) +(context (opam (switch sledge) (name release) (profile release)))