[clang] [RISCV][clang] Use fcf-protection flag in Multilib Selection (PR #205202)
Kito Cheng via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 23 18:13:58 PDT 2026
https://github.com/kito-cheng approved this pull request.
The PR itself is fine, but I noticed that clang and gcc handle `-fcf-protection=` in slightly different ways[1]. Clang treats it like a regular option: last-wins, but gcc processes it sequentially. For example:
`march=rv64gc_zicfiss_zicfilp -fcf-protection=branch -fcf-protection=return`
In gcc, it's equivalent to `-fcf-protection=full`, but in clang it's `-fcf-protection=return`.
However I think this should not become blocker for this PR, we may adjust after than once clang align the behavior with gcc for `-fcf-protection=`
[1] https://godbolt.org/z/TqY9hYo8d
https://github.com/llvm/llvm-project/pull/205202
More information about the cfe-commits
mailing list