<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Okay, thanks for the clarifications. Just make sure you're using the CMake option _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT if you're building your own libc++. This will make sure that _LIBCPP_HIDE_FROM_ABI_PER_TU is always defined for anyone using your build of libc++.<div class=""><br class=""></div><div class="">Louis<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 27, 2018, at 13:35, Erik van der Poel <<a href="mailto:erikv@google.com" class="">erikv@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Yes, we had a number of programs with a few very large stack frames, and this setting (based on Louis' great work) solved that particular problem.</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Nov 27, 2018 at 10:02 AM Jordan Rupprecht <<a href="mailto:rupprecht@google.com" class="">rupprecht@google.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div dir="ltr" class=""><div class="">I'm not really sure why; I was just the lucky build cop and started seeing failures in that area :)</div><div class=""><br class=""></div><div class="">Fortunately Erik helped and suggested "_LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT:BOOL=ON" as a fix. The only context I can pull up is this: <a href="http://lists.llvm.org/pipermail/cfe-dev/2018-August/059156.html" target="_blank" class="">http://lists.llvm.org/pipermail/cfe-dev/2018-August/059156.html</a>. Looks like we were hitting stack overflows without it.</div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 21, 2018 at 9:34 AM Benjamin Kramer <<a href="mailto:benny.kra@gmail.com" target="_blank" class="">benny.kra@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">We are defining _LIBCPP_HIDE_FROM_ABI_PER_TU in our libc++ build. I don't know why though.<div class=""><br class=""></div><div class="">Jordan, do you remember why we need that flag?</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Nov 21, 2018 at 6:30 PM Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank" class="">ldionne@apple.com</a>> wrote:<br class=""></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" class="">Thanks!<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Louis</div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Nov 21, 2018, at 12:21, Benjamin Kramer <<a href="mailto:benny.kra@gmail.com" target="_blank" class="">benny.kra@gmail.com</a>> wrote:</div><br class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-interchange-newline"><div class=""><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" class=""><div dir="ltr" class="">I'm still seeing things like<div class=""><br class=""></div><div class=""><div class="">In file included from llvm/projects/libcxx/src/ios.cpp:12:</div><div class="">In file included from llvm/projects/libcxx/include/ios:216:</div><div class="">In file included from llvm/projects/libcxx/include/__locale:15:</div><div class="">llvm/projects/libcxx/include/string:4041:1: error: 'internal_linkage' attribute does not appear on the first declaration of 'operator+'</div><div class="">operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)</div><div class="">^</div><div class="">llvm/projects/libcxx/include/string:584:1: note: previous definition is here</div><div class="">operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);</div><div class="">^</div></div><div class=""><br class=""></div><div class="">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" class=""><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" class="">On Wed, Nov 21, 2018 at 6:03 PM Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank" class="">libcxx-commits@lists.llvm.org</a>> wrote:<br class=""></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 class=""><br class=""><br class="">---------- Forwarded message ----------<br class="">From: Louis Dionne <<a href="mailto:ldionne@apple.com" target="_blank" class="">ldionne@apple.com</a>><br class="">To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank" class="">libcxx-commits@lists.llvm.org</a><br class="">Cc: <br class="">Bcc: <br class="">Date: Wed, 21 Nov 2018 17:00:52 -0000<br class="">Subject: [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try and fix the build<br class="">Author: ldionne<br class="">Date: Wed Nov 21 09:00:52 2018<br class="">New Revision: 347399<br class=""><br class="">URL:<span class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=347399&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=347399&view=rev</a><br class="">Log:<br class="">[libcxx] Mark stray symbols as hidden to try and fix the build<br class=""><br class="">r347395 changed the ABI list on Linux, but two of those symbols are still<br class="">being exported from the shared object:<br class=""><br class="">   <span class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-converted-space"> </span>_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_<br class="">   <span class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-converted-space"> </span>_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_<br class=""><br class="">This commit makes sure those symbols are not exported, as they should be.<br class=""><br class="">Modified:<br class="">   <span class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-converted-space"> </span>libcxx/trunk/include/exception<br class="">   <span class="m_-4533690413492881550m_8847679505985781988m_-529285241799291830Apple-converted-space"> </span>libcxx/trunk/include/string<br class=""><br class="">Modified: libcxx/trunk/include/exception<br class="">URL:<span class="m_-4533690413492881550m_8847679505985781988m_-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" class="">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=347399&r1=347398&r2=347399&view=diff</a><br class="">==============================================================================<br class="">--- libcxx/trunk/include/exception (original)<br class="">+++ libcxx/trunk/include/exception Wed Nov 21 09:00:52 2018<br class="">@@ -164,7 +164,7 @@ public:<br class=""> };<br class=""><br class=""> template<class _Ep><br class="">-exception_ptr<br class="">+_LIBCPP_INLINE_VISIBILITY exception_ptr<br class=""> make_exception_ptr(_Ep __e) _NOEXCEPT<br class=""> {<br class=""> #ifndef _LIBCPP_NO_EXCEPTIONS<br class="">@@ -223,7 +223,7 @@ _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void r<br class=""> template <class _E> void *__GetExceptionInfo(_E);<br class=""><br class=""> template<class _Ep><br class="">-exception_ptr<br class="">+_LIBCPP_INLINE_VISIBILITY exception_ptr<br class=""> make_exception_ptr(_Ep __e) _NOEXCEPT<br class=""> {<br class="">   return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e));<br class=""><br class="">Modified: libcxx/trunk/include/string<br class="">URL:<span class="m_-4533690413492881550m_8847679505985781988m_-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" class="">http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?rev=347399&r1=347398&r2=347399&view=diff</a><br class="">==============================================================================<br class="">--- libcxx/trunk/include/string (original)<br class="">+++ libcxx/trunk/include/string Wed Nov 21 09:00:52 2018<br class="">@@ -4036,7 +4036,7 @@ operator+(_CharT __lhs, const basic_stri<br class=""> }<br class=""><br class=""> template<class _CharT, class _Traits, class _Allocator><br class="">-_LIBCPP_INLINE_VISIBILITY<br class="">+inline _LIBCPP_INLINE_VISIBILITY<br class=""> basic_string<_CharT, _Traits, _Allocator><br class=""> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)<br class=""> {<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">---------- Forwarded message ----------<br class="">From: Louis Dionne via libcxx-commits <<a href="mailto:libcxx-commits@lists.llvm.org" target="_blank" class="">libcxx-commits@lists.llvm.org</a>><br class="">To: <a href="mailto:libcxx-commits@lists.llvm.org" target="_blank" class="">libcxx-commits@lists.llvm.org</a><br class="">Cc: <br class="">Bcc: <br class="">Date: Wed, 21 Nov 2018 09:00:53 -0800 (PST)<br class="">Subject: [libcxx-commits] [libcxx] r347399 - [libcxx] Mark stray symbols as hidden to try and fix the build<br class="">_______________________________________________<br class="">libcxx-commits mailing list<br class=""><a href="mailto:libcxx-commits@lists.llvm.org" target="_blank" class="">libcxx-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-commits</a></blockquote></div></div></blockquote></div><br class=""></div></div></blockquote></div>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>