[vlc-devel] [PATCH 2/4] contrib: add an option to generate PDB information

Steve Lhomme robux4 at ycbcr.xyz
Mon May 20 11:23:56 CEST 2019


---
 contrib/bootstrap    | 6 ++++++
 contrib/src/main.mak | 4 ++++
 2 files changed, 10 insertions(+)

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..4cda628133 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -192,6 +192,10 @@ 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
+endif
 endif
 
 ifndef WITH_OPTIMIZATION
-- 
2.17.1



More information about the vlc-devel mailing list