Skip to content
Merged
Show file tree
Hide file tree
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
38 changes: 32 additions & 6 deletions libcxx/include/__configuration/availability.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,40 @@
# define _LIBCPP_INTRODUCED_IN_LLVM_21_ATTRIBUTE __attribute__((unavailable))

// LLVM 20
// TODO: Fill this in
# define _LIBCPP_INTRODUCED_IN_LLVM_20 0
# define _LIBCPP_INTRODUCED_IN_LLVM_20_ATTRIBUTE __attribute__((unavailable))
//
// Note that versions for most Apple OSes were bumped forward and aligned in that release.
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 260000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 260000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 260000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 260000) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 100000)
# define _LIBCPP_INTRODUCED_IN_LLVM_20 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_20 1
# endif
# define _LIBCPP_INTRODUCED_IN_LLVM_20_ATTRIBUTE \
__attribute__((availability(macos, strict, introduced = 26.0))) \
__attribute__((availability(ios, strict, introduced = 26.0))) \
__attribute__((availability(tvos, strict, introduced = 26.0))) \
__attribute__((availability(watchos, strict, introduced = 26.0))) \
__attribute__((availability(bridgeos, strict, introduced = 10.0)))

// LLVM 19
// TODO: Fill this in
# define _LIBCPP_INTRODUCED_IN_LLVM_19 0
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 150400) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 180400) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 180400) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 110400) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 90400)
# define _LIBCPP_INTRODUCED_IN_LLVM_19 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_19 1
# endif
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE \
__attribute__((availability(macos, strict, introduced = 15.4))) \
__attribute__((availability(ios, strict, introduced = 18.4))) \
__attribute__((availability(tvos, strict, introduced = 18.4))) \
__attribute__((availability(watchos, strict, introduced = 11.4))) \
__attribute__((availability(bridgeos, strict, introduced = 9.4)))

// LLVM 18
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 150000) || \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

// The fix for issue 57964 requires an updated dylib due to explicit
// instantiations. That means Apple backdeployment targets remain broken.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

// <ios>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

// This test requires the fix to https://llvm.org/PR60509 in the dylib,
// which landed in 5afb937d8a30445642ccaf33866ee4cdd0713222.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

#include <fstream>
#include <cstddef>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// The fix for bug 51497 and bug 51499 require and updated dylib due to
// explicit instantiations. That means Apple backdeployment targets remain
// broken.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

#include <istream>
#include <cassert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

// <locale>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

// <locale>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

// The fix for LWG2381 (https://github.com/llvm/llvm-project/pull/77948) changed behavior of
// FP parsing. This requires 3e15c97fa3812993bdc319827a5c6d867b765ae8 in the dylib.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

// <locale>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@

// UNSUPPORTED: no-exceptions

// After changing the alignment of the allocated pointer from 16 to 8, the exception
// thrown is no longer `bad_alloc` but instead length_error on systems using new
// headers but a dylib that doesn't contain 04ce0ba.
// This test fails when using a built library that does not contain
// 15860446a8c3, which changed the return value of max_size(). Without
// that change, the built library believes the max size to be one greater
// than it really is, and we fail to throw `length_error` from `string::resize()`,
// which is explicitly instantiated in the built library.
//
// XFAIL: using-built-library-before-llvm-19
// XFAIL: using-built-library-before-llvm-21

// <string>

Expand Down
34 changes: 31 additions & 3 deletions libcxx/utils/libcxx/test/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,17 +733,45 @@ def check_gdb(cfg):
# Helpers to define correspondances between LLVM versions and vendor system versions.
# Those are used for backdeployment features below, do not use directly in tests.
DEFAULT_FEATURES += [
Feature(
name="_target-has-llvm-22",
when=lambda cfg: BooleanExpression.evaluate(
"TBD",
cfg.available_features,
),
),
Feature(
name="_target-has-llvm-21",
when=lambda cfg: BooleanExpression.evaluate(
"TBD",
cfg.available_features,
),
),
Feature(
name="_target-has-llvm-20",
when=lambda cfg: BooleanExpression.evaluate(
"_target-has-llvm-21 || target={{.+}}-apple-macosx{{26.[0-9](.\d+)?}}",
cfg.available_features,
),
),
Feature(
name="_target-has-llvm-19",
when=lambda cfg: BooleanExpression.evaluate(
"_target-has-llvm-20 || target={{.+}}-apple-macosx{{15.[4-9](.\d+)?}}",
cfg.available_features,
),
),
Feature(
name="_target-has-llvm-18",
when=lambda cfg: BooleanExpression.evaluate(
"target={{.+}}-apple-macosx{{15(.[0-9]+)?(.[0-9]+)?}}",
"_target-has-llvm-19 || target={{.+}}-apple-macosx{{15.[0-3](.\d+)?}}",
cfg.available_features,
),
),
Feature(
name="_target-has-llvm-17",
when=lambda cfg: BooleanExpression.evaluate(
"_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.[0-9]+)?}} || target={{.+}}-apple-macosx{{1[5-9]([.].+)?}}",
"_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.\d+)?}}",
cfg.available_features,
),
),
Expand Down Expand Up @@ -821,7 +849,7 @@ def check_gdb(cfg):
# a libc++ flavor that enables availability markup. Similarly, a test could fail when
# run against the system library of an older version of FreeBSD, even though FreeBSD
# doesn't provide availability markup at the time of writing this.
for version in ("12", "13", "14", "15", "16", "17", "18", "19", "20"):
for version in ("12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22"):
DEFAULT_FEATURES.append(
Feature(
name="using-built-library-before-llvm-{}".format(version),
Expand Down
4 changes: 4 additions & 0 deletions libcxxabi/test/test_demangle.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// dd8b266ef.
// UNSUPPORTED: using-built-library-before-llvm-20

// This test exercises support for BitInt demangling introduced in
// 20f56d140909a01c74e9981835373eaab6021af9.
// UNSUPPORTED: using-built-library-before-llvm-21

// XFAIL: win32-broken-printf-a-precision

#include "support/timer.h"
Expand Down
3 changes: 1 addition & 2 deletions libcxxabi/test/uncaught_exception.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
// to undefined symbols when linking against a libc++ that re-exports the symbols,
// but running against a libc++ that doesn't. Fortunately, usage of __cxa_uncaught_exception()
// in the wild seems to be close to non-existent.
// TODO: Remove && !darwin once availability markup for LLVM 19 on macOS has been added
// XFAIL: using-built-library-before-llvm-19 && !darwin
// XFAIL: using-built-library-before-llvm-19

#include <cxxabi.h>
#include <cassert>
Expand Down
Loading