Reduce memory footprint 75% for cpp library
Prefer c++17
Bug: 160434478
Test: Manually verify operational and memory footprint
Change-Id: I3128e00a86cf5991eb4758952a9b9b1e3ffbfb11
diff --git a/Android.bp b/Android.bp
index 26b442b..c41f518 100644
--- a/Android.bp
+++ b/Android.bp
@@ -62,17 +62,18 @@
cc_library {
name: "libflatbuffers-cpp",
export_include_dirs: ["include"],
+ cpp_std: "c++17",
host_supported: true,
local_include_dirs: [
- "grpc",
"include",
],
srcs: [
- "src/*.cpp",
- "grpc/src/compiler/*.cc",
- ],
- exclude_srcs: [
- "src/flathash.cpp",
+ "src/code_generators.cpp",
+ "src/idl_gen_fbs.cpp",
+ "src/idl_gen_text.cpp",
+ "src/idl_parser.cpp",
+ "src/reflection.cpp",
+ "src/util.cpp",
],
apex_available: [
"//apex_available:platform",