Fix minsize optimization for vs backend

Fixes #12265
This commit is contained in:
Charles Brunet 2024-01-10 14:35:19 -05:00 committed by Nirbheek Chauhan
parent 80ed1dfa7f
commit 9659a8e6cf
1 changed files with 1 additions and 1 deletions

View File

@ -1368,7 +1368,7 @@ class Vs2010Backend(backends.Backend):
elif '/Ob2' in o_flags:
ET.SubElement(clconf, 'InlineFunctionExpansion').text = 'AnySuitable'
# Size-preserving flags
if '/Os' in o_flags:
if '/Os' in o_flags or '/O1' in o_flags:
ET.SubElement(clconf, 'FavorSizeOrSpeed').text = 'Size'
# Note: setting FavorSizeOrSpeed with clang-cl conflicts with /Od and can make debugging difficult, so don't.
elif '/Od' not in o_flags: