43845688bc
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 |
||
---|---|---|
.. | ||
config | ||
Android.bp | ||
androidmk.go | ||
binary.go | ||
binary_test.go | ||
bindgen.go | ||
bindgen_test.go | ||
builder.go | ||
clippy.go | ||
clippy_test.go | ||
compiler.go | ||
compiler_test.go | ||
coverage.go | ||
coverage_test.go | ||
library.go | ||
library_test.go | ||
OWNERS | ||
prebuilt.go | ||
proc_macro.go | ||
project_json.go | ||
project_json_test.go | ||
rust.go | ||
rust_test.go | ||
source_provider.go | ||
test.go | ||
test_test.go | ||
testing.go |