From 7712ce147fa0201bca09de2111ec450ce1a0ecad Mon Sep 17 00:00:00 2001 From: Roc <30228238+sljlp@users.noreply.github.com> Date: Tue, 20 Sep 2022 09:55:46 +0800 Subject: [PATCH] [Cherry-pick] Fix static check (#46253) * fix static_check error when compile twice (#46140) * [CI] fix static check in build_pr_dev (#46192) Co-authored-by: Zhou Wei <1183042833@qq.com> --- paddle/scripts/paddle_build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 6fd5537ab0d..837e332ec92 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -68,6 +68,9 @@ function cmake_base() { # Delete previous built whl packages rm -rf python/dist 2>/dev/null || true + # Delete previous built paddle cache + rm -rf python/paddle 2>/dev/null || true + # Support build for all python3 versions PYTHON_FLAGS="" SYSTEM=`uname -s` @@ -991,7 +994,7 @@ function generate_upstream_develop_api_spec() { mkdir -p ${PADDLE_ROOT}/build/pr_whl && mv ${PADDLE_ROOT}/build/python/dist/*.whl ${PADDLE_ROOT}/build/pr_whl/ echo "pr_whl_size: ${pr_whl_size}" - rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt + rm -rf ${PADDLE_ROOT}/build/Makefile ${PADDLE_ROOT}/build/CMakeCache.txt ${PADDLE_ROOT}/build/python/paddle cmake_change=`git diff --name-only upstream/$BRANCH | grep "cmake/external" || true` cd ${PADDLE_ROOT} -- GitLab