r190900 - clang-cl: ignore ths /GS- flag

Reid Kleckner rnk at google.com
Tue Sep 17 16:40:38 PDT 2013


Sounds good.  Clang and LLVM have some support for -fstack-protector.  I
wonder how much work it would be to make it compatible with /GS.


On Tue, Sep 17, 2013 at 4:27 PM, Hans Wennborg <hans at hanshq.net> wrote:

> Author: hans
> Date: Tue Sep 17 18:27:39 2013
> New Revision: 190900
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190900&view=rev
> Log:
> clang-cl: ignore ths /GS- flag
>
> The /GS- flag is used to turn off run-time buffer security checks (/GS).
> Since no such checks are enabled in the first place, I think we should just
> ignore this flag.
>
> Modified:
>     cfe/trunk/include/clang/Driver/CLCompatOptions.td
>     cfe/trunk/test/Driver/cl-options.c
>
> Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=190900&r1=190899&r2=190900&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
> +++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Tue Sep 17 18:27:39
> 2013
> @@ -140,6 +140,7 @@ def _SLASH_TP : CLCompileFlag<"TP">, Hel
>
>  def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
>  def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
> +def _SLASH_GS_ : CLIgnoredFlag<"GS-">;
>  def _SLASH_nologo : CLIgnoredFlag<"nologo">;
>  def _SLASH_Ob1 : CLIgnoredFlag<"Ob1">;
>  def _SLASH_Ob2 : CLIgnoredFlag<"Ob2">;
>
> Modified: cfe/trunk/test/Driver/cl-options.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=190900&r1=190899&r2=190900&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/cl-options.c (original)
> +++ cfe/trunk/test/Driver/cl-options.c Tue Sep 17 18:27:39 2013
> @@ -97,7 +97,7 @@
>  // Ignored options. Check that we don't get "unused during compilation"
> errors.
>  // (/Zs is for syntax-only, /WX is for -Werror)
>  // RUN: %clang_cl /Zs /WX /analyze- /errorReport:foo /nologo /Ob1 /Ob2 --
> %s
> -// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t /w12345 /wd1234 /RTC1
> -- %s
> +// RUN: %clang_cl /Zs /WX /Zc:forScope /Zc:wchar_t /w12345 /wd1234 /RTC1
> /GS- -- %s
>
>  // Ignored options and compile-only options are ignored for link jobs.
>  // RUN: touch %t.obj
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130917/541c49c6/attachment.html>


More information about the cfe-commits mailing list