bp2build special case for libcrypto_for_testing

A new module libcrypto_for_testing was added that uses the
inject_bssl_hash property, but this property is currently only available
for the libcrypto module specifically.

Test: CI
Change-Id: I1b83de02a2990b7503980bf6a85611683427baf9
This commit is contained in:
Sam Delmerico
2022-08-08 13:35:08 -04:00
parent 439fbfc25f
commit fae47f9522

View File

@@ -400,7 +400,7 @@ func libraryBp2Build(ctx android.TopDownMutatorContext, m *Module) {
if props, ok := props.(*LibraryProperties); ok {
if props.Inject_bssl_hash != nil {
// This is an edge case applies only to libcrypto
if m.Name() == "libcrypto" {
if m.Name() == "libcrypto" || m.Name() == "libcrypto_for_testing" {
sharedTargetAttrs.Inject_bssl_hash.SetSelectValue(axis, config, props.Inject_bssl_hash)
} else {
ctx.PropertyErrorf("inject_bssl_hash", "only applies to libcrypto")