[vlc-devel] [PATCH] contrib: add debug info for cmake and meson
Alexandre Janniaux
ajanni at videolabs.io
Mon Apr 27 10:24:14 CEST 2020
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.
---
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 708885cdec6..9b2e1443881 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -408,7 +408,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
@@ -561,7 +561,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))" >> $@
if test -n "$(CMAKE_SYSTEM_NAME)"; then \
--
2.26.2
More information about the vlc-devel
mailing list