Re: [PATCH v2] Update 'make fuzz-all' docs to reflect modern clang
- From
Andrzej Hunt <andrzej@ahunt.org>
- Date
- Mar 8, 2021, 17:05 UTC
- Message-ID
- <defff7a3-2104-4fa1-7750-0b13ca5cdf59@ahunt.org>
- In-Reply-To
- <xmqqlfb2cz8c.fsf@gitster.c.googlers.com>
On 04/03/2021 23:48, Junio C Hamano wrote:>
Show 13 quoted lines
> LIB_FUZZING_ENGINE is used this way in the Makefile: > > $(FUZZ_PROGRAMS): all > $(QUIET_LINK)$(CXX) $(FUZZ_CXXFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \ > $(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@ > > and it is somewhat annoying to see a compiler/linker option that > late on the command line, where readers would expect an object file > or a library archive would appear. It makes me wonder if we should > instead be doing something along the following line: > > - empty LIB_FUZZING_ENGINE by default > - add -fsanitize=fuzzer names to FUZZ_CXXFLAGS
This sounds sensible to me, and will certainly simplify the use of "make fuzz-all" by beginners - although I'm not sure just how useful the change would be since my understanding is that this target is almost exclusively used by oss-fuzz.
However I would prefer to wait for Josh's feedback before making such a change, as he is the owner of oss-fuzz's git integration [1], and as such is most likely to be affected by any changes to this target.
In the meantime I'll prepare an updated patch with a fixed commit message!
[1] https://github.com/google/oss-fuzz/blob/c41e46ffc8bc409bdfde0c0d2c97e1305f0c4106/projects/git/project.yaml#L3