Further improve error handling in BOLT by reporting `RewriteInstance` errors in a library and fuzzer-friendly way instead of exiting. Follow-up to D119658 Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D120224
This adds a target that would consume random binary as an input ELF file. TBD: add structured input support (ELF). Build: ``` cmake /path/to/llvm-project/llvm -GNinja \ -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_ASSERTIONS=1 \ -DCMAKE_C_COMPILER=<sanitizer-capable clang> \ -DCMAKE_CXX_COMPILER=<sanitizer-capable clang++> \ -DLLVM_ENABLE_PROJECTS="bolt" \ -DLLVM_USE_SANITIZER=Address \ -DLLVM_USE_SANITIZE_COVERAGE=On ninja llvm-bolt-fuzzer ``` Test Plan: ninja llvm-bolt-fuzzer Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D120016