Compare commits

..

No commits in common. "5f12a4139373e99fc8d594587e06658ebc9db726" and "9c52a5c00401925975019cbefb2805d68b59807c" have entirely different histories.

1 changed files with 4 additions and 15 deletions

View File

@ -698,10 +698,7 @@ function(setup_compile_params)
) )
if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
target_compile_options(${__target} PRIVATE target_compile_options(${__target} PRIVATE
# NOTE: /bigobj /FS /MP /utf-8 $<$<CONFIG:Release>:/fp:fast /GT /Gw /Gy /Oi /Ot /Oy /Zc:inline>
# Don't add "/fp:fast" unless absolutely necessary, because it makes many floating point
# based math calculations give very wrong result, eg: NaN.
/bigobj /FS /MP /utf-8 $<$<CONFIG:Release>:/GT /Gw /Gy /Oi /Ot /Oy /Zc:inline>
) )
if(COM_ARGS_SECURE_CODE) if(COM_ARGS_SECURE_CODE)
target_compile_options(${__target} PRIVATE target_compile_options(${__target} PRIVATE
@ -841,15 +838,8 @@ function(setup_compile_params)
else() else()
target_compile_options(${__target} PRIVATE target_compile_options(${__target} PRIVATE
-fthreadsafe-statics -fthreadsafe-statics
# NOTE #1: $<$<CONFIG:Release>:-fmerge-all-constants -ffp-contract=fast -fomit-frame-pointer
# https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Optimize-Options.html#index-ffp-contract -ffunction-sections -fdata-sections -funroll-all-loops>
# The official documentation tells us that "-ffp-contract=fast" is compiler default,
# does it mean GCC/Clang doesn't have the same math calculation issue with MSVC?
# NOTE #2:
# -fomit-frame-pointer: Enabled by default at -O1 and higher.
# NOTE #3:
# -funroll-all-loops: This usually makes programs run more slowly.
$<$<CONFIG:Release>:-fmerge-all-constants -ffunction-sections -fdata-sections -funroll-loops>
) )
if(APPLE) if(APPLE)
target_link_options(${__target} PRIVATE target_link_options(${__target} PRIVATE
@ -959,8 +949,7 @@ function(setup_compile_params)
-fansi-escape-codes -fansi-escape-codes
/Zc:dllexportInlines- # Do not export inline member functions. This is similar to "-fvisibility-inlines-hidden". /Zc:dllexportInlines- # Do not export inline member functions. This is similar to "-fvisibility-inlines-hidden".
/Zc:char8_t /Zc:sizedDealloc /Zc:strictStrings /Zc:threadSafeInit /Zc:trigraphs /Zc:twoPhase /Zc:char8_t /Zc:sizedDealloc /Zc:strictStrings /Zc:threadSafeInit /Zc:trigraphs /Zc:twoPhase
# No "/fp:fast", same reason as MSVC above. $<$<CONFIG:Release>:/clang:-mbranches-within-32B-boundaries /fp:fast /Gw /Gy /Oi /Ot /Zc:inline>
$<$<CONFIG:Release>:/clang:-mbranches-within-32B-boundaries /Gw /Gy /Oi /Ot /Zc:inline>
) )
if(CMAKE_SIZEOF_VOID_P EQUAL 8) if(CMAKE_SIZEOF_VOID_P EQUAL 8)
target_compile_options(${__target} PRIVATE target_compile_options(${__target} PRIVATE