r337746 - [clang-cl] Expose -fblocks and -fno-builtin as driver flags
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 25 04:38:47 PDT 2018
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?
On Mon, Jul 23, 2018 at 5:29 PM Reid Kleckner via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: rnk
> Date: Mon Jul 23 14:29:43 2018
> New Revision: 337746
>
> URL: http://llvm.org/viewvc/llvm-project?rev=337746&view=rev
> Log:
> [clang-cl] Expose -fblocks and -fno-builtin as driver flags
>
> Users have requested them.
>
> Helps with PR36427.
>
> Modified:
> cfe/trunk/include/clang/Driver/Options.td
> cfe/trunk/test/Driver/cl-options.c
>
> Modified: cfe/trunk/include/clang/Driver/Options.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=337746&r1=337745&r2=337746&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/Options.td (original)
> +++ cfe/trunk/include/clang/Driver/Options.td Mon Jul 23 14:29:43 2018
> @@ -762,12 +762,12 @@ def faddrsig : Flag<["-"], "faddrsig">,
> HelpText<"Emit an address-significance table">;
> def fno_addrsig : Flag<["-"], "fno-addrsig">, Group<f_Group>,
> Flags<[CoreOption]>,
> HelpText<"Don't emit an address-significance table">;
> -def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CC1Option]>,
> +def fblocks : Flag<["-"], "fblocks">, Group<f_Group>, Flags<[CoreOption,
> CC1Option]>,
> HelpText<"Enable the 'blocks' language feature">;
> def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
> def fborland_extensions : Flag<["-"], "fborland-extensions">,
> Group<f_Group>, Flags<[CC1Option]>,
> HelpText<"Accept non-standard constructs supported by the Borland
> compiler">;
> -def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>;
> +def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>,
> Flags<[CoreOption]>;
> def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">,
> Group<f_Group>,
> Flags<[DriverOption]>, HelpText<"Load the clang builtins module map
> file.">;
> def fcaret_diagnostics : Flag<["-"], "fcaret-diagnostics">,
> Group<f_Group>;
> @@ -1320,11 +1320,11 @@ def fno_asynchronous_unwind_tables : Fla
> def fno_assume_sane_operator_new : Flag<["-"],
> "fno-assume-sane-operator-new">, Group<f_Group>,
> HelpText<"Don't assume that C++'s global operator new can't alias any
> pointer">,
> Flags<[CC1Option]>;
> -def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>;
> +def fno_blocks : Flag<["-"], "fno-blocks">, Group<f_Group>,
> Flags<[CoreOption]>;
> def fno_borland_extensions : Flag<["-"], "fno-borland-extensions">,
> Group<f_Group>;
> -def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>,
> Flags<[CC1Option]>,
> +def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>,
> Flags<[CC1Option, CoreOption]>,
> HelpText<"Disable implicit builtin knowledge of functions">;
> -def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>,
> Flags<[CC1Option]>,
> +def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>,
> Flags<[CC1Option, CoreOption]>,
> HelpText<"Disable implicit builtin knowledge of a specific function">;
> def fno_caret_diagnostics : Flag<["-"], "fno-caret-diagnostics">,
> Group<f_Group>,
> Flags<[CC1Option]>;
>
> Modified: cfe/trunk/test/Driver/cl-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=337746&r1=337745&r2=337746&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/cl-options.c (original)
> +++ cfe/trunk/test/Driver/cl-options.c Mon Jul 23 14:29:43 2018
> @@ -565,6 +565,11 @@
> // (/Zs is for syntax-only, -Werror makes it fail hard on unknown options)
> // RUN: %clang_cl \
> // RUN: --driver-mode=cl \
> +// RUN: -fblocks \
> +// RUN: -fno-blocks \
> +// RUN: -fbuiltin \
> +// RUN: -fno-builtin \
> +// RUN: -fno-builtin-strcpy \
> // RUN: -fcolor-diagnostics \
> // RUN: -fno-color-diagnostics \
> // RUN: -fcoverage-mapping \
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180725/81304c65/attachment-0001.html>
More information about the cfe-commits
mailing list