summaryrefslogtreecommitdiffstats
path: root/cmake/QtWrapperScriptHelpers.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2023-10-16 18:04:06 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2023-11-03 18:24:46 +0200
commit09fdddeb326d0c79d080bdb50a92a839038baea7 (patch)
treef74c0f7813f083a12280a2325add73d8dce789c9 /cmake/QtWrapperScriptHelpers.cmake
parent510cc564c07d41c2eb1689f1928c0b77f652ceb5 (diff)
CMake: Don't strip debug builds with qt-cmake-private-install in CI
This provides better stack traces and easier debugging in CI VMs. Put the MSVC check for disabling stripping into the same place so there's one location to decide whether stripping should happen. Amends 60d804c56769de82e658205bec687b83833a61e9 Pick-to: 6.6 Fixes: QTBUG-118070 Change-Id: I4684036c8a5a137d14eea58954b34fe1ceb7f804 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake/QtWrapperScriptHelpers.cmake')
-rw-r--r--cmake/QtWrapperScriptHelpers.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/QtWrapperScriptHelpers.cmake b/cmake/QtWrapperScriptHelpers.cmake
index 9d7460fb53..e583a413dd 100644
--- a/cmake/QtWrapperScriptHelpers.cmake
+++ b/cmake/QtWrapperScriptHelpers.cmake
@@ -203,6 +203,22 @@ function(qt_internal_create_wrapper_scripts)
elseif(CMAKE_BUILD_TYPE)
set(__qt_configured_configs "${CMAKE_BUILD_TYPE}")
endif()
+
+ if(
+ # Skip stripping pure debug builds so it's easier to debug issues in CI VMs.
+ (NOT QT_FEATURE_debug_and_release
+ AND QT_FEATURE_debug
+ AND NOT QT_FEATURE_separate_debug_info)
+
+ # Skip stripping on MSVC because ${CMAKE_STRIP} might contain a MinGW strip binary
+ # and the breaks the linker version flag embedded in the binary and causes Qt Creator
+ # to mis-identify the Kit ABI.
+ OR MSVC
+ )
+ set(__qt_skip_strip_installed_artifacts TRUE)
+ else()
+ set(__qt_skip_strip_installed_artifacts FALSE)
+ endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bin/${__qt_cmake_install_script_name}.in"
"${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${__qt_cmake_install_script_name}" @ONLY)
qt_install(FILES "${QT_BUILD_DIR}/${INSTALL_LIBEXECDIR}/${__qt_cmake_install_script_name}"