Quantcast

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Asiri Rathnayake via cfe-dev

Will LibC++ still enable ‘auto_ptr’ when ‘-std=c++[98|11|15]’ are chosen?  I assume that it will.  If ‘auto_ptr’ is entirely in the headers, I don’t see any problems, but if some support is in the library, how should the library itself be built so that a single library build supports all of the Standards?  Will we need to provide Multilib builds of the libraries for C++17 versus its predecessors?

 

Thanks,

 

            MartinO

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of Marshall Clow via llvm-dev
Sent: 24 January 2017 22:34
To: [hidden email]
Subject: Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow <[hidden email]> wrote:

The upcoming C++1z (probably C++17) standard will not contain several things - most notably auto_ptr.

 

Soon, libc++ will not be providing auto_ptr by default when building in C++1z mode.

You'll be able to get it back with a 

"-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any libc++ header files.

 

 

Landed as revision 292986.

 

-- Marshall 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Asiri Rathnayake via cfe-dev


On Wed, Jan 25, 2017 at 2:11 AM, Martin J. O'Riordan via cfe-dev <[hidden email]> wrote:

Will LibC++ still enable ‘auto_ptr’ when ‘-std=c++[98|11|15]’ are chosen?  I assume that it will.  If ‘auto_ptr’ is entirely in the headers, I don’t see any problems, but if some support is in the library, how should the library itself be built so that a single library build supports all of the Standards?  Will we need to provide Multilib builds of the libraries for C++17 versus its predecessors?



There will never be a need for multilib builds of Libc++ for different dialects.

/Eric

 

 

Thanks,

 

            MartinO

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of Marshall Clow via llvm-dev
Sent: 24 January 2017 22:34
To: [hidden email]
Subject: Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow <[hidden email]> wrote:

The upcoming C++1z (probably C++17) standard will not contain several things - most notably auto_ptr.

 

Soon, libc++ will not be providing auto_ptr by default when building in C++1z mode.

You'll be able to get it back with a 

"-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any libc++ header files.

 

 

Landed as revision 292986.

 

-- Marshall 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Asiri Rathnayake via cfe-dev

Thanks Eric, the assurance that there will never be a need for a MultiLib build is more comforting than you might guess J, and to me, it is further weight against the incumbent.

 

So from that, I would like to expand - with an out-of-tree - CMake “incompatible” library cross-compiler, what flags should I pass while building LibC++?  Usually I follow whatever ‘buildit’ recommends, but ‘buildit’ looks likely to be removed soon.

 

Thanks,

 

            MartinO

 

 

From: Eric Fiselier [mailto:[hidden email]]
Sent: 30 January 2017 17:20
To: Martin J. O'Riordan <[hidden email]>
Cc: Marshall Clow <[hidden email]>; cfe-dev <[hidden email]>
Subject: Re: [cfe-dev] [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Wed, Jan 25, 2017 at 2:11 AM, Martin J. O'Riordan via cfe-dev <[hidden email]> wrote:

Will LibC++ still enable ‘auto_ptr’ when ‘-std=c++[98|11|15]’ are chosen?  I assume that it will.  If ‘auto_ptr’ is entirely in the headers, I don’t see any problems, but if some support is in the library, how should the library itself be built so that a single library build supports all of the Standards?  Will we need to provide Multilib builds of the libraries for C++17 versus its predecessors?

 

 

There will never be a need for multilib builds of Libc++ for different dialects.

 

/Eric

 

 

 

Thanks,

 

            MartinO

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of Marshall Clow via llvm-dev
Sent: 24 January 2017 22:34
To: [hidden email]
Subject: Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow <[hidden email]> wrote:

The upcoming C++1z (probably C++17) standard will not contain several things - most notably auto_ptr.

 

Soon, libc++ will not be providing auto_ptr by default when building in C++1z mode.

You'll be able to get it back with a 

"-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any libc++ header files.

 

 

Landed as revision 292986.

 

-- Marshall 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Asiri Rathnayake via cfe-dev


On Mon, Jan 30, 2017 at 3:35 PM, Martin J. O'Riordan <[hidden email]> wrote:

Thanks Eric, the assurance that there will never be a need for a MultiLib build is more comforting than you might guess J, and to me, it is further weight against the incumbent.


It would be really unfortunate if different dylibs were needed for different dialects. :-)

 

So from that, I would like to expand - with an out-of-tree - CMake “incompatible” library cross-compiler, what flags should I pass while building LibC++?  Usually I follow whatever ‘buildit’ recommends, but ‘buildit’ looks likely to be removed soon.


That's unfortunate that you can't use the CMake build. The reason buildit is getting removed is it is unmaintained, so it's "recommendations" are way out of date. I would suggest configuring CMake with a "compatible compiler" as closely as possible to your real build, and then simply inspect the flags it passes. Off the top of my head the important compile flags are:

-nostdinc++
-D_LIBCPP_BUILDING_LIBRARY
-DLIBCXX_BUILDING_LIBCXXABI (Assuming your building against libc++abi).

The linker flags are much more complex, so I won't attempt to enumerate the possibilities here.

/Eric

 

Thanks,

 

            MartinO

 

 

From: Eric Fiselier [mailto:[hidden email]]
Sent: 30 January 2017 17:20
To: Martin J. O'Riordan <[hidden email]>
Cc: Marshall Clow <[hidden email]>; cfe-dev <[hidden email]>
Subject: Re: [cfe-dev] [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Wed, Jan 25, 2017 at 2:11 AM, Martin J. O'Riordan via cfe-dev <[hidden email]> wrote:

Will LibC++ still enable ‘auto_ptr’ when ‘-std=c++[98|11|15]’ are chosen?  I assume that it will.  If ‘auto_ptr’ is entirely in the headers, I don’t see any problems, but if some support is in the library, how should the library itself be built so that a single library build supports all of the Standards?  Will we need to provide Multilib builds of the libraries for C++17 versus its predecessors?

 

 

There will never be a need for multilib builds of Libc++ for different dialects.

 

/Eric

 

 

 

Thanks,

 

            MartinO

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of Marshall Clow via llvm-dev
Sent: 24 January 2017 22:34
To: [hidden email]
Subject: Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow <[hidden email]> wrote:

The upcoming C++1z (probably C++17) standard will not contain several things - most notably auto_ptr.

 

Soon, libc++ will not be providing auto_ptr by default when building in C++1z mode.

You'll be able to get it back with a 

"-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any libc++ header files.

 

 

Landed as revision 292986.

 

-- Marshall 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

 



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

Asiri Rathnayake via cfe-dev

Hi Eric,

 

Yes I have incorporated this, and I can happily say that we now have LibC++ building and testing fine.  We don’t use ‘libc++abi’ as it happens, though I do pull in elements for RTTI support (‘private_typeinfo’).

 

You don’t even want to think about our multicore linking without taking a big sedative first ;-)

 

Thanks again you your help, and sorry about the long delay responding,

 

            MartinO

 

From: Eric Fiselier [mailto:[hidden email]]
Sent: 04 February 2017 20:30
To: Martin J. O'Riordan <[hidden email]>
Cc: Marshall Clow <[hidden email]>; cfe-dev <[hidden email]>
Subject: Re: [cfe-dev] [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 30, 2017 at 3:35 PM, Martin J. O'Riordan <[hidden email]> wrote:

Thanks Eric, the assurance that there will never be a need for a MultiLib build is more comforting than you might guess J, and to me, it is further weight against the incumbent.

 

It would be really unfortunate if different dylibs were needed for different dialects. :-)

 

 

So from that, I would like to expand - with an out-of-tree - CMake “incompatible” library cross-compiler, what flags should I pass while building LibC++?  Usually I follow whatever ‘buildit’ recommends, but ‘buildit’ looks likely to be removed soon.

 

That's unfortunate that you can't use the CMake build. The reason buildit is getting removed is it is unmaintained, so it's "recommendations" are way out of date. I would suggest configuring CMake with a "compatible compiler" as closely as possible to your real build, and then simply inspect the flags it passes. Off the top of my head the important compile flags are:

 

-nostdinc++

-D_LIBCPP_BUILDING_LIBRARY

-DLIBCXX_BUILDING_LIBCXXABI (Assuming your building against libc++abi).

 

The linker flags are much more complex, so I won't attempt to enumerate the possibilities here.

 

/Eric

 

Thanks,

 

            MartinO

 

 

From: Eric Fiselier [mailto:[hidden email]]
Sent: 30 January 2017 17:20
To: Martin J. O'Riordan <[hidden email]>
Cc: Marshall Clow <[hidden email]>; cfe-dev <[hidden email]>
Subject: Re: [cfe-dev] [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Wed, Jan 25, 2017 at 2:11 AM, Martin J. O'Riordan via cfe-dev <[hidden email]> wrote:

Will LibC++ still enable ‘auto_ptr’ when ‘-std=c++[98|11|15]’ are chosen?  I assume that it will.  If ‘auto_ptr’ is entirely in the headers, I don’t see any problems, but if some support is in the library, how should the library itself be built so that a single library build supports all of the Standards?  Will we need to provide Multilib builds of the libraries for C++17 versus its predecessors?

 

 

There will never be a need for multilib builds of Libc++ for different dialects.

 

/Eric

 

 

 

Thanks,

 

            MartinO

 

From: llvm-dev [mailto:[hidden email]] On Behalf Of Marshall Clow via llvm-dev
Sent: 24 January 2017 22:34
To: [hidden email]
Subject: Re: [llvm-dev] Upcoming removal of std::auto_ptr (in C++1z)

 

 

 

On Mon, Jan 23, 2017 at 1:32 PM, Marshall Clow <[hidden email]> wrote:

The upcoming C++1z (probably C++17) standard will not contain several things - most notably auto_ptr.

 

Soon, libc++ will not be providing auto_ptr by default when building in C++1z mode.

You'll be able to get it back with a 

"-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" on your command line, or "#define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR" before including any libc++ header files.

 

 

Landed as revision 292986.

 

-- Marshall 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

 

 


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...