platform_build_soong/rust
Ivan Lozano 43845688bc Allow rust module dependency on SourceProviders.
Allow rust modules to depend on and use generated source code provided
by SourceProvider modules and genrule modules without resorting to
hardcoded output paths.

All generated sources are now copied to a dependent module's
intermediates directory, then OUT_DIR is set to point to that path when
calling rustc. This matches the common convention used in most rust
crates to include generated source code from the path defined in the
OUT_DIR environment variable.

A couple other small notable changes are included in this CL:

* prebuiltLibraries can no longer include generated source files as they
  should be prebuilt.
* srcPathFromModuleSrcs now excludes the main source file from the
  second return value so its a list of only the generated sources.

Bug: 159064919
Test: Local example rust_library compiles with rust_bindgen dependency.
Test: Local example rust_library compiles with genrule dependency.
Test: Collision detected when multiple providers produce similar output.
Test: New Soong tests pass.
Change-Id: I59f54a25368c680b9086420c47ec24ab8cd1de6b
2020-07-20 13:40:31 -04:00
..
config rust: Change default variants 2020-07-01 11:27:12 -07:00
Android.bp Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00
androidmk.go Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00
binary.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
binary_test.go Add rust_test and rust_test_host. 2019-10-29 17:19:03 -07:00
bindgen.go Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00
bindgen_test.go Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00
builder.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
clippy.go Add clippy-driver build rule 2020-06-26 13:31:21 +02:00
clippy_test.go rust: Change default variants 2020-07-01 11:27:12 -07:00
compiler.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
compiler_test.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
coverage.go Remove moduleContextImpl struct 2020-06-24 11:56:33 +02:00
coverage_test.go rust: Change default variants 2020-07-01 11:27:12 -07:00
library.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
library_test.go rust: Add rustlibs auto dependency selection 2020-07-01 11:27:12 -07:00
OWNERS Add Matt to OWNERS for Rust 2020-06-26 09:23:47 +02:00
prebuilt.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
proc_macro.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
project_json.go [Rust] Remove unused variables and deduplicate. 2020-06-16 10:28:25 -04:00
project_json_test.go Add rust-project.json generator 2020-06-11 11:22:31 +02:00
rust.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
rust_test.go Allow rust module dependency on SourceProviders. 2020-07-20 13:40:31 -04:00
source_provider.go Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00
test.go rust: Add rustlibs auto dependency selection 2020-07-01 11:27:12 -07:00
test_test.go Make rust_test file output more similar to cc_test. 2020-06-11 17:12:19 -04:00
testing.go Add SourceProviders and a rust_bindgen module type 2020-07-20 13:40:14 -04:00