diff --git a/ceph-dev-new-setup/build/build b/ceph-dev-new-setup/build/build index a3623bb71..b5fa4425e 100644 --- a/ceph-dev-new-setup/build/build +++ b/ceph-dev-new-setup/build/build @@ -64,28 +64,6 @@ 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 - # Tentacle is the last release that needs dedicated Crimson builds, # Later releases are able to use Crimson with the default build. # As the "Crimson flavor" is no longer available, we need a *temporary* way diff --git a/ceph-dev-pipeline/build/Jenkinsfile b/ceph-dev-pipeline/build/Jenkinsfile index 94d047a1c..9b05dc1b1 100644 --- a/ceph-dev-pipeline/build/Jenkinsfile +++ b/ceph-dev-pipeline/build/Jenkinsfile @@ -440,20 +440,17 @@ pipeline { } def ceph_extra_cmake_args = ""; def deb_build_profiles = ""; - switch (env.FLAVOR) { - case "default": - ceph_extra_cmake_args += " -DALLOCATOR=tcmalloc" - ceph_extra_cmake_args += " -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON" - if (os.version_name == "focal") { - ceph_extra_cmake_args += " -DWITH_STATIC_LIBSTDCXX=ON" - } - break - case "debug": - ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug" - break - default: - println "FLAVOR=${env.FLAVOR} is invalid" - assert false + ceph_extra_cmake_args += " -DALLOCATOR=tcmalloc" + ceph_extra_cmake_args += " -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON" + if (os.version_name == "focal") { + ceph_extra_cmake_args += " -DWITH_STATIC_LIBSTDCXX=ON" + } + if (env.FLAVOR == "debug") { + ceph_extra_cmake_args += " -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON" + } + if (env.FLAVOR != "default" && env.FLAVOR != "debug") { + println "FLAVOR=${env.FLAVOR} is invalid" + assert false } bwc_command = "${bwc_command} ${bwc_cmd_sccache_flags}" if ( os.pkg_type == "deb" ) { diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index 3c8b1f7c8..2868232ce 100755 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -876,22 +876,21 @@ ceph_build_args_from_flavor() { shift # shellcheck disable=SC2034 - case "${flavor}" in - default) - CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc" - CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc" - # build boost with valgrind=on for https://tracker.ceph.com/issues/56500 - CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON" - DEB_BUILD_PROFILES="" - ;; - debug) - CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug" - ;; - *) + CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc" + CEPH_EXTRA_CMAKE_ARGS+=" -DALLOCATOR=tcmalloc" + # build boost with valgrind=on for https://tracker.ceph.com/issues/56500 + CEPH_EXTRA_CMAKE_ARGS+=" -DWITH_SYSTEM_BOOST=OFF -DWITH_BOOST_VALGRIND=ON" + DEB_BUILD_PROFILES="" + + if [[ "$flavor" == "debug" ]]; then + CEPH_EXTRA_CMAKE_ARGS+=" -DCMAKE_BUILD_TYPE=Debug -DWITH_CEPH_DEBUG_MUTEX=ON" + fi + + if [[ "$flavor" != "default" && "$flavor" != "debug" ]]; then echo "unknown FLAVOR: ${FLAVOR}" >&2 exit 1 - esac -} + fi + write_dist_files() {