From df7ab225eb150af3f8ed9713775c95eaa557bdbb Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 31 Jul 2024 09:29:23 +1100 Subject: [PATCH 1/7] add hardened libcxx builds in separate label --- recipe/build.sh | 2 +- recipe/conda_build_config.yaml | 28 ++++++++++++++++++++++------ recipe/meta.yaml | 16 ++++++++++++---- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/recipe/build.sh b/recipe/build.sh index dee5983a..786a9f3b 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -25,7 +25,7 @@ cmake -G Ninja \ -DLIBCXX_INCLUDE_BENCHMARKS=OFF \ -DLIBCXX_INCLUDE_DOCS=OFF \ -DLIBCXX_INCLUDE_TESTS=OFF \ - -DLIBCXX_HARDENING_MODE="none" \ + -DLIBCXX_HARDENING_MODE="${hardening}" \ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ -DCOMPILER_RT_USE_LLVM_UNWINDER=OFF \ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 4bc04298..51f94862 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -27,18 +27,34 @@ c_stdlib_version: # [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 +# hardening modes can be useful to detect misuse or undefined behaviour, especially +# as all modes maintain the same ABI; while the fast mode has essentially no runtime +# impact, it uses a default assertion handler that just crashes (see #162) and is +# therefore not a good choice for production builds. We provide fully hardened +# "debug" builds in a separate channel, which can be used for testing, but must be +# avoided in production (which we enforce with a run-export). For more details see +# https://libcxx.llvm.org/Hardening.html +hardening: + - none # [osx] + - none + - debug + # 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] + - post-12 # [osx] -# publish the pre-12 ABI builds to a separate label -channel_targets: # [osx] +# publish the pre-12 ABI & hardened builds to a separate label +channel_targets: - conda-forge libcxx_macos_lt_12 # [osx] - - conda-forge main # [osx] + - conda-forge main + - conda-forge libcxx_debug -zip_keys: # [osx] - - - sys_abi # [osx] - - channel_targets # [osx] +zip_keys: + - + - hardening + - channel_targets + - sys_abi # [osx] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2764108d..541074a4 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -2,6 +2,7 @@ {% if sys_abi is undefined %} {% set sys_abi = "dummy" %} +{% set hardening = "dummy" %} {% endif %} package: @@ -29,15 +30,16 @@ build: missing_dso_whitelist: - /usr/lib/libc++abi.dylib +# use selectors here so smithy breaks up CI jobs +# [sys_abi] +# [hardening] + requirements: build: - 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")] + - {{ stdlib('c') }} - python >3 # [not osx] host: - clangdev {{ version }} # [not osx] @@ -45,6 +47,12 @@ requirements: outputs: - name: libcxx + build: + string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [hardening == "none"] + string: debug_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [hardening == "debug"] + run_exports: # [hardening == "debug"] + # packages built with hardened lib must not be installable without extra label + - libcxx =*=debug* # [hardening == "debug"] files: - include/c++ # [unix] - lib/libc++.* # [unix] From cbf9de290c7faec7012003a5daec8c3750190159 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 31 Jul 2024 09:45:32 +1100 Subject: [PATCH 2/7] MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.37.1, and conda-forge-pinning 2024.07.30.01.49.09 --- .azure-pipelines/azure-pipelines-linux.yml | 8 ++- .azure-pipelines/azure-pipelines-osx.yml | 22 ++++--- ...onda-forge_libcxx_debughardeningdebug.yaml | 25 ++++++++ ...targetsconda-forge_mainhardeningnone.yaml} | 4 ++ ...cxx_debughardeningdebugsys_abipost-12.yaml | 30 ++++++++++ ...acos_lt_12hardeningnonesys_abipre-12.yaml} | 5 +- ...orge_mainhardeningnonesys_abipost-12.yaml} | 5 +- ...cxx_debughardeningdebugsys_abipost-12.yaml | 30 ++++++++++ ...acos_lt_12hardeningnonesys_abipre-12.yaml} | 5 +- ...orge_mainhardeningnonesys_abipost-12.yaml} | 5 +- README.md | 57 +++++++++++++------ 11 files changed, 164 insertions(+), 32 deletions(-) create mode 100644 .ci_support/linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug.yaml rename .ci_support/{linux_64_.yaml => linux_64_channel_targetsconda-forge_mainhardeningnone.yaml} (85%) create mode 100644 .ci_support/osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml rename .ci_support/{osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml => osx_64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12.yaml} (90%) rename .ci_support/{osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml => osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml} (89%) create mode 100644 .ci_support/osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml rename .ci_support/{osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml => osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12.yaml} (90%) rename .ci_support/{osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml => osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml} (89%) diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 875d9966..314f33d8 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,8 +8,12 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_: - CONFIG: linux_64_ + linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug: + CONFIG: linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug + UPLOAD_PACKAGES: 'True' + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 + linux_64_channel_targetsconda-forge_mainhardeningnone: + CONFIG: linux_64_channel_targetsconda-forge_mainhardeningnone UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index d3221d58..838ac01f 100755 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -8,17 +8,23 @@ jobs: vmImage: macOS-12 strategy: matrix: - osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12: - CONFIG: osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12 + osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12: + CONFIG: osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12 UPLOAD_PACKAGES: 'True' - osx_64_channel_targetsconda-forge_mainsys_abipost-12: - CONFIG: osx_64_channel_targetsconda-forge_mainsys_abipost-12 + osx_64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12: + CONFIG: osx_64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-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 + osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12: + CONFIG: osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12 UPLOAD_PACKAGES: 'True' - osx_arm64_channel_targetsconda-forge_mainsys_abipost-12: - CONFIG: osx_arm64_channel_targetsconda-forge_mainsys_abipost-12 + osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12: + CONFIG: osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12 + UPLOAD_PACKAGES: 'True' + osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12: + CONFIG: osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12 + UPLOAD_PACKAGES: 'True' + osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12: + CONFIG: osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12 UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: {} diff --git a/.ci_support/linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug.yaml b/.ci_support/linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug.yaml new file mode 100644 index 00000000..bdf686b1 --- /dev/null +++ b/.ci_support/linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug.yaml @@ -0,0 +1,25 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' +cdt_name: +- cos7 +channel_sources: +- conda-forge +channel_targets: +- conda-forge libcxx_debug +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' +docker_image: +- quay.io/condaforge/linux-anvil-cos7-x86_64 +hardening: +- debug +target_platform: +- linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +- - hardening + - channel_targets diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_channel_targetsconda-forge_mainhardeningnone.yaml similarity index 85% rename from .ci_support/linux_64_.yaml rename to .ci_support/linux_64_channel_targetsconda-forge_mainhardeningnone.yaml index 49fab456..0826ed91 100644 --- a/.ci_support/linux_64_.yaml +++ b/.ci_support/linux_64_channel_targetsconda-forge_mainhardeningnone.yaml @@ -14,8 +14,12 @@ cxx_compiler_version: - '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +hardening: +- none target_platform: - linux-64 zip_keys: - - c_stdlib_version - cdt_name +- - hardening + - channel_targets diff --git a/.ci_support/osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml b/.ci_support/osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml new file mode 100644 index 00000000..c945feef --- /dev/null +++ b/.ci_support/osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml @@ -0,0 +1,30 @@ +MACOSX_DEPLOYMENT_TARGET: +- '10.13' +MACOSX_SDK_VERSION: +- '10.14' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '10.13' +channel_sources: +- conda-forge +channel_targets: +- conda-forge libcxx_debug +cxx_compiler: +- clang_bootstrap +cxx_compiler_version: +- '*' +dummy_var: +- '0' +hardening: +- debug +macos_machine: +- x86_64-apple-darwin13.4.0 +sys_abi: +- post-12 +target_platform: +- osx-64 +zip_keys: +- - hardening + - channel_targets + - sys_abi 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_12hardeningnonesys_abipre-12.yaml similarity index 90% rename from .ci_support/osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml rename to .ci_support/osx_64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12.yaml index 5d268f2e..a36bf7d5 100644 --- 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_12hardeningnonesys_abipre-12.yaml @@ -16,6 +16,8 @@ cxx_compiler_version: - '*' dummy_var: - '0' +hardening: +- none macos_machine: - x86_64-apple-darwin13.4.0 sys_abi: @@ -23,5 +25,6 @@ sys_abi: target_platform: - osx-64 zip_keys: -- - sys_abi +- - hardening - channel_targets + - sys_abi diff --git a/.ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml b/.ci_support/osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml similarity index 89% rename from .ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml rename to .ci_support/osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml index f2d72f7d..f4e27b18 100644 --- a/.ci_support/osx_64_channel_targetsconda-forge_mainsys_abipost-12.yaml +++ b/.ci_support/osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml @@ -16,6 +16,8 @@ cxx_compiler_version: - '*' dummy_var: - '0' +hardening: +- none macos_machine: - x86_64-apple-darwin13.4.0 sys_abi: @@ -23,5 +25,6 @@ sys_abi: target_platform: - osx-64 zip_keys: -- - sys_abi +- - hardening - channel_targets + - sys_abi diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml new file mode 100644 index 00000000..cf55b2a0 --- /dev/null +++ b/.ci_support/osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12.yaml @@ -0,0 +1,30 @@ +MACOSX_DEPLOYMENT_TARGET: +- '11.0' +MACOSX_SDK_VERSION: +- '11.0' +c_stdlib: +- macosx_deployment_target +c_stdlib_version: +- '11.0' +channel_sources: +- conda-forge +channel_targets: +- conda-forge libcxx_debug +cxx_compiler: +- clang_bootstrap +cxx_compiler_version: +- '*' +dummy_var: +- '1' +hardening: +- debug +macos_machine: +- arm64-apple-darwin20.0.0 +sys_abi: +- post-12 +target_platform: +- osx-arm64 +zip_keys: +- - hardening + - channel_targets + - sys_abi 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_12hardeningnonesys_abipre-12.yaml similarity index 90% rename from .ci_support/osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12.yaml rename to .ci_support/osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12.yaml index 5aef6d33..55d7a782 100644 --- 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_12hardeningnonesys_abipre-12.yaml @@ -16,6 +16,8 @@ cxx_compiler_version: - '*' dummy_var: - '1' +hardening: +- none macos_machine: - arm64-apple-darwin20.0.0 sys_abi: @@ -23,5 +25,6 @@ sys_abi: target_platform: - osx-arm64 zip_keys: -- - sys_abi +- - hardening - channel_targets + - sys_abi diff --git a/.ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml b/.ci_support/osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml similarity index 89% rename from .ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml rename to .ci_support/osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml index d6d338cb..ffb68dd3 100644 --- a/.ci_support/osx_arm64_channel_targetsconda-forge_mainsys_abipost-12.yaml +++ b/.ci_support/osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12.yaml @@ -16,6 +16,8 @@ cxx_compiler_version: - '*' dummy_var: - '1' +hardening: +- none macos_machine: - arm64-apple-darwin20.0.0 sys_abi: @@ -23,5 +25,6 @@ sys_abi: target_platform: - osx-arm64 zip_keys: -- - sys_abi +- - hardening - channel_targets + - sys_abi diff --git a/README.md b/README.md index 2dde2db5..38cd6c8b 100644 --- a/README.md +++ b/README.md @@ -29,38 +29,59 @@ Current build status - + - + - + - + - + + + + + + + + + + @@ -82,14 +103,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/libcxx_debug` channel can be achieved by adding `conda-forge/label/libcxx_debug` to your channels with: ``` -conda config --add channels conda-forge +conda config --add channels conda-forge/label/libcxx_debug 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/libcxx_debug` channel has been enabled, `libcxx, libcxxabi` can be installed with `conda`: ``` conda install libcxx libcxxabi @@ -104,26 +125,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/libcxx_debug ``` or with `mamba`: ``` -mamba search libcxx --channel conda-forge +mamba search libcxx --channel conda-forge/label/libcxx_debug ``` 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/libcxx_debug # List packages depending on `libcxx`: -mamba repoquery whoneeds libcxx --channel conda-forge +mamba repoquery whoneeds libcxx --channel conda-forge/label/libcxx_debug # List dependencies of `libcxx`: -mamba repoquery depends libcxx --channel conda-forge +mamba repoquery depends libcxx --channel conda-forge/label/libcxx_debug ``` From 70f8700cbadffb0430e4341babb585ae02e5df9a Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 31 Jul 2024 10:26:04 +1100 Subject: [PATCH 3/7] distinguish builds also for libcxxabi --- recipe/meta.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 541074a4..c61e9e1e 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -122,6 +122,9 @@ outputs: - name: libcxxabi build: skip: true # [not linux] + # even though libcxxabi shouldn't be affected, distinguish builds + string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [hardening == "none"] + string: debug_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [hardening == "debug"] files: - lib/libc++abi.* requirements: From 79a858034091f64ebcc5b2a21f54361e67f4742c Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Wed, 31 Jul 2024 10:26:27 +1100 Subject: [PATCH 4/7] remove unneeded build config --- recipe/build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/recipe/build.sh b/recipe/build.sh index 786a9f3b..a32075d4 100644 --- a/recipe/build.sh +++ b/recipe/build.sh @@ -27,7 +27,6 @@ cmake -G Ninja \ -DLIBCXX_INCLUDE_TESTS=OFF \ -DLIBCXX_HARDENING_MODE="${hardening}" \ -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \ - -DCOMPILER_RT_USE_LLVM_UNWINDER=OFF \ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ $CMAKE_ARGS \ $CMAKE_EXTRA_ARGS From 01b44d8ad8aff86198656098e8847b309d6d6d8d Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 6 Aug 2024 09:22:04 +1100 Subject: [PATCH 5/7] disable tzdata dependence for now --- recipe/meta.yaml | 9 +++++++-- recipe/test_sources/hello_world.cpp | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c82f800d..0625f573 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -14,7 +14,7 @@ source: sha256: cd3b42caf8e78c497712a661303672c1a6279eb1a5ff8735488087319ab95214 patches: # 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/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 @@ -71,11 +71,15 @@ outputs: - {{ stdlib('c') }} host: run: - - tzdata + # re-enable this once chrono implementation is in shared library + # - tzdata - {{ pin_subpackage("libcxxabi", exact=True) }} # [linux] run_constrained: + - __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] @@ -126,6 +130,7 @@ outputs: - libcxx-testing 0.18 # [osx] - libcxx-testing 0.17 # [osx] - libcxx-testing 0.16 # [osx] + {% endif %} - name: libcxxabi build: diff --git a/recipe/test_sources/hello_world.cpp b/recipe/test_sources/hello_world.cpp index b365ad3e..3814fad7 100644 --- a/recipe/test_sources/hello_world.cpp +++ b/recipe/test_sources/hello_world.cpp @@ -1,5 +1,4 @@ #include -#include int main() { std::cout << "Hello World from C++!" << std::endl; From 04df48d273a37e4fb7a6a3b00d7a45bf9a53b0a3 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 6 Aug 2024 09:22:41 +1100 Subject: [PATCH 6/7] libcxx v19.1.0.rc2 --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 0625f573..a15912cd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "19.1.0.rc1" %} +{% set version = "19.1.0.rc2" %} {% if sys_abi is undefined %} {% set sys_abi = "dummy" %} @@ -11,7 +11,7 @@ package: source: - url: https://github.com/llvm/llvm-project/archive/refs/tags/llvmorg-{{ version.replace(".rc", "-rc") }}.tar.gz - sha256: cd3b42caf8e78c497712a661303672c1a6279eb1a5ff8735488087319ab95214 + sha256: 5332e77a658136c778fc32ec2a3687de4d63e0ff48010be205c4e7af6e76f1f1 patches: # See https://discourse.llvm.org/t/shipping-custom-libc-on-macos/58606 - patches/0001-Fix-ABI-compatibility-with-system.patch # [sys_abi == "pre-12"] @@ -24,7 +24,7 @@ source: - patches/0005-patch-__libcpp_tzdb_directory-to-allow-use-on-osx.patch build: - number: 3 + number: 0 skip: true # [win] skip: true # [ppc64le or aarch64] ignore_run_exports: From 81ecaaf68f03dcee1457f8306616d8b20b4d78e9 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Tue, 6 Aug 2024 10:26:21 +1100 Subject: [PATCH 7/7] clean up link check warnings on linux --- recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index a15912cd..8bdcca7a 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -55,6 +55,8 @@ outputs: run_exports: # [hardening == "debug"] # packages built with hardened lib must not be installable without extra label - libcxx =*=debug* # [hardening == "debug"] + ignore_run_exports: # [linux] + - libstdcxx-ng # [linux] files: - include/c++ # [unix] - lib/libc++.* # [unix] @@ -70,6 +72,7 @@ outputs: - {{ compiler('cxx') }} - {{ stdlib('c') }} host: + - {{ pin_subpackage("libcxxabi", exact=True) }} # [linux] run: # re-enable this once chrono implementation is in shared library # - tzdata @@ -144,6 +147,7 @@ outputs: build: # for run-exports - {{ stdlib('c') }} + - {{ compiler('c') }} test: commands: - test -f $PREFIX/lib/libc++abi.so # [linux]
VariantStatus
linux_64linux_64_channel_targetsconda-forge_libcxx_debughardeningdebug - variant + variant
osx_64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12linux_64_channel_targetsconda-forge_mainhardeningnone - variant + variant
osx_64_channel_targetsconda-forge_mainsys_abipost-12osx_64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12 - variant + variant
osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12sys_abipre-12osx_64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12 - variant + variant
osx_arm64_channel_targetsconda-forge_mainsys_abipost-12osx_64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12 - variant + variant + +
osx_arm64_channel_targetsconda-forge_libcxx_debughardeningdebugsys_abipost-12 + + variant + +
osx_arm64_channel_targetsconda-forge_libcxx_macos_lt_12hardeningnonesys_abipre-12 + + variant + +
osx_arm64_channel_targetsconda-forge_mainhardeningnonesys_abipost-12 + + variant