summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2023-01-30 21:53:53 +0100
committerXavier Leroy <xavier.leroy@college-de-france.fr>2023-02-02 09:15:00 +0100
commit2d04a3b1b28d0273306d57e8bd2197233d03b108 (patch)
treeed6d75491872f214107ace0e0891af442a69cd86 /Makefile
parentea7f21a60afab1db054fedbeb4b7e398b1124ecf (diff)
downloadocaml-2d04a3b1b28d0273306d57e8bd2197233d03b108.tar.gz
Do not build bytecode executables with -g by default
This makes them too big. Just use -g for selected executables that we often want to debug using ocamldebug (ocamlc, ocamlopt), and for the ocaml toplevel, which can be run with backtraces enabled.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index e5356b2936..31eeea9a46 100644
--- a/Makefile
+++ b/Makefile
@@ -467,7 +467,7 @@ ocamlc_LIBRARIES = $(addprefix compilerlibs/,ocamlcommon ocamlbytecomp)
ocamlc_MODULES = driver/main
-ocamlc$(EXE): OC_BYTECODE_LDFLAGS += -compat-32
+ocamlc$(EXE): OC_BYTECODE_LDFLAGS += -compat-32 -g
ocamlc.opt$(EXE): OC_NATIVE_LDFLAGS += $(addprefix -cclib ,$(BYTECCLIBS))
@@ -480,6 +480,8 @@ ocamlopt_LIBRARIES = $(addprefix compilerlibs/,ocamlcommon ocamloptcomp)
ocamlopt_MODULES = driver/optmain
+ocamlopt$(EXE): OC_BYTECODE_LDFLAGS += -g
+
partialclean::
rm -f ocamlopt ocamlopt.exe ocamlopt.opt ocamlopt.opt.exe
@@ -491,7 +493,7 @@ ocaml_LIBRARIES = \
ocaml_MODULES = toplevel/topstart
.INTERMEDIATE: ocaml.tmp
-ocaml.tmp: OC_BYTECODE_LDFLAGS += -I toplevel/byte -linkall
+ocaml.tmp: OC_BYTECODE_LDFLAGS += -I toplevel/byte -linkall -g
ocaml.tmp: $(ocaml_LIBRARIES:=.cma) $(ocaml_MODULES:=.cmo)
$(V_LINKC)$(LINK_BYTECODE_PROGRAM) -o $@ $^