Merge "Remove restriction on android config in generated rust_library targets" into main
This commit is contained in:
@@ -101,8 +101,7 @@ rust_library_host {
|
|||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
ExpectedBazelTargets: []string{
|
ExpectedBazelTargets: []string{
|
||||||
// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
|
MakeBazelTargetNoRestrictions("rust_library", "libfoo", expectedAttrs),
|
||||||
makeBazelTargetHostOrDevice("rust_library", "libfoo", expectedAttrs, android.HostSupported),
|
|
||||||
makeBazelTargetHostOrDevice("rust_library", "libfoo_host", expectedAttrs, android.HostSupported),
|
makeBazelTargetHostOrDevice("rust_library", "libfoo_host", expectedAttrs, android.HostSupported),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -865,11 +865,7 @@ func libraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(b/290790800): Remove the restriction when rust toolchain for android is implemented
|
ctx.CreateBazelTargetModule(
|
||||||
var restriction bazel.BoolAttribute
|
|
||||||
restriction.SetSelectValue(bazel.OsConfigurationAxis, "android", proptools.BoolPtr(false))
|
|
||||||
|
|
||||||
ctx.CreateBazelTargetModuleWithRestrictions(
|
|
||||||
bazel.BazelTargetModuleProperties{
|
bazel.BazelTargetModuleProperties{
|
||||||
Rule_class: "rust_library",
|
Rule_class: "rust_library",
|
||||||
Bzl_load_location: "@rules_rust//rust:defs.bzl",
|
Bzl_load_location: "@rules_rust//rust:defs.bzl",
|
||||||
@@ -878,7 +874,6 @@ func libraryBp2build(ctx android.Bp2buildMutatorContext, m *Module) {
|
|||||||
Name: m.Name(),
|
Name: m.Name(),
|
||||||
},
|
},
|
||||||
attrs,
|
attrs,
|
||||||
restriction,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user