Changing default cxx_stdlib to libc++

Ryan Schmidt ryandesign at macports.org
Fri Mar 9 00:27:43 UTC 2018


On Mar 8, 2018, at 15:26, Joshua Root wrote:

> On 2018-3-9 07:07 , Ryan Schmidt wrote:
> 
>> On Mar 8, 2018, at 11:24, Joshua Root wrote:
>> 
>>> Code to check C++ stdlib linkage in rev-upgrade is now in master. That
>>> takes care of the main obstacle to being able to change the default stdlib.
>> 
>> Currently, we publish archives on packages.macports.org for 10.8 and earlier that are built for libstdc++. Currently, if we were to create archives for libc++ on those systems, the archive names would be the same. Is your plan to leave it that way, or to change the archive names for libc++ to distinguish them from the old libstdc++ archives?
> 
> I was not planning to rename the archives. It would work if we left all
> the existing archives, albeit inefficiently when an archive using the
> old stdlib is downloaded and immediately gets rebuilt.

Ok, rev-upgrade would detect a mismatch between the user's selected cxx_stdlib and the one in the archive they received. That does answer one concern of mine.

> I figured we
> could remove all the archives that use C++ (quick hacked together
> example script attached - probably want to clean up old archives before
> running it...).
> 
> - Josh
> <cxx_archives.sh>

When would we run this script to delete libstdc++ archives? Presumably, after all legacy users have MacPorts 2.5 and have switched to libc++. When is that? Certainly no sooner than two weeks after release since that's how long it takes MacPorts to prompt a user to selfupdate. Do all users follow that prompt right away? The prompt goes away if you sync rather than selfupdate, right? Due to the length of time between MacPorts releases, users may be in the habit of running sync rather than selfupdate, since sync is faster. It may be some time before all users actually upgrade to 2.5.

How will users upgrade from libstdc++ to libc++? What subset of the instructions on the LibcxxOnOlderSystems page would they have to follow? What if they don't do that and stay on libstdc++?

This strategy means we won't have any libc++ archives available for legacy users when they switch over. It will take us time to build them. If we changed the archive name and/or directory they're in, we could build libc++ archives in advance and have them ready for users when they switch.



More information about the macports-dev mailing list