blob: 7f215e866c126785d8d52e56e8a1d5d18be81557 [file] [log] [blame]
Inseob Kime498dd92020-08-04 09:24:04 +09001// Copyright 2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14package cc
15
16// This file contains image variant related things, including image mutator functions, utility
17// functions to determine where a module is installed, etc.
18
19import (
20 "strings"
21
22 "android/soong/android"
23)
24
25var _ android.ImageInterface = (*Module)(nil)
26
Inseob Kim74d25562020-08-04 00:41:38 +090027type imageVariantType string
28
29const (
Yifan Hong60e0cfb2020-10-21 15:17:56 -070030 coreImageVariant imageVariantType = "core"
31 vendorImageVariant imageVariantType = "vendor"
32 productImageVariant imageVariantType = "product"
33 ramdiskImageVariant imageVariantType = "ramdisk"
34 vendorRamdiskImageVariant imageVariantType = "vendor_ramdisk"
35 recoveryImageVariant imageVariantType = "recovery"
36 hostImageVariant imageVariantType = "host"
Inseob Kim74d25562020-08-04 00:41:38 +090037)
38
39func (c *Module) getImageVariantType() imageVariantType {
40 if c.Host() {
41 return hostImageVariant
42 } else if c.inVendor() {
43 return vendorImageVariant
Ivan Lozanof9e21722020-12-02 09:00:51 -050044 } else if c.InProduct() {
Inseob Kim74d25562020-08-04 00:41:38 +090045 return productImageVariant
46 } else if c.InRamdisk() {
47 return ramdiskImageVariant
Yifan Hong60e0cfb2020-10-21 15:17:56 -070048 } else if c.InVendorRamdisk() {
49 return vendorRamdiskImageVariant
Inseob Kim74d25562020-08-04 00:41:38 +090050 } else if c.InRecovery() {
51 return recoveryImageVariant
52 } else {
53 return coreImageVariant
54 }
55}
56
Inseob Kime498dd92020-08-04 09:24:04 +090057const (
58 // VendorVariationPrefix is the variant prefix used for /vendor code that compiles
59 // against the VNDK.
60 VendorVariationPrefix = "vendor."
61
62 // ProductVariationPrefix is the variant prefix used for /product code that compiles
63 // against the VNDK.
64 ProductVariationPrefix = "product."
65)
66
67func (ctx *moduleContext) ProductSpecific() bool {
Justin Yun63e9ec72020-10-29 16:49:43 +090068 //TODO(b/150902910): Replace HasNonSystemVariants() with HasProductVariant()
Inseob Kime498dd92020-08-04 09:24:04 +090069 return ctx.ModuleContext.ProductSpecific() ||
Ivan Lozanof9e21722020-12-02 09:00:51 -050070 (ctx.mod.HasNonSystemVariants() && ctx.mod.InProduct())
Inseob Kime498dd92020-08-04 09:24:04 +090071}
72
73func (ctx *moduleContext) SocSpecific() bool {
74 return ctx.ModuleContext.SocSpecific() ||
Justin Yun543f60b2020-10-18 10:54:31 +090075 (ctx.mod.HasVendorVariant() && ctx.mod.inVendor())
Inseob Kime498dd92020-08-04 09:24:04 +090076}
77
78func (ctx *moduleContextImpl) inProduct() bool {
Ivan Lozanof9e21722020-12-02 09:00:51 -050079 return ctx.mod.InProduct()
Inseob Kime498dd92020-08-04 09:24:04 +090080}
81
82func (ctx *moduleContextImpl) inVendor() bool {
83 return ctx.mod.inVendor()
84}
85
86func (ctx *moduleContextImpl) inRamdisk() bool {
87 return ctx.mod.InRamdisk()
88}
89
Yifan Hong60e0cfb2020-10-21 15:17:56 -070090func (ctx *moduleContextImpl) inVendorRamdisk() bool {
91 return ctx.mod.InVendorRamdisk()
92}
93
Inseob Kime498dd92020-08-04 09:24:04 +090094func (ctx *moduleContextImpl) inRecovery() bool {
95 return ctx.mod.InRecovery()
96}
97
Justin Yun63e9ec72020-10-29 16:49:43 +090098// Returns true when this module is configured to have core and vendor variants.
Inseob Kime498dd92020-08-04 09:24:04 +090099func (c *Module) HasVendorVariant() bool {
100 return c.IsVndk() || Bool(c.VendorProperties.Vendor_available)
101}
102
Justin Yun63e9ec72020-10-29 16:49:43 +0900103// Returns true when this module is configured to have core and product variants.
104func (c *Module) HasProductVariant() bool {
105 return c.IsVndk() || Bool(c.VendorProperties.Product_available)
106}
107
108// Returns true when this module is configured to have core and either product or vendor variants.
109func (c *Module) HasNonSystemVariants() bool {
110 return c.IsVndk() || Bool(c.VendorProperties.Vendor_available) || Bool(c.VendorProperties.Product_available)
111}
112
Inseob Kime498dd92020-08-04 09:24:04 +0900113// Returns true if the module is "product" variant. Usually these modules are installed in /product
Ivan Lozanof9e21722020-12-02 09:00:51 -0500114func (c *Module) InProduct() bool {
Inseob Kime498dd92020-08-04 09:24:04 +0900115 return c.Properties.ImageVariationPrefix == ProductVariationPrefix
116}
117
118// Returns true if the module is "vendor" variant. Usually these modules are installed in /vendor
119func (c *Module) inVendor() bool {
120 return c.Properties.ImageVariationPrefix == VendorVariationPrefix
121}
122
123func (c *Module) InRamdisk() bool {
124 return c.ModuleBase.InRamdisk() || c.ModuleBase.InstallInRamdisk()
125}
126
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700127func (c *Module) InVendorRamdisk() bool {
128 return c.ModuleBase.InVendorRamdisk() || c.ModuleBase.InstallInVendorRamdisk()
129}
130
Inseob Kime498dd92020-08-04 09:24:04 +0900131func (c *Module) InRecovery() bool {
132 return c.ModuleBase.InRecovery() || c.ModuleBase.InstallInRecovery()
133}
134
135func (c *Module) OnlyInRamdisk() bool {
136 return c.ModuleBase.InstallInRamdisk()
137}
138
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700139func (c *Module) OnlyInVendorRamdisk() bool {
140 return c.ModuleBase.InstallInVendorRamdisk()
141}
142
Inseob Kime498dd92020-08-04 09:24:04 +0900143func (c *Module) OnlyInRecovery() bool {
144 return c.ModuleBase.InstallInRecovery()
145}
146
147func (m *Module) ImageMutatorBegin(mctx android.BaseModuleContext) {
148 // Validation check
149 vendorSpecific := mctx.SocSpecific() || mctx.DeviceSpecific()
150 productSpecific := mctx.ProductSpecific()
151
Justin Yun63e9ec72020-10-29 16:49:43 +0900152 if m.VendorProperties.Vendor_available != nil {
153 if vendorSpecific {
154 mctx.PropertyErrorf("vendor_available",
155 "doesn't make sense at the same time as `vendor: true`, `proprietary: true`, or `device_specific:true`")
156 }
157 // If defined, make sure vendor_available and product_available has the
158 // same value since `false` for these properties means the module is
159 // for system only but provides the variant.
160 if m.VendorProperties.Product_available != nil {
161 if Bool(m.VendorProperties.Vendor_available) != Bool(m.VendorProperties.Product_available) {
162 mctx.PropertyErrorf("product_available", "may not have different value than `vendor_available`")
163 }
164 }
165 }
166
167 if m.VendorProperties.Product_available != nil {
168 if productSpecific {
169 mctx.PropertyErrorf("product_available",
170 "doesn't make sense at the same time as `product_specific: true`")
171 }
172 if vendorSpecific {
173 mctx.PropertyErrorf("product_available",
174 "cannot provide product variant from a vendor module. Please use `product_specific: true` with `vendor_available: true`")
175 }
Inseob Kime498dd92020-08-04 09:24:04 +0900176 }
177
178 if vndkdep := m.vndkdep; vndkdep != nil {
179 if vndkdep.isVndk() {
180 if vendorSpecific || productSpecific {
181 if !vndkdep.isVndkExt() {
182 mctx.PropertyErrorf("vndk",
183 "must set `extends: \"...\"` to vndk extension")
184 } else if m.VendorProperties.Vendor_available != nil {
185 mctx.PropertyErrorf("vendor_available",
186 "must not set at the same time as `vndk: {extends: \"...\"}`")
Justin Yun63e9ec72020-10-29 16:49:43 +0900187 } else if m.VendorProperties.Product_available != nil {
188 mctx.PropertyErrorf("product_available",
189 "must not set at the same time as `vndk: {extends: \"...\"}`")
Inseob Kime498dd92020-08-04 09:24:04 +0900190 }
191 } else {
192 if vndkdep.isVndkExt() {
193 mctx.PropertyErrorf("vndk",
194 "must set `vendor: true` or `product_specific: true` to set `extends: %q`",
195 m.getVndkExtendsModuleName())
196 }
197 if m.VendorProperties.Vendor_available == nil {
198 mctx.PropertyErrorf("vndk",
199 "vendor_available must be set to either true or false when `vndk: {enabled: true}`")
200 }
201 }
202 } else {
203 if vndkdep.isVndkSp() {
204 mctx.PropertyErrorf("vndk",
205 "must set `enabled: true` to set `support_system_process: true`")
206 }
207 if vndkdep.isVndkExt() {
208 mctx.PropertyErrorf("vndk",
209 "must set `enabled: true` to set `extends: %q`",
210 m.getVndkExtendsModuleName())
211 }
212 }
213 }
214
215 var coreVariantNeeded bool = false
216 var ramdiskVariantNeeded bool = false
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700217 var vendorRamdiskVariantNeeded bool = false
Inseob Kime498dd92020-08-04 09:24:04 +0900218 var recoveryVariantNeeded bool = false
219
220 var vendorVariants []string
221 var productVariants []string
222
223 platformVndkVersion := mctx.DeviceConfig().PlatformVndkVersion()
224 boardVndkVersion := mctx.DeviceConfig().VndkVersion()
225 productVndkVersion := mctx.DeviceConfig().ProductVndkVersion()
Jose Galmes6f843bc2020-12-11 13:36:29 -0800226 recoverySnapshotVersion := mctx.DeviceConfig().RecoverySnapshotVersion()
227 usingRecoverySnapshot := recoverySnapshotVersion != "current" &&
228 recoverySnapshotVersion != ""
Inseob Kime498dd92020-08-04 09:24:04 +0900229 if boardVndkVersion == "current" {
230 boardVndkVersion = platformVndkVersion
231 }
232 if productVndkVersion == "current" {
233 productVndkVersion = platformVndkVersion
234 }
235
236 if boardVndkVersion == "" {
237 // If the device isn't compiling against the VNDK, we always
238 // use the core mode.
239 coreVariantNeeded = true
240 } else if _, ok := m.linker.(*llndkStubDecorator); ok {
241 // LL-NDK stubs only exist in the vendor and product variants,
242 // since the real libraries will be used in the core variant.
243 vendorVariants = append(vendorVariants,
244 platformVndkVersion,
245 boardVndkVersion,
246 )
247 productVariants = append(productVariants,
248 platformVndkVersion,
249 productVndkVersion,
250 )
251 } else if _, ok := m.linker.(*llndkHeadersDecorator); ok {
252 // ... and LL-NDK headers as well
253 vendorVariants = append(vendorVariants,
254 platformVndkVersion,
255 boardVndkVersion,
256 )
257 productVariants = append(productVariants,
258 platformVndkVersion,
259 productVndkVersion,
260 )
261 } else if m.isSnapshotPrebuilt() {
262 // Make vendor variants only for the versions in BOARD_VNDK_VERSION and
263 // PRODUCT_EXTRA_VNDK_VERSIONS.
264 if snapshot, ok := m.linker.(interface {
265 version() string
266 }); ok {
Jose Galmes6f843bc2020-12-11 13:36:29 -0800267 if m.InstallInRecovery() {
268 recoveryVariantNeeded = true
269 } else {
270 vendorVariants = append(vendorVariants, snapshot.version())
271 }
Inseob Kime498dd92020-08-04 09:24:04 +0900272 } else {
273 mctx.ModuleErrorf("version is unknown for snapshot prebuilt")
274 }
Ivan Lozanof9e21722020-12-02 09:00:51 -0500275 } else if m.HasNonSystemVariants() && !m.IsVndkExt() {
Justin Yun63e9ec72020-10-29 16:49:43 +0900276 // This will be available to /system unless it is product_specific
277 // which will be handled later.
Inseob Kime498dd92020-08-04 09:24:04 +0900278 coreVariantNeeded = true
279
280 // We assume that modules under proprietary paths are compatible for
281 // BOARD_VNDK_VERSION. The other modules are regarded as AOSP, or
282 // PLATFORM_VNDK_VERSION.
Justin Yun63e9ec72020-10-29 16:49:43 +0900283 if m.HasVendorVariant() {
284 if isVendorProprietaryModule(mctx) {
285 vendorVariants = append(vendorVariants, boardVndkVersion)
286 } else {
287 vendorVariants = append(vendorVariants, platformVndkVersion)
288 }
Inseob Kime498dd92020-08-04 09:24:04 +0900289 }
290
291 // vendor_available modules are also available to /product.
Justin Yun63e9ec72020-10-29 16:49:43 +0900292 // TODO(b/150902910): product variant will be created only if
293 // m.HasProductVariant() is true.
Inseob Kime498dd92020-08-04 09:24:04 +0900294 productVariants = append(productVariants, platformVndkVersion)
295 // VNDK is always PLATFORM_VNDK_VERSION
296 if !m.IsVndk() {
297 productVariants = append(productVariants, productVndkVersion)
298 }
299 } else if vendorSpecific && String(m.Properties.Sdk_version) == "" {
300 // This will be available in /vendor (or /odm) only
301
302 // kernel_headers is a special module type whose exported headers
303 // are coming from DeviceKernelHeaders() which is always vendor
304 // dependent. They'll always have both vendor variants.
305 // For other modules, we assume that modules under proprietary
306 // paths are compatible for BOARD_VNDK_VERSION. The other modules
307 // are regarded as AOSP, which is PLATFORM_VNDK_VERSION.
308 if _, ok := m.linker.(*kernelHeadersDecorator); ok {
309 vendorVariants = append(vendorVariants,
310 platformVndkVersion,
311 boardVndkVersion,
312 )
Bill Peckham945441c2020-08-31 16:07:58 -0700313 } else if isVendorProprietaryModule(mctx) {
Inseob Kime498dd92020-08-04 09:24:04 +0900314 vendorVariants = append(vendorVariants, boardVndkVersion)
315 } else {
316 vendorVariants = append(vendorVariants, platformVndkVersion)
317 }
Colin Cross127bb8b2020-12-16 16:46:01 -0800318 } else if lib := moduleLibraryInterface(m); lib != nil && lib.hasLLNDKStubs() {
319 // This is an LLNDK library. The implementation of the library will be on /system,
320 // and vendor and product variants will be created with LLNDK stubs.
321 coreVariantNeeded = true
322 vendorVariants = append(vendorVariants,
323 platformVndkVersion,
324 boardVndkVersion,
325 )
326 productVariants = append(productVariants,
327 platformVndkVersion,
328 productVndkVersion,
329 )
Inseob Kime498dd92020-08-04 09:24:04 +0900330 } else {
331 // This is either in /system (or similar: /data), or is a
332 // modules built with the NDK. Modules built with the NDK
333 // will be restricted using the existing link type checks.
334 coreVariantNeeded = true
335 }
336
337 if boardVndkVersion != "" && productVndkVersion != "" {
338 if coreVariantNeeded && productSpecific && String(m.Properties.Sdk_version) == "" {
339 // The module has "product_specific: true" that does not create core variant.
340 coreVariantNeeded = false
341 productVariants = append(productVariants, productVndkVersion)
342 }
343 } else {
344 // Unless PRODUCT_PRODUCT_VNDK_VERSION is set, product partition has no
345 // restriction to use system libs.
346 // No product variants defined in this case.
347 productVariants = []string{}
348 }
349
350 if Bool(m.Properties.Ramdisk_available) {
351 ramdiskVariantNeeded = true
352 }
353
354 if m.ModuleBase.InstallInRamdisk() {
355 ramdiskVariantNeeded = true
356 coreVariantNeeded = false
357 }
358
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700359 if Bool(m.Properties.Vendor_ramdisk_available) {
360 vendorRamdiskVariantNeeded = true
361 }
362
363 if m.ModuleBase.InstallInVendorRamdisk() {
364 vendorRamdiskVariantNeeded = true
365 coreVariantNeeded = false
366 }
367
Inseob Kime498dd92020-08-04 09:24:04 +0900368 if Bool(m.Properties.Recovery_available) {
369 recoveryVariantNeeded = true
370 }
371
372 if m.ModuleBase.InstallInRecovery() {
373 recoveryVariantNeeded = true
374 coreVariantNeeded = false
375 }
376
Jose Galmes6f843bc2020-12-11 13:36:29 -0800377 // If using a snapshot, the recovery variant under AOSP directories is not needed,
378 // except for kernel headers, which needs all variants.
379 if _, ok := m.linker.(*kernelHeadersDecorator); !ok &&
380 !m.isSnapshotPrebuilt() &&
381 usingRecoverySnapshot &&
382 !isRecoveryProprietaryModule(mctx) {
383 recoveryVariantNeeded = false
384 }
385
Inseob Kime498dd92020-08-04 09:24:04 +0900386 for _, variant := range android.FirstUniqueStrings(vendorVariants) {
387 m.Properties.ExtraVariants = append(m.Properties.ExtraVariants, VendorVariationPrefix+variant)
388 }
389
390 for _, variant := range android.FirstUniqueStrings(productVariants) {
391 m.Properties.ExtraVariants = append(m.Properties.ExtraVariants, ProductVariationPrefix+variant)
392 }
393
394 m.Properties.RamdiskVariantNeeded = ramdiskVariantNeeded
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700395 m.Properties.VendorRamdiskVariantNeeded = vendorRamdiskVariantNeeded
Inseob Kime498dd92020-08-04 09:24:04 +0900396 m.Properties.RecoveryVariantNeeded = recoveryVariantNeeded
397 m.Properties.CoreVariantNeeded = coreVariantNeeded
Jose Galmes6f843bc2020-12-11 13:36:29 -0800398
399 // Disable the module if no variants are needed.
400 if !ramdiskVariantNeeded &&
401 !recoveryVariantNeeded &&
402 !coreVariantNeeded &&
403 len(m.Properties.ExtraVariants) == 0 {
404 m.Disable()
405 }
Inseob Kime498dd92020-08-04 09:24:04 +0900406}
407
408func (c *Module) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
409 return c.Properties.CoreVariantNeeded
410}
411
412func (c *Module) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
413 return c.Properties.RamdiskVariantNeeded
414}
415
Yifan Hong60e0cfb2020-10-21 15:17:56 -0700416func (c *Module) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
417 return c.Properties.VendorRamdiskVariantNeeded
418}
419
Inseob Kime498dd92020-08-04 09:24:04 +0900420func (c *Module) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
421 return c.Properties.RecoveryVariantNeeded
422}
423
424func (c *Module) ExtraImageVariations(ctx android.BaseModuleContext) []string {
425 return c.Properties.ExtraVariants
426}
427
Justin Yun63e9ec72020-10-29 16:49:43 +0900428func squashVendorSrcs(m *Module) {
429 if lib, ok := m.compiler.(*libraryDecorator); ok {
430 lib.baseCompiler.Properties.Srcs = append(lib.baseCompiler.Properties.Srcs,
431 lib.baseCompiler.Properties.Target.Vendor.Srcs...)
432
433 lib.baseCompiler.Properties.Exclude_srcs = append(lib.baseCompiler.Properties.Exclude_srcs,
434 lib.baseCompiler.Properties.Target.Vendor.Exclude_srcs...)
435
436 lib.baseCompiler.Properties.Exclude_generated_sources = append(lib.baseCompiler.Properties.Exclude_generated_sources,
437 lib.baseCompiler.Properties.Target.Vendor.Exclude_generated_sources...)
438 }
439}
440
441func squashProductSrcs(m *Module) {
442 if lib, ok := m.compiler.(*libraryDecorator); ok {
443 lib.baseCompiler.Properties.Srcs = append(lib.baseCompiler.Properties.Srcs,
444 lib.baseCompiler.Properties.Target.Product.Srcs...)
445
446 lib.baseCompiler.Properties.Exclude_srcs = append(lib.baseCompiler.Properties.Exclude_srcs,
447 lib.baseCompiler.Properties.Target.Product.Exclude_srcs...)
448
449 lib.baseCompiler.Properties.Exclude_generated_sources = append(lib.baseCompiler.Properties.Exclude_generated_sources,
450 lib.baseCompiler.Properties.Target.Product.Exclude_generated_sources...)
451 }
452}
453
454func squashRecoverySrcs(m *Module) {
455 if lib, ok := m.compiler.(*libraryDecorator); ok {
456 lib.baseCompiler.Properties.Srcs = append(lib.baseCompiler.Properties.Srcs,
457 lib.baseCompiler.Properties.Target.Recovery.Srcs...)
458
459 lib.baseCompiler.Properties.Exclude_srcs = append(lib.baseCompiler.Properties.Exclude_srcs,
460 lib.baseCompiler.Properties.Target.Recovery.Exclude_srcs...)
461
462 lib.baseCompiler.Properties.Exclude_generated_sources = append(lib.baseCompiler.Properties.Exclude_generated_sources,
463 lib.baseCompiler.Properties.Target.Recovery.Exclude_generated_sources...)
464 }
465}
466
467func squashVendorRamdiskSrcs(m *Module) {
468 if lib, ok := m.compiler.(*libraryDecorator); ok {
469 lib.baseCompiler.Properties.Exclude_srcs = append(lib.baseCompiler.Properties.Exclude_srcs, lib.baseCompiler.Properties.Target.Vendor_ramdisk.Exclude_srcs...)
470 }
471}
472
Inseob Kime498dd92020-08-04 09:24:04 +0900473func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string, module android.Module) {
474 m := module.(*Module)
Yifan Hong6da33c22020-10-27 15:01:21 -0700475 if variant == android.RamdiskVariation {
Inseob Kime498dd92020-08-04 09:24:04 +0900476 m.MakeAsPlatform()
Yifan Hong6da33c22020-10-27 15:01:21 -0700477 } else if variant == android.VendorRamdiskVariation {
478 m.MakeAsPlatform()
479 squashVendorRamdiskSrcs(m)
Inseob Kime498dd92020-08-04 09:24:04 +0900480 } else if variant == android.RecoveryVariation {
481 m.MakeAsPlatform()
482 squashRecoverySrcs(m)
483 } else if strings.HasPrefix(variant, VendorVariationPrefix) {
484 m.Properties.ImageVariationPrefix = VendorVariationPrefix
485 m.Properties.VndkVersion = strings.TrimPrefix(variant, VendorVariationPrefix)
486 squashVendorSrcs(m)
487
488 // Makefile shouldn't know vendor modules other than BOARD_VNDK_VERSION.
489 // Hide other vendor variants to avoid collision.
490 vndkVersion := ctx.DeviceConfig().VndkVersion()
491 if vndkVersion != "current" && vndkVersion != "" && vndkVersion != m.Properties.VndkVersion {
492 m.Properties.HideFromMake = true
Colin Crossa9c8c9f2020-12-16 10:20:23 -0800493 m.HideFromMake()
Inseob Kime498dd92020-08-04 09:24:04 +0900494 }
495 } else if strings.HasPrefix(variant, ProductVariationPrefix) {
496 m.Properties.ImageVariationPrefix = ProductVariationPrefix
497 m.Properties.VndkVersion = strings.TrimPrefix(variant, ProductVariationPrefix)
Justin Yun63e9ec72020-10-29 16:49:43 +0900498 // TODO (b/150902910): This will be replaced with squashProductSrcs(m).
Inseob Kime498dd92020-08-04 09:24:04 +0900499 squashVendorSrcs(m)
500 }
501}