diff --git a/Misc/NEWS.d/next/Windows/2026-09-19-13-18-48.gh-issue-157789.o6-rmo.rst b/Misc/NEWS.d/next/Windows/2026-09-19-13-18-48.gh-issue-157789.o6-rmo.rst new file mode 100644 index 00000000000000..f7f998b9eced36 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2026-09-19-13-18-48.gh-issue-157789.o6-rmo.rst @@ -0,0 +1,2 @@ +Use compiler option ``-Og`` in case of clang-cl debug builds on Windows to +reduce stack usage. Patch by Chris Eibl. diff --git a/PCbuild/pyproject-clangcl.props b/PCbuild/pyproject-clangcl.props index 70a81ca7da306c..14843f18823ca9 100644 --- a/PCbuild/pyproject-clangcl.props +++ b/PCbuild/pyproject-clangcl.props @@ -50,6 +50,7 @@ -m32 %(AdditionalOptions) -m64 %(AdditionalOptions) -flto=thin %(AdditionalOptions) + %(AdditionalOptions) -Xclang -Og -fprofile-instr-generate=$(_CLANG_PROFILE_PATH)$(TargetName)_%m.profraw %(AdditionalOptions) -fprofile-instr-use=$(OutDir)instrumented\profdata.profdata -Wno-profile-instr-unprofiled %(AdditionalOptions)