mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-25 20:14:10 +08:00
Move libFuzzer build to Makefile
Now the only thing fuzz_setup.sh does is installing new clang; if system clang supports -fsanitize-coverage then fuzz_setup.sh is not required.
This commit is contained in:
parent
0eb1ddb975
commit
24d1a4562b
9
Makefile
9
Makefile
@ -86,9 +86,14 @@ build/pugixml-%: .FORCE | $(RELEASE)
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
|
||||
$(BUILD)/fuzz_%: tests/fuzz_%.cpp src/pugixml.cpp
|
||||
build/libFuzzer.o:
|
||||
svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer build/Fuzzer
|
||||
ls build/Fuzzer/*.cpp | xargs printf '#include "%s"\n' >build/libFuzzer.cpp
|
||||
clang++ build/libFuzzer.cpp -c -g -O2 -fno-omit-frame-pointer -std=c++11 -I . -o build/libFuzzer.o
|
||||
|
||||
$(BUILD)/fuzz_%: tests/fuzz_%.cpp src/pugixml.cpp build/libFuzzer.o
|
||||
@mkdir -p $(BUILD)
|
||||
clang++ $(CXXFLAGS) -fsanitize=address -fsanitize-coverage=trace-pc-guard $^ libFuzzer.a -o $@
|
||||
clang++ $(CXXFLAGS) -fsanitize=address -fsanitize-coverage=trace-pc-guard $^ -o $@
|
||||
|
||||
$(BUILD)/%.o: %
|
||||
@mkdir -p $(dir $@)
|
||||
|
@ -9,6 +9,3 @@ cd ..
|
||||
clang/clang/scripts/update.py
|
||||
sudo cp -rf third_party/llvm-build/Release+Asserts/lib/* /usr/local/lib/
|
||||
sudo cp -rf third_party/llvm-build/Release+Asserts/bin/* /usr/local/bin
|
||||
|
||||
svn co http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer
|
||||
Fuzzer/build.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user