mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Kernel: Enable -fzero-call-used-regs=used-gpr on RISC-V Clang
This is now supported by Clang trunk.
This commit is contained in:
1 parent
955b48fa3a
commit
268cbe22a6
1 file changed
+1
-4
@@ -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 "")
|
||||
|
||||
Reference in new issue
Block a user