Skip to content

[libc++] Simplify the apple-system-hardened CI configuration #126911

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

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 4 additions & 48 deletions libcxx/utils/ci/run-buildbot
Original file line number Diff line number Diff line change
Expand Up @@ -548,59 +548,15 @@ apple-configuration)
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
;;
apple-system-hardened)
clean

arch="$(uname -m)"
version="$(sw_vers --productVersion)"
params="target_triple=${arch}-apple-macosx${version}"
params+=";hardening_mode=fast"

# In the Apple system configuration, we build libc++ and libunwind separately.
step "Installing libc++ and libc++abi in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/cxx" \
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/cxx" \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-DLIBCXX_CXX_ABI=libcxxabi \
-C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \
-DLIBCXX_TEST_CONFIG="apple-libc++-system.cfg.in" \
-DLIBCXXABI_TEST_CONFIG="apple-libc++abi-system.cfg.in" \
-DLIBCXX_TEST_PARAMS="${params}" \
-DLIBCXXABI_TEST_PARAMS="${params}"

step "Installing libunwind in Apple-system configuration"
${CMAKE} \
-S "${MONOREPO_ROOT}/runtimes" \
-B "${BUILD_DIR}/unwind" \
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/unwind" \
-DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
-DLLVM_ENABLE_RUNTIMES="libunwind" \
-DLIBUNWIND_TEST_CONFIG="apple-libunwind-system.cfg.in" \
-DLIBUNWIND_TEST_PARAMS="${params}" \
-DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"

step "Running the libc++ tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx

step "Running the libc++abi tests"
${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi

step "Running the libunwind tests"
${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
;;
apple-system)
apple-system|apple-system-hardened)
clean

arch="$(uname -m)"
version="$(sw_vers --productVersion)"
params="target_triple=${arch}-apple-macosx${version}"
if [[ "${BUILDER}" == *-hardened ]]; then
params+=";hardening_mode=fast"
fi

# In the Apple system configuration, we build libc++ and libunwind separately.
step "Installing libc++ and libc++abi in Apple-system configuration"
Expand Down