-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CI] Use LLVM_ENABLE_RUNTIMES for runtimes builds on Linux #142694
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
[CI] Use LLVM_ENABLE_RUNTIMES for runtimes builds on Linux #142694
Conversation
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something feels wrong with this PR:
- There's a "full changes here" button on the Files Changed tab, which shows me a bunch of changes to libc++ tests adding
#include <span>
- In the new version, I don't see
LLVM_ENABLE_RUTIMES
passed to cmake. Not evenCMAKE_BUILD_TYPE
andCMAKE_CXX_COMPILER
.
What's going on?
I'm not sure how you're seeing this. Those changes are in #142693.
We're just modifying the existing CMake invocation. That one has |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake once with the runtimes enabled. Modify the test parameters each time.
Looks good to me.
I just opened 9e3490b in my local git, and yes, all libc++ changes are there alongside changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're just modifying the existing CMake invocation. That one has
LLVM_ENABLE_RUNTIMES
set tolibcxx;libcxxabi;libunwind
. #142695 and #142696 modify that though so we can start buildinglibc
andcompiler-rt
through the runtimes build given building them throughLLVM_ENABLE_PROJECTS
is going to be deprecated soon.
What I see is that you're reusing the same initial CMake config for everything, even though in order to test Clang against libc++ and its tests, we need to reconfigure CMake to use just-built Clang, by supplying -D CMAKE_C_COMPILER="${INSTALL_DIR}/bin/clang"
and -D CMAKE_CXX_COMPILER="${INSTALL_DIR}/bin/clang++"
. Otherwise we're simply losing this additional coverage for Clang.
I don't see this addressed in two PRs you linked.
This is a merge commit, it might be worth rebasing / cherry picking on a clean branch |
@llvm/pr-subscribers-libcxx Author: Aiden Grossman (boomanaiden154) ChangesThis patch switches us to using LLVM_ENABLE_RUNTIMES rather than using Full diff: https://github.com/llvm/llvm-project/pull/142694.diff 1 Files Affected:
diff --git a/.ci/monolithic-linux.sh b/.ci/monolithic-linux.sh
index f5a31fa45a641..52a80958b4025 100755
--- a/.ci/monolithic-linux.sh
+++ b/.ci/monolithic-linux.sh
@@ -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 \
+ -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
|
We're using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using LLVM_ENABLE_RUNTIMES. It uses the just built clang to build the runtimes specified.
That explains it, thank you.
There's still an outstanding question of unrelated changes to libc++ tests that are included in this PR.
I'm still not sure how they're ending up in here. I haven't seen this before with |
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Pull Request: llvm#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Pull Request: llvm#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Pull Request: llvm#142694
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4 [skip ci]
Created using spr 1.3.4
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Pull Request: llvm#142694
Branch seems to be cleaned up now. |
-D LIBCXX_TEST_PARAMS="std=c++26" \ | ||
-D LIBCXXABI_TEST_PARAMS="std=c++26" \ | ||
-D LLVM_LIT_ARGS="${lit_args}" | ||
cmake \ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
Created using spr 1.3.6 [skip ci]
Created using spr 1.3.6 [skip ci]
Created using spr 1.3.6 [skip ci]
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Reviewers: DavidSpickett, cmtice, lnihlen, Endilll, tstellar Reviewed By: Endilll, DavidSpickett Pull Request: llvm/llvm-project#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Reviewers: DavidSpickett, cmtice, lnihlen, Endilll, tstellar Reviewed By: Endilll, DavidSpickett Pull Request: llvm#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Reviewers: DavidSpickett, cmtice, lnihlen, Endilll, tstellar Reviewed By: Endilll, DavidSpickett Pull Request: llvm#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using separate runtimes builds for some reductions in CMake configuration time and some simplification of the monolithic-linux.sh script. Reviewers: DavidSpickett, cmtice, lnihlen, Endilll, tstellar Reviewed By: Endilll, DavidSpickett Pull Request: llvm#142694
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using
separate runtimes builds for some reductions in CMake configuration time
and some simplification of the monolithic-linux.sh script.