[libcxx-commits] [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try and fix the build

Benjamin Kramer benny.kra at gmail.com
Wed Nov 21 09:34:33 PST 2018


We are defining _LIBCPP_HIDE_FROM_ABI_PER_TU in our libc++ build. I don't
know why though.

Jordan, do you remember why we need that flag?

On Wed, Nov 21, 2018 at 6:30 PM Louis Dionne <ldionne at apple.com> wrote:

> Thanks!
>
> The problem is, as the error says, that I did not apply the attribute to
> the first declaration of that operator+. I missed it because we have this
> frustrating habit of declaring and defining heavily templated functions
> separately.
>
> Also, how come are you using internal_linkage? Are you defining
> _LIBCPP_HIDE_FROM_ABI_PER_TU, and if so, why? Just trying to gather some
> user input.
>
> Louis
>
> On Nov 21, 2018, at 12:21, Benjamin Kramer <benny.kra at gmail.com> wrote:
>
> I'm still seeing things like
>
> In file included from llvm/projects/libcxx/src/ios.cpp:12:
> In file included from llvm/projects/libcxx/include/ios:216:
> In file included from llvm/projects/libcxx/include/__locale:15:
> llvm/projects/libcxx/include/string:4041:1: error: 'internal_linkage'
> attribute does not appear on the first declaration of 'operator+'
> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const
> _CharT* __rhs)
> ^
> llvm/projects/libcxx/include/string:584:1: note: previous definition is
> here
> operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const
> _CharT* __y);
> ^
>
> Any idea what's going on?
>
> On Wed, Nov 21, 2018 at 6:03 PM Louis Dionne via libcxx-commits <
> libcxx-commits at lists.llvm.org> wrote:
>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Louis Dionne <ldionne at apple.com>
>> To: libcxx-commits at lists.llvm.org
>> Cc:
>> Bcc:
>> Date: Wed, 21 Nov 2018 17:00:52 -0000
>> Subject: [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try
>> and fix the build
>> Author: ldionne
>> Date: Wed Nov 21 09:00:52 2018
>> New Revision: 347399
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=347399&view=rev
>> Log:
>> [libcxx] Mark stray symbols as hidden to try and fix the build
>>
>> r347395 changed the ABI list on Linux, but two of those symbols are still
>> being exported from the shared object:
>>
>>     _ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_
>>
>> _ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_
>>
>> This commit makes sure those symbols are not exported, as they should be.
>>
>> Modified:
>>     libcxx/trunk/include/exception
>>     libcxx/trunk/include/string
>>
>> Modified: libcxx/trunk/include/exception
>> URL:
>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=347399&r1=347398&r2=347399&view=diff
>>
>> ==============================================================================
>> --- libcxx/trunk/include/exception (original)
>> +++ libcxx/trunk/include/exception Wed Nov 21 09:00:52 2018
>> @@ -164,7 +164,7 @@ public:
>>  };
>>
>>  template<class _Ep>
>> -exception_ptr
>> +_LIBCPP_INLINE_VISIBILITY exception_ptr
>>  make_exception_ptr(_Ep __e) _NOEXCEPT
>>  {
>>  #ifndef _LIBCPP_NO_EXCEPTIONS
>> @@ -223,7 +223,7 @@ _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void r
>>  template <class _E> void *__GetExceptionInfo(_E);
>>
>>  template<class _Ep>
>> -exception_ptr
>> +_LIBCPP_INLINE_VISIBILITY exception_ptr
>>  make_exception_ptr(_Ep __e) _NOEXCEPT
>>  {
>>    return __copy_exception_ptr(_VSTD::addressof(__e),
>> __GetExceptionInfo(__e));
>>
>> Modified: libcxx/trunk/include/string
>> URL:
>> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347399&r1=347398&r2=347399&view=diff
>>
>> ==============================================================================
>> --- libcxx/trunk/include/string (original)
>> +++ libcxx/trunk/include/string Wed Nov 21 09:00:52 2018
>> @@ -4036,7 +4036,7 @@ operator+(_CharT __lhs, const basic_stri
>>  }
>>
>>  template<class _CharT, class _Traits, class _Allocator>
>> -_LIBCPP_INLINE_VISIBILITY
>> +inline _LIBCPP_INLINE_VISIBILITY
>>  basic_string<_CharT, _Traits, _Allocator>
>>  operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const
>> _CharT* __rhs)
>>  {
>>
>>
>>
>>
>>
>> ---------- Forwarded message ----------
>> From: Louis Dionne via libcxx-commits <libcxx-commits at lists.llvm.org>
>> To: libcxx-commits at lists.llvm.org
>> Cc:
>> Bcc:
>> Date: Wed, 21 Nov 2018 09:00:53 -0800 (PST)
>> Subject: [libcxx-commits] [libcxx] r347399 - [libcxx] Mark stray symbols
>> as hidden to try and fix the build
>> _______________________________________________
>> libcxx-commits mailing list
>> libcxx-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20181121/20464e3c/attachment-0001.html>


More information about the libcxx-commits mailing list