[PATCH] D52499: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 26 05:33:03 PDT 2018


hans added inline comments.


================
Comment at: include/clang/Driver/CLCompatOptions.td:94
+def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
+  Alias<mstack_probe_size>, AliasArgs<["4096"]>;
 def _SLASH_Gs : CLJoined<"Gs">,
----------------
thakis wrote:
> https://docs.microsoft.com/en-us/cpp/build/reference/gs-control-stack-checking-calls?view=vs-2017 still claims that /Gs is /Gs0 though. Is that just wrong? https://bugs.llvm.org/show_bug.cgi?id=39074#c2 suggests it is. Should we ask bruce to file a doc bug?
> 
> And since this flag is supposed to get the default behavior, should it be a CLIgnoredFlag instead of duplicating the 4096 somewhat redundantly?
I've submitted feedback on the document page: https://github.com/MicrosoftDocs/cpp-docs/issues/445

By not ignoring it, we enable using /Gs to override a previous e.g. /Gs0 flag, which I think is the correct thing to do.


Repository:
  rL LLVM

https://reviews.llvm.org/D52499





More information about the llvm-commits mailing list