Skip to content

Commit 72a583b

Browse files
yingcong-wuKornevNikita
authored andcommitted
[compiler-rt][builtins] Add missing flag for builtins standalone build (#133046)
When builtins are built with runtimes, it is built before compiler-rt, and this makes some of the HAS_XXX_FLAGs missing. In this case, the COMPILER_RT_HAS_FCF_PROTECTION_FLAG is missing which makes it impossible to enable CET in this case. This patch addresses this issue by also check for such flag in standalone build instead of relying on the compiler-rt's detection.
1 parent 7b5051e commit 72a583b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler-rt/cmake/builtin-config-ix.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ builtin_check_c_compiler_flag(-fconvergent-functions COMPILER_RT_HAS_FCONVERGENT
2525
builtin_check_c_compiler_flag("-Xclang -mcode-object-version=none" COMPILER_RT_HAS_CODE_OBJECT_VERSION_FLAG)
2626
builtin_check_c_compiler_flag(-Wbuiltin-declaration-mismatch COMPILER_RT_HAS_WBUILTIN_DECLARATION_MISMATCH_FLAG)
2727
builtin_check_c_compiler_flag(/Zl COMPILER_RT_HAS_ZL_FLAG)
28+
builtin_check_c_compiler_flag(-fcf-protection=full COMPILER_RT_HAS_FCF_PROTECTION_FLAG)
2829

2930
builtin_check_c_compiler_source(COMPILER_RT_HAS_ATOMIC_KEYWORD
3031
"

0 commit comments

Comments
 (0)