1
0
Fork 0

Codechange: use -fno-strict-enums instead of -fno-tree-vrp

-fno-tree-vrp is essentially a GCC implementation detail which controls
a powerful source of optimisation information. The linked GCC bug from 2010(!)
shows that -fno-strict-enums was added in response to the bug report, and
we can use that instead. Clang supports it too. Use that instead for both
GCC and (newly) Clang.
pull/13369/head
Sam James 2025-01-23 23:02:15 +00:00 committed by Patric Stout
parent 5664b1e2f6
commit 0662c654c3
1 changed files with 4 additions and 4 deletions

View File

@ -80,6 +80,10 @@ macro(compile_flags)
# We use 'ABCD' multichar for SaveLoad chunks identifiers # We use 'ABCD' multichar for SaveLoad chunks identifiers
-Wno-multichar -Wno-multichar
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680 and PR#5246.
-fno-strict-enums
) )
# Ninja processes the output so the output from the compiler # Ninja processes the output so the output from the compiler
@ -106,10 +110,6 @@ macro(compile_flags)
# about its own optimized code in some places. # about its own optimized code in some places.
"-fno-strict-overflow" "-fno-strict-overflow"
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680
"-fno-tree-vrp"
# -flifetime-dse=2 (default since GCC 6) doesn't play # -flifetime-dse=2 (default since GCC 6) doesn't play
# well with our custom pool item allocator # well with our custom pool item allocator
"$<$<BOOL:${LIFETIME_DSE_FOUND}>:-flifetime-dse=1>" "$<$<BOOL:${LIFETIME_DSE_FOUND}>:-flifetime-dse=1>"