diff options
author | Zach Johnson <zachoverflow@google.com> | 2020-11-06 11:56:27 -0800 |
---|---|---|
committer | Zach Johnson <zachoverflow@google.com> | 2020-11-11 12:09:26 -0800 |
commit | 3df4e6364bd23f1cae55efc1e709a5f6905c985d (patch) | |
tree | f6693ef1ef32f8a8ae693995cfe6106ebe02678c /rust/testing.go | |
parent | 40c9798e92c30927b1d5e1eae87486ad593cca87 (diff) |
rust_grpcio well known types support, default deps
The usage of the well known type Empty requires a hack in the module
above the grpc implementation, this is now the generated stem_mod.rs
This also adds additional implicit dependencies that are required by
the grpc protobuf generated code. This includes the addition of a
'header_libs' property for library dependencies which export include
paths required by protos.
We also now include both the protos and the grpcio in the library
variant via the mod_stem.rs.
Bug: 172592789
Bug: 171504899
Test: m nothing
Test: Example rust_grpcio module build command includes dependencies,
include paths.
Change-Id: I187a13cd5cdea991828a1020314de16727e4f74e
Diffstat (limited to 'rust/testing.go')
-rw-r--r-- | rust/testing.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rust/testing.go b/rust/testing.go index 4a1894c05..40015663a 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -79,6 +79,13 @@ func GatherRequiredDepsForTest() string { nocrt: true, system_shared_libs: [], } + cc_library { + name: "libprotobuf-cpp-full", + no_libcrt: true, + nocrt: true, + system_shared_libs: [], + export_include_dirs: ["libprotobuf-cpp-full-includes"], + } rust_library { name: "libstd", crate_name: "std", @@ -103,6 +110,18 @@ func GatherRequiredDepsForTest() string { srcs: ["foo.rs"], host_supported: true, } + rust_library { + name: "libgrpcio", + crate_name: "grpcio", + srcs: ["foo.rs"], + host_supported: true, + } + rust_library { + name: "libfutures", + crate_name: "futures", + srcs: ["foo.rs"], + host_supported: true, + } ` + cc.GatherRequiredDepsForTest(android.NoOsType) return bp |