From a741f25803cebeb3e90895d10bf05c328ad01faf Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Mon, 27 Jul 2020 16:13:28 +0100 Subject: [PATCH] Build otherlibs with debug info in C stubs --- Changes | 3 +++ otherlibs/Makefile.otherlibs.common | 4 ++++ otherlibs/systhreads/Makefile | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/Changes b/Changes index fc9aaf96f..7cf9b8134 100644 --- a/Changes +++ b/Changes @@ -292,6 +292,9 @@ Working version to avoid C dependency recomputation. (Gabriel Scherer, review by David Allsopp) +- #9804: Build C stubs of libraries in otherlibs/ with debug info. + (Stephen Dolan, review by Sébastien Hinderer and David Allsopp) + ### Bug fixes: - #7902, #9556: Type-checker infers recursive type, even though -rectypes is diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common index 1d43b1315..781db8e75 100644 --- a/otherlibs/Makefile.otherlibs.common +++ b/otherlibs/Makefile.otherlibs.common @@ -24,6 +24,10 @@ CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun CAMLC := $(BEST_OCAMLC) -nostdlib -I $(ROOTDIR)/stdlib CAMLOPT := $(BEST_OCAMLOPT) -nostdlib -I $(ROOTDIR)/stdlib +ifneq "$(CCOMPTYPE)" "msvc" +OC_CFLAGS += -g +endif + OC_CFLAGS += $(SHAREDLIB_CFLAGS) $(EXTRACFLAGS) OC_CPPFLAGS += -I$(ROOTDIR)/runtime $(EXTRACPPFLAGS) diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile index 7852bc89b..fb2740bc2 100644 --- a/otherlibs/systhreads/Makefile +++ b/otherlibs/systhreads/Makefile @@ -18,6 +18,10 @@ ROOTDIR=../.. include $(ROOTDIR)/Makefile.common include $(ROOTDIR)/Makefile.best_binaries +ifneq "$(CCOMPTYPE)" "msvc" +OC_CFLAGS += -g +endif + OC_CFLAGS += $(SHAREDLIB_CFLAGS) OC_CPPFLAGS += -I$(ROOTDIR)/runtime