This is an archive of the discontinued LLVM Phabricator instance.

Rename and rework `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR`. Move FreeBSD configuration in-tree.
ClosedPublic

Authored by EricWF on Jun 14 2016, 10:32 AM.

Details

Summary

This patch does the following:

  • It renames _LIBCPP_TRIVIAL_PAIR_COPY_CTOR to _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR.
  • It automatically enables this option on FreeBSD in ABI V1, since that's the current ABI FreeBSD ships.
  • It cleans up the handling of this option in std::pair.

I would like the sign off from the FreeBSD maintainers. They will no longer need to keep their __config changes downstream.

I'm still hoping to come up with a better way to maintain the ABI without needing these constructors.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 60702.Jun 14 2016, 10:32 AM
EricWF retitled this revision from to Rename and rework `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR`. Move FreeBSD configuration in-tree..
EricWF updated this object.
EricWF added reviewers: mclow.lists, dim, emaste, theraven.
EricWF added a subscriber: cfe-commits.
dim accepted this revision.Jul 4 2016, 2:34 PM
dim edited edge metadata.

LGTM. Eric, apologies that this took some time to review. I finally dug out my old test cases for the original problem report in FreeBSD, and re-tested them against this patch. (These test cases link against boost, so will be to big to add to the libc++ tests, unfortunately...)

This revision is now accepted and ready to land.Jul 4 2016, 2:34 PM
dim added a comment.Jul 5 2016, 10:31 AM

@theraven, do you have any other feedback? :)

theraven edited edge metadata.Jul 6 2016, 6:24 AM

Looks fine to me, though I wonder if we want to move to the new ABI for FreeBSD11 and use the old one for <=10.

dim added a comment.Jul 7 2016, 1:25 AM

Looks fine to me, though I wonder if we want to move to the new ABI for FreeBSD11 and use the old one for <=10.

For 11 it is certainly too late now, since it is ABI/API frozen now, and we would still need to find some way of providing backwards compat for applications that were linked against the earlier libc++, which still had the non-trivial pair copy constructor.

I'm committing this today, meaning it will make it into 3.9, so don't forget to remove your upstream patches before the release :-)

In D21329#476455, @dim wrote:

Looks fine to me, though I wonder if we want to move to the new ABI for FreeBSD11 and use the old one for <=10.

For 11 it is certainly too late now, since it is ABI/API frozen now, and we would still need to find some way of providing backwards compat for applications that were linked against the earlier libc++, which still had the non-trivial pair copy constructor.

I can't think of any way to offer backwards compat for this particular ABI break. Looks like FreeBSD is stuck with this until your allowed to take a total ABI break. Does FreeBSD have a plan for when this might happen?

EricWF closed this revision.Jul 17 2016, 7:07 PM

r275749.