[vlc-devel] [PATCH 3/5] contrib: add an option to generate PDB files
Steve Lhomme
robux4 at ycbcr.xyz
Thu May 16 10:03:23 CEST 2019
Only supported by contribs using libtool
Only output for programs and shared libraries (EXE and DLL), in .a archives the
symbols are in the the each .o files. They are aggregated when a .dll or .exe
is generated with them.
---
contrib/bootstrap | 6 ++++++
contrib/src/main.mak | 11 +++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 547fe3afd6..1540ffbf9b 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -36,6 +36,7 @@ usage()
echo " (USE AT YOUR OWN LEGAL RISKS)"
echo " --disable-optim disable optimization in libraries"
echo " --disable-debug disable generating debug information"
+ echo " --enable-pdb generate debug information in PDB format"
}
BUILD=
@@ -51,6 +52,7 @@ GNUV3="1"
AD_CLAUSES=
WITH_OPTIMIZATION="1"
HAVE_DEBUG="1"
+HAVE_PDB=
if test ! -f "../../contrib/src/main.mak"
then
@@ -89,6 +91,9 @@ do
--disable-debug)
HAVE_DEBUG=
;;
+ --enable-pdb)
+ HAVE_PDB=1
+ ;;
--enable-small)
ENABLE_SMALL=1
;;
@@ -271,6 +276,7 @@ test -z "$GNUV3" || add_make_enabled "GNUV3"
test -z "$AD_CLAUSES" || add_make_enabled "AD_CLAUSES"
test -z "$WITH_OPTIMIZATION" || add_make_enabled "WITH_OPTIMIZATION"
test -z "$HAVE_DEBUG" || add_make_enabled "HAVE_DEBUG"
+test -z "$HAVE_PDB" || add_make_enabled "HAVE_PDB"
test "`uname -o 2>/dev/null`" != "Msys" || add_make "CMAKE_GENERATOR := -G \"MSYS Makefiles\""
#
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 3868ea8fac..1bf24c8f4b 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -192,6 +192,11 @@ LDFLAGS := $(LDFLAGS) -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
ifdef HAVE_DEBUG
CFLAGS := $(CFLAGS) -g
CXXFLAGS := $(CXXFLAGS) -g
+ifdef HAVE_PDB
+CFLAGS := $(CFLAGS) -gcodeview
+CXXFLAGS := $(CXXFLAGS) -gcodeview
+LIBTOOLFLAGS += --generate-pdb
+endif
endif
ifndef WITH_OPTIMIZATION
@@ -324,12 +329,14 @@ HOSTVARS := \
CPPFLAGS="$(CPPFLAGS)" \
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
- LDFLAGS="$(LDFLAGS)"
+ LDFLAGS="$(LDFLAGS)" \
+ LIBTOOLFLAGS="$(LIBTOOLFLAGS)"
HOSTVARS_PIC := $(HOSTTOOLS) \
CPPFLAGS="$(CPPFLAGS) $(PIC)" \
CFLAGS="$(CFLAGS) $(PIC)" \
CXXFLAGS="$(CXXFLAGS) $(PIC)" \
- LDFLAGS="$(LDFLAGS)"
+ LDFLAGS="$(LDFLAGS)" \
+ LIBTOOLFLAGS="$(LIBTOOLFLAGS)"
# Keep a version of HOSTVARS without the tools, since meson requires the
# tools variables to point to the native ones
--
2.17.1
More information about the vlc-devel
mailing list