This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add support for Fuchsia
ClosedPublic

Authored by phosek on Oct 9 2016, 3:39 PM.

Details

Summary

Fuchsia is a new operating system which uses libc++ and libc++abi as the C++ standard library.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek updated this revision to Diff 74085.Oct 9 2016, 3:39 PM
phosek retitled this revision from to [libcxx] Add support for Fuchsia.
phosek updated this object.
phosek set the repository for this revision to rL LLVM.
phosek added a subscriber: llvm-commits.
phosek edited subscribers, added: cfe-commits; removed: llvm-commits.
EricWF edited edge metadata.Oct 10 2016, 1:01 AM

Is this *all* that's needed to get libc++ working?

Currently yes, we've been using libc++ (and libc++abi which doesn't need any changes) for a few months now without any problems. Our C library is a fork of musl so we rely on all the changes that have already been done to support it. However, we're building libc++ with LIBCXX_HAS_MUSL_LIBC=ON but we're slowly diverging from the upstream version so it might be better to stop relying on that option. I'd have to copy include/support/musl/xlocale.h to include/support/fuchsia/xlocale.h. Would that be fine with you?

EricWF accepted this revision.Oct 10 2016, 1:25 AM
EricWF edited edge metadata.

Cool! This patch LGTM then.

we're slowly diverging from the upstream version so it might be better to stop relying on that option. I'd have to copy include/support/musl/xlocale.h to include/support/fuchsia/xlocale.h. Would that be fine with you?

That sounds fine.

This revision is now accepted and ready to land.Oct 10 2016, 1:25 AM

PS. If your not already locked into an ABI you'll want to look into enabling the most recent ABI breaking changes. See the _LIBCPP_ABI_VERSION configuration at the top of __config for more info.

That sounds fine.

Shall I send it as a separate patch or update this one?

PS. If your not already locked into an ABI you'll want to look into enabling the most recent ABI breaking changes. See the _LIBCPP_ABI_VERSION configuration at the top of __config for more info.

We're already defaulting to LIBCXX_ABI_VERSION=2, I figured that's what we want to be using.

That sounds fine.

Shall I send it as a separate patch or update this one?

I would send a separate patch. This one is already good to go so you might as well commit it.

PS. If your not already locked into an ABI you'll want to look into enabling the most recent ABI breaking changes. See the _LIBCPP_ABI_VERSION configuration at the top of __config for more info.

We're already defaulting to LIBCXX_ABI_VERSION=2, I figured that's what we want to be using.

Great! Just be aware that ABI v2 is not yet stable. We're just staging it for later.

mclow.lists edited edge metadata.Oct 10 2016, 8:21 AM

@EricWF > Cool! This patch LGTM then.

This looks fine to me, too.