From 39860f5dc1b96c816726610cdbd33989375ba05b Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 3 Oct 2023 16:47:52 +0000 Subject: [PATCH] ceph-dev-new-setup: enable debug options for dev builds Note: it has been this way since at least 35e1a715. It's difficult to tell when or even if ceph was ever properly built with debugging configurations for QA as there are corresponding changes in ceph with the switch to cmake which makes this challenging to evaluate. It's likely that it was wrongly assumed that cmake would set the build type to Debug because the ".git" directory would be present. This is not the case because the "make-dist" script (executed below) creates a git tarball that is used for the actual untar/build. See also: https://github.com/ceph/ceph/pull/53800 Signed-off-by: Patrick Donnelly --- ceph-dev-new-setup/build/build | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ceph-dev-new-setup/build/build b/ceph-dev-new-setup/build/build index 07a304e9..b5a9bc66 100644 --- a/ceph-dev-new-setup/build/build +++ b/ceph-dev-new-setup/build/build @@ -64,6 +64,28 @@ else echo "forcing." fi +# This is a dev release, enable some debug cmake configs. Note: it has been +# this way since at least 35e1a715. It's difficult to tell when or even if ceph +# was ever properly built with debugging configurations for QA as there are +# corresponding changes in ceph with the switch to cmake which makes this +# challenging to evaluate. +# +# It's likely that it was wrongly assumed that cmake would set the build type +# to Debug because the ".git" directory would be present. This is not the case +# because the "make-dist" script (executed below) creates a git tarball that is +# used for the actual untar/build. See also: +# +# https://github.com/ceph/ceph/pull/53800 +# +# Addendum and possibly temporary restriction: only enable these for branches +# ending in "-debug". +if [[ "$BRANCH" == *-debug ]]; then + CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON" + printf 'Added debug cmake configs to branch %s. CEPH_EXTRA_CMAKE_ARGS: %s\n' "$BRANCH" "$CEPH_EXTRA_CMAKE_ARGS" +else + printf 'No cmake debug options added to branch %s.\n' "$BRANCH" +fi + ceph_build_args_from_flavor ${FLAVOR} mkdir -p release -- 2.39.5