[vlc-commits] contrib: add debug info for cmake and meson

Alexandre Janniaux git at videolan.org
Wed Apr 29 15:22:56 CEST 2020


vlc/vlc-3.0 | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Mon Apr 27 10:19:36 2020 +0200| [dc36872e6c056660bc70628952f39bf24fd652fc] | committer: Hugo Beauzée-Luyssen

contrib: add debug info for cmake and meson

Other buildsystems are compiled with -g inconditionnally. As we
generally extract and strip debug info, make sure they are generated so
that overlayered build scripts don't need to add `-g` flag in CFLAGS.

It is particularily important since adding `-g` flag in CFLAGS confuses
meson detection for underscore prefixing.

See videolan/VLCKit#360.

(cherry picked from commit 787d886450187b56176d74d4cb2e1c3f138cf174)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 contrib/src/main.mak | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 02878693c2..9c2e041418 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -377,7 +377,7 @@ MESONFLAGS = --default-library static --prefix "$(PREFIX)" --backend ninja \
 ifndef WITH_OPTIMIZATION
 MESONFLAGS += --buildtype debug
 else
-MESONFLAGS += --buildtype release
+MESONFLAGS += --buildtype debugoptimized
 endif
 
 ifdef HAVE_CROSS_COMPILE
@@ -507,7 +507,7 @@ toolchain.cmake:
 ifndef WITH_OPTIMIZATION
 	echo "set(CMAKE_BUILD_TYPE Debug)" >> $@
 else
-	echo "set(CMAKE_BUILD_TYPE Release)" >> $@
+	echo "set(CMAKE_BUILD_TYPE RelWithDebInfo)" >> $@
 endif
 	echo "set(CMAKE_SYSTEM_PROCESSOR $(ARCH))" >> $@
 ifdef HAVE_WIN32



More information about the vlc-commits mailing list