diff options
Diffstat (limited to 'cc/library.go')
| -rw-r--r-- | cc/library.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cc/library.go b/cc/library.go index 216c12409..5720944ab 100644 --- a/cc/library.go +++ b/cc/library.go @@ -392,8 +392,12 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) { Bzl_load_location: "//build/bazel/rules:cc_library_shared.bzl", } - ctx.CreateBazelTargetModule(staticProps, android.CommonAttributes{Name: m.Name() + "_bp2build_cc_library_static"}, staticTargetAttrs) - ctx.CreateBazelTargetModule(sharedProps, android.CommonAttributes{Name: m.Name()}, sharedTargetAttrs) + ctx.CreateBazelTargetModuleWithRestrictions(staticProps, + android.CommonAttributes{Name: m.Name() + "_bp2build_cc_library_static"}, + staticTargetAttrs, staticAttrs.Enabled) + ctx.CreateBazelTargetModuleWithRestrictions(sharedProps, + android.CommonAttributes{Name: m.Name()}, + sharedTargetAttrs, sharedAttrs.Enabled) } // cc_library creates both static and/or shared libraries for a device and/or |