Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building Swift toolchain with libcxx, libcxxabi should also be installed #80112

Open
Naville opened this issue Mar 19, 2025 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@Naville
Copy link

Naville commented Mar 19, 2025

Description

Ref:

INSTALL_TARGETS=install-cxx-headers

There are four install components:

  • install-libcxx
  • install-libcxx-headers
  • install-libcxxabi
  • install-libcxxabi-headers

From my understanding here is the "official" Swift Toolchain on Darwin doesn't provide any libcxx stuff, presumably they're compiled with build-toolchain-only ?

However in our downstream, we patch llvm-install-components in the preset to inject the full suite of LLVM tools like llvm-lto that we need in our customer's build pipeline.
In this case, build-toolchain-only is not a viable option since it seems it skips the target generation of llvm tools completely. But if we build "normally" with the fullchain suite, yes, libcxx is installed, but not libcxxabi (headers), this results in (rare) projects that actually uses libcxxabi.h unable to build with this toolchain

Reproduction

Build the full swift toolchain, we use our own preset based on:

[preset: Base]
mixin-preset=
    buildbot_osx_package,no_assertions
    mixin_buildbot_osx_package,no_test

Expected behavior

Both libcxx and libcxxabi are installed

Environment

This was found on a local build Swift 5.9.2, but it seems relevant issues still persist in ToT

Additional information

No response

@Naville Naville added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Mar 19, 2025
@Naville
Copy link
Author

Naville commented Mar 19, 2025

I see multiple approaches to this problem:

  • Fix the script to insert libcxxabi-headers, but the question is should we also ship the libraries.

I remember reading about Apple's libcxx implementation with compact-unwind so that linking none-apple libcxx* is not a good idea on Darwin

  • I patch our downstream preset to skip the entirety of Swift-OSS libcxx and always fallback to Xcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant