Skip to content

Commit 2662180

Browse files
committed
esp/ci: Fix standalone libs packaging
1 parent 353ae76 commit 2662180

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.gitlab-ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ before_script:
4343
artifacts:
4444
paths:
4545
- ${DIST_DIR}/
46-
- ${BUILD_DIR}/*.log
46+
- ${BUILD_DIR}/build/*.log
4747
when: always
4848
expire_in: 1 day
4949
dependencies: []
@@ -72,8 +72,10 @@ before_script:
7272
- *get_toolchain_build_scripts
7373
- LLVM_PROJECT_PATH=$PWD
7474
- git config --global --add safe.directory ${LLVM_PROJECT_PATH}
75-
- BUILD_PATH=$PWD/${BUILD_DIR}
75+
- BUILD_PATH=$PWD/${BUILD_DIR}/build
76+
- INSTALL_PATH=$PWD/${BUILD_DIR}/install
7677
- mkdir -p ${BUILD_PATH}
78+
- mkdir -p ${INSTALL_PATH}
7779
- BUILD_HOST=$(gcc -dumpmachine)
7880
# Config to build target libraries
7981
# TODO: do not build core tools (clang, lld, binutils etc)
@@ -119,6 +121,7 @@ before_script:
119121
-DLLVM_PARALLEL_COMPILE_JOBS=${ESP_LLVM_PARALLEL_COMPILE_JOBS}
120122
-DCLANG_REPOSITORY_STRING="${GH_REPO_HTTPS}"
121123
-DCPACK_ARCHIVE_THREADS=0
124+
--install-prefix=${INSTALL_PATH}
122125
-B ${BUILD_PATH} 2>&1 > ${BUILD_PATH}/build.log
123126
# Do not run unit tests for cross-builds.
124127
# Run as non-root user because permission tests fail when run by root.
@@ -168,6 +171,8 @@ before_script:
168171
# pack distro with standalone libs
169172
- >
170173
if [[ "${PACK_STANDALONE_LIBS}" == "ON" ]]; then
174+
echo "Clean install dir ${INSTALL_PATH}"
175+
rm -rf ${INSTALL_PATH}
171176
ninja -C ${BUILD_PATH} package-llvm-standalone-libs 2>&1 >> ${BUILD_PATH}/build.log
172177
DISTRO_PACK_PATH=$(ninja -C ${BUILD_PATH} print-llvm-standalone-libs-package-path | tail -n 1)
173178
echo "DISTRO_PACK_PATH=${DISTRO_PACK_PATH}"
@@ -178,6 +183,8 @@ before_script:
178183
# pack target libraries to be re-used in distros for other platforms
179184
- >
180185
if [[ "${PACK_TARGET_LIBS}" == "ON" ]]; then
186+
echo "Clean install dir ${INSTALL_PATH}"
187+
rm -rf ${INSTALL_PATH}
181188
ninja -C ${BUILD_PATH} package-llvm-toolchain-target-libs 2>&1 >> ${BUILD_PATH}/build.log
182189
DISTRO_PACK_PATH=$(ninja -C ${BUILD_PATH} print-llvm-toolchain-target-libs-package-path | tail -n 1)
183190
echo "DISTRO_PACK_PATH=${DISTRO_PACK_PATH}"

0 commit comments

Comments
 (0)