Merge "Remove restriction on android config in generated rust_library targets" into main am: 59aa97a594 am: 4b4dc551b0

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2786780

Change-Id: I3698b80b2dab3642b12cb971c2bfe0e47ef59668
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Vinh Tran
2023-10-16 20:10:19 +00:00
committed by Automerger Merge Worker
2 changed files with 2 additions and 8 deletions

View File

@@ -101,8 +101,7 @@ rust_library_host {
`,
},
ExpectedBazelTargets: []string{
// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
makeBazelTargetHostOrDevice("rust_library", "libfoo", expectedAttrs, android.HostSupported),
MakeBazelTargetNoRestrictions("rust_library", "libfoo", expectedAttrs),
makeBazelTargetHostOrDevice("rust_library", "libfoo_host", expectedAttrs, android.HostSupported),
},
},

View File

@@ -865,11 +865,7 @@ func libraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
},
}
// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
var restriction bazel.BoolAttribute
restriction.SetSelectValue(bazel.OsConfigurationAxis, "android", proptools.BoolPtr(false))
ctx.CreateBazelTargetModuleWithRestrictions(
ctx.CreateBazelTargetModule(
bazel.BazelTargetModuleProperties{
Rule_class: "rust_library",
Bzl_load_location: "@rules_rust//rust:defs.bzl",
@@ -878,7 +874,6 @@ func libraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
Name: m.Name(),
},
attrs,
restriction,
)
}