diff options
author | 2021-11-16 13:46:49 +0000 | |
---|---|---|
committer | 2021-11-16 13:46:49 +0000 | |
commit | b993a835c3cb5925d0c58b6c069f0742794d63a1 (patch) | |
tree | a23409b8c7ab35135c566128e3b62c180ddd9d03 /rust/rust.go | |
parent | a10ebe60ab750bbb5dccdf2aee2a06740ce7911e (diff) | |
parent | 4e5f07d27ba2e8ae460457a5a977478b9b2c96eb (diff) |
Merge "rust: Add data_libs and data_bins to rust_test"
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go index 3cc786878..0fd781ea7 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -393,6 +393,10 @@ type Deps struct { WholeStaticLibs []string HeaderLibs []string + // Used for data dependencies adjacent to tests + DataLibs []string + DataBins []string + CrtBegin, CrtEnd string } @@ -982,6 +986,8 @@ var ( procMacroDepTag = dependencyTag{name: "procMacro", procMacro: true} testPerSrcDepTag = dependencyTag{name: "rust_unit_tests"} sourceDepTag = dependencyTag{name: "source"} + dataLibDepTag = dependencyTag{name: "data lib"} + dataBinDepTag = dependencyTag{name: "data bin"} ) func IsDylibDepTag(depTag blueprint.DependencyTag) bool { @@ -1428,6 +1434,12 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { } } + actx.AddVariationDependencies([]blueprint.Variation{ + {Mutator: "link", Variation: "shared"}, + }, dataLibDepTag, deps.DataLibs...) + + actx.AddVariationDependencies(nil, dataBinDepTag, deps.DataBins...) + // proc_macros are compiler plugins, and so we need the host arch variant as a dependendcy. actx.AddFarVariationDependencies(ctx.Config().BuildOSTarget.Variations(), procMacroDepTag, deps.ProcMacros...) } |