Skip to content
Merged
46 changes: 10 additions & 36 deletions .ci/monolithic-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,51 +102,25 @@ if [[ "${runtimes}" != "" ]]; then
exit 1
fi

echo "--- ninja install-clang"

ninja -C ${BUILD_DIR} install-clang install-clang-resource-headers

RUNTIMES_BUILD_DIR="${MONOREPO_ROOT}/build-runtimes"
INSTALL_DIR="${BUILD_DIR}/install"
mkdir -p ${RUNTIMES_BUILD_DIR}

echo "--- cmake runtimes C++26"

rm -rf "${RUNTIMES_BUILD_DIR}"
cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
-D LIBCXX_CXX_ABI=libcxxabi \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-D LIBCXX_TEST_PARAMS="std=c++26" \
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
-D LLVM_LIT_ARGS="${lit_args}"
cmake \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I don't quite understand what this change does. You're basically just re-generating the CMake cache and re-running ninja every time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Rerunning CMake with the existing cache so we don't have to rerun all the checks just to change the test configuration. Then we run ninja which goes through the runtimes build. This is mainly to make it simpler to move compiler-rt and libc over to the runtimes build.

-D LIBCXX_TEST_PARAMS="std=c++26" \
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
"${BUILD_DIR}"

echo "--- ninja runtimes C++26"

ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
ninja -C "${BUILD_DIR}" ${runtime_targets}

echo "--- cmake runtimes clang modules"

# We don't need to do a clean build of runtimes, because LIBCXX_TEST_PARAMS
# and LIBCXXABI_TEST_PARAMS only affect lit configuration, which successfully
# propagates without a clean build. Other that those two variables, builds
# are supposed to be the same.

cmake -S "${MONOREPO_ROOT}/runtimes" -B "${RUNTIMES_BUILD_DIR}" -GNinja \
-D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang" \
-D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++" \
-D LLVM_ENABLE_RUNTIMES="${runtimes}" \
-D LIBCXX_CXX_ABI=libcxxabi \
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
-D LLVM_LIT_ARGS="${lit_args}"
cmake \
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
"${BUILD_DIR}"

echo "--- ninja runtimes clang modules"

ninja -vC "${RUNTIMES_BUILD_DIR}" ${runtime_targets}
ninja -C "${BUILD_DIR}" ${runtime_targets}
fi
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
// (((Extents != dynamic_extent) && (OtherExtents == dynamic_extent)) || ... ) ||
// (numeric_limits<index_type>::max() < numeric_limits<OtherIndexType>::max())

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
// for every rank index r.
//

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
// - each element of exts is nonnegative and is representable as a value of type index_type.
//

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// for every rank index r.
//

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
//
// Returns: Di.

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//
// Preconditions: other.required_span_size() is representable as a value of type index_type.

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
//
// Effects: Direct-non-list-initializes extents_ with e.

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
//
// Preconditions: other.required_span_size() is representable as a value of type index_type

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
//
// Effects: Direct-non-list-initializes extents_ with other.extents().

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//
// Preconditions: other.required_span_size() is representable as a value of type index_type.

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
//
// Effects: Direct-non-list-initializes extents_ with e.

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
//
// Preconditions: other.required_span_size() is representable as a value of type index_type

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
//
// Effects: Direct-non-list-initializes extents_ with other.extents().

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//
// Effects: Direct-non-list-initializes extents_ with e, and for all d in the range [0, rank_), direct-non-list-initializes strides_[d] with as_const(s[d]).

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//
// Effects: Direct-non-list-initializes extents_ with e, and for all d in the range [0, rank_), direct-non-list-initializes strides_[d] with as_const(s[d]).

#include <span> // dynamic_extent
#include <mdspan>
#include <cassert>

Expand Down
Loading