Support trimmed variant build in soong
variable.go: add a new product variable TrimmedApex which is controlled by environment variable PRODUCT_TRIMMED_APEX config.go: all config to check if trimmed build is turned on or not apex.go: add overridable apex module property: use_DCLA: <DCLA apex module> "use_DCLA" allows user to just use the lib list in DCLA to determine which native shared libraries to trim. This property is no-op if TrimApexEnabled is set to false. builder.go 1, if it is to produce a trimmed variant, fix the default version code by making the last variant digit to 2. this is only useful in local build. in production build, there is apex manifest injection by coastguard that determines the actual version code. 2, create a new apex rule called: "TrimmedApexRule", this rule invokes an apexer wrapper called apexer_with_trim_preprocessing which will properly trim the target libs. BUG: b/259381334 TEST: adbd banchan build for both static and trimmed variant Change-Id: I38a91cdef86a3c9185d00610ab3dd7acd07fd90a
This commit is contained in:
@@ -380,6 +380,7 @@ type productVariables struct {
|
||||
|
||||
Ndk_abis *bool `json:",omitempty"`
|
||||
|
||||
TrimmedApex *bool `json:",omitempty"`
|
||||
Flatten_apex *bool `json:",omitempty"`
|
||||
ForceApexSymlinkOptimization *bool `json:",omitempty"`
|
||||
CompressedApex *bool `json:",omitempty"`
|
||||
@@ -502,6 +503,7 @@ func (v *productVariables) SetDefaultConfig() {
|
||||
Malloc_zero_contents: boolPtr(true),
|
||||
Malloc_pattern_fill_contents: boolPtr(false),
|
||||
Safestack: boolPtr(false),
|
||||
TrimmedApex: boolPtr(false),
|
||||
|
||||
BootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},
|
||||
ApexBootJars: ConfiguredJarList{apexes: []string{}, jars: []string{}},
|
||||
|
Reference in New Issue
Block a user