aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2018-01-29 23:11:42 -0800
committerPirama Arumuga Nainar <pirama@google.com>2018-02-13 09:41:13 -0800
commit49540800f038de8b93411aa20b95215cb674ee42 (patch)
treef7a44e0a75508dbc2df16eec075045fca507b6ee /android
parent1d29875829712eb37d0a1808716c94126018e52d (diff)
downloadbuild_soong-49540800f038de8b93411aa20b95215cb674ee42.tar.gz
build_soong-49540800f038de8b93411aa20b95215cb674ee42.tar.bz2
build_soong-49540800f038de8b93411aa20b95215cb674ee42.zip
Search for PGO profiles in PGO_ADDITIONAL_PROFILE_DIRS
This variable can be set in BoardConfig.mk to specify a list of additional paths that contain PGO profiles. These directories are searched after the predefined paths in soong/cc/pgo.go while finding PGO profiles. Test: Set this variable in a BoardConfig and verify that such profiles are found and that these paths are searched after the predefined paths in soong/cc/pgo.go. Change-Id: I0bb9523de614d0f23aba8d51c887d8fc8f41c993
Diffstat (limited to 'android')
-rw-r--r--android/config.go4
-rw-r--r--android/variable.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go
index b5ec9758..1e5dd521 100644
--- a/android/config.go
+++ b/android/config.go
@@ -710,6 +710,10 @@ func (c *deviceConfig) CoverageEnabledForPath(path string) bool {
return coverage
}
+func (c *deviceConfig) PgoAdditionalProfileDirs() []string {
+ return c.config.ProductVariables.PgoAdditionalProfileDirs
+}
+
func (c *config) IntegerOverflowDisabledForPath(path string) bool {
if c.ProductVariables.IntegerOverflowExcludePaths == nil {
return false
diff --git a/android/variable.go b/android/variable.go
index 2c2a0cfe..328074a3 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -205,6 +205,8 @@ type productVariables struct {
ExtraVndkVersions []string `json:",omitempty"`
NamespacesToExport []string `json:",omitempty"`
+
+ PgoAdditionalProfileDirs []string `json:",omitempty"`
}
func boolPtr(v bool) *bool {