Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2023-02-15 16:49:57 +08:00
parent 2e1201c182
commit bf628d3eaf
1 changed files with 6 additions and 1 deletions

View File

@ -500,9 +500,14 @@ function(setup_compile_params)
if(MINGW)
# Currently not supported.
else()
set(__prefix)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(__prefix "-Wa,")
endif()
target_compile_options(${__target} PRIVATE
$<$<NOT:$<CONFIG:Debug>>:-mbranches-within-32B-boundaries>
$<$<NOT:$<CONFIG:Debug>>:${__prefix}-mbranches-within-32B-boundaries>
)
unset(__prefix)
endif()
endif()
if(COM_ARGS_CFGUARD)