[CMake][fuzzer] Add riscv64 to fuzzer supported arch list
authorEli Kobrin <kobrineli@star.intra.ispras.ru>
Fri, 12 May 2023 01:33:44 +0000 (18:33 -0700)
committerFangrui Song <i@maskray.me>
Fri, 12 May 2023 01:33:44 +0000 (18:33 -0700)
I tried to build libFuzzer for RISC-V and succeeded. All the libFuzzer
targets were successfully built. I tested this on the small hello world code
with a few branches to check the instrumentation; all of them were covered by
libFuzzer on RISC-V arch. So I suppose it makes sense to enable libFuzzer
build for RISC-V.

Reviewed By: phosek, thetruestblue, MaskRay

Differential Revision: https://reviews.llvm.org/D147788

compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake

index 99d672d..3892dd7 100644 (file)
@@ -38,7 +38,8 @@ else()
 endif()
 
 if(OS_NAME MATCHES "Linux")
-  set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${S390X})
+  set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64} ${S390X}
+      ${RISCV64})
 elseif (OS_NAME MATCHES "Windows")
   set(ALL_FUZZER_SUPPORTED_ARCH ${X86} ${X86_64})
 elseif(OS_NAME MATCHES "Android")