Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using sanitizer runtimes on RISC-V #564

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
4 changes: 3 additions & 1 deletion compiler-rt/cmake/builtin-config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ set(MIPS_CHERI_PURECAP mips64c128)
set(PPC32 powerpc)
set(PPC64 powerpc64 powerpc64le)
set(RISCV32 riscv32)
set(RISCV32_PURECAP riscv32c)
set(RISCV64 riscv64)
set(RISCV64_PURECAP riscv64c)
set(SPARC sparc)
set(SPARCV9 sparcv9)
set(WASM32 wasm32)
Expand All @@ -63,7 +65,7 @@ endif()
set(ALL_BUILTIN_SUPPORTED_ARCH
${X86} ${X86_64} ${ARM32} ${ARM64}
${HEXAGON} ${MIPS32} ${MIPS64} ${MIPS_CHERI_PURECAP} ${PPC32} ${PPC64}
${RISCV32} ${RISCV64} ${SPARC} ${SPARCV9}
${RISCV32} ${RISCV32_PURECAP} ${RISCV64} ${RISCV64_PURECAP} ${SPARC} ${SPARCV9}
${WASM32} ${WASM64} ${VE})

include(CompilerRTUtils)
Expand Down
6 changes: 5 additions & 1 deletion compiler-rt/lib/builtins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ set(mips64_SOURCES ${GENERIC_TF_SOURCES}
set(mips64el_SOURCES ${GENERIC_TF_SOURCES}
${mips_SOURCES})
set(mips64c128_SOURCES ${GENERIC_TF_SOURCES} ${mips_SOURCES})
set(mips64c256_SOURCES ${GENERIC_TF_SOURCES} ${mips_SOURCES})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You won't be missed...



set(powerpc_SOURCES ${GENERIC_SOURCES})
Expand Down Expand Up @@ -645,10 +644,15 @@ set(riscv32_SOURCES
riscv/mulsi3.S
${riscv_SOURCES}
)
set(riscv32c_SOURCES ${riscv64_SOURCES})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy-paste error, though the lists happen to be the same

set(riscv64_SOURCES
riscv/muldi3.S
${riscv_SOURCES}
)
set(riscv64c_SOURCES ${riscv64_SOURCES})
# save.S and restore.S need https://github.com/CTSRD-CHERI/llvm-project/pull/533
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can drop this now

list(REMOVE_ITEM riscv32c_SOURCES riscv/save.S riscv/restore.S)
list(REMOVE_ITEM riscv64c_SOURCES riscv/save.S riscv/restore.S)

set(sparc_SOURCES ${GENERIC_SOURCES} ${GENERIC_TF_SOURCES})
set(sparcv9_SOURCES ${GENERIC_SOURCES} ${GENERIC_TF_SOURCES})
Expand Down