aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2018-01-19 16:07:51 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-01-19 16:07:51 +0000
commitbb20d98bb752268e112342881fcd72c1dc43df30 (patch)
tree4ac2894f906c019cc4ca2615ffe00a3ccf5baafe /android
parent7f76db2cc30d4332700ce5b6d1d5eb9662c00a26 (diff)
parentcbc5232329b03b2184cfc7e8b7218033e1c0520d (diff)
downloadbuild_soong-bb20d98bb752268e112342881fcd72c1dc43df30.tar.gz
build_soong-bb20d98bb752268e112342881fcd72c1dc43df30.tar.bz2
build_soong-bb20d98bb752268e112342881fcd72c1dc43df30.zip
Merge "Support enabling overflow sanitization by path." am: c1fecc2dfa am: a613b55860
am: cbc5232329 Change-Id: I99e120a4e5442bf2715ffce7f2ac69c60085140b
Diffstat (limited to 'android')
-rw-r--r--android/config.go7
-rw-r--r--android/variable.go1
2 files changed, 8 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go
index 43d743b6..5d38d718 100644
--- a/android/config.go
+++ b/android/config.go
@@ -712,6 +712,13 @@ func (c *config) CFIDisabledForPath(path string) bool {
return PrefixInList(path, *c.ProductVariables.CFIExcludePaths)
}
+func (c *config) IntegerOverflowEnabledForPath(path string) bool {
+ if c.ProductVariables.IntegerOverflowIncludePaths == nil {
+ return false
+ }
+ return PrefixInList(path, *c.ProductVariables.IntegerOverflowIncludePaths)
+}
+
func (c *config) CFIEnabledForPath(path string) bool {
if c.ProductVariables.CFIIncludePaths == nil {
return false
diff --git a/android/variable.go b/android/variable.go
index baf6de32..79406d31 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -177,6 +177,7 @@ type productVariables struct {
MinimizeJavaDebugInfo *bool `json:",omitempty"`
IntegerOverflowExcludePaths *[]string `json:",omitempty"`
+ IntegerOverflowIncludePaths *[]string `json:",omitempty"`
EnableCFI *bool `json:",omitempty"`
CFIExcludePaths *[]string `json:",omitempty"`