Skip to content

Commit

Permalink
Clean up some fuzzer-related cruft.
Browse files Browse the repository at this point in the history
The fuzzer can actually be built properly with Clang by overriding
`CXX`, `CXXFLAGS` and `LDFLAGS` as appropriate/desired. The "fake"
build and associated files are no longer useful if they ever were.

Change-Id: Ic47fbdac6ca6e9377fb1eb18ee12dcb2a96abc25
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61970
Reviewed-by: Alex Chernyakhovsky <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Oct 6, 2023
1 parent 76239a9 commit b673de3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 644 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,9 @@ obj/test/regexp_benchmark: obj/libre2.a obj/re2/testing/regexp_benchmark.o $(TES
@mkdir -p obj/test
$(CXX) -o $@ obj/re2/testing/regexp_benchmark.o $(TESTOFILES) -lgtest -lbenchmark -lbenchmark_main obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)

# re2_fuzzer is a target for fuzzers like libFuzzer and AFL. This fake fuzzing
# is simply a way to check that the target builds and then to run it against a
# fixed set of inputs. To perform real fuzzing, refer to the documentation for
# libFuzzer (llvm.org/docs/LibFuzzer.html) and AFL (lcamtuf.coredump.cx/afl/).
obj/test/re2_fuzzer: CXXFLAGS:=-I./re2/fuzzing/compiler-rt/include $(CXXFLAGS)
obj/test/re2_fuzzer: obj/libre2.a obj/re2/fuzzing/re2_fuzzer.o obj/util/fuzz.o
obj/test/re2_fuzzer: obj/libre2.a obj/re2/fuzzing/re2_fuzzer.o
@mkdir -p obj/test
$(CXX) -o $@ obj/re2/fuzzing/re2_fuzzer.o obj/util/fuzz.o obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)
$(CXX) -o $@ obj/re2/fuzzing/re2_fuzzer.o obj/libre2.a $(RE2_LDFLAGS) $(LDFLAGS)

ifdef REBUILD_TABLES
.PRECIOUS: re2/perl_groups.cc
Expand Down
219 changes: 0 additions & 219 deletions re2/fuzzing/compiler-rt/LICENSE

This file was deleted.

Loading

0 comments on commit b673de3

Please sign in to comment.