Index: include/clang/Driver/CLCompatOptions.td =================================================================== --- include/clang/Driver/CLCompatOptions.td +++ include/clang/Driver/CLCompatOptions.td @@ -90,8 +90,8 @@ Alias; def _SLASH_GS : CLFlag<"GS">, HelpText<"Enable buffer security check (default)">; def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">; -// FIXME: Not sure /Gs really means /Gs0 (see PR39074). -def : CLFlag<"Gs">, HelpText<"Same as /Gs0">, Alias, AliasArgs<["0"]>; +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, HelpText<"Set stack probe size (default 4096)">, Alias; def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">, @@ -121,9 +121,9 @@ // FIXME: Not sure why we have -O0 here; MSVC doesn't support that. def : CLFlag<"O0">, Alias, HelpText<"Disable optimization">; def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>, - HelpText<"Optimize for size (equivalent to /Og /Os /Oy /Ob2 /Gs /GF /Gy)">; + HelpText<"Optimize for size (equivalent to /Og /Os /Oy /Ob2 /GF /Gy)">; def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>, - HelpText<"Optimize for speed (equivalent to /Og /Oi /Ot /Oy /Ob2 /Gs /GF /Gy)">; + HelpText<"Optimize for speed (equivalent to /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">; def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>, HelpText<"Disable function inlining">; def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>, Index: test/Driver/cl-options.c =================================================================== --- test/Driver/cl-options.c +++ test/Driver/cl-options.c @@ -101,7 +101,7 @@ // Gy_-NOT: -ffunction-sections // RUN: %clang_cl /Gs -### -- %s 2>&1 | FileCheck -check-prefix=Gs %s -// Gs: "-mstack-probe-size=0" +// Gs: "-mstack-probe-size=4096" // RUN: %clang_cl /Gs0 -### -- %s 2>&1 | FileCheck -check-prefix=Gs0 %s // Gs0: "-mstack-probe-size=0" // RUN: %clang_cl /Gs4096 -### -- %s 2>&1 | FileCheck -check-prefix=Gs4096 %s