From db0aaf0b84ab4df84966eaff37d9b074a273f02a Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 12 Feb 2025 14:35:34 +0100 Subject: [PATCH] [libc++] Simplify the apple-system-hardened CI configuration It was basically a copy-paste of the non-hardened version of the same job, and it's easy to remove the duplication. --- libcxx/utils/ci/run-buildbot | 52 +++--------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot index f1ede6474eb9e..0ee5bf3e71f59 100755 --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -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"