<div dir="ltr">I thought about adding -fblocks when that thread happened, but since there's no runtime for them that just works exposing it doesn't seem very helpful. Maybe we should instead change the warning text to not suggest -fblocks when building on a non-mac target?</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 23, 2018 at 5:29 PM Reid Kleckner via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rnk<br>
Date: Mon Jul 23 14:29:43 2018<br>
New Revision: 337746<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=337746&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=337746&view=rev</a><br>
Log:<br>
[clang-cl] Expose -fblocks and -fno-builtin as driver flags<br>
<br>
Users have requested them.<br>
<br>
Helps with PR36427.<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/Driver/Options.td<br>
    cfe/trunk/test/Driver/cl-options.c<br>
<br>
Modified: cfe/trunk/include/clang/Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=337746&r1=337745&r2=337746&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=337746&r1=337745&r2=337746&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver/Options.td Mon Jul 23 14:29:43 2018<br>
@@ -762,12 +762,12 @@ def faddrsig : Flag<["-"], "faddrsig">,<br>
   HelpText<"Emit an address-significance table">;<br>
 def fno_addrsig : Flag<["-"], "fno-addrsig">, Group<f_Group>, Flags<[CoreOption]>,<br>
   HelpText<"Don't emit an address-significance table">;<br>
-def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>,<br>
+def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,<br>
   HelpText<"Enable the 'blocks' language feature">;<br>
 def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;<br>
 def fborland_extensions : Flag<["-"], "fborland-extensions">, Group<f_Group>, Flags<[CC1Option]>,<br>
   HelpText<"Accept non-standard constructs supported by the Borland compiler">;<br>
-def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>;<br>
+def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;<br>
 def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,<br>
   Flags<[DriverOption]>, HelpText<"Load the clang builtins module map file.">;<br>
 def fcaret_diagnostics : Flag<["-"], "fcaret-diagnostics">, Group<f_Group>;<br>
@@ -1320,11 +1320,11 @@ def fno_asynchronous_unwind_tables : Fla<br>
 def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,<br>
   HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,<br>
   Flags<[CC1Option]>;<br>
-def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>;<br>
+def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>, Flags<[CoreOption]>;<br>
 def fno_borland_extensions : Flag<["-"], "fno-borland-extensions">, Group<f_Group>;<br>
-def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option]>,<br>
+def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,<br>
   HelpText<"Disable implicit builtin knowledge of functions">;<br>
-def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option]>,<br>
+def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,<br>
   HelpText<"Disable implicit builtin knowledge of a specific function">;<br>
 def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">, Group<f_Group>,<br>
  Flags<[CC1Option]>;<br>
<br>
Modified: cfe/trunk/test/Driver/cl-options.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=337746&r1=337745&r2=337746&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=337746&r1=337745&r2=337746&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/cl-options.c (original)<br>
+++ cfe/trunk/test/Driver/cl-options.c Mon Jul 23 14:29:43 2018<br>
@@ -565,6 +565,11 @@<br>
 // (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)<br>
 // RUN: %clang_cl \<br>
 // RUN:     --driver-mode=cl \<br>
+// RUN:     -fblocks \<br>
+// RUN:     -fno-blocks \<br>
+// RUN:     -fbuiltin \<br>
+// RUN:     -fno-builtin \<br>
+// RUN:     -fno-builtin-strcpy \<br>
 // RUN:     -fcolor-diagnostics \<br>
 // RUN:     -fno-color-diagnostics \<br>
 // RUN:     -fcoverage-mapping \<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">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/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>