<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 7, 2017 at 1:29 AM, Shoaib Meenai <span dir="ltr"><<a href="mailto:smeenai@fb.com" target="_blank">smeenai@fb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Do you think it's worth also checking for the presence of cxxabi.h and<br>
assuming the Itanium ABI if it's found, since the MS ABI shouldn't be using<br>
any ABI library?<br></blockquote><div><br></div><div>No I don't think we should check for `cxxabi.h`.It's entirely possible to want to compile</div><div>for the Microsoft ABI when `cxxabi.h` is in your path.</div><div><br></div><div>That being said I don't think the current configuration is correct either. I'm just using it</div><div>until we change Clang to provide the needed macros.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
(_LIBCPP_BUILDING_HAS_NO_ABI_<wbr>LIBRARY would have been ideal were it available<br>
persistently rather than only during the build of libc++ itself. It could<br>
still work if this macro isn't used in any headers though.)<br>
<br>
Also, is there ever a case where _MSC_VER would be defined and _WIN32<br>
wouldn't? The current check seems slightly redundant.<br>
<span class=""><br>
On 1/6/17, 6:43 PM, "cfe-commits on behalf of Eric Fiselier via cfe-commits" <<a href="mailto:cfe-commits-bounces@lists.llvm.org">cfe-commits-bounces@lists.<wbr>llvm.org</a> on behalf of <a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br>
<br>
    Author: ericwf<br>
    Date: Fri Jan  6 20:43:58 2017<br>
    New Revision: 291329<br>
<br>
</span>    URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D291329-26view-3Drev&d=DgIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_ZR6syyL2-CBgE_SBSS0YTQdKIMfcLf4r8leu2c&s=fVFRdDSSgXSZHuGlbfQI1SHyPLDGvuVdhQdxOsU30hI&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__llvm.<wbr>org_viewvc_llvm-2Dproject-<wbr>3Frev-3D291329-26view-3Drev&d=<wbr>DgIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_<wbr>ZR6syyL2-CBgE_<wbr>SBSS0YTQdKIMfcLf4r8leu2c&s=<wbr>fVFRdDSSgXSZHuGlbfQI1SHyPLDGvu<wbr>VdhQdxOsU30hI&e=</a><br>
<span class="">    Log:<br>
    Add _LIBCPP_ABI_[ITANIUM|<wbr>MICROSOFT] macros.<br>
<br>
    This patch adds a libc++ configuration macro for the ABI we<br>
    are targeting, either Itanium or Microsoft. For now we configure<br>
    for the Microsoft ABI when on Windows with a compiler that defines<br>
    _MSC_VER. However this is only temporary until Clang implements<br>
    builtin macros we can use.<br>
<br>
    Modified:<br>
        libcxx/trunk/include/__config<br>
<br>
    Modified: libcxx/trunk/include/__config<br>
</span>    URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_include_-5F-5Fconfig-3Frev-3D291329-26r1-3D291328-26r2-3D291329-26view-3Ddiff&d=DgIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_ZR6syyL2-CBgE_SBSS0YTQdKIMfcLf4r8leu2c&s=46ge62wLL0LHhhQmWVsvb0uPoh8oV44DG0fsq0nEPs8&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_-5F-<wbr>5Fconfig-3Frev-3D291329-26r1-<wbr>3D291328-26r2-3D291329-26view-<wbr>3Ddiff&d=DgIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_<wbr>ZR6syyL2-CBgE_<wbr>SBSS0YTQdKIMfcLf4r8leu2c&s=<wbr>46ge62wLL0LHhhQmWVsvb0uPoh8oV4<wbr>4DG0fsq0nEPs8&e=</a><br>
<span class="">    ==============================<wbr>==============================<wbr>==================<br>
    --- libcxx/trunk/include/__config (original)<br>
    +++ libcxx/trunk/include/__config Fri Jan  6 20:43:58 2017<br>
    @@ -111,6 +111,15 @@<br>
     #define _LIBCPP_COMPILER_IBM<br>
     #endif<br>
<br>
    +// FIXME: ABI detection should be done via compiler builtin macros. This<br>
    +// is just a placeholder until Clang implements such macros. For now assume<br>
    +// that Windows compilers pretending to be MSVC++ target the microsoft ABI.<br>
    +#if defined(_WIN32) && defined(_MSC_VER)<br>
    +# define _LIBCPP_ABI_MICROSOFT<br>
    +#else<br>
    +# define _LIBCPP_ABI_ITANIUM<br>
    +#endif<br>
    +<br>
     // Need to detect which libc we're using if we're on Linux.<br>
     #if defined(__linux__)<br>
     #include <features.h><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>
</span>    <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DgIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_ZR6syyL2-CBgE_SBSS0YTQdKIMfcLf4r8leu2c&s=rzONjyM9TBpTpA9aQpIA9LFsaiofSZIYff34ZiNb5cA&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>DgIGaQ&c=<wbr>5VD0RTtNlTh3ycd41b3MUw&r=<wbr>o3kDXzdBUE3ljQXKeTWOMw&m=vt8N_<wbr>ZR6syyL2-CBgE_<wbr>SBSS0YTQdKIMfcLf4r8leu2c&s=<wbr>rzONjyM9TBpTpA9aQpIA9LFsaiofSZ<wbr>IYff34ZiNb5cA&e=</a><br>
<br>
<br>
</blockquote></div><br></div></div>