<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Yup, the patch looks good – just wanted to clarify the commit message :)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black"><ldionne@apple.com> on behalf of Louis Dionne <ldionne@apple.com><br>
<b>Date: </b>Friday, April 3, 2020 at 12:41 PM<br>
<b>To: </b>Shoaib Meenai <smeenai@fb.com><br>
<b>Cc: </b>Louis Dionne <llvmlistbot@llvm.org>, "libcxx-commits@lists.llvm.org" <libcxx-commits@lists.llvm.org><br>
<b>Subject: </b>Re: [libcxx-commits] [libcxx] 937040d - [libc++] Add REQUIRES for tests that need -fblocks and -fobjc-arc<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:.5in">On Apr 3, 2020, at 15:38, Shoaib Meenai <<a href="mailto:smeenai@fb.com">smeenai@fb.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:Helvetica">To be clear, this is a target thing and not an AppleClang vs. Clang thing. If you built Clang yourself but passed e.g. `-target x86_64-apple-macosx10.15`, you'd
 also get blocks and ARC by default.</span><o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">That makes sense, thanks for the information! The patch only detects whether the compiler supports it without checking whether it's AppleClang or another Clang, so I think this is still good.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">That was not necessary before because we were skipping .mm tests altogether :-(.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Louis<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:9.0pt;font-family:Helvetica"><br>
On 4/3/20, 7:11 AM, "libcxx-commits on behalf of Louis Dionne via libcxx-commits" <</span><a href="mailto:libcxx-commits-bounces@lists.llvm.org"><span style="font-size:9.0pt;font-family:Helvetica">libcxx-commits-bounces@lists.llvm.org</span></a><span class="apple-converted-space"><span style="font-size:9.0pt;font-family:Helvetica"> </span></span><span style="font-size:9.0pt;font-family:Helvetica">on
 behalf of<span class="apple-converted-space"> </span></span><a href="mailto:libcxx-commits@lists.llvm.org"><span style="font-size:9.0pt;font-family:Helvetica">libcxx-commits@lists.llvm.org</span></a><span style="font-size:9.0pt;font-family:Helvetica">> wrote:<br>
<br>
<br>
   Author: Louis Dionne<br>
   Date: 2020-04-03T10:10:35-04:00<br>
   New Revision: 937040d18196987221ed28fd6f3d2586102a6dbe<br>
<br>
   URL: <a href="https://github.com/llvm/llvm-project/commit/937040d18196987221ed28fd6f3d2586102a6dbe">
https://github.com/llvm/llvm-project/commit/937040d18196987221ed28fd6f3d2586102a6dbe</a><br>
   DIFF: <a href="https://github.com/llvm/llvm-project/commit/937040d18196987221ed28fd6f3d2586102a6dbe.diff">
https://github.com/llvm/llvm-project/commit/937040d18196987221ed28fd6f3d2586102a6dbe.diff</a><br>
<br>
   LOG: [libc++] Add REQUIRES for tests that need -fblocks and -fobjc-arc<br>
<br>
   AppleClang seems to support these extensions by default, but other<br>
   compilers don't.<br>
<br>
   Added:<span class="apple-converted-space"> </span><br>
<br>
<br>
   Modified:<span class="apple-converted-space"> </span><br>
       libcxx/test/libcxx/selftest/test.arc.pass.mm<br>
       libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm<br>
       libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm<br>
       libcxx/test/libcxx/utilities/optional/block.objc.pass.mm<br>
       libcxx/utils/libcxx/test/config.py<br>
<br>
   Removed:<span class="apple-converted-space"> </span><br>
<br>
<br>
<br>
   ################################################################################<br>
   diff  --git a/libcxx/test/libcxx/selftest/test.arc.pass.mm b/libcxx/test/libcxx/selftest/test.arc.pass.mm<br>
   index 0c83cc825542..b70b24e63183 100644<br>
   --- a/libcxx/test/libcxx/selftest/test.arc.pass.mm<br>
   +++ b/libcxx/test/libcxx/selftest/test.arc.pass.mm<br>
   @@ -7,6 +7,7 @@<br>
    //<br>
    //===----------------------------------------------------------------------===//<br>
<br>
   +// REQUIRES: has-fobjc-arc<br>
    // ADDITIONAL_COMPILE_FLAGS: -fobjc-arc<br>
<br>
    #if __has_feature(objc_arc) == 0<br>
<br>
   diff  --git a/libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm b/libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm<br>
   index 3b297d5c2271..168869972dd1 100644<br>
   --- a/libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm<br>
   +++ b/libcxx/test/libcxx/type_traits/is_pointer.arc.pass.mm<br>
   @@ -5,9 +5,9 @@<br>
    // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception<br>
    //<br>
    //===----------------------------------------------------------------------===//<br>
   -//<br>
   -// UNSUPPORTED: c++98, c++03<br>
<br>
   +// UNSUPPORTED: c++98, c++03<br>
   +// REQUIRES: has-fobjc-arc<br>
    // ADDITIONAL_COMPILE_FLAGS: -fobjc-arc<br>
<br>
    // <type_traits><br>
<br>
   diff  --git a/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm b/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm<br>
   index 1f7ffec8efda..23693fc064eb 100644<br>
   --- a/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm<br>
   +++ b/libcxx/test/libcxx/type_traits/is_scalar.objc.pass.mm<br>
   @@ -5,8 +5,10 @@<br>
    // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception<br>
    //<br>
    //===----------------------------------------------------------------------===//<br>
   -//<br>
   +<br>
    // UNSUPPORTED: c++98, c++03<br>
   +// REQUIRES: has-fblocks<br>
   +// ADDITIONAL_COMPILE_FLAGS: -fblocks<br>
<br>
    // <type_traits><br>
<br>
<br>
   diff  --git a/libcxx/test/libcxx/utilities/optional/block.objc.pass.mm b/libcxx/test/libcxx/utilities/optional/block.objc.pass.mm<br>
   index 8d2722bf8534..77674602f377 100644<br>
   --- a/libcxx/test/libcxx/utilities/optional/block.objc.pass.mm<br>
   +++ b/libcxx/test/libcxx/utilities/optional/block.objc.pass.mm<br>
   @@ -7,6 +7,8 @@<br>
    //===----------------------------------------------------------------------===//<br>
<br>
    // UNSUPPORTED: c++98, c++03, c++11, c++14<br>
   +// REQUIRES: has-fblocks<br>
   +// ADDITIONAL_COMPILE_FLAGS: -fblocks<br>
<br>
    // <optional><br>
<br>
<br>
   diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py<br>
   index 20d0a796a3af..0a5f62eefe30 100644<br>
   --- a/libcxx/utils/libcxx/test/config.py<br>
   +++ b/libcxx/utils/libcxx/test/config.py<br>
   @@ -6,6 +6,7 @@<br>
    #<br>
    #===----------------------------------------------------------------------===##<br>
<br>
   +import copy<br>
    import locale<br>
    import os<br>
    import platform<br>
   @@ -149,6 +150,8 @@ def configure(self):<br>
            self.configure_coverage()<br>
            self.configure_modules()<br>
            self.configure_coroutines()<br>
   +        self.configure_blocks()<br>
   +        self.configure_objc_arc()<br>
            self.configure_substitutions()<br>
            self.configure_features()<br>
<br>
   @@ -987,6 +990,16 @@ def configure_coroutines(self):<br>
                if intMacroValue(macros['__cpp_coroutines']) >= 201703:<br>
                    self.config.available_features.add('fcoroutines-ts')<br>
<br>
   +    def configure_blocks(self):<br>
   +        if self.cxx.hasCompileFlag('-fblocks'):<br>
   +            self.config.available_features.add('has-fblocks')<br>
   +<br>
   +    def configure_objc_arc(self):<br>
   +        cxx = copy.deepcopy(self.cxx)<br>
   +        cxx.source_lang = 'objective-c++'<br>
   +        if cxx.hasCompileFlag('-fobjc-arc'):<br>
   +            self.config.available_features.add('has-fobjc-arc')<br>
   +<br>
        def configure_modules(self):<br>
            modules_flags = ['-fmodules']<br>
            if not self.target_info.is_darwin():<br>
<br>
<br>
<br>
   _______________________________________________<br>
   libcxx-commits mailing list<br>
   <a href="mailto:libcxx-commits@lists.llvm.org">libcxx-commits@lists.llvm.org</a><br>
   </span><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=WrGGZgQwQdGbIJlkwYK5We3mB6G7BX5Lei0LseLjse4&s=e_OBmVPWyRQ-yAI1s47eBm8NTT3Y8zV926MFYA_PG_0&e="><span style="font-size:9.0pt;font-family:Helvetica">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_libcxx-2Dcommits&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=WrGGZgQwQdGbIJlkwYK5We3mB6G7BX5Lei0LseLjse4&s=e_OBmVPWyRQ-yAI1s47eBm8NTT3Y8zV926MFYA_PG_0&e=</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>