[vlc-commits] configure: add an option to generate PDB files when building

Steve Lhomme git at videolan.org
Tue May 21 15:30:56 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb 22 15:40:03 2019 +0100| [cb3e3498d8269e21490dc4db5a98b89523a0b00e] | committer: Steve Lhomme

configure: add an option to generate PDB files when building

This will only be enabled when building windows targets and will only work when
compiling with Clang.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb3e3498d8269e21490dc4db5a98b89523a0b00e
---

 configure.ac | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index a08be619ac..f2a22de7af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,6 +349,19 @@ AS_IF([test "${SYS}" = "mingw32"],[
   ])
 AC_DEFINE_UNQUOTED(VLC_WINSTORE_APP, ${vlc_winstore_app}, [Define to 1 if you want to build for Windows Store apps])
 
+vlc_build_pdb=0
+AC_ARG_ENABLE([pdb],
+     AS_HELP_STRING([--enable-pdb],
+                    [Build PDB files for windows targets (default off)]))
+AS_IF([test "${SYS}" = "mingw32"],[
+  AS_IF([test "${enable_pdb}" = "yes"], [
+    vlc_build_pdb=1
+    AX_APPEND_FLAG([-g -gcodeview],[CFLAGS])
+    AX_APPEND_FLAG([-g -gcodeview],[CXXFLAGS])
+    LDFLAGS="${LDFLAGS} -Wl,-pdb="
+  ],[])
+])
+
 AM_CONDITIONAL([HAVE_LINUX],   [test "${SYS}" = "linux"])
 AM_CONDITIONAL([HAVE_OS2],     [test "${SYS}" = "os2"])
 
@@ -364,6 +377,7 @@ AM_CONDITIONAL([HAVE_WIN32],   [test "${SYS}" = "mingw32"])
 AM_CONDITIONAL([HAVE_WIN64],   [test "${HAVE_WIN64}" = "1"]) dnl Only used for the packaging
 AM_CONDITIONAL([HAVE_WINSTORE], [test "$vlc_winstore_app" = "1"])
 AM_CONDITIONAL([HAVE_WIN32_DESKTOP], [test "${SYS}" = "mingw32" -a "$vlc_winstore_app" = "0"])
+AM_CONDITIONAL([ENABLE_PDB],   [test "$vlc_build_pdb" = "1"])
 
 dnl Use nasm/yasm only on x86
 AC_CHECK_PROGS(X86ASM, [nasm yasm])



More information about the vlc-commits mailing list