summaryrefslogtreecommitdiff
path: root/Meta/Lagom/Fuzzers
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2021-07-25 19:37:27 -0600
committerLinus Groh <mail@linusgroh.de>2021-07-29 21:46:25 +0100
commitb6e5117f65afd3ec45b2fb0b51cbea3da43a583f (patch)
tree890634fb988e9c3a27813b4638498fbee46c02ae /Meta/Lagom/Fuzzers
parent38707f4a20c9ac8a389c0c5725b7bca25e62b783 (diff)
downloadserenity-b6e5117f65afd3ec45b2fb0b51cbea3da43a583f.zip
Lagom: Change to shared library build for all Lagom code
Split the Lagom build into shared libraries to match the Serenity build. This reduces the cognitive load when trying to edit the Lagom CMakeLists significantly. It also reduces the amount of source files that must be compiled to run each test or host program significantly. Also re-organize all the build rules into sections. And reorganize the CMakeLists file in general.
Diffstat (limited to 'Meta/Lagom/Fuzzers')
-rw-r--r--Meta/Lagom/Fuzzers/CMakeLists.txt88
1 files changed, 44 insertions, 44 deletions
diff --git a/Meta/Lagom/Fuzzers/CMakeLists.txt b/Meta/Lagom/Fuzzers/CMakeLists.txt
index 4b88ba08a9..6582766ad6 100644
--- a/Meta/Lagom/Fuzzers/CMakeLists.txt
+++ b/Meta/Lagom/Fuzzers/CMakeLists.txt
@@ -3,60 +3,60 @@ function(add_simple_fuzzer name)
if (ENABLE_OSS_FUZZ)
target_link_libraries(${name}
- PUBLIC Lagom)
+ PUBLIC {$ARGN} LagomCore)
else()
target_compile_options(${name}
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize=fuzzer>
)
target_link_libraries(${name}
- PUBLIC Lagom
+ PUBLIC ${ARGN} LagomCore
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize=fuzzer>
)
endif()
endfunction()
-add_simple_fuzzer(FuzzBMPLoader)
-add_simple_fuzzer(FuzzCyrillicDecoder)
-add_simple_fuzzer(FuzzDeflateCompression)
-add_simple_fuzzer(FuzzDeflateDecompression)
-add_simple_fuzzer(FuzzELF)
-add_simple_fuzzer(FuzzFlacLoader)
-add_simple_fuzzer(FuzzGemini)
-add_simple_fuzzer(FuzzGIFLoader)
-add_simple_fuzzer(FuzzGzipCompression)
-add_simple_fuzzer(FuzzGzipDecompression)
-add_simple_fuzzer(FuzzICOLoader)
-add_simple_fuzzer(FuzzJPGLoader)
-add_simple_fuzzer(FuzzMD5)
-add_simple_fuzzer(FuzzPNGLoader)
-add_simple_fuzzer(FuzzPBMLoader)
-add_simple_fuzzer(FuzzPGMLoader)
-add_simple_fuzzer(FuzzPPMLoader)
-add_simple_fuzzer(FuzzQuotedPrintableParser)
-add_simple_fuzzer(FuzzHebrewDecoder)
-add_simple_fuzzer(FuzzHttpRequest)
-add_simple_fuzzer(FuzzIMAPParser)
-add_simple_fuzzer(FuzzJs)
-add_simple_fuzzer(FuzzLatin1Decoder)
-add_simple_fuzzer(FuzzLatin2Decoder)
-add_simple_fuzzer(FuzzMarkdown)
-add_simple_fuzzer(FuzzRegexECMA262)
-add_simple_fuzzer(FuzzRegexPosixBasic)
-add_simple_fuzzer(FuzzRegexPosixExtended)
-add_simple_fuzzer(FuzzSHA1)
-add_simple_fuzzer(FuzzSHA256)
-add_simple_fuzzer(FuzzSHA384)
-add_simple_fuzzer(FuzzSHA512)
-add_simple_fuzzer(FuzzShell)
-add_simple_fuzzer(FuzzSQLParser)
-add_simple_fuzzer(FuzzTTF)
+add_simple_fuzzer(FuzzBMPLoader LagomGfx)
+add_simple_fuzzer(FuzzCyrillicDecoder LagomTextCodec)
+add_simple_fuzzer(FuzzDeflateCompression LagomCompress)
+add_simple_fuzzer(FuzzDeflateDecompression LagomCompress)
+add_simple_fuzzer(FuzzELF LagomELF)
+add_simple_fuzzer(FuzzFlacLoader LagomAudio)
+add_simple_fuzzer(FuzzGemini LagomGemini)
+add_simple_fuzzer(FuzzGIFLoader LagomGfx)
+add_simple_fuzzer(FuzzGzipCompression LagomCompress)
+add_simple_fuzzer(FuzzGzipDecompression LagomCompress)
+add_simple_fuzzer(FuzzICOLoader LagomGfx)
+add_simple_fuzzer(FuzzJPGLoader LagomGfx)
+add_simple_fuzzer(FuzzMD5 LagomCrypto)
+add_simple_fuzzer(FuzzPNGLoader LagomGfx)
+add_simple_fuzzer(FuzzPBMLoader LagomGfx)
+add_simple_fuzzer(FuzzPGMLoader LagomGfx)
+add_simple_fuzzer(FuzzPPMLoader LagomGfx)
+add_simple_fuzzer(FuzzQuotedPrintableParser LagomIMAP)
+add_simple_fuzzer(FuzzHebrewDecoder LagomTextCodec)
+add_simple_fuzzer(FuzzHttpRequest LagomHTTP)
+add_simple_fuzzer(FuzzIMAPParser LagomIMAP)
+add_simple_fuzzer(FuzzJs LagomJS)
+add_simple_fuzzer(FuzzLatin1Decoder LagomTextCodec)
+add_simple_fuzzer(FuzzLatin2Decoder LagomTextCodec)
+add_simple_fuzzer(FuzzMarkdown LagomMarkdown)
+add_simple_fuzzer(FuzzRegexECMA262 LagomRegex)
+add_simple_fuzzer(FuzzRegexPosixBasic LagomRegex)
+add_simple_fuzzer(FuzzRegexPosixExtended LagomRegex)
+add_simple_fuzzer(FuzzSHA1 LagomCrypto)
+add_simple_fuzzer(FuzzSHA256 LagomCrypto)
+add_simple_fuzzer(FuzzSHA384 LagomCrypto)
+add_simple_fuzzer(FuzzSHA512 LagomCrypto)
+add_simple_fuzzer(FuzzShell LagomShell)
+add_simple_fuzzer(FuzzSQLParser LagomSQL)
+add_simple_fuzzer(FuzzTTF LagomGfx)
add_simple_fuzzer(FuzzURL)
-add_simple_fuzzer(FuzzUTF16BEDecoder)
-add_simple_fuzzer(FuzzRSAKeyParsing)
-add_simple_fuzzer(FuzzWAVLoader)
-add_simple_fuzzer(FuzzWasmParser)
-add_simple_fuzzer(FuzzZip)
-add_simple_fuzzer(FuzzZlibDecompression)
+add_simple_fuzzer(FuzzUTF16BEDecoder LagomTextCodec)
+add_simple_fuzzer(FuzzRSAKeyParsing LagomCrypto)
+add_simple_fuzzer(FuzzWAVLoader LagomAudio)
+add_simple_fuzzer(FuzzWasmParser LagomWasm)
+add_simple_fuzzer(FuzzZip LagomArchive)
+add_simple_fuzzer(FuzzZlibDecompression LagomCompress)
if (NOT ENABLE_OSS_FUZZ)
set(CMAKE_EXE_LINKER_FLAGS "${ORIGINAL_CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
@@ -67,7 +67,7 @@ target_compile_options(FuzzilliJs
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-g -O1 -fsanitize-coverage=trace-pc-guard>
)
target_link_libraries(FuzzilliJs
- PUBLIC Lagom
+ PUBLIC LagomCore LagomJS
PRIVATE $<$<CXX_COMPILER_ID:Clang>:-fsanitize-coverage=trace-pc-guard>
)
endif()