Do not add '.product' suffix for product_specific module
When a module has both 'product_specific: true' and 'vendor_available: true', the module does not have core variant but have product and vendor variant modules. As the module generated multiple variants, the names of the modules have the variant name suffix. However, it did not create the module with the base module name because it does not have core variant. As the base module, in this case, is the product variant, use the base module name for the product variant without adding the '.product' suffix to it. Bug: 161913599 Test: m hidl_test_product@2.0-adapter-helper Change-Id: I904b43744579a6e89cecbc2e529122eaa8b14cae
This commit is contained in:
5
cc/cc.go
5
cc/cc.go
@@ -1535,6 +1535,11 @@ func (c *Module) getNameSuffixWithVndkVersion(ctx android.ModuleContext) string
|
||||
var vndkVersion string
|
||||
var nameSuffix string
|
||||
if c.InProduct() {
|
||||
if c.ProductSpecific() {
|
||||
// If the module is product specific with 'product_specific: true',
|
||||
// do not add a name suffix because it is a base module.
|
||||
return ""
|
||||
}
|
||||
vndkVersion = ctx.DeviceConfig().ProductVndkVersion()
|
||||
nameSuffix = productSuffix
|
||||
} else {
|
||||
|
@@ -2799,7 +2799,7 @@ func TestRuntimeLibs(t *testing.T) {
|
||||
checkRuntimeLibs(t, []string{"liball_available.product"}, module)
|
||||
|
||||
module = ctx.ModuleForTests("libproduct2", variant).Module().(*Module)
|
||||
checkRuntimeLibs(t, []string{"liball_available.product", "libproduct1", "libproduct_vendor.product"}, module)
|
||||
checkRuntimeLibs(t, []string{"liball_available.product", "libproduct1", "libproduct_vendor"}, module)
|
||||
}
|
||||
|
||||
func TestExcludeRuntimeLibs(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user