<div dir="ltr">I'm OK merging it then.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 18, 2017 at 2:32 PM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eric, sounds like there are no known issues with this, then. What do<br>
you think about merging it?<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Aug 17, 2017 at 5:30 PM, Petr Hosek <<a href="mailto:phosek@chromium.org">phosek@chromium.org</a>> wrote:<br>
> Confirmed, this changes is harmless. The failure we're seeing seems to have<br>
> been introduced by Clang in r310983, sorry about the confusion.<br>
><br>
> On Thu, Aug 17, 2017 at 4:35 PM Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<br>
>><br>
>> See Petr's follow-up. It doesn't look like this was the responsible<br>
>> change.<br>
>><br>
>><br>
>><br>
>> From: Eric Fiselier <<a href="mailto:eric@efcs.ca">eric@efcs.ca</a>><br>
>> Date: Thursday, August 17, 2017 at 4:02 PM<br>
>> To: Petr Hosek <<a href="mailto:phosek@chromium.org">phosek@chromium.org</a>><br>
>> Cc: cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>>, Marshall Clow<br>
>> <<a href="mailto:mclow.lists@gmail.com">mclow.lists@gmail.com</a>>, Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>>, Shoaib Meenai<br>
>> <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>><br>
>> Subject: Re: [libcxx] r309474 - [libc++] Hoist extern template above first<br>
>> use<br>
>><br>
>><br>
>><br>
>> probably shouldn't merge this then.<br>
>><br>
>><br>
>><br>
>> On Aug 17, 2017 4:54 PM, "Petr Hosek via cfe-commits"<br>
>> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> This broke our build of WebKit with the following build failure:<br>
>><br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/bin/clang++ -MD -MF<br>
>> obj/apps/web_view/web_view_<wbr>test.test_webview.o.d<br>
>> -DTOOLCHAIN_VERSION=<wbr>4e89c701396412a50a901115ab4a2a<wbr>09145f3777<br>
>> -D_LIBCPP_ENABLE_THREAD_<wbr>SAFETY_ANNOTATIONS -DCAIRO_HAS_FC_FONT=0<br>
>> -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION<br>
>> -DICU_UTIL_DATA_IMPL=ICU_UTIL_<wbr>DATA_FILE -I../.. -Igen<br>
>> -I../../third_party/webkit/<wbr>Source/WebKit/fuchsia<br>
>> -I../../third_party/boringssl/<wbr>include -Igen/third_party/cairo<br>
>> -I../../third_party/curl/<wbr>include -Iobj/third_party/curl<br>
>> -Iobj/third_party/curl/curl -I../../third_party/freetype2/<wbr>include<br>
>> -I../../third_party/harfbuzz/<wbr>src -I../../third_party/icu/<wbr>source/common<br>
>> -I../../third_party/icu/<wbr>source/i18n -I../../third_party/libjpeg-<wbr>turbo<br>
>> -I../../third_party/libpng -I../../third_party/zlib<br>
>> -I../../third_party/libxml2/<wbr>include -I../../third_party/sqlite -g<br>
>> --sysroot=/usr/local/google/<wbr>home/phosek/fuchsia/out/build-<wbr>magenta/build-magenta-pc-x86-<wbr>64/sysroot<br>
>> --target=x86_64-fuchsia -no-canonical-prefixes<br>
>> -fdebug-prefix-map=/usr/local/<wbr>google/home/phosek/fuchsia=. -Wall -Wextra<br>
>> -Wno-unused-parameter -Wno-enum-compare-switch -Wno-unused-lambda-capture<br>
>> -Wno-user-defined-warnings -fvisibility=hidden -g -Og -fsanitize=safe-stack<br>
>> -fstack-protector-strong -Werror -Wno-error=deprecated-<wbr>declarations<br>
>> -fvisibility-inlines-hidden -std=c++14 -fno-exceptions -fno-rtti<br>
>> -Wthread-safety -c ../../apps/web_view/test_<wbr>webview.cpp -o<br>
>> obj/apps/web_view/web_view_<wbr>test.test_webview.o<br>
>><br>
>> In file included from ../../apps/web_view/test_<wbr>webview.cpp:1:<br>
>><br>
>> In file included from<br>
>> ../../third_party/webkit/<wbr>Source/WebKit/fuchsia/WebView.<wbr>h:28:<br>
>><br>
>> In file included from<br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/functional:484:<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/type_traits:<wbr>4323:23:<br>
>> error: implicit instantiation of undefined template<br>
>> 'std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> >'<br>
>><br>
>><br>
>> _LIBCPP_INVOKE_RETURN(_VSTD::<wbr>forward<_Fp>(__f)(_VSTD::<wbr>forward<_Args>(__args)...))<br>
>><br>
>>                       ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/__config:468:<wbr>15:<br>
>> note: expanded from macro '_VSTD'<br>
>><br>
>> #define _VSTD std::_LIBCPP_NAMESPACE<br>
>><br>
>>               ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/type_traits:<wbr>4340:9:<br>
>> note: in instantiation of exception specification for<br>
>> '__invoke<std::__2::function<<wbr>std::__2::basic_string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > (const<br>
>> std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > &)> &, const std::__2::basic_string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > &>' requested here<br>
>><br>
>>         _VSTD::__invoke(_VSTD::<wbr>declval<_Fp>(),<br>
>> _VSTD::declval<_Args>()...));<br>
>><br>
>>         ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/__config:468:<wbr>15:<br>
>> note: expanded from macro '_VSTD'<br>
>><br>
>> #define _VSTD std::_LIBCPP_NAMESPACE<br>
>><br>
>>               ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/functional:<wbr>1601:33:<br>
>> note: in instantiation of template class 'std::__2::__invokable_r<void,<br>
>> std::__2::function<std::__2::<wbr>basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > (const std::__2::basic_string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > &)> &, const<br>
>> std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > &>' requested here<br>
>><br>
>>                                 __invokable<_Fp&, _ArgTypes...>::value><br>
>><br>
>>                                 ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/functional:<wbr>1626:9:<br>
>> note: in instantiation of default argument for<br>
>> '__callable<std::__2::<wbr>function<std::__2::basic_<wbr>string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > (const<br>
>> std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > &)> >' required here<br>
>><br>
>>         __callable<_Fp>::value && !is_same<_Fp, function>::value<br>
>><br>
>>         ^~~~~~~~~~~~~~~<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/functional:<wbr>1628:5:<br>
>> note: in instantiation of default argument for<br>
>> 'function<std::__2::function<<wbr>std::__2::basic_string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > (const<br>
>> std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > &)> >' required here<br>
>><br>
>>     function(_Fp);<br>
>><br>
>>     ^~~~~~~~~~~~~<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/functional:<wbr>1588:28:<br>
>> note: while substituting deduced template arguments into function template<br>
>> 'function' [with _Fp = std::__2::function<std::__2::<wbr>basic_string<char,<br>
>> std::__2::char_traits<char>, std::__2::allocator<char> > (const<br>
>> std::__2::basic_string<char, std::__2::char_traits<char>,<br>
>> std::__2::allocator<char> > &)>, $1 = (no value)]<br>
>><br>
>> class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)><br>
>><br>
>>                            ^<br>
>><br>
>> ../../third_party/webkit/<wbr>Source/WebKit/fuchsia/WebView.<wbr>h:48:7: note: while<br>
>> declaring the implicit copy constructor for 'WebView'<br>
>><br>
>> class WebView {<br>
>><br>
>>       ^<br>
>><br>
>><br>
>> ../../buildtools/linux-x64/<wbr>clang/lib/x86_64-fuchsia/<wbr>include/c++/v1/iosfwd:193:32:<br>
>> note: template is declared here<br>
>><br>
>>     class _LIBCPP_TEMPLATE_VIS basic_string;<br>
>><br>
>>                                ^<br>
>><br>
>> 1 error generated.<br>
>><br>
>><br>
>><br>
>> On Wed, Aug 9, 2017 at 4:50 PM Hans Wennborg via cfe-commits<br>
>> <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Marshall: ping?<br>
>><br>
>> On Thu, Aug 3, 2017 at 10:20 AM, Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br>
>> > Sounds good to me, but Eric or Marshall need to sign off.<br>
>> ><br>
>> > On Thu, Aug 3, 2017 at 10:15 AM, Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<br>
>> >> Ping.<br>
>> >><br>
>> >> On 7/28/17, 7:57 PM, "Shoaib Meenai" <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<br>
>> >><br>
>> >>     Marshall, Eric, Hans,<br>
>> >><br>
>> >>     Any objections to backporting this to 5.0? It fixes a potential<br>
>> >> visibility<br>
>> >>     issue for clients of the header.<br>
>> >><br>
>> >>     On 7/28/17, 7:54 PM, "cfe-commits on behalf of Shoaib Meenai via<br>
>> >> cfe-commits" <<a href="mailto:cfe-commits-bounces@lists.llvm.org">cfe-commits-bounces@lists.<wbr>llvm.org</a> on behalf of<br>
>> >> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
>> >><br>
>> >>         Author: smeenai<br>
>> >>         Date: Fri Jul 28 19:54:41 2017<br>
>> >>         New Revision: 309474<br>
>> >><br>
>> >>         URL:<br>
>> >> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D309474-26view-3Drev&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=EcGbIxegCOTbSLMJelp_vOaeGiS_iQ1eciM_oeX41-E&s=5q7TS5mhaUsf-1jQBqX62RvjcqAiy2whh8RO7yFhPyA&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject-<wbr>3Frev-3D309474-26view-3Drev&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>EcGbIxegCOTbSLMJelp_vOaeGiS_<wbr>iQ1eciM_oeX41-E&s=<wbr>5q7TS5mhaUsf-<wbr>1jQBqX62RvjcqAiy2whh8RO7yFhPyA<wbr>&e=</a><br>
>> >>         Log:<br>
>> >>         [libc++] Hoist extern template above first use<br>
>> >><br>
>> >>         This function template is referenced inside class basic_string<br>
>> >> as a<br>
>> >>         friend function. The extern template declaration needs to be<br>
>> >> above that<br>
>> >>         friend declaration to actually take effect.<br>
>> >><br>
>> >>         This is important because this function was marked as exported<br>
>> >> in<br>
>> >>         r307966, so without the extern template taking effect, it can<br>
>> >> leak into<br>
>> >>         other DSOs as a visible symbol.<br>
>> >><br>
>> >>         Modified:<br>
>> >>             libcxx/trunk/include/string<br>
>> >><br>
>> >>         Modified: libcxx/trunk/include/string<br>
>> >>         URL:<br>
>> >> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_include_string-3Frev-3D309474-26r1-3D309473-26r2-3D309474-26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=EcGbIxegCOTbSLMJelp_vOaeGiS_iQ1eciM_oeX41-E&s=zFJXc9CA6Sgyh25kGeAh4Qo36gpNQX_zo2qRlRFJoL8&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject_<wbr>libcxx_trunk_include_string-<wbr>3Frev-3D309474-26r1-3D309473-<wbr>26r2-3D309474-26view-3Ddiff&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>EcGbIxegCOTbSLMJelp_vOaeGiS_<wbr>iQ1eciM_oeX41-E&s=<wbr>zFJXc9CA6Sgyh25kGeAh4Qo36gpNQX<wbr>_zo2qRlRFJoL8&e=</a><br>
>> >><br>
>> >> ==============================<wbr>==============================<wbr>==================<br>
>> >>         --- libcxx/trunk/include/string (original)<br>
>> >>         +++ libcxx/trunk/include/string Fri Jul 28 19:54:41 2017<br>
>> >>         @@ -556,6 +556,8 @@ template<class _CharT, class _Traits, cl<br>
>> >>          basic_string<_CharT, _Traits, _Allocator><br>
>> >>          operator+(const basic_string<_CharT, _Traits, _Allocator>&<br>
>> >> __x, _CharT __y);<br>
>> >><br>
>> >>         +_LIBCPP_EXTERN_TEMPLATE(_<wbr>LIBCPP_FUNC_VIS string<br>
>> >> operator+<char, char_traits<char>, allocator<char> >(char const*, string<br>
>> >> const&))<br>
>> >>         +<br>
>> >>          template <bool><br>
>> >>          class _LIBCPP_TEMPLATE_VIS __basic_string_common<br>
>> >>          {<br>
>> >>         @@ -3999,7 +4001,6 @@ basic_string<_CharT, _Traits, _Allocator<br>
>> >><br>
>> >>          _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_<wbr>VIS<br>
>> >> basic_string<char>)<br>
>> >>          _LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_<wbr>VIS<br>
>> >> basic_string<wchar_t>)<br>
>> >>         -_LIBCPP_EXTERN_TEMPLATE(_<wbr>LIBCPP_FUNC_VIS string<br>
>> >> operator+<char, char_traits<char>, allocator<char> >(char const*, string<br>
>> >> const&))<br>
>> >><br>
>> >>          #if _LIBCPP_STD_VER > 11<br>
>> >>          // Literal suffixes for basic_string [basic.string.literals]<br>
>> >><br>
>> >><br>
>> >>         ______________________________<wbr>_________________<br>
>> >>         cfe-commits mailing list<br>
>> >>         <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> >><br>
>> >> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=EcGbIxegCOTbSLMJelp_vOaeGiS_iQ1eciM_oeX41-E&s=95GYNfQT_kBVjYvYRYnF3mje6PEyF4EDl4MCBQKCu88&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__lists.<wbr>llvm.org_cgi-2Dbin_mailman_<wbr>listinfo_cfe-2Dcommits&d=<wbr>DwIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=<wbr>EcGbIxegCOTbSLMJelp_vOaeGiS_<wbr>iQ1eciM_oeX41-E&s=95GYNfQT_<wbr>kBVjYvYRYnF3mje6PEyF4EDl4MCBQK<wbr>Cu88&e=</a><br>
>> >><br>
>> >><br>
>> >><br>
>> >><br>
>> ______________________________<wbr>_________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> cfe-commits mailing list<br>
>> <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br></div>