[MacPorts] #57576: libcxx 8+ usability
MacPorts
noreply at macports.org
Sat May 30 13:59:03 UTC 2020
#57576: libcxx 8+ usability
--------------------------+--------------------
Reporter: RJVB | Owner: (none)
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: libcxx |
--------------------------+--------------------
Description changed by kencu:
Old description:
> I just saw this
>
> {{{
> Starting with LLVM 8.0.0, users that wish to link together translation
> units built with different versions of libc++’s headers into the same
> final linked image MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to
> 1 when building those translation units. Not defining
> _LIBCPP_HIDE_FROM_ABI_PER_TU to 1 and linking translation units built
> with different versions of libc++’s headers together may lead to ODR
> violations and ABI issues. On the flipside, code size improvements should
> be expected for everyone not defining the macro.
> }}}
> (https://libcxx.llvm.org/docs/ReleaseNotes.html#what-s-new-in-libc-8-0-0)
>
> I interpret this as "define _LIBCPP_HIDE_FROM_ABI_PER_TU if you want to
> use the libc++ headers to build code that will link against system
> libraries".
>
> A really strange decision if that interpretation is correct but if it is
> correct wouldn't it be a least-worst idea revert the logic in
> `c++/v1/__config` to avoid having to add `-D_LIBCPP_HIDE_FROM_ABI_PER_TU`
> to just about every C++ compiler invocation?
New description:
I just saw this
{{{
Starting with LLVM 8.0.0, users that wish to link together translation
units built with different versions of libc++’s headers into the same
final linked image MUST define the _LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1
when building those translation units. Not defining
_LIBCPP_HIDE_FROM_ABI_PER_TU to 1 and linking translation units built with
different versions of libc++’s headers together may lead to ODR violations
and ABI issues. On the flipside, code size improvements should be expected
for everyone not defining the macro.
}}}
(https://releases.llvm.org/8.0.0/projects/libcxx/docs/ReleaseNotes.html)
I interpret this as "define _LIBCPP_HIDE_FROM_ABI_PER_TU if you want to
use the libc++ headers to build code that will link against system
libraries".
A really strange decision if that interpretation is correct but if it is
correct wouldn't it be a least-worst idea revert the logic in
`c++/v1/__config` to avoid having to add `-D_LIBCPP_HIDE_FROM_ABI_PER_TU`
to just about every C++ compiler invocation?
--
--
Ticket URL: <https://trac.macports.org/ticket/57576#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list