Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug image build target for CentOS7 #5344

Merged
merged 5 commits into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions release-centos7-llvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ image_tiflash_llvm_base_aarch64:
build_tiflash_release_amd64:
docker run --rm -v $(realpath ..):/build/tics hub.pingcap.net/tiflash/tiflash-llvm-base:amd64 /build/tics/release-centos7-llvm/scripts/build-release.sh

# Add build_tiflash_debug_amd64 target to enable FailPoints on x86. Since outputs are the same as release version, no new package targets added.
build_tiflash_debug_amd64:
docker run --rm -v $(realpath ..):/build/tics hub.pingcap.net/tiflash/tiflash-llvm-base:amd64 /build/tics/release-centos7-llvm/scripts/build-debug.sh

build_tiflash_ci_amd64:
docker run --rm -v $(realpath ..):/build/tics hub.pingcap.net/tiflash/tiflash-llvm-base:amd64 /build/tics/release-centos7-llvm/scripts/build-tiflash-ci.sh

Expand Down
23 changes: 23 additions & 0 deletions release-centos7-llvm/scripts/build-debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# Copyright 2022 PingCAP, Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


CMAKE_PREFIX_PATH=$1

set -ueox pipefail

SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

${SCRIPTPATH}/build-tiflash-release.sh "DEBUG" "${CMAKE_PREFIX_PATH}"
9 changes: 8 additions & 1 deletion release-centos7-llvm/scripts/build-tiflash-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,21 @@ ENABLE_PCH=${ENABLE_PCH:-ON}
INSTALL_DIR="${SRCPATH}/release-centos7-llvm/tiflash"
rm -rf ${INSTALL_DIR} && mkdir -p ${INSTALL_DIR}

BUILD_DIR="${SRCPATH}/release-centos7-llvm/build-release"
if [ $CMAKE_BUILD_TYPE == "RELWITHDEBINFO" ]; then
BUILD_DIR="$SRCPATH/release-centos7-llvm/build-release"
ENABLE_FAILPOINTS="OFF"
else
BUILD_DIR="$SRCPATH/release-centos7-llvm/build-debug"
ENABLE_FAILPOINTS="ON"
fi
rm -rf ${BUILD_DIR} && mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}

cmake -S "${SRCPATH}" \
${DEFINE_CMAKE_PREFIX_PATH} \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DENABLE_TESTING=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_FAILPOINTS=${ENABLE_FAILPOINTS} \
-Wno-dev \
-DUSE_CCACHE=OFF \
-DRUN_HAVE_STD_REGEX=0 \
Expand Down