Skip to content

Commit 3e1566d

Browse files
committed
cmake: fix libFuzzer library name
Needed for google/oss-fuzz#14656
1 parent 502f87c commit 3e1566d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmake/LibFuzzer.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ function(SetLibFuzzerPath outvar)
2020
endif ()
2121

2222
SetHwArchString(HW_ARCH)
23-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
23+
# LibFuzzer library in the OSS Fuzz environment has another name.
24+
if (DEFINED ENV{OSS_FUZZ})
25+
set(lib_name "libclang_rt.fuzzer_no_main.a")
26+
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
2427
set(lib_name "libclang_rt.fuzzer_no_main-${HW_ARCH}.a")
2528
else()
2629
message(FATAL_ERROR "Unsupported system: ${CMAKE_SYSTEM_NAME}")

0 commit comments

Comments
 (0)