diff options
author | ThiƩbaud Weksteen <tweek@google.com> | 2020-08-06 07:50:31 +0000 |
---|---|---|
committer | ThiƩbaud Weksteen <tweek@google.com> | 2020-08-06 12:28:08 +0000 |
commit | c8105108980fce1c0bf56c30630b84205aa57746 (patch) | |
tree | 8699cca4b5f87f9e70adbb5923fbaa07d9845fb0 /rust/project_json.go | |
parent | 246e69c586ff1d98518435f03051d9a91d0e5cdc (diff) |
Revert "rust: validate existence of library source"
Revert submission 1391076
Reason for revert: Broken downstream Darwin build (b/162975597)
Reverted Changes:
I275f04639:rust: handle modules with same crate_name
Ie736d7ebb:rust: validate existence of library source
Change-Id: I1732d50a08546864f17cd826c8af574c1064c670
Diffstat (limited to 'rust/project_json.go')
-rw-r--r-- | rust/project_json.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/rust/project_json.go b/rust/project_json.go index 75375408c..41dd194ee 100644 --- a/rust/project_json.go +++ b/rust/project_json.go @@ -75,6 +75,7 @@ func mergeDependencies(ctx android.SingletonContext, project *rustProjectJson, knownCrates map[string]crateInfo, module android.Module, crate *rustProjectCrate, deps map[string]int) { + //TODO(tweek): The stdlib dependencies do not appear here. We need to manually add them. ctx.VisitDirectDeps(module, func(child android.Module) { childId, childName, ok := appendLibraryAndDeps(ctx, project, knownCrates, child) if !ok { @@ -114,11 +115,8 @@ func appendLibraryAndDeps(ctx android.SingletonContext, project *rustProjectJson return cInfo.ID, crateName, true } crate := rustProjectCrate{Deps: make([]rustProjectDep, 0), Cfgs: make([]string, 0)} - srcs := rustLib.baseCompiler.Properties.Srcs - if len(srcs) == 0 { - return 0, "", false - } - crate.RootModule = path.Join(ctx.ModuleDir(rModule), srcs[0]) + src := rustLib.baseCompiler.Properties.Srcs[0] + crate.RootModule = path.Join(ctx.ModuleDir(rModule), src) crate.Edition = rustLib.baseCompiler.edition() deps := make(map[string]int) |