mirror of https://github.com/OpenTTD/OpenTTD
Codechange: use -fno-strict-enums instead of -fno-tree-vrp (#13369)
-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/13425/head
parent
1cba62faaf
commit
4e82091f92
|
@ -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>"
|
||||||
|
|
Loading…
Reference in New Issue