summaryrefslogtreecommitdiff
path: root/Makefile.toolchain
diff options
context:
space:
mode:
authorAllen Webb <allenwebb@google.com>2018-08-21 12:05:53 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-09-07 18:36:35 -0700
commite6a13850e9b5a6b2889549c03caddf2944e7fc63 (patch)
tree058c66ade45a699e1dc84a6bf64ebe5595dc52bc /Makefile.toolchain
parenta8e3f2388c0a950ec431e6fffc916b42ea6c816d (diff)
downloadchrome-ec-e6a13850e9b5a6b2889549c03caddf2944e7fc63.tar.gz
Add rules for building protocol buffers.
To facilitate using libprotobuf-mutator in fuzzing targets, rules for generating sources from proto files and compiling those to object files were added. BRANCH=none BUG=chromium:876582 TEST=rm -rf build && make -j buildfuzztests && ./build/host/cr50_fuzz/cr50_fuzz.exe (after cr50_fuzz.proto is added) Change-Id: Id645d0b60397bfeb71d60d601c4f65eefcbdf228 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1184106 Reviewed-by: Mattias Nissler <mnissler@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'Makefile.toolchain')
-rw-r--r--Makefile.toolchain2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 1da81d3461..20a01ebb43 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -42,6 +42,7 @@ PKG_CONFIG?=pkg-config
BUILDCC?=$(CCACHE) gcc
HOSTCC?=$(CCACHE) $(HOST_CROSS_COMPILE)gcc
HOSTCXX?=$(CCACHE) $(HOST_CROSS_COMPILE)g++
+PROTOC?=protoc
C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign
COMMON_WARN = -Wall -Werror -Wundef -Wno-trigraphs -fno-strict-aliasing \
@@ -93,6 +94,7 @@ CFLAGS+= -fno-delete-null-pointer-checks
CFLAGS+= -fconserve-stack
endif
CFLAGS+= -DCHROMIUM_EC
+CXXFLAGS+=-DPROTOBUF_INLINE_NOT_IN_HEADERS=0
FTDIVERSION=$(shell $(PKG_CONFIG) --modversion libftdi1 2>/dev/null)
ifneq ($(FTDIVERSION),)