<div dir="ltr">We are defining _LIBCPP_HIDE_FROM_ABI_PER_TU in our libc++ build. I don't know why though.<div><br></div><div>Jordan, do you remember why we need that flag?</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 21, 2018 at 6:30 PM Louis Dionne <<a href="mailto:ldionne@apple.com">ldionne@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Thanks!<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Louis</div><div><div><br><blockquote type="cite"><div>On Nov 21, 2018, at 12:21, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com" target="_blank">benny.kra@gmail.com</a>> wrote:</div><br class="m_-529285241799291830Apple-interchange-newline"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr">I'm still seeing things like<div><br></div><div><div>In file included from llvm/projects/libcxx/src/ios.cpp:12:</div><div>In file included from llvm/projects/libcxx/include/ios:216:</div><div>In file included from llvm/projects/libcxx/include/__locale:15:</div><div>llvm/projects/libcxx/include/string:4041:1: error: 'internal_linkage' attribute does not appear on the first declaration of 'operator+'</div><div>operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)</div><div>^</div><div>llvm/projects/libcxx/include/string:584:1: note: previous definition is here</div><div>operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);</div><div>^</div></div><div><br></div><div>Any idea what's going on?</div></div></div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div dir="ltr">On Wed, Nov 21, 2018 at 6:03 PM Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br><br><br>---------- Forwarded message ----------<br>From: Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank">ldionne@apple.com</a>><br>To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>Cc: <br>Bcc: <br>Date: Wed, 21 Nov 2018 17:00:52 -0000<br>Subject: [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try and fix the build<br>Author: ldionne<br>Date: Wed Nov 21 09:00:52 2018<br>New Revision: 347399<br><br>URL:<span class="m_-529285241799291830Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=347399&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=347399&view=rev</a><br>Log:<br>[libcxx] Mark stray symbols as hidden to try and fix the build<br><br>r347395 changed the ABI list on Linux, but two of those symbols are still<br>being exported from the shared object:<br><br>   <span class="m_-529285241799291830Apple-converted-space"> </span>_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_<br>   <span class="m_-529285241799291830Apple-converted-space"> </span>_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_<br><br>This commit makes sure those symbols are not exported, as they should be.<br><br>Modified:<br>   <span class="m_-529285241799291830Apple-converted-space"> </span>libcxx/trunk/include/exception<br>   <span class="m_-529285241799291830Apple-converted-space"> </span>libcxx/trunk/include/string<br><br>Modified: libcxx/trunk/include/exception<br>URL:<span class="m_-529285241799291830Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=347399&r1=347398&r2=347399&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=347399&r1=347398&r2=347399&view=diff</a><br>==============================================================================<br>--- libcxx/trunk/include/exception (original)<br>+++ libcxx/trunk/include/exception Wed Nov 21 09:00:52 2018<br>@@ -164,7 +164,7 @@ public:<br> };<br><br> template<class _Ep><br>-exception_ptr<br>+_LIBCPP_INLINE_VISIBILITY exception_ptr<br> make_exception_ptr(_Ep __e) _NOEXCEPT<br> {<br> #ifndef _LIBCPP_NO_EXCEPTIONS<br>@@ -223,7 +223,7 @@ _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void r<br> template <class _E> void *__GetExceptionInfo(_E);<br><br> template<class _Ep><br>-exception_ptr<br>+_LIBCPP_INLINE_VISIBILITY exception_ptr<br> make_exception_ptr(_Ep __e) _NOEXCEPT<br> {<br>   return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e));<br><br>Modified: libcxx/trunk/include/string<br>URL:<span class="m_-529285241799291830Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347399&r1=347398&r2=347399&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347399&r1=347398&r2=347399&view=diff</a><br>==============================================================================<br>--- libcxx/trunk/include/string (original)<br>+++ libcxx/trunk/include/string Wed Nov 21 09:00:52 2018<br>@@ -4036,7 +4036,7 @@ operator+(_CharT __lhs, const basic_stri<br> }<br><br> template<class _CharT, class _Traits, class _Allocator><br>-_LIBCPP_INLINE_VISIBILITY<br>+inline _LIBCPP_INLINE_VISIBILITY<br> basic_string<_CharT, _Traits, _Allocator><br> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)<br> {<br><br><br><br><br><br>---------- Forwarded message ----------<br>From: Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a>><br>To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br>Cc: <br>Bcc: <br>Date: Wed, 21 Nov 2018 09:00:53 -0800 (PST)<br>Subject: [libcxx-commits] [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try and fix the build<br>_______________________________________________<br>libcxx-commits mailing list<br><a href="mailto:libcxx-commits@lists.llvm.org" target="_blank">libcxx-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits</a></blockquote></div></div></blockquote></div><br></div></div></blockquote></div>