Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-03-10 20:04:08 +08:00
parent 5395839fbb
commit df8db1ef98
1 changed files with 2 additions and 1 deletions

View File

@ -375,6 +375,7 @@ function(setup_compile_params)
_USE_MATH_DEFINES # Enable the PI constant define for the math headers.
NOMINMAX # Avoid the Win32 macros conflict with std::min() and std::max().
UNICODE _UNICODE # Use the -W APIs by default.
STRICT # https://learn.microsoft.com/en-us/windows/win32/winprog/enabling-strict
WIN32_LEAN_AND_MEAN WINRT_LEAN_AND_MEAN # Filter out some rarely used headers, to increase compilation speed.
)
target_compile_options(${__target} PRIVATE
@ -531,7 +532,7 @@ function(setup_compile_params)
$<$<NOT:$<CONFIG:Debug>>:-mguard=cf>
)
target_link_options(${__target} PRIVATE
$<$<NOT:$<CONFIG:Debug>>:-Wl,--guard-cf>
$<$<NOT:$<CONFIG:Debug>>:-Wl,-mguard=cf>
)
else()
# AppleClang says x86 doesn't support -fsanitize=cfi -fsanitize-cfi-cross-dso, why?