[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: don't set the build mode in the toolchain file
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Apr 16 13:06:17 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
89fe89ee by Steve Lhomme at 2024-04-16T10:34:34+00:00
contrib: don't set the build mode in the toolchain file
It doesn't describe the toolchain we use. We can pass the value as a regular flag.
- - - - -
78f68d45 by Steve Lhomme at 2024-04-16T10:34:34+00:00
contrib: qt: always build in release mode and use symbols only with PDB
- - - - -
3 changed files:
- contrib/src/gen-cmake-toolchain.py
- contrib/src/main.mak
- contrib/src/qt/rules.mak
Changes:
=====================================
contrib/src/gen-cmake-toolchain.py
=====================================
@@ -28,7 +28,6 @@ def _add_environ_val_not_empty(meson_key, env_key):
args.file.write("# CMake toolchain automatically generated by contrib makefile\n")
# Binaries section
-_add_environ_val('CMAKE_BUILD_TYPE', 'BUILD_TYPE')
_add_environ_val('CMAKE_SYSTEM_PROCESSOR', 'HOST_ARCH')
_add_environ_val_not_empty('CMAKE_SYSTEM_NAME', 'SYSTEM_NAME')
_add_environ_val('CMAKE_RC_COMPILER', 'RC_COMPILER')
=====================================
contrib/src/main.mak
=====================================
@@ -473,6 +473,11 @@ CMAKE = $(CMAKECONFIG) \
-DCMAKE_INSTALL_PREFIX:STRING=$(PREFIX)
CMAKE_NATIVE = $(CMAKECONFIG) \
-DCMAKE_INSTALL_PREFIX:STRING=$(BUILDPREFIX)
+ifndef WITH_OPTIMIZATION
+CMAKE += -DCMAKE_BUILD_TYPE=Debug
+else
+CMAKE += -DCMAKE_BUILD_TYPE=RelWithDebInfo
+endif
ifdef HAVE_WIN32
CMAKE += -DCMAKE_DEBUG_POSTFIX:STRING=
endif
@@ -678,11 +683,6 @@ endif
# CMake toolchain
CMAKE_TOOLCHAIN_ENV := $(HOSTTOOLS) HOST_ARCH="$(ARCH)" SYSTEM_NAME="$(CMAKE_SYSTEM_NAME)"
-ifndef WITH_OPTIMIZATION
- CMAKE_TOOLCHAIN_ENV += BUILD_TYPE=Debug
-else
- CMAKE_TOOLCHAIN_ENV += BUILD_TYPE=RelWithDebInfo
-endif
ifdef HAVE_WIN32
ifdef HAVE_CROSS_COMPILE
CMAKE_TOOLCHAIN_ENV += RC_COMPILER="$(WINDRES)"
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -56,14 +56,6 @@ qt: qtbase-everywhere-src-$(QTBASE_VERSION_FULL).tar.xz .sum-qt
$(APPLY) $(SRC)/qt/0003-CMake-Fix-a-misplaced-in-pkg-config-files.patch
$(MOVE)
-QTBASE_CONFIG := -release
-
-# Qt static debug build is practically unusable.
-# So add debug symbols in release mode instead:
-ifndef WITH_OPTIMIZATION
-QTBASE_CONFIG += -force-debug-info
-endif
-
ifeq ($(V),1)
QTBASE_CONFIG += -verbose
endif
@@ -77,7 +69,14 @@ QTBASE_CONFIG += -static -opensource -confirm-license -opengl desktop -no-pkg-co
-no-gif -no-dbus -no-feature-zstd -no-feature-concurrent -no-feature-androiddeployqt \
-no-feature-sql -no-feature-testlib -system-freetype -system-harfbuzz -system-libjpeg \
-no-feature-xml -no-feature-printsupport -system-libpng -system-zlib -no-feature-network \
- -nomake examples -prefix $(PREFIX) -qt-host-path $(BUILDPREFIX)
+ -nomake examples -prefix $(PREFIX) -qt-host-path $(BUILDPREFIX) \
+ -- -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake)
+
+ifdef ENABLE_PDB
+QTBASE_CONFIG += -DCMAKE_BUILD_TYPE=RelWithDebInfo
+else
+QTBASE_CONFIG += -DCMAKE_BUILD_TYPE=Release
+endif
QTBASE_NATIVE_CONFIG := -DQT_BUILD_EXAMPLES=FALSE -DQT_BUILD_TESTS=FALSE -DFEATURE_pkg_config=OFF \
-DFEATURE_accessibility=OFF -DFEATURE_widgets=OFF -DFEATURE_printsupport=OFF -DFEATURE_androiddeployqt=OFF \
@@ -101,8 +100,7 @@ QTBASE_NATIVE_CONFIG := -DQT_BUILD_EXAMPLES=FALSE -DQT_BUILD_TESTS=FALSE -DFEATU
mkdir -p $(BUILD_DIR)
# Configure qt, build and run cmake
- +cd $(BUILD_DIR) && ../configure $(QTBASE_PLATFORM) $(QTBASE_CONFIG) \
- -- -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake)
+ +cd $(BUILD_DIR) && ../configure $(QTBASE_PLATFORM) $(QTBASE_CONFIG)
# Build
+$(CMAKEBUILD)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/58c60d13978b5048d82aee68e6a848821bdcaf94...78f68d45af0ce3ae24c60262c728eddef4f72996
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/58c60d13978b5048d82aee68e6a848821bdcaf94...78f68d45af0ce3ae24c60262c728eddef4f72996
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list