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

Link against libc++ on Apple targets #286

Merged
merged 1 commit into from
Oct 24, 2023
Merged

Conversation

gferon
Copy link
Contributor

@gferon gferon commented Oct 23, 2023

On Apple systems, libc++ is the default C++ library1. Trying to compile a binary example using rust_icu with the static feature enabled will currently fail on Apple systems with the following error:

  = note: ld: library 'stdc++' not found
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

This patch links against libc++ on Apple and FreeBSD systems when the static features is enabled.

Note: maybe adding a CI job that builds on macOS in static mode is also a good idea?

Footnotes

  1. https://developer.apple.com/xcode/cpp/

@filmil filmil merged commit b56c59f into google:main Oct 24, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants