Skip to content

Commit 25cbf72

Browse files
committed
[libc++] Use apple-install-libcxx.sh in the Apple/system CI job
That script is what we (need to) use to build libc++ for the system configuration, so that's what we should test against. At some point we may be able to fold all of that logic into the CMake build, and when that happens the CI can go back to running CMake directly. As a fly-by fix, stop mentioning x86_64 in the names of the Apple jobs since they are not truly tied to any architecture. Differential Revision: https://reviews.llvm.org/D111865
1 parent 082fa56 commit 25cbf72

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

libcxx/utils/ci/buildkite-pipeline.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ steps:
562562

563563
# Build with the configuration we use to generate libc++.dylib on Apple platforms
564564
- label: "Apple system"
565-
command: "libcxx/utils/ci/run-buildbot x86_64-apple-system"
565+
command: "libcxx/utils/ci/run-buildbot apple-system"
566566
artifact_paths:
567567
- "**/test-results.xml"
568568
agents:
@@ -576,7 +576,7 @@ steps:
576576

577577
# Test back-deployment to older Apple platforms
578578
- label: "Apple back-deployment macosx10.9"
579-
command: "libcxx/utils/ci/run-buildbot x86_64-apple-system-backdeployment-10.9"
579+
command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.9"
580580
artifact_paths:
581581
- "**/test-results.xml"
582582
agents:
@@ -590,7 +590,7 @@ steps:
590590
timeout_in_minutes: 120
591591

592592
- label: "Apple back-deployment macosx10.15"
593-
command: "libcxx/utils/ci/run-buildbot x86_64-apple-system-backdeployment-10.15"
593+
command: "libcxx/utils/ci/run-buildbot apple-system-backdeployment-10.15"
594594
artifact_paths:
595595
- "**/test-results.xml"
596596
agents:

libcxx/utils/ci/run-buildbot

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,14 +377,25 @@ generic-no-wide-characters)
377377
-DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in"
378378
check-runtimes
379379
;;
380-
x86_64-apple-system)
380+
apple-system)
381381
clean
382-
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \
383-
-DLIBCXX_TEST_CONFIG="apple-libc++-shared.cfg.in" \
384-
-DLIBCXXABI_TEST_CONFIG="apple-libc++abi-shared.cfg.in"
385-
check-runtimes
382+
383+
sdk_root="$(xcrun --sdk macosx --show-sdk-path)"
384+
arch="$(uname -m)"
385+
386+
${MONOREPO_ROOT}/libcxx/utils/ci/apple-install-libcxx.sh \
387+
--llvm-root ${MONOREPO_ROOT} \
388+
--build-dir ${BUILD_DIR} \
389+
--install-dir ${INSTALL_DIR} \
390+
--symbols-dir "${BUILD_DIR}/symbols" \
391+
--sdk "macosx" \
392+
--architectures "${arch}" \
393+
--version "999.99"
394+
395+
# TODO: It would be better to run the tests against the fake-installed version of libc++ instead
396+
xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi
386397
;;
387-
x86_64-apple-system-backdeployment-*)
398+
apple-system-backdeployment-*)
388399
clean
389400

390401
if [[ "${OSX_ROOTS}" == "" ]]; then
@@ -395,14 +406,15 @@ x86_64-apple-system-backdeployment-*)
395406
curl "${PREVIOUS_DYLIBS_URL}" | tar -xz --strip-components=1 -C "${OSX_ROOTS}"
396407
fi
397408

398-
DEPLOYMENT_TARGET="${BUILDER#x86_64-apple-system-backdeployment-}"
409+
DEPLOYMENT_TARGET="${BUILDER#apple-system-backdeployment-}"
399410

400411
# TODO: On Apple platforms, we never produce libc++abi.1.dylib, always libc++abi.dylib.
401412
# Fix that in the build so that the tests stop searching for @rpath/libc++abi.1.dylib.
402413
cp "${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.dylib" \
403414
"${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}/libc++abi.1.dylib"
404415

405-
PARAMS="target_triple=x86_64-apple-macosx${DEPLOYMENT_TARGET}"
416+
arch="$(uname -m)"
417+
PARAMS="target_triple=${arch}-apple-macosx${DEPLOYMENT_TARGET}"
406418
PARAMS+=";cxx_runtime_root=${OSX_ROOTS}/macOS/libc++/${DEPLOYMENT_TARGET}"
407419
PARAMS+=";abi_runtime_root=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
408420
PARAMS+=";use_system_cxx_lib=True"

0 commit comments

Comments
 (0)