Merge "Disable hiddenapi check for building from prebuilts." into main am: 5e0ee313e1
am: 7d2beceffd
am: e70e2b0b5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2761821 Change-Id: Iebc4b9d558816ecb3be37fdab2fd8ffd42e57919 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
34d4275401
2 changed files with 13 additions and 2 deletions
|
@ -167,7 +167,8 @@ func (c Config) RunningInsideUnitTest() bool {
|
|||
}
|
||||
|
||||
// DisableHiddenApiChecks returns true if hiddenapi checks have been disabled.
|
||||
// For 'eng' target variant hiddenapi checks are disabled by default for performance optimisation,
|
||||
// For 'eng' target variant hiddenapi checks are disabled by default for performance optimisation
|
||||
// Hiddenapi checks are also disabled when RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE is set to false
|
||||
// but can be enabled by setting environment variable ENABLE_HIDDENAPI_FLAGS=true.
|
||||
// For other target variants hiddenapi check are enabled by default but can be disabled by
|
||||
// setting environment variable UNSAFE_DISABLE_HIDDENAPI_FLAGS=true.
|
||||
|
@ -176,7 +177,8 @@ func (c Config) RunningInsideUnitTest() bool {
|
|||
func (c Config) DisableHiddenApiChecks() bool {
|
||||
return !c.IsEnvTrue("ENABLE_HIDDENAPI_FLAGS") &&
|
||||
(c.IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") ||
|
||||
Bool(c.productVariables.Eng))
|
||||
Bool(c.productVariables.Eng) ||
|
||||
!c.ReleaseDefaultModuleBuildFromSource())
|
||||
}
|
||||
|
||||
// MaxPageSizeSupported returns the max page size supported by the device. This
|
||||
|
@ -221,6 +223,13 @@ func (c Config) ReleaseAconfigFlagDefaultPermission() string {
|
|||
return c.config.productVariables.ReleaseAconfigFlagDefaultPermission
|
||||
}
|
||||
|
||||
// The flag indicating behavior for the tree wrt building modules or using prebuilts
|
||||
// derived from RELEASE_DEFAULT_MODULE_BUILD_FROM_SOURCE
|
||||
func (c Config) ReleaseDefaultModuleBuildFromSource() bool {
|
||||
return c.config.productVariables.ReleaseDefaultModuleBuildFromSource == nil ||
|
||||
Bool(c.config.productVariables.ReleaseDefaultModuleBuildFromSource)
|
||||
}
|
||||
|
||||
// A DeviceConfig object represents the configuration for a particular device
|
||||
// being built. For now there will only be one of these, but in the future there
|
||||
// may be multiple devices being built.
|
||||
|
|
|
@ -479,6 +479,8 @@ type ProductVariables struct {
|
|||
|
||||
ReleaseAconfigFlagDefaultPermission string `json:",omitempty"`
|
||||
|
||||
ReleaseDefaultModuleBuildFromSource *bool `json:",omitempty"`
|
||||
|
||||
KeepVndk *bool `json:",omitempty"`
|
||||
|
||||
CheckVendorSeappViolations *bool `json:",omitempty"`
|
||||
|
|
Loading…
Reference in a new issue