Skip to content

Commit fa5ee96

Browse files
ldionnemstorsjo
authored andcommitted
[libc++] Bump OS version for macOS backdeployment CI jobs (llvm#131883)
In 0547e57, I introduced backdeployment testing on macOS using Github-provided builders. This was done by basically building libc++ on a slightly older macOS (like macOS 13) and then running against the system library on that machine. However, that created a dependency that libc++ must keep working on macOS 13, which doesn't support the latest-released Xcode. This patch solves that problem by moving the deployment testing to a newer version of macOS which supports the latest-released version of Xcode. Sadly, that also reduces the backdeployment coverage we have since we're not actually testing on older OSes, but is necessary to satisfy the documented libc++ support policy. In the future, we could improve the situation by providing a Lit configuration that allows compiling (but not running) all the tests, building the tests on a supported macOS, and then shipping those tests on an older backdeployment target in order to run them against the system library. Since that requires significant engineering, this isn't done at this time. (cherry picked from commit b4f7a2a)
1 parent 88a9566 commit fa5ee96

File tree

8 files changed

+33
-15
lines changed

8 files changed

+33
-15
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,20 @@ jobs:
197197
os: macos-15
198198
- config: apple-configuration
199199
os: macos-15
200+
# TODO: These jobs are intended to test back-deployment (building against ToT libc++ but running against an
201+
# older system-provided libc++.dylib). Doing this properly would require building the test suite on a
202+
# recent macOS using a recent Clang (hence recent Xcode), and then running the actual test suite on an
203+
# older mac. We could do that by e.g. sharing artifacts between the two jobs.
204+
#
205+
# However, our Lit configuration currently doesn't provide a good way to do that in a batch, so our only
206+
# alternative is to actually build on the same host that we're going to run on. Sadly, that doesn't work
207+
# since older macOSes don't support newer Xcodes. For now, we run the "backdeployment" jobs on recent
208+
# macOS versions as a way to avoid rotting that configuration, but it doesn't provide a lot of additional
209+
# coverage.
200210
- config: apple-system
201-
os: macos-13
211+
os: macos-15
202212
- config: apple-system-hardened
203-
os: macos-13
213+
os: macos-15
204214
runs-on: ${{ matrix.os }}
205215
steps:
206216
- uses: actions/checkout@v4

libcxx/test/libcxx/strings/basic.string/string.capacity/allocation_size.pass.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88

99
// <string>
1010

11-
// This test demonstrates the smaller allocation sizes when the alignment
12-
// requirements of std::string are dropped from 16 to 8.
13-
//
14-
// XFAIL: using-built-library-before-llvm-19
15-
1611
#include <algorithm>
1712
#include <cassert>
1813
#include <cstddef>

libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/setbuf.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111
// basic_streambuf<charT, traits>* setbuf(char_type* s, streamsize n) override;
1212

13-
// In C++23 and later, this test requires support for P2467R1 in the dylib (a3f17ba3febbd546f2342ffc780ac93b694fdc8d)
14-
// XFAIL: (!c++03 && !c++11 && !c++14 && !c++17 && !c++20) && using-built-library-before-llvm-18
13+
// This test requires the fix to https://github.com/llvm/llvm-project/issues/60509 in the dylib,
14+
// which landed in 5afb937d8a30445642ccaf33866ee4cdd0713222.
15+
// XFAIL: using-built-library-before-llvm-19
1516

1617
#include <fstream>
1718
#include <cstddef>

libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_double.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
10+
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
11+
// XFAIL: using-built-library-before-llvm-19
12+
913
// <locale>
1014

1115
// class num_get<charT, InputIterator>

libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_float.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
10+
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
11+
// XFAIL: using-built-library-before-llvm-19
12+
913
// <locale>
1014

1115
// class num_get<charT, InputIterator>

libcxx/test/std/localization/locale.categories/category.numeric/locale.num.get/facet.num.get.members/get_long_double.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
10+
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
11+
// XFAIL: using-built-library-before-llvm-19
12+
913
// <locale>
1014

1115
// class num_get<charT, InputIterator>

libcxx/test/std/strings/basic.string/string.capacity/max_size.pass.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88

99
// UNSUPPORTED: no-exceptions
1010

11-
// After changing the alignment of the allocated pointer from 16 to 8, the exception
12-
// thrown is no longer `bad_alloc` but instead length_error on systems using new
13-
// headers but a dylib that doesn't contain 04ce0ba.
14-
//
15-
// XFAIL: using-built-library-before-llvm-19
16-
1711
// <string>
1812

1913
// size_type max_size() const; // constexpr since C++20

libcxx/test/std/strings/basic.string/string.capacity/over_max_size.pass.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88

99
// UNSUPPORTED: no-exceptions
1010

11+
// After changing the alignment of the allocated pointer from 16 to 8, the exception
12+
// thrown is no longer `bad_alloc` but instead length_error on systems using new
13+
// headers but a dylib that doesn't contain 04ce0ba.
14+
//
15+
// XFAIL: using-built-library-before-llvm-19
16+
1117
// <string>
1218

1319
// size_type max_size() const; // constexpr since C++20

0 commit comments

Comments
 (0)