diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_.yaml index 3149dc06..9173ecee 100644 --- a/.ci_support/osx_64_.yaml +++ b/.ci_support/osx_64_.yaml @@ -1,5 +1,5 @@ MACOSX_DEPLOYMENT_TARGET: -- '10.9' +- '10.13' MACOSX_SDK_VERSION: - '10.14' channel_sources: @@ -9,7 +9,7 @@ channel_targets: cxx_compiler: - clang_bootstrap cxx_compiler_version: -- '14' +- '15' dummy_var: - '0' macos_machine: diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_.yaml index 743baf2b..e39e0b64 100644 --- a/.ci_support/osx_arm64_.yaml +++ b/.ci_support/osx_arm64_.yaml @@ -7,7 +7,7 @@ channel_targets: cxx_compiler: - clang_bootstrap cxx_compiler_version: -- '14' +- '15' dummy_var: - '1' macos_machine: diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh index bb00584b..3969edf3 100755 --- a/.scripts/run_osx_build.sh +++ b/.scripts/run_osx_build.sh @@ -55,11 +55,6 @@ source run_conda_forge_build_setup echo -e "\n\nMaking the build clobber file" make_build_number ./ ./recipe ./.ci_support/${CONFIG}.yaml -if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then - EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" -fi - - if [[ -f LICENSE.txt ]]; then cp LICENSE.txt "recipe/recipe-scripts-license.txt" fi @@ -75,6 +70,11 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then # Drop into an interactive shell /bin/bash else + + if [[ "${HOST_PLATFORM}" != "${BUILD_PLATFORM}" ]]; then + EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test" + fi + conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \ --suppress-variables ${EXTRA_CB_OPTIONS:-} \ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml diff --git a/conda-forge.yml b/conda-forge.yml index a24f1c97..138badf3 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -1,3 +1,7 @@ +bot: + abi_migration_branches: + - 15.x + - 14.x provider: {linux_aarch64: default, linux_ppc64le: default} travis: osx_image: xcode6.4 diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index d00d9f28..da962832 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -10,14 +10,16 @@ channel_sources: - conda-forge/label/llvm_rc,conda-forge # libcxx only supports the last released GCC version, see -# https://releases.llvm.org/13.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support +# https://libcxx.llvm.org/index.html#platform-and-compiler-support c_compiler_version: # [linux] - 12 # [linux] cxx_compiler_version: # [linux] - 12 # [linux] -MACOSX_SDK_VERSION: # [osx and x86_64] - - 10.14 # [osx and x86_64] +MACOSX_SDK_VERSION: # [osx and x86_64] + - "10.14" # [osx and x86_64] +MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] + - "10.13" # [osx and x86_64] dummy_var: # [osx] - 0 # [osx and x86_64] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3f9f3e5c..22cbb841 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "16.0.0.rc4" %} +{% set version = "17.0.0.rc1" %} package: name: libcxx_and_libcxxabi @@ -6,17 +6,12 @@ package: source: - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version.replace(".rc", "-rc") }}/llvm-project-{{ version.replace(".rc", "rc") }}.src.tar.xz - sha256: 36e723b0befd0874a799253f5cfac8b00fe5bbfec3020ccf7b4fdae566a7e089 + sha256: 01b80625c131b8281dcf76a4e6395d10f45835c60e27357c92abf5a98c9a0337 patches: - - patches/0001-libcxxabi-10.9-compatibility.patch # [osx and x86_64] - - patches/0002-Support-legacy-standalone-builds.patch + - patches/0001-Support-legacy-standalone-builds.patch # See https://lists.llvm.org/pipermail/libcxx-dev/2021-July/001172.html - - patches/0003-Fix-ABI-compatibility-with-system.patch - - patches/0004-custom-error-message-for-old-sdk.patch - # upstream removed fallbacks in case the underlying libc didn't support C11 in - # https://github.com/llvm/llvm-project/commit/21f73d5826fb5024a27eaacafadfa316f58949c5; - # however, it seems that the then-required using_if_exists does not work as desired yet - - patches/0005-Revert-libc-Remove-workaround-for-C11-features-on-co.patch + - patches/0002-Fix-ABI-compatibility-with-system.patch + - patches/0003-custom-error-message-for-old-sdk.patch build: number: 0 @@ -33,6 +28,8 @@ requirements: - ninja - {{ compiler('cxx') }} - python >3 # [not osx] + # actually would need >=2.24, but we don't have that in conda-forge yet + - sysroot_linux-64 2.17 # [linux64] host: - clangdev {{ version }} # [not osx] - llvmdev {{ version }} # [not osx] @@ -51,9 +48,14 @@ outputs: requirements: build: - {{ compiler('cxx') }} + # actually would need >=2.24, but we don't have that in conda-forge yet + - sysroot_linux-64 2.17 # [linux64] host: run: - {{ pin_subpackage("libcxxabi", exact=True) }} # [linux] + run_constrained: + - sysroot_linux-64 >=2.17 # [linux64] + - __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64] test: requires: - clang # [osx] @@ -74,10 +76,10 @@ outputs: - bash compile_test.sh # [unix] - compile_test.bat # [win] # make sure we inserted link to our docs wherever it is necessary; - # i.e. everywhere there's a string "availability(macos,...,introduced=)" for osx version >10.9; + # i.e. everywhere there's a string "availability(macos,...,introduced=)" for osx version >10.13; # 'grep -v' inverts the match but returns non-zero exit code if no lines are returned; so we use 'wc -l'; - # we want to have zero lines that don't either: contain the link or are for 10.9 - - if [ 0 -eq $(cat ${PREFIX}/include/c++/v1/__availability | grep "availability(macos" | grep -vE "(conda-forge|10.9)" | wc -l) ]; then exit 0; else exit 1; fi # [osx] + # we want to have zero lines that don't either: contain our link or are for <=10.13 (lowest occurring in that file is 10.9) + - if [ 0 -eq $(cat ${PREFIX}/include/c++/v1/__availability | grep "availability(macos" | grep -vE "(conda-forge|10.9|10.1[0-3])" | wc -l) ]; then exit 0; else exit 1; fi # [osx] # !!!!!!!!!!!! README !!!!!!!!!!!!!!!!!! # we do not ship libcxxabi on OSX - this breaks exception passing - if [ -f $PREFIX/lib/libc++abi.dylib ]; then exit 1; fi # [osx] diff --git a/recipe/patches/0002-Support-legacy-standalone-builds.patch b/recipe/patches/0001-Support-legacy-standalone-builds.patch similarity index 85% rename from recipe/patches/0002-Support-legacy-standalone-builds.patch rename to recipe/patches/0001-Support-legacy-standalone-builds.patch index 2ce40421..41c4c32a 100644 --- a/recipe/patches/0002-Support-legacy-standalone-builds.patch +++ b/recipe/patches/0001-Support-legacy-standalone-builds.patch @@ -1,17 +1,17 @@ -From d29448d3a9f777674c2aea03ebbdba6bb245e97e Mon Sep 17 00:00:00 2001 +From d29ac5318e8e94e0365f6f93547d1b6e97ac48e4 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 18 May 2021 19:51:28 -0500 -Subject: [PATCH 2/5] Support legacy standalone builds +Subject: [PATCH 1/3] Support legacy standalone builds --- libcxx/src/CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt -index 9abf548abb..3f155af09e 100644 +index 35b46652709..720a4b65b83 100644 --- a/libcxx/src/CMakeLists.txt +++ b/libcxx/src/CMakeLists.txt -@@ -236,6 +236,23 @@ if (LIBCXX_ENABLE_SHARED) +@@ -235,6 +235,23 @@ if (LIBCXX_ENABLE_SHARED) "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp") target_link_libraries(cxx_shared PRIVATE $) @@ -35,6 +35,3 @@ index 9abf548abb..3f155af09e 100644 endif() # Generate a linker script in place of a libc++.so symlink. --- -2.38.1.windows.1 - diff --git a/recipe/patches/0001-libcxxabi-10.9-compatibility.patch b/recipe/patches/0001-libcxxabi-10.9-compatibility.patch deleted file mode 100644 index d9600079..00000000 --- a/recipe/patches/0001-libcxxabi-10.9-compatibility.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d5004a2bf64156684a7a2a113b2a2d9fa4bd153e Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Sat, 8 Aug 2020 15:52:31 +0000 -Subject: [PATCH 1/5] libcxxabi 10.9 compatibility - ---- - libcxx/src/support/runtime/exception_libcxxabi.ipp | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/libcxx/src/support/runtime/exception_libcxxabi.ipp b/libcxx/src/support/runtime/exception_libcxxabi.ipp -index ee15e437e6..8933a9b747 100644 ---- a/libcxx/src/support/runtime/exception_libcxxabi.ipp -+++ b/libcxx/src/support/runtime/exception_libcxxabi.ipp -@@ -17,11 +17,7 @@ bool uncaught_exception() noexcept { return uncaught_exceptions() > 0; } - - int uncaught_exceptions() noexcept - { --# if _LIBCPPABI_VERSION > 1001 -- return __cxa_uncaught_exceptions(); --# else - return __cxa_uncaught_exception() ? 1 : 0; --# endif - } - - } // namespace std --- -2.38.1.windows.1 - diff --git a/recipe/patches/0003-Fix-ABI-compatibility-with-system.patch b/recipe/patches/0002-Fix-ABI-compatibility-with-system.patch similarity index 81% rename from recipe/patches/0003-Fix-ABI-compatibility-with-system.patch rename to recipe/patches/0002-Fix-ABI-compatibility-with-system.patch index 84b63b70..3cd46116 100644 --- a/recipe/patches/0003-Fix-ABI-compatibility-with-system.patch +++ b/recipe/patches/0002-Fix-ABI-compatibility-with-system.patch @@ -1,17 +1,17 @@ -From e30718656c41bd624ddd9895fb9f6e64ed4c2ab5 Mon Sep 17 00:00:00 2001 +From 123217eff2d5ceec3a0d7578d2c1256be6dc1943 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 13 Jul 2021 01:57:06 -0500 -Subject: [PATCH 3/5] Fix ABI compatibility with system +Subject: [PATCH 2/3] Fix ABI compatibility with system --- libcxx/src/locale.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp -index 6b454274e1..5e601e133a 100644 +index bd70a27be4e..a2062e5d3f5 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp -@@ -194,10 +194,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH +@@ -193,10 +193,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install(&make >(1u)); install(&make >(1u)); _LIBCPP_SUPPRESS_DEPRECATED_POP @@ -22,7 +22,7 @@ index 6b454274e1..5e601e133a 100644 install(&make >(1u)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS install(&make >(1u)); -@@ -236,6 +232,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP +@@ -235,6 +231,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS install(&make<_VSTD::messages >(1u)); #endif @@ -33,7 +33,7 @@ index 6b454274e1..5e601e133a 100644 } locale::__imp::__imp(const string& name, size_t refs) -@@ -267,10 +267,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH +@@ -266,10 +266,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install(new codecvt_byname(name_)); install(new codecvt_byname(name_)); _LIBCPP_SUPPRESS_DEPRECATED_POP @@ -44,7 +44,7 @@ index 6b454274e1..5e601e133a 100644 install(new numpunct_byname(name_)); #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS install(new numpunct_byname(name_)); -@@ -293,6 +289,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP +@@ -292,6 +288,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS install(new messages_byname(name_)); #endif @@ -52,9 +52,6 @@ index 6b454274e1..5e601e133a 100644 + install(new codecvt_byname(name_)); + install(new codecvt_byname(name_)); +#endif - #ifndef _LIBCPP_NO_EXCEPTIONS + #ifndef _LIBCPP_HAS_NO_EXCEPTIONS } catch (...) --- -2.38.1.windows.1 - diff --git a/recipe/patches/0003-custom-error-message-for-old-sdk.patch b/recipe/patches/0003-custom-error-message-for-old-sdk.patch new file mode 100644 index 00000000..3a9667ac --- /dev/null +++ b/recipe/patches/0003-custom-error-message-for-old-sdk.patch @@ -0,0 +1,55 @@ +From 54fcf64308c718b275629a28678dcfcc90014205 Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +Date: Wed, 29 Dec 2021 19:28:35 -0800 +Subject: [PATCH 3/3] custom error message for old sdk + +--- + libcxx/include/__availability | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libcxx/include/__availability b/libcxx/include/__availability +index 7807f22b716..94f6e070b93 100644 +--- a/libcxx/include/__availability ++++ b/libcxx/include/__availability +@@ -279,12 +279,12 @@ + # define _LIBCPP_AVAILABILITY_HAS_NO_FILESYSTEM_LIBRARY + # endif + # define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY \ +- __attribute__((availability(macos,strict,introduced=10.15))) \ ++ __attribute__((availability(macos,strict,introduced=10.15,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ + __attribute__((availability(ios,strict,introduced=13.0))) \ + __attribute__((availability(tvos,strict,introduced=13.0))) \ + __attribute__((availability(watchos,strict,introduced=6.0))) + # define _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH \ +- _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \ ++ _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15,message=\"see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk\"))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ + _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") +@@ -302,7 +302,7 @@ + # define _LIBCPP_AVAILABILITY_HAS_NO_TO_CHARS_FLOATING_POINT + # endif + # define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT \ +- __attribute__((availability(macos,strict,introduced=13.3))) \ ++ __attribute__((availability(macos,strict,introduced=13.3,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ + __attribute__((availability(ios,strict,introduced=16.3))) \ + __attribute__((availability(tvos,strict,introduced=16.3))) \ + __attribute__((availability(watchos,strict,introduced=9.3))) +@@ -315,7 +315,7 @@ + # define _LIBCPP_AVAILABILITY_HAS_NO_SYNC + # endif + # define _LIBCPP_AVAILABILITY_SYNC \ +- __attribute__((availability(macos,strict,introduced=11.0))) \ ++ __attribute__((availability(macos,strict,introduced=11.0,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ + __attribute__((availability(ios,strict,introduced=14.0))) \ + __attribute__((availability(tvos,strict,introduced=14.0))) \ + __attribute__((availability(watchos,strict,introduced=7.0))) +@@ -340,7 +340,7 @@ + // use availability annotations until that bug has been fixed. + # if 0 + # define _LIBCPP_AVAILABILITY_PMR \ +- __attribute__((availability(macos, strict, introduced = 14.0))) \ ++ __attribute__((availability(macos, strict, introduced = 14.0,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ + __attribute__((availability(ios, strict, introduced = 17.0))) \ + __attribute__((availability(tvos, strict, introduced = 17.0))) \ + __attribute__((availability(watchos, strict, introduced = 10.0))) diff --git a/recipe/patches/0004-custom-error-message-for-old-sdk.patch b/recipe/patches/0004-custom-error-message-for-old-sdk.patch deleted file mode 100644 index 29a688fa..00000000 --- a/recipe/patches/0004-custom-error-message-for-old-sdk.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 9de9a236743b024d49e3311a582bae90435aa5dc Mon Sep 17 00:00:00 2001 -From: Isuru Fernando -Date: Wed, 29 Dec 2021 19:28:35 -0800 -Subject: [PATCH 4/5] custom error message for old sdk - ---- - libcxx/include/__availability | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/libcxx/include/__availability b/libcxx/include/__availability -index 72ff663334..f60220a29c 100644 ---- a/libcxx/include/__availability -+++ b/libcxx/include/__availability -@@ -175,7 +175,7 @@ - #elif defined(__APPLE__) - - # define _LIBCPP_AVAILABILITY_SHARED_MUTEX \ -- __attribute__((availability(macos,strict,introduced=10.12))) \ -+ __attribute__((availability(macos,strict,introduced=10.12,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=10.0))) \ - __attribute__((availability(tvos,strict,introduced=10.0))) \ - __attribute__((availability(watchos,strict,introduced=3.0))) -@@ -191,7 +191,7 @@ - // macOS and iOS versions, so the version mismatch between macOS and others - // is intended. - # define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS \ -- __attribute__((availability(macos,strict,introduced=10.13))) \ -+ __attribute__((availability(macos,strict,introduced=10.13,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=12.0))) \ - __attribute__((availability(tvos,strict,introduced=12.0))) \ - __attribute__((availability(watchos,strict,introduced=5.0))) -@@ -201,13 +201,13 @@ - _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS - - # define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS \ -- __attribute__((availability(macos,strict,introduced=10.12))) \ -+ __attribute__((availability(macos,strict,introduced=10.12,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=10.0))) \ - __attribute__((availability(tvos,strict,introduced=10.0))) \ - __attribute__((availability(watchos,strict,introduced=3.0))) - - # define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE \ -- __attribute__((availability(macos,strict,introduced=10.12))) \ -+ __attribute__((availability(macos,strict,introduced=10.12,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=10.0))) \ - __attribute__((availability(tvos,strict,introduced=10.0))) \ - __attribute__((availability(watchos,strict,introduced=3.0))) -@@ -228,14 +228,14 @@ - __attribute__((availability(ios,strict,introduced=7.0))) - - # define _LIBCPP_AVAILABILITY_FILESYSTEM \ -- __attribute__((availability(macos,strict,introduced=10.15))) \ -+ __attribute__((availability(macos,strict,introduced=10.15,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=13.0))) \ - __attribute__((availability(tvos,strict,introduced=13.0))) \ - __attribute__((availability(watchos,strict,introduced=6.0))) - # define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH \ -- _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \ -- _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ -- _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ -+ _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15,message=\"see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk\"))), apply_to=any(function,record))") \ -+ _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))") \ -+ _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))") \ - _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))") - # define _LIBCPP_AVAILABILITY_FILESYSTEM_POP \ - _Pragma("clang attribute pop") \ -@@ -253,7 +253,7 @@ - __attribute__((unavailable)) - - # define _LIBCPP_AVAILABILITY_SYNC \ -- __attribute__((availability(macos,strict,introduced=11.0))) \ -+ __attribute__((availability(macos,strict,introduced=11.0,message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \ - __attribute__((availability(ios,strict,introduced=14.0))) \ - __attribute__((availability(tvos,strict,introduced=14.0))) \ - __attribute__((availability(watchos,strict,introduced=7.0))) --- -2.38.1.windows.1 - diff --git a/recipe/patches/0005-Revert-libc-Remove-workaround-for-C11-features-on-co.patch b/recipe/patches/0005-Revert-libc-Remove-workaround-for-C11-features-on-co.patch deleted file mode 100644 index 85196bc0..00000000 --- a/recipe/patches/0005-Revert-libc-Remove-workaround-for-C11-features-on-co.patch +++ /dev/null @@ -1,153 +0,0 @@ -From 9a092badf837696b3923197b6c0d9b10b1cfcb90 Mon Sep 17 00:00:00 2001 -From: "H. Vetinari" -Date: Wed, 8 Feb 2023 16:44:15 +1100 -Subject: [PATCH 5/5] Revert "[libc++] Remove workaround for C11 features on - compilers that don't support using_if_exists" - -This reverts commit 21f73d5826fb5024a27eaacafadfa316f58949c5. ---- - libcxx/include/__config | 66 +++++++++++++++++++++++++++++++++++++++++ - libcxx/include/cstdlib | 4 +-- - libcxx/include/ctime | 18 +++++++++-- - 3 files changed, 84 insertions(+), 4 deletions(-) - -diff --git a/libcxx/include/__config b/libcxx/include/__config -index 810189c94a..d93059de6e 100644 ---- a/libcxx/include/__config -+++ b/libcxx/include/__config -@@ -410,6 +410,72 @@ If there are users of this configuration we are happy to provide support. - # define _LIBCPP_NO_CFI - # endif - -+// If the compiler supports using_if_exists, pretend we have those functions and they'll -+// be picked up if the C library provides them. -+// -+// TODO: Once we drop support for Clang 12, we can assume the compiler supports using_if_exists -+// for platforms that don't have a conforming C11 library, so we can drop this whole thing. -+# if __has_attribute(using_if_exists) -+# define _LIBCPP_HAS_TIMESPEC_GET -+# define _LIBCPP_HAS_QUICK_EXIT -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# else -+# if (defined(__ISO_C_VISIBLE) && (__ISO_C_VISIBLE >= 2011)) || __cplusplus >= 201103L -+# if defined(__FreeBSD__) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_QUICK_EXIT -+# if __FreeBSD_version >= 1300064 || \ -+ (__FreeBSD_version >= 1201504 && __FreeBSD_version < 1300000) -+# define _LIBCPP_HAS_TIMESPEC_GET -+# endif -+# elif defined(__BIONIC__) -+# if __ANDROID_API__ >= 21 -+# define _LIBCPP_HAS_QUICK_EXIT -+# endif -+# if __ANDROID_API__ >= 28 -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# endif -+# if __ANDROID_API__ >= 29 -+# define _LIBCPP_HAS_TIMESPEC_GET -+# endif -+# elif defined(__Fuchsia__) || defined(__wasi__) || defined(__NetBSD__) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_QUICK_EXIT -+# define _LIBCPP_HAS_TIMESPEC_GET -+# elif defined(__OpenBSD__) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_TIMESPEC_GET -+# elif defined(__linux__) -+# if !defined(_LIBCPP_HAS_MUSL_LIBC) -+# if _LIBCPP_GLIBC_PREREQ(2, 15) || defined(__BIONIC__) -+# define _LIBCPP_HAS_QUICK_EXIT -+# endif -+# if _LIBCPP_GLIBC_PREREQ(2, 17) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_TIMESPEC_GET -+# endif -+# else // defined(_LIBCPP_HAS_MUSL_LIBC) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_QUICK_EXIT -+# define _LIBCPP_HAS_TIMESPEC_GET -+# endif -+# elif defined(_LIBCPP_MSVCRT) -+ // Using Microsoft's C Runtime library, not MinGW -+# define _LIBCPP_HAS_TIMESPEC_GET -+# elif defined(__APPLE__) -+ // timespec_get and aligned_alloc were introduced in macOS 10.15 and -+ // aligned releases -+# if ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500) || \ -+ (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000) || \ -+ (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000) || \ -+ (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000)) -+# define _LIBCPP_HAS_ALIGNED_ALLOC -+# define _LIBCPP_HAS_TIMESPEC_GET -+# endif -+# endif // __APPLE__ -+# endif -+# endif // __has_attribute(using_if_exists) -+ - # ifndef _LIBCPP_CXX03_LANG - - # define _LIBCPP_ALIGNOF(_Tp) alignof(_Tp) -diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib -index 457c31f625..27ca7aa010 100644 ---- a/libcxx/include/cstdlib -+++ b/libcxx/include/cstdlib -@@ -131,11 +131,11 @@ using ::mbtowc _LIBCPP_USING_IF_EXISTS; - using ::wctomb _LIBCPP_USING_IF_EXISTS; - using ::mbstowcs _LIBCPP_USING_IF_EXISTS; - using ::wcstombs _LIBCPP_USING_IF_EXISTS; --#if !defined(_LIBCPP_CXX03_LANG) -+#if !defined(_LIBCPP_CXX03_LANG) && defined(_LIBCPP_HAS_QUICK_EXIT) - using ::at_quick_exit _LIBCPP_USING_IF_EXISTS; - using ::quick_exit _LIBCPP_USING_IF_EXISTS; - #endif --#if _LIBCPP_STD_VER > 14 -+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_ALIGNED_ALLOC) - using ::aligned_alloc _LIBCPP_USING_IF_EXISTS; - #endif - -diff --git a/libcxx/include/ctime b/libcxx/include/ctime -index 0c6e4dfd6f..120af5ed83 100644 ---- a/libcxx/include/ctime -+++ b/libcxx/include/ctime -@@ -53,13 +53,27 @@ int timespec_get( struct timespec *ts, int base); // C++17 - # pragma GCC system_header - #endif - -+// FIXME: -+// Apple SDKs don't define ::timespec_get unconditionally in C++ mode. This -+// should be fixed in future SDKs, but for the time being we need to avoid -+// trying to use that declaration when the SDK doesn't provide it. Note that -+// we're detecting this here instead of in <__config> because we can't include -+// system headers from <__config>, since it leads to circular module dependencies. -+// This is also meant to be a very temporary workaround until the SDKs are fixed. -+#if defined(__APPLE__) && !__has_attribute(using_if_exists) -+# include -+# if defined(_LIBCPP_HAS_TIMESPEC_GET) && (__DARWIN_C_LEVEL < __DARWIN_C_FULL) -+# define _LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED -+# endif -+#endif -+ - _LIBCPP_BEGIN_NAMESPACE_STD - - using ::clock_t _LIBCPP_USING_IF_EXISTS; - using ::size_t _LIBCPP_USING_IF_EXISTS; - using ::time_t _LIBCPP_USING_IF_EXISTS; - using ::tm _LIBCPP_USING_IF_EXISTS; --#if _LIBCPP_STD_VER > 14 -+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) - using ::timespec _LIBCPP_USING_IF_EXISTS; - #endif - using ::clock _LIBCPP_USING_IF_EXISTS; -@@ -71,7 +85,7 @@ using ::ctime _LIBCPP_USING_IF_EXISTS; - using ::gmtime _LIBCPP_USING_IF_EXISTS; - using ::localtime _LIBCPP_USING_IF_EXISTS; - using ::strftime _LIBCPP_USING_IF_EXISTS; --#if _LIBCPP_STD_VER > 14 -+#if _LIBCPP_STD_VER > 14 && defined(_LIBCPP_HAS_TIMESPEC_GET) && !defined(_LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED) - using ::timespec_get _LIBCPP_USING_IF_EXISTS; - #endif - --- -2.38.1.windows.1 -