Skip to content

Commit

Permalink
[clang] Fix the pre-commit CI pipeline after changes to libc++'s own …
Browse files Browse the repository at this point in the history
…CI pipeline

We made some changes to the libc++ CI pipeline that take for granted
that we're running on libc++'s own Docker images. This was necessary for
a temporary period until widely-used tools update to a version that can
handle C++20 modules.

However, this had the unintended consequence of breaking the Clang CI
pipeline, which used the libc++ CI scripts as an implementation detail.
Instead, decouple the Clang CI pipeline from the libc++ build scripts.

Differential Revision: https://reviews.llvm.org/D158690
  • Loading branch information
ldionne committed Aug 24, 2023
1 parent aa60b26 commit bb6073c
Showing 1 changed file with 37 additions and 3 deletions.
40 changes: 37 additions & 3 deletions clang/utils/ci/run-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build/${BUILDER}}"
INSTALL_DIR="${BUILD_DIR}/install"

function clean() {
rm -rf "${BUILD_DIR}"
}

# Print the version of a few tools to aid diagnostics in some cases
cmake --version
ninja --version
Expand Down Expand Up @@ -95,23 +99,53 @@ generic-cxx03)
export CC=$(pwd)/install/bin/clang
export CXX=$(pwd)/install/bin/clang++
chmod +x install/bin/clang install/bin/clang++
libcxx/utils/ci/run-buildbot generic-cxx03

clean
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${BUILD_DIR}" -GNinja \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLIBCXX_CXX_ABI=libcxxabi \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DLIBCXX_TEST_PARAMS="std=c++03" \
-DLIBCXXABI_TEST_PARAMS="std=c++03"

ninja -vC "${BUILD_DIR}" check-runtimes
;;
generic-cxx26)
buildkite-agent artifact download install.tar.xz .
tar -xvf install.tar.xz
export CC=$(pwd)/install/bin/clang
export CXX=$(pwd)/install/bin/clang++
chmod +x install/bin/clang install/bin/clang++
libcxx/utils/ci/run-buildbot generic-cxx26

clean
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${BUILD_DIR}" -GNinja \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLIBCXX_CXX_ABI=libcxxabi \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DLIBCXX_TEST_PARAMS="std=c++26" \
-DLIBCXXABI_TEST_PARAMS="std=c++26"

ninja -vC "${BUILD_DIR}" check-runtimes
;;
generic-modules)
buildkite-agent artifact download install.tar.xz .
tar -xvf install.tar.xz
export CC=$(pwd)/install/bin/clang
export CXX=$(pwd)/install/bin/clang++
chmod +x install/bin/clang install/bin/clang++
libcxx/utils/ci/run-buildbot generic-modules

clean
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${BUILD_DIR}" -GNinja \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLIBCXX_CXX_ABI=libcxxabi \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DLIBCXX_TEST_PARAMS="enable_modules=clang" \
-DLIBCXXABI_TEST_PARAMS="enable_modules=clang"

ninja -vC "${BUILD_DIR}" check-runtimes
;;
#################################################################
# Insert vendor-specific internal configurations below.
Expand Down

0 comments on commit bb6073c

Please sign in to comment.