diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml
index a20f3154..875d9966 100755
--- a/.azure-pipelines/azure-pipelines-linux.yml
+++ b/.azure-pipelines/azure-pipelines-linux.yml
@@ -13,6 +13,7 @@ jobs:
UPLOAD_PACKAGES: 'True'
DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64
timeoutInMinutes: 360
+ variables: {}
steps:
# configure qemu binfmt-misc running. This allows us to run docker containers
@@ -25,6 +26,9 @@ jobs:
- script: |
export CI=azure
+ export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt)
+ export remote_url=$(Build.Repository.Uri)
+ export sha=$(Build.SourceVersion)
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
if [[ "${BUILD_REASON:-}" == "PullRequest" ]]; then
diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml
index 8032e967..d3221d58 100755
--- a/.azure-pipelines/azure-pipelines-osx.yml
+++ b/.azure-pipelines/azure-pipelines-osx.yml
@@ -5,21 +5,31 @@
jobs:
- job: osx
pool:
- vmImage: macOS-11
+ vmImage: macOS-12
strategy:
matrix:
- osx_64_:
- CONFIG: osx_64_
+ osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12:
+ CONFIG: osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12
UPLOAD_PACKAGES: 'True'
- osx_arm64_:
- CONFIG: osx_arm64_
+ osx_64_channel_targetsconda-forge_mainsys_abipost-12:
+ CONFIG: osx_64_channel_targetsconda-forge_mainsys_abipost-12
+ UPLOAD_PACKAGES: 'True'
+ osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12:
+ CONFIG: osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12
+ UPLOAD_PACKAGES: 'True'
+ osx_arm64_channel_targetsconda-forge_mainsys_abipost-12:
+ CONFIG: osx_arm64_channel_targetsconda-forge_mainsys_abipost-12
UPLOAD_PACKAGES: 'True'
timeoutInMinutes: 360
+ variables: {}
steps:
# TODO: Fast finish on azure pipelines?
- script: |
export CI=azure
+ export flow_run_id=azure_$(Build.BuildNumber).$(System.JobAttempt)
+ export remote_url=$(Build.Repository.Uri)
+ export sha=$(Build.SourceVersion)
export OSX_FORCE_SDK_DOWNLOAD="1"
export GIT_BRANCH=$BUILD_SOURCEBRANCHNAME
export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME})
diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml
index 9fb4d831..77a691e8 100644
--- a/.ci_support/linux_64_.yaml
+++ b/.ci_support/linux_64_.yaml
@@ -1,5 +1,9 @@
+c_stdlib:
+- sysroot
+c_stdlib_version:
+- '2.17'
cdt_name:
-- cos6
+- cos7
channel_sources:
- conda-forge/label/llvm_rc,conda-forge
channel_targets:
@@ -7,8 +11,11 @@ channel_targets:
cxx_compiler:
- gxx
cxx_compiler_version:
-- '12'
+- '14'
docker_image:
- quay.io/condaforge/linux-anvil-cos7-x86_64
target_platform:
- linux-64
+zip_keys:
+- - c_stdlib_version
+ - cdt_name
diff --git a/.ci_support/osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml b/.ci_support/osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml
new file mode 100644
index 00000000..e5ecf96b
--- /dev/null
+++ b/.ci_support/osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml
@@ -0,0 +1,27 @@
+MACOSX_DEPLOYMENT_TARGET:
+- '10.13'
+MACOSX_SDK_VERSION:
+- '10.14'
+c_stdlib:
+- macosx_deployment_target
+c_stdlib_version:
+- '10.13'
+channel_sources:
+- conda-forge/label/llvm_rc,conda-forge
+channel_targets:
+- conda-forge libcxx_macos_lt_12
+cxx_compiler:
+- clang_bootstrap
+cxx_compiler_version:
+- '*'
+dummy_var:
+- '0'
+macos_machine:
+- x86_64-apple-darwin13.4.0
+sys_abi:
+- pre-12
+target_platform:
+- osx-64
+zip_keys:
+- - sys_abi
+ - channel_targets
diff --git a/.ci_support/osx_64_.yaml b/.ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml
similarity index 64%
rename from .ci_support/osx_64_.yaml
rename to .ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml
index 9173ecee..97fb86c2 100644
--- a/.ci_support/osx_64_.yaml
+++ b/.ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml
@@ -2,19 +2,26 @@ MACOSX_DEPLOYMENT_TARGET:
- '10.13'
MACOSX_SDK_VERSION:
- '10.14'
+c_stdlib:
+- macosx_deployment_target
+c_stdlib_version:
+- '10.13'
channel_sources:
- conda-forge/label/llvm_rc,conda-forge
channel_targets:
-- conda-forge llvm_rc
+- conda-forge main
cxx_compiler:
- clang_bootstrap
cxx_compiler_version:
-- '15'
+- '*'
dummy_var:
- '0'
macos_machine:
- x86_64-apple-darwin13.4.0
-openturns:
-- '1.20'
+sys_abi:
+- post-12
target_platform:
- osx-64
+zip_keys:
+- - sys_abi
+ - channel_targets
diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml
new file mode 100644
index 00000000..ae9f8b6f
--- /dev/null
+++ b/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml
@@ -0,0 +1,27 @@
+MACOSX_DEPLOYMENT_TARGET:
+- '11.0'
+MACOSX_SDK_VERSION:
+- '11.0'
+c_stdlib:
+- macosx_deployment_target
+c_stdlib_version:
+- '11.0'
+channel_sources:
+- conda-forge/label/llvm_rc,conda-forge
+channel_targets:
+- conda-forge libcxx_macos_lt_12
+cxx_compiler:
+- clang_bootstrap
+cxx_compiler_version:
+- '*'
+dummy_var:
+- '1'
+macos_machine:
+- arm64-apple-darwin20.0.0
+sys_abi:
+- pre-12
+target_platform:
+- osx-arm64
+zip_keys:
+- - sys_abi
+ - channel_targets
diff --git a/.ci_support/osx_arm64_.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml
similarity index 58%
rename from .ci_support/osx_arm64_.yaml
rename to .ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml
index e39e0b64..d0571168 100644
--- a/.ci_support/osx_arm64_.yaml
+++ b/.ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml
@@ -1,18 +1,27 @@
MACOSX_DEPLOYMENT_TARGET:
- '11.0'
+MACOSX_SDK_VERSION:
+- '11.0'
+c_stdlib:
+- macosx_deployment_target
+c_stdlib_version:
+- '11.0'
channel_sources:
- conda-forge/label/llvm_rc,conda-forge
channel_targets:
-- conda-forge llvm_rc
+- conda-forge main
cxx_compiler:
- clang_bootstrap
cxx_compiler_version:
-- '15'
+- '*'
dummy_var:
- '1'
macos_machine:
- arm64-apple-darwin20.0.0
-openturns:
-- '1.20'
+sys_abi:
+- post-12
target_platform:
- osx-arm64
+zip_keys:
+- - sys_abi
+ - channel_targets
diff --git a/.gitattributes b/.gitattributes
index 7f327638..18f114a1 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -20,8 +20,8 @@ bld.bat text eol=crlf
.travis.yml linguist-generated=true
.scripts/* linguist-generated=true
.woodpecker.yml linguist-generated=true
-LICENSE.txt linguist-generated=true
-README.md linguist-generated=true
+/LICENSE.txt linguist-generated=true
+/README.md linguist-generated=true
azure-pipelines.yml linguist-generated=true
build-locally.py linguist-generated=true
shippable.yml linguist-generated=true
diff --git a/.gitignore b/.gitignore
index c89ecb7d..179afe55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,24 @@
-*.pyc
+# User content belongs under recipe/.
+# Feedstock configuration goes in `conda-forge.yml`
+# Everything else is managed by the conda-smithy rerender process.
+# Please do not modify
+
+# Ignore all files and folders in root
+*
+!/conda-forge.yml
+
+# Don't ignore any files/folders if the parent folder is 'un-ignored'
+# This also avoids warnings when adding an already-checked file with an ignored parent.
+!/**/
+# Don't ignore any files/folders recursively in the following folders
+!/recipe/**
+!/.ci_support/**
-build_artifacts
+# Since we ignore files/folders recursively, any folders inside
+# build_artifacts gets ignored which trips some build systems.
+# To avoid that we 'un-ignore' all files/folders recursively
+# and only ignore the root build_artifacts folder.
+!/build_artifacts/**
+/build_artifacts
+
+*.pyc
diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh
index a6b09f6b..ba4b251c 100755
--- a/.scripts/build_steps.sh
+++ b/.scripts/build_steps.sh
@@ -28,14 +28,15 @@ conda-build:
pkgs_dirs:
- ${FEEDSTOCK_ROOT}/build_artifacts/pkg_cache
- /opt/conda/pkgs
+solver: libmamba
CONDARC
+export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
-
-mamba install --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
-mamba update --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+mamba install --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
+ pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
+mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
+ pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
# set up the condarc
setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
@@ -67,9 +68,16 @@ if [[ "${BUILD_WITH_CONDA_DEBUG:-0}" == 1 ]]; then
# Drop into an interactive shell
/bin/bash
else
- conda mambabuild "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
+ conda-build "${RECIPE_ROOT}" -m "${CI_SUPPORT}/${CONFIG}.yaml" \
--suppress-variables ${EXTRA_CB_OPTIONS:-} \
- --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml"
+ --clobber-file "${CI_SUPPORT}/clobber_${CONFIG}.yaml" \
+ --extra-meta flow_run_id="${flow_run_id:-}" remote_url="${remote_url:-}" sha="${sha:-}"
+ ( startgroup "Inspecting artifacts" ) 2> /dev/null
+
+ # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
+ command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
+
+ ( endgroup "Inspecting artifacts" ) 2> /dev/null
( startgroup "Validating outputs" ) 2> /dev/null
validate_recipe_outputs "${FEEDSTOCK_NAME}"
diff --git a/.scripts/logging_utils.sh b/.scripts/logging_utils.sh
index 57bc95c2..aff009f0 100644
--- a/.scripts/logging_utils.sh
+++ b/.scripts/logging_utils.sh
@@ -12,7 +12,7 @@ function startgroup {
echo "##[group]$1";;
travis )
echo "$1"
- echo -en 'travis_fold:start:'"${1// /}"'\\r';;
+ echo -en 'travis_fold:start:'"${1// /}"'\r';;
github_actions )
echo "::group::$1";;
* )
@@ -28,7 +28,7 @@ function endgroup {
azure )
echo "##[endgroup]";;
travis )
- echo -en 'travis_fold:end:'"${1// /}"'\\r';;
+ echo -en 'travis_fold:end:'"${1// /}"'\r';;
github_actions )
echo "::endgroup::";;
esac
diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh
index 92362398..00f377a8 100755
--- a/.scripts/run_docker_build.sh
+++ b/.scripts/run_docker_build.sh
@@ -21,6 +21,12 @@ if [ -z ${FEEDSTOCK_NAME} ]; then
export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT})
fi
+if [[ "${sha:-}" == "" ]]; then
+ pushd "${FEEDSTOCK_ROOT}"
+ sha=$(git rev-parse HEAD)
+ popd
+fi
+
docker info
# In order for the conda-build process in the container to write to the mounted
@@ -91,6 +97,9 @@ docker run ${DOCKER_RUN_ARGS} \
-e CPU_COUNT \
-e BUILD_WITH_CONDA_DEBUG \
-e BUILD_OUTPUT_ID \
+ -e flow_run_id \
+ -e remote_url \
+ -e sha \
-e BINSTAR_TOKEN \
-e FEEDSTOCK_TOKEN \
-e STAGING_BINSTAR_TOKEN \
diff --git a/.scripts/run_osx_build.sh b/.scripts/run_osx_build.sh
index 3969edf3..ba0c8791 100755
--- a/.scripts/run_osx_build.sh
+++ b/.scripts/run_osx_build.sh
@@ -22,11 +22,13 @@ bash $MINIFORGE_FILE -b -p ${MINIFORGE_HOME}
source ${MINIFORGE_HOME}/etc/profile.d/conda.sh
conda activate base
+export CONDA_SOLVER="libmamba"
+export CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1
-mamba install --update-specs --quiet --yes --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
-mamba update --update-specs --yes --quiet --channel conda-forge \
- conda-build pip boa conda-forge-ci-setup=3
+mamba install --update-specs --quiet --yes --channel conda-forge --strict-channel-priority \
+ pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
+mamba update --update-specs --yes --quiet --channel conda-forge --strict-channel-priority \
+ pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1"
@@ -45,6 +47,10 @@ else
echo -e "\n\nNot mangling homebrew as we are not running in CI"
fi
+if [[ "${sha:-}" == "" ]]; then
+ sha=$(git rev-parse HEAD)
+fi
+
echo -e "\n\nRunning the build setup script."
source run_conda_forge_build_setup
@@ -75,9 +81,17 @@ else
EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"
fi
- conda mambabuild ./recipe -m ./.ci_support/${CONFIG}.yaml \
+ conda-build ./recipe -m ./.ci_support/${CONFIG}.yaml \
--suppress-variables ${EXTRA_CB_OPTIONS:-} \
- --clobber-file ./.ci_support/clobber_${CONFIG}.yaml
+ --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \
+ --extra-meta flow_run_id="$flow_run_id" remote_url="$remote_url" sha="$sha"
+
+ ( startgroup "Inspecting artifacts" ) 2> /dev/null
+
+ # inspect_artifacts was only added in conda-forge-ci-setup 4.6.0
+ command -v inspect_artifacts >/dev/null 2>&1 && inspect_artifacts || echo "inspect_artifacts needs conda-forge-ci-setup >=4.6.0"
+
+ ( endgroup "Inspecting artifacts" ) 2> /dev/null
( startgroup "Validating outputs" ) 2> /dev/null
validate_recipe_outputs "${FEEDSTOCK_NAME}"
diff --git a/README.md b/README.md
index 4e0b39ec..e1657f6a 100644
--- a/README.md
+++ b/README.md
@@ -36,17 +36,31 @@ Current build status
- | osx_64 |
+ osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12 |
-
+
|
- | osx_arm64 |
+ osx_64_channel_targetsconda-forge_mainsys_abipost-12 |
-
+
+
+ |
+
+ | osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12 |
+
+
+
+
+ |
+
+ | osx_arm64_channel_targetsconda-forge_mainsys_abipost-12 |
+
+
+
|
@@ -68,14 +82,14 @@ Current release info
Installing libcxx
=================
-Installing `libcxx` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with:
+Installing `libcxx` from the `conda-forge/label/llvm_rc` channel can be achieved by adding `conda-forge/label/llvm_rc` to your channels with:
```
-conda config --add channels conda-forge
+conda config --add channels conda-forge/label/llvm_rc
conda config --set channel_priority strict
```
-Once the `conda-forge` channel has been enabled, `libcxx, libcxxabi` can be installed with `conda`:
+Once the `conda-forge/label/llvm_rc` channel has been enabled, `libcxx, libcxxabi` can be installed with `conda`:
```
conda install libcxx libcxxabi
@@ -90,26 +104,26 @@ mamba install libcxx libcxxabi
It is possible to list all of the versions of `libcxx` available on your platform with `conda`:
```
-conda search libcxx --channel conda-forge
+conda search libcxx --channel conda-forge/label/llvm_rc
```
or with `mamba`:
```
-mamba search libcxx --channel conda-forge
+mamba search libcxx --channel conda-forge/label/llvm_rc
```
Alternatively, `mamba repoquery` may provide more information:
```
# Search all versions available on your platform:
-mamba repoquery search libcxx --channel conda-forge
+mamba repoquery search libcxx --channel conda-forge/label/llvm_rc
# List packages depending on `libcxx`:
-mamba repoquery whoneeds libcxx --channel conda-forge
+mamba repoquery whoneeds libcxx --channel conda-forge/label/llvm_rc
# List dependencies of `libcxx`:
-mamba repoquery depends libcxx --channel conda-forge
+mamba repoquery depends libcxx --channel conda-forge/label/llvm_rc
```
@@ -131,7 +145,7 @@ available continuous integration services. Thanks to the awesome service provide
[CircleCI](https://circleci.com/), [AppVeyor](https://www.appveyor.com/),
[Drone](https://cloud.drone.io/welcome), and [TravisCI](https://travis-ci.com/)
it is possible to build and upload installable packages to the
-[conda-forge](https://anaconda.org/conda-forge) [Anaconda-Cloud](https://anaconda.org/)
+[conda-forge](https://anaconda.org/conda-forge) [anaconda.org](https://anaconda.org/)
channel for Linux, Windows and OSX respectively.
To manage the continuous integration and simplify feedstock maintenance
diff --git a/build-locally.py b/build-locally.py
index 3f4b7a79..e0d408d0 100755
--- a/build-locally.py
+++ b/build-locally.py
@@ -64,8 +64,9 @@ def verify_config(ns):
elif ns.config.startswith("osx"):
if "OSX_SDK_DIR" not in os.environ:
raise RuntimeError(
- "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=SDKs' "
- "to download the SDK automatically to 'SDKs/MacOSX.sdk'. "
+ "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' "
+ "to download the SDK automatically to '$PWD/SDKs/MacOSX.sdk'. "
+ "Note: OSX_SDK_DIR must be set to an absolute path. "
"Setting this variable implies agreement to the licensing terms of the SDK by Apple."
)
diff --git a/conda-forge.yml b/conda-forge.yml
index a624268e..e3711f1b 100644
--- a/conda-forge.yml
+++ b/conda-forge.yml
@@ -1,13 +1,11 @@
bot:
abi_migration_branches:
- - 15.x
- - 14.x
-provider: {linux_aarch64: default, linux_ppc64le: default}
-travis:
- osx_image: xcode6.4
-conda_forge_output_validation: true
+ - 16.x
build_platform:
osx_arm64: osx_64
+conda_build:
+ pkg_format: '2'
+conda_forge_output_validation: true
channel_priority: flexible
github:
branch_name: main
diff --git a/recipe/build.sh b/recipe/build.sh
index 172e0be9..903d18e8 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -25,6 +25,9 @@ cmake -G Ninja \
-DLIBCXX_INCLUDE_BENCHMARKS=OFF \
-DLIBCXX_INCLUDE_DOCS=OFF \
-DLIBCXX_INCLUDE_TESTS=OFF \
+ -DLIBCXX_HARDENING_MODE="fast" \
+ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
+ -DCOMPILER_RT_USE_LLVM_UNWINDER=OFF \
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
$CMAKE_ARGS \
$CMAKE_EXTRA_ARGS
@@ -38,4 +41,6 @@ ninja -C build install-cxx install-cxxabi install-unwind
if [[ "$target_platform" == osx-* ]]; then
# on osx we point libc++ to the system libc++abi
$INSTALL_NAME_TOOL -change "@rpath/libc++abi.1.dylib" "/usr/lib/libc++abi.dylib" $PREFIX/lib/libc++.1.0.dylib
+ # same for libunwind
+ $INSTALL_NAME_TOOL -change "@rpath/libunwind.1.dylib" "/usr/lib/system/libunwind.dylib" $PREFIX/lib/libc++.1.0.dylib
fi
diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml
index da962832..18186de6 100644
--- a/recipe/conda_build_config.yaml
+++ b/recipe/conda_build_config.yaml
@@ -11,16 +11,40 @@ channel_sources:
# libcxx only supports the last released GCC version, see
# 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_DEPLOYMENT_TARGET: # [osx and x86_64]
- - "10.13" # [osx and x86_64]
+c_compiler_version: # [unix]
+ - 14 # [linux]
+ - "*" # [osx]
+cxx_compiler_version: # [unix]
+ - 14 # [linux]
+ - "*" # [osx]
+# we want different hashes between osx-64 & osx-arm
dummy_var: # [osx]
- 0 # [osx and x86_64]
- 1 # [osx and arm64]
+
+MACOSX_SDK_VERSION: # [osx]
+ - "10.14" # [osx and x86_64]
+ - "11.0" # [osx and arm64]
+
+c_stdlib_version: # [linux]
+ # actually would need >=2.24, but we don't have that in conda-forge yet
+ - "2.17" # [linux]
+ # w.r.t. to the ABI of the system libcxx, this would need to be 12.0 on macos
+ # but as we only publish one build to main, maintain global lower bounds
+
+# in some scenarios, libraries will load a cached _system_ libc++, and if we have an
+# ABI-mismatch with that system lib, segfaults ensue (see libcxx-testing-feedstock);
+# because the ABI changed with macOS 12, we build a version each for before & after
+sys_abi: # [osx]
+ - pre-12 # [osx]
+ - post-12 # [osx]
+
+# publish the pre-12 ABI builds to a separate label
+channel_targets: # [osx]
+ - conda-forge libcxx_macos_lt_12 # [osx]
+ - conda-forge main # [osx]
+
+zip_keys: # [osx]
+ - - sys_abi # [osx]
+ - channel_targets # [osx]
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 8d045abc..bbd46ecb 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -1,22 +1,24 @@
-{% set version = "17.0.0.rc3" %}
+{% set version = "19.1.0.rc1" %}
+
+{% if sys_abi is undefined %}
+{% set sys_abi = "dummy" %}
+{% endif %}
package:
name: libcxx_and_libcxxabi
version: {{ version }}
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: 60493f4e974fcca7b739aea4901af2d957b0eaea34b42815359be59cf6c88fa2
+ - url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz
+ sha256: cd3b42caf8e78c497712a661303672c1a6279eb1a5ff8735488087319ab95214
patches:
- - patches/0001-Support-legacy-standalone-builds.patch
- # See https://lists.llvm.org/pipermail/libcxx-dev/2021-July/001172.html
- - patches/0002-Fix-ABI-compatibility-with-system.patch
- - patches/0003-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;
- # using new libcxx with old clang versions (beyond what upstream supports) relies on
- # having these fallbacks in place. Drop if conflict-resolution becomes too messy.
- - patches/0004-Revert-libc-Remove-workaround-for-C11-features-on-co.patch
+ # See https://discourse.llvm.org/t/shipping-custom-libc-on-macos/58606
+ - patches/0001-Fix-ABI-compatibility-with-system.patch # [sys_abi == "pre-12"]
+ - patches/0002-custom-error-message-for-old-sdk.patch
+ # disable feature that requires up-to-date libcxxabi, which we don't ship
+ - patches/0003-disable-_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPT.patch
+ # work around https://github.com/llvm/llvm-project/issues/90332
+ - patches/0004-Work-around-stray-nostdlib-flags-causing-errors-with.patch
build:
number: 0
@@ -32,9 +34,11 @@ requirements:
- cmake
- ninja
- {{ compiler('cxx') }}
+ - {{ stdlib('c') }} # [not osx]
+ # use sys_abi as selector, so smithy breaks up CI jobs
+ - {{ stdlib('c') }} # [osx and (sys_abi == "pre-12")]
+ - {{ stdlib('c') }} # [osx and (sys_abi == "post-12")]
- 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]
@@ -53,14 +57,16 @@ 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]
+ - {{ stdlib('c') }}
host:
run:
- {{ pin_subpackage("libcxxabi", exact=True) }} # [linux]
- - __osx >={{ MACOSX_DEPLOYMENT_TARGET }} # [osx and x86_64]
run_constrained:
- - sysroot_linux-64 >=2.17 # [linux64]
+ - __osx <12 # [osx and (sys_abi == "pre-12")]
+ - sysroot_{{ target_platform }} >={{ c_stdlib_version }} # [linux]
+
+ # package for old sys_abi is not installable on macOS-12 image anymore
+ {% if sys_abi != "pre-12" %}
test:
requires:
- clang # [osx]
@@ -76,6 +82,7 @@ outputs:
commands:
# Dummy var for different hashes
- echo {{ dummy_var }} # [osx]
+ - echo {{ sys_abi }} # [osx]
- if not exist %LIBRARY_INC%\\c++\\v1\\iterator exit 1 # [win]
- test -f $PREFIX/include/c++/v1/iterator # [unix]
- bash compile_test.sh # [unix]
@@ -97,12 +104,12 @@ outputs:
- openturns # [osx]
# test current libcxx against old clang builds;
# version correspondence is 0.{{ CLANG_MAJOR }}
+ # these tests are unusual in that they use -Wl,-rpath, but not -L.
+ # we'd need the pre-12 system libcxx, but azure deleted the macOS-11 image
+ - libcxx-testing 0.18 # [osx]
+ - libcxx-testing 0.17 # [osx]
- libcxx-testing 0.16 # [osx]
- - libcxx-testing 0.15 # [osx]
- - libcxx-testing 0.14 # [osx]
- - libcxx-testing 0.13 # [osx]
- - libcxx-testing 0.12 # [osx]
- - libcxx-testing 0.11 # [osx]
+ {% endif %}
- name: libcxxabi
build:
@@ -110,8 +117,9 @@ outputs:
files:
- lib/libc++abi.*
requirements:
- run_constrained:
- - libcxx {{ version }}.*
+ build:
+ # for run-exports
+ - {{ stdlib('c') }}
test:
commands:
- test -f $PREFIX/lib/libc++abi.so # [linux]
diff --git a/recipe/patches/0001-Fix-ABI-compatibility-with-system.patch b/recipe/patches/0001-Fix-ABI-compatibility-with-system.patch
new file mode 100644
index 00000000..f3b14cc6
--- /dev/null
+++ b/recipe/patches/0001-Fix-ABI-compatibility-with-system.patch
@@ -0,0 +1,57 @@
+From bf8c76c5be4a6923267959f629650d375ffe1fb5 Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Tue, 13 Jul 2021 01:57:06 -0500
+Subject: [PATCH 1/4] 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 4efdc63c0966..812d1a386096 100644
+--- a/libcxx/src/locale.cpp
++++ b/libcxx/src/locale.cpp
+@@ -174,10 +174,6 @@ locale::__imp::__imp(size_t refs) : facet(refs), facets_(N), name_("C") {
+ install(&make >(1u));
+ install(&make >(1u));
+ _LIBCPP_SUPPRESS_DEPRECATED_POP
+-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+- install(&make >(1u));
+- install(&make >(1u));
+-#endif
+ install(&make >(1u));
+ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ install(&make >(1u));
+@@ -216,6 +212,10 @@ locale::__imp::__imp(size_t refs) : facet(refs), facets_(N), name_("C") {
+ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ install(&make >(1u));
+ #endif
++#ifndef _LIBCPP_HAS_NO_CHAR8_T
++ install(&make >(1u));
++ install(&make >(1u));
++#endif
+ }
+
+ locale::__imp::__imp(const string& name, size_t refs) : facet(refs), facets_(N), name_(name) {
+@@ -242,10 +242,6 @@ locale::__imp::__imp(const string& name, size_t refs) : facet(refs), facets_(N),
+ install(new codecvt_byname(name_));
+ install(new codecvt_byname(name_));
+ _LIBCPP_SUPPRESS_DEPRECATED_POP
+-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+- install(new codecvt_byname(name_));
+- install(new codecvt_byname(name_));
+-#endif
+ install(new numpunct_byname(name_));
+ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ install(new numpunct_byname(name_));
+@@ -268,6 +264,10 @@ locale::__imp::__imp(const string& name, size_t refs) : facet(refs), facets_(N),
+ #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+ install(new messages_byname(name_));
+ #endif
++#ifndef _LIBCPP_HAS_NO_CHAR8_T
++ install(new codecvt_byname(name_));
++ install(new codecvt_byname(name_));
++#endif
+ #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
+ } catch (...) {
+ for (unsigned i = 0; i < facets_.size(); ++i)
diff --git a/recipe/patches/0001-Support-legacy-standalone-builds.patch b/recipe/patches/0001-Support-legacy-standalone-builds.patch
deleted file mode 100644
index eaa6e0e3..00000000
--- a/recipe/patches/0001-Support-legacy-standalone-builds.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d29ac5318e8e94e0365f6f93547d1b6e97ac48e4 Mon Sep 17 00:00:00 2001
-From: Isuru Fernando
-Date: Tue, 18 May 2021 19:51:28 -0500
-Subject: [PATCH 1/4] 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 35b466527096..720a4b65b83c 100644
---- a/libcxx/src/CMakeLists.txt
-+++ b/libcxx/src/CMakeLists.txt
-@@ -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 $)
-+ function(reexport_symbols file)
-+ target_link_libraries(cxx_shared PRIVATE "-Wl,-reexported_symbols_list,${file}")
-+ endfunction()
-+
-+ if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
-+ reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/lib/new-delete.exp")
-+ endif()
-+
-+ if (LIBCXX_ENABLE_EXCEPTIONS)
-+ reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/lib/exceptions.exp")
-+
-+ if ("${CMAKE_OSX_ARCHITECTURES}" MATCHES "^(armv6|armv7|armv7s)$")
-+ reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/lib/personality-sjlj.exp")
-+ else()
-+ reexport_symbols("${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/lib/personality-v0.exp")
-+ endif()
-+ endif()
- endif()
-
- # Generate a linker script in place of a libc++.so symlink.
diff --git a/recipe/patches/0002-Fix-ABI-compatibility-with-system.patch b/recipe/patches/0002-Fix-ABI-compatibility-with-system.patch
deleted file mode 100644
index 033290c1..00000000
--- a/recipe/patches/0002-Fix-ABI-compatibility-with-system.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 123217eff2d5ceec3a0d7578d2c1256be6dc1943 Mon Sep 17 00:00:00 2001
-From: Isuru Fernando
-Date: Tue, 13 Jul 2021 01:57:06 -0500
-Subject: [PATCH 2/4] 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 bd70a27be4ef..a2062e5d3f53 100644
---- a/libcxx/src/locale.cpp
-+++ b/libcxx/src/locale.cpp
-@@ -193,10 +193,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
- install(&make >(1u));
- install(&make >(1u));
- _LIBCPP_SUPPRESS_DEPRECATED_POP
--#ifndef _LIBCPP_HAS_NO_CHAR8_T
-- install(&make >(1u));
-- install(&make >(1u));
--#endif
- install(&make >(1u));
- #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
- install(&make >(1u));
-@@ -235,6 +231,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
- #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
- install(&make<_VSTD::messages >(1u));
- #endif
-+#ifndef _LIBCPP_HAS_NO_CHAR8_T
-+ install(&make >(1u));
-+ install(&make >(1u));
-+#endif
- }
-
- locale::__imp::__imp(const string& name, size_t refs)
-@@ -266,10 +266,6 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH
- install(new codecvt_byname(name_));
- install(new codecvt_byname(name_));
- _LIBCPP_SUPPRESS_DEPRECATED_POP
--#ifndef _LIBCPP_HAS_NO_CHAR8_T
-- install(new codecvt_byname(name_));
-- install(new codecvt_byname(name_));
--#endif
- install(new numpunct_byname(name_));
- #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
- install(new numpunct_byname(name_));
-@@ -292,6 +288,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
- #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
- install(new messages_byname(name_));
- #endif
-+#ifndef _LIBCPP_HAS_NO_CHAR8_T
-+ install(new codecvt_byname(name_));
-+ install(new codecvt_byname(name_));
-+#endif
- #ifndef _LIBCPP_HAS_NO_EXCEPTIONS
- }
- catch (...)
diff --git a/recipe/patches/0002-custom-error-message-for-old-sdk.patch b/recipe/patches/0002-custom-error-message-for-old-sdk.patch
new file mode 100644
index 00000000..03b2e7b3
--- /dev/null
+++ b/recipe/patches/0002-custom-error-message-for-old-sdk.patch
@@ -0,0 +1,98 @@
+From 7a6b8cee3b11db797a01eb2bdd9a0e4c31bf6aca Mon Sep 17 00:00:00 2001
+From: Isuru Fernando
+Date: Wed, 29 Dec 2021 19:28:35 -0800
+Subject: [PATCH 2/4] custom error message for old sdk
+
+Co-Authored-By: H. Vetinari
+---
+ libcxx/include/__configuration/availability.h | 20 +++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
+index ab483a07c9c1..70de9989b457 100644
+--- a/libcxx/include/__configuration/availability.h
++++ b/libcxx/include/__configuration/availability.h
+@@ -135,12 +135,12 @@
+ // LLVM 19
+ // TODO: Fill this in
+ # define _LIBCPP_INTRODUCED_IN_LLVM_19 0
+-# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
++# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((macos, strict, introduced = 15.0, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))
+
+ // LLVM 18
+ // TODO: Fill this in
+ # define _LIBCPP_INTRODUCED_IN_LLVM_18 0
+-# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
++# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((macos, strict, introduced = 15.0, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))
+
+ // LLVM 17
+ # if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140400) || \
+@@ -152,7 +152,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_17 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_17_ATTRIBUTE \
+- __attribute__((availability(macos, strict, introduced = 14.4))) \
++ __attribute__((availability(macos, strict, introduced = 14.4, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \
+ __attribute__((availability(ios, strict, introduced = 17.4))) \
+ __attribute__((availability(tvos, strict, introduced = 17.4))) \
+ __attribute__((availability(watchos, strict, introduced = 10.4)))
+@@ -167,7 +167,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_16 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_16_ATTRIBUTE \
+- __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)))
+@@ -182,7 +182,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_15 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_15_ATTRIBUTE \
+- __attribute__((availability(macos, strict, introduced = 13.4))) \
++ __attribute__((availability(macos, strict, introduced = 13.4, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \
+ __attribute__((availability(ios, strict, introduced = 16.5))) \
+ __attribute__((availability(tvos, strict, introduced = 16.5))) \
+ __attribute__((availability(watchos, strict, introduced = 9.5)))
+@@ -201,7 +201,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_13 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_13_ATTRIBUTE \
+- __attribute__((availability(macos, strict, introduced = 13.0))) \
++ __attribute__((availability(macos, strict, introduced = 13.0, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \
+ __attribute__((availability(ios, strict, introduced = 16.0))) \
+ __attribute__((availability(tvos, strict, introduced = 16.0))) \
+ __attribute__((availability(watchos, strict, introduced = 9.0)))
+@@ -216,7 +216,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_12 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_12_ATTRIBUTE \
+- __attribute__((availability(macos, strict, introduced = 12.3))) \
++ __attribute__((availability(macos, strict, introduced = 12.3, message="see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk"))) \
+ __attribute__((availability(ios, strict, introduced = 15.3))) \
+ __attribute__((availability(tvos, strict, introduced = 15.3))) \
+ __attribute__((availability(watchos, strict, introduced = 8.3)))
+@@ -231,7 +231,7 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_11 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_11_ATTRIBUTE \
+- __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)))
+@@ -250,12 +250,12 @@
+ # define _LIBCPP_INTRODUCED_IN_LLVM_9 1
+ # endif
+ # define _LIBCPP_INTRODUCED_IN_LLVM_9_ATTRIBUTE \
+- __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_INTRODUCED_IN_LLVM_9_ATTRIBUTE_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))")
diff --git a/recipe/patches/0003-custom-error-message-for-old-sdk.patch b/recipe/patches/0003-custom-error-message-for-old-sdk.patch
deleted file mode 100644
index b3dd9c60..00000000
--- a/recipe/patches/0003-custom-error-message-for-old-sdk.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 54fcf64308c718b275629a28678dcfcc90014205 Mon Sep 17 00:00:00 2001
-From: Isuru Fernando
-Date: Wed, 29 Dec 2021 19:28:35 -0800
-Subject: [PATCH 3/4] 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 7807f22b716f..94f6e070b936 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/0003-disable-_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPT.patch b/recipe/patches/0003-disable-_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPT.patch
new file mode 100644
index 00000000..d9421784
--- /dev/null
+++ b/recipe/patches/0003-disable-_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPT.patch
@@ -0,0 +1,38 @@
+From 1fa872f42eb17226d5f37425f393c72bc12cfc92 Mon Sep 17 00:00:00 2001
+From: "H. Vetinari"
+Date: Sun, 26 May 2024 22:04:04 +1100
+Subject: [PATCH 3/4] disable _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
+ unconditionally
+
+When _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS is not defined, things
+work as expected: i.e. the feature is only used on macOS that vendors LLVM>=18.
+
+Our general policy of setting `-D_LIBCPP_DISABLE_AVAILABILITY` (which causes
+the above macro to be defined) wherever newer C++ features are needed works
+fine because we ship our own libcxx. In this case however, the required symbols
+(`___cxa_init_primary_exception` etc.) is in libcxxabi, which we intentionally
+don't ship ourselves.
+
+Therefore, we must disable this feature unconditionally, at least until our
+macOS baseline is >=15.0, as we rely on the libcxxabi shipped by the system.
+
+See also https://github.com/llvm/llvm-project/issues/77653 & https://github.com/llvm/llvm-project/issues/86077
+---
+ libcxx/include/__configuration/availability.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
+index 70de9989b457..bbcb17a910aa 100644
+--- a/libcxx/include/__configuration/availability.h
++++ b/libcxx/include/__configuration/availability.h
+@@ -352,8 +352,8 @@
+ // These macros controls the availability of __cxa_init_primary_exception
+ // in the built library, which std::make_exception_ptr might use
+ // (see libcxx/include/__exception/exception_ptr.h).
+-#define _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION _LIBCPP_INTRODUCED_IN_LLVM_18
+-#define _LIBCPP_AVAILABILITY_INIT_PRIMARY_EXCEPTION _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE
++#define _LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION 0
++#define _LIBCPP_AVAILABILITY_INIT_PRIMARY_EXCEPTION /* nothing */
+
+ // This controls the availability of C++23 , which
+ // has a dependency on the built library (it needs access to
diff --git a/recipe/patches/0004-Revert-libc-Remove-workaround-for-C11-features-on-co.patch b/recipe/patches/0004-Revert-libc-Remove-workaround-for-C11-features-on-co.patch
deleted file mode 100644
index ba0bec89..00000000
--- a/recipe/patches/0004-Revert-libc-Remove-workaround-for-C11-features-on-co.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 428205712f3ebd4efb7b0ea71d9fa45e0b28fece Mon Sep 17 00:00:00 2001
-From: "H. Vetinari"
-Date: Wed, 8 Feb 2023 16:44:15 +1100
-Subject: [PATCH 4/4] 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 9759d3b9e8e0..9a27abe3367b 100644
---- a/libcxx/include/__config
-+++ b/libcxx/include/__config
-@@ -556,6 +556,72 @@
- # 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 ab2c159c7259..44a6f6a5dc36 100644
---- a/libcxx/include/cstdlib
-+++ b/libcxx/include/cstdlib
-@@ -140,11 +140,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 >= 17
-+#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_HAS_ALIGNED_ALLOC)
- using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
- #endif
-
-diff --git a/libcxx/include/ctime b/libcxx/include/ctime
-index b61e19d6446d..6b48da7a7e4b 100644
---- a/libcxx/include/ctime
-+++ b/libcxx/include/ctime
-@@ -60,13 +60,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 >= 17
-+#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_HAS_TIMESPEC_GET)
- using ::timespec _LIBCPP_USING_IF_EXISTS;
- #endif
- using ::clock _LIBCPP_USING_IF_EXISTS;
-@@ -78,7 +92,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 >= 17
-+#if _LIBCPP_STD_VER >= 17 && defined(_LIBCPP_HAS_TIMESPEC_GET) && !defined(_LIBCPP_HAS_TIMESPEC_GET_NOT_ACTUALLY_PROVIDED)
- using ::timespec_get _LIBCPP_USING_IF_EXISTS;
- #endif
-
diff --git a/recipe/patches/0004-Work-around-stray-nostdlib-flags-causing-errors-with.patch b/recipe/patches/0004-Work-around-stray-nostdlib-flags-causing-errors-with.patch
new file mode 100644
index 00000000..8469a732
--- /dev/null
+++ b/recipe/patches/0004-Work-around-stray-nostdlib-flags-causing-errors-with.patch
@@ -0,0 +1,72 @@
+From 2ff612a0e19739e0523c98f6580a09c4dbd6bd73 Mon Sep 17 00:00:00 2001
+From: "H. Vetinari"
+Date: Sun, 26 May 2024 13:01:28 +1100
+Subject: [PATCH 4/4] Work around stray `-nostdlib++` flags causing errors with
+ C compiler
+
+---
+ libcxxabi/cmake/config-ix.cmake | 7 +++++--
+ libunwind/cmake/config-ix.cmake | 7 +++++--
+ libunwind/src/CMakeLists.txt | 6 ++++--
+ 3 files changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
+index 10f2087c68c5..c0e58f8b255c 100644
+--- a/libcxxabi/cmake/config-ix.cmake
++++ b/libcxxabi/cmake/config-ix.cmake
+@@ -106,8 +106,11 @@ elseif(ANDROID)
+ check_library_exists(c __cxa_thread_atexit_impl ""
+ LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
+ else()
+- check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
+- check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
++ # misdetected due to https://github.com/llvm/llvm-project/issues/90332
++ # check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
++ # check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
++ set(LIBCXXABI_HAS_DL_LIB YES)
++ set(LIBCXXABI_HAS_PTHREAD_LIB YES)
+ check_library_exists(c __cxa_thread_atexit_impl ""
+ LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
+ endif()
+diff --git a/libunwind/cmake/config-ix.cmake b/libunwind/cmake/config-ix.cmake
+index 126c872f0d48..ab9ea1d5ce01 100644
+--- a/libunwind/cmake/config-ix.cmake
++++ b/libunwind/cmake/config-ix.cmake
+@@ -120,8 +120,11 @@ if(FUCHSIA)
+ set(LIBUNWIND_HAS_DL_LIB NO)
+ set(LIBUNWIND_HAS_PTHREAD_LIB NO)
+ else()
+- check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
+- check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
++ # misdetected due to https://github.com/llvm/llvm-project/issues/90332
++ # check_library_exists(dl dladdr "" LIBUNWIND_HAS_DL_LIB)
++ # check_library_exists(pthread pthread_once "" LIBUNWIND_HAS_PTHREAD_LIB)
++ set(LIBUNWIND_HAS_DL_LIB YES)
++ set(LIBUNWIND_HAS_PTHREAD_LIB YES)
+ endif()
+
+ if(HAIKU)
+diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
+index 780430ba70ba..8f53719d4007 100644
+--- a/libunwind/src/CMakeLists.txt
++++ b/libunwind/src/CMakeLists.txt
+@@ -168,7 +168,8 @@ if (LIBUNWIND_ENABLE_SHARED)
+ set_target_properties(unwind_shared
+ PROPERTIES
+ LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
+- LINKER_LANGUAGE C
++ # changed from C due to https://github.com/llvm/llvm-project/issues/90332
++ LINKER_LANGUAGE CXX
+ OUTPUT_NAME "${LIBUNWIND_SHARED_OUTPUT_NAME}"
+ VERSION "1.0"
+ SOVERSION "1"
+@@ -214,7 +215,8 @@ if (LIBUNWIND_ENABLE_STATIC)
+ set_target_properties(unwind_static
+ PROPERTIES
+ LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}"
+- LINKER_LANGUAGE C
++ # changed from C due to https://github.com/llvm/llvm-project/issues/90332
++ LINKER_LANGUAGE CXX
+ OUTPUT_NAME "${LIBUNWIND_STATIC_OUTPUT_NAME}"
+ )
+