Merge "Disable Hidden API Checks for ENG Builds" into main am: d938f83be1
am: f42fbcf6a1
am: e4b8ef7b74
am: 128acca18d
am: ae1c06f8f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2666977 Change-Id: Ib60d7842670c38de0bb3ca37607f7930cc7321df Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -170,6 +170,19 @@ func (c Config) RunningInsideUnitTest() bool {
|
||||
return c.config.TestProductVariables != nil
|
||||
}
|
||||
|
||||
// DisableHiddenApiChecks returns true if hiddenapi checks have been disabled.
|
||||
// For 'eng' target variant hiddenapi checks are disabled by default for performance optimisation,
|
||||
// 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.
|
||||
// If both ENABLE_HIDDENAPI_FLAGS=true and UNSAFE_DISABLE_HIDDENAPI_FLAGS=true, then
|
||||
// ENABLE_HIDDENAPI_FLAGS=true will be triggered and hiddenapi checks will be considered enabled.
|
||||
func (c Config) DisableHiddenApiChecks() bool {
|
||||
return !c.IsEnvTrue("ENABLE_HIDDENAPI_FLAGS") &&
|
||||
(c.IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") ||
|
||||
Bool(c.productVariables.Eng))
|
||||
}
|
||||
|
||||
// MaxPageSizeSupported returns the max page size supported by the device. This
|
||||
// value will define the ELF segment alignment for binaries (executables and
|
||||
// shared libraries).
|
||||
|
Reference in New Issue
Block a user