aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2024-05-02 08:12:10 +0200
committerDmitry Vyukov <dvyukov@google.com>2024-05-03 14:25:58 +0000
commita3ce1723b2f8f690652d181a96344ab9b1c438a4 (patch)
treec4af820c0af46d89d3feb229402fa58b31b6f08e /Makefile
parente0545e264c6343d00dc5fba031daaa4ed8688713 (diff)
pkg/flatrpc: add schema
Add schema for manager<->fuzzer communication. We may need to change things when we start to use this, but this serves as a proof of concept that we can express things that we need in flatbuffers.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0f47e9389..0990b00ee 100644
--- a/Makefile
+++ b/Makefile
@@ -103,7 +103,7 @@ endif
execprog mutate prog2c trace2syz stress repro upgrade db \
usbgen symbolize cover kconf syz-build crush \
bin/syz-extract bin/syz-fmt \
- extract generate generate_go generate_sys \
+ extract generate generate_go generate_rpc generate_sys \
format format_go format_cpp format_sys \
tidy test test_race \
check_copyright check_language check_whitespace check_links check_diff check_commits check_shebang \
@@ -239,12 +239,18 @@ bin/syz-extract:
generate:
$(MAKE) descriptions
$(MAKE) generate_go
+ $(MAKE) generate_rpc
$(MAKE) format
generate_go: format_cpp
$(GO) generate ./pkg/csource ./executor ./pkg/ifuzz ./pkg/build
$(GO) generate ./vm/proxyapp
+generate_rpc:
+ flatc -o pkg/flatrpc --warnings-as-errors --gen-object-api --filename-suffix "" --go --gen-onefile --go-namespace flatrpc pkg/flatrpc/flatrpc.fbs
+ flatc -o pkg/flatrpc --warnings-as-errors --gen-object-api --filename-suffix "" --cpp --scoped-enums pkg/flatrpc/flatrpc.fbs
+ $(GO) fmt ./pkg/flatrpc/flatrpc.go
+
generate_fidl:
ifeq ($(TARGETOS),fuchsia)
$(HOSTGO) generate ./sys/fuchsia
@@ -410,6 +416,7 @@ install_prerequisites:
[ -z "$(shell which python)" -a -n "$(shell which python3)" ] && sudo apt-get install -y -q python-is-python3 || true
sudo apt-get install -y -q clang-tidy || true
sudo apt-get install -y -q clang clang-format ragel
+ sudo apt-get install -y -q flatbuffers-compiler libflatbuffers-dev
GO111MODULE=off go get -u golang.org/x/tools/cmd/goyacc
check_copyright: