From f83bb60b08c9f9150aefdd6921e0c8b2f22e51f2 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Mon, 25 Mar 2024 18:11:02 +0100 Subject: [PATCH] Makefile: Fix libFuzzer target -DCMAKE_BUILD_TYPE=Asan doesn't seem to work. Pass sanitizer flags manually. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3e7cebe69..0759e95d1 100644 --- a/Makefile +++ b/Makefile @@ -89,9 +89,10 @@ afl: $(CMARK) $(CMARK_OPTS) libFuzzer: - CC=clang CXX=clang++ cmake -S . -B $(BUILDDIR) \ - -DCMAKE_BUILD_TYPE=Asan \ - -DCMARK_LIB_FUZZER=ON + CC=clang CXX=clang++ \ + CFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address \ + cmake -S . -B $(BUILDDIR) \ + -DCMARK_LIB_FUZZER=ON cmake --build $(BUILDDIR) mkdir -p fuzz/corpus $(BUILDDIR)/fuzz/cmark-fuzz \