This revision was automatically updated to reflect the committed changes. Closed by commit rL343077: [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074) (authored by hans, committed by ). Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D52499?vs=166918&id=167058#toc Repository: rL LLVM https://reviews.llvm.org/D52499 Files: cfe/trunk/include/clang/Driver/CLCompatOptions.td cfe/trunk/test/Driver/cl-options.c Index: cfe/trunk/include/clang/Driver/CLCompatOptions.td =================================================================== --- cfe/trunk/include/clang/Driver/CLCompatOptions.td +++ cfe/trunk/include/clang/Driver/CLCompatOptions.td @@ -90,8 +90,8 @@ Alias<fwritable_strings>; 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<mstack_probe_size>, AliasArgs<["0"]>; +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias<mstack_probe_size>, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; 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<O0>, 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: cfe/trunk/test/Driver/cl-options.c =================================================================== --- cfe/trunk/test/Driver/cl-options.c +++ cfe/trunk/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
Index: cfe/trunk/include/clang/Driver/CLCompatOptions.td =================================================================== --- cfe/trunk/include/clang/Driver/CLCompatOptions.td +++ cfe/trunk/include/clang/Driver/CLCompatOptions.td @@ -90,8 +90,8 @@ Alias<fwritable_strings>; 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<mstack_probe_size>, AliasArgs<["0"]>; +def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">, + Alias<mstack_probe_size>, AliasArgs<["4096"]>; def _SLASH_Gs : CLJoined<"Gs">, HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>; 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<O0>, 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: cfe/trunk/test/Driver/cl-options.c =================================================================== --- cfe/trunk/test/Driver/cl-options.c +++ cfe/trunk/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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits