Kernel: Enable -fzero-call-used-regs=used-gpr on RISC-V Clang

This is now supported by Clang trunk.
This commit is contained in:
Lucas Chollet committed 2026-10-12 09:21:47 +02:00
1 parent 955b48fa3a
commit 268cbe22a6
1 file changed
+1 -4
+1 -4
View File
@@ -721,10 +721,7 @@ add_compile_options(-nostdlib)
add_compile_options(-ftrivial-auto-var-init=pattern)
# Zero any registers used within a function on return (to reduce data lifetime and ROP gadgets).
# This is not implemented for RISC-V on Clang.
if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND "${SERENITY_ARCH}" STREQUAL "riscv64"))
add_compile_options(-fzero-call-used-regs=used-gpr)
endif()
add_compile_options(-fzero-call-used-regs=used-gpr)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(TARGET_STRING "")