soong: -Werror=fortify-source
Recently, we started deferring to clang for some of its built-in
FORTIFY-like warnings. We should always treat these as errors, since
they represent potential security vulnerabilities.
Bug: 131861088
Test: m. Also made a compilation in Bionic fail; verified the build
command had -Werror=fortify-source in it.
Change-Id: I2715ea411ef067f801534dab4d306fef5431f290
diff --git a/cc/config/global.go b/cc/config/global.go
index d873494..8cf8de6 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -108,6 +108,7 @@
noOverrideGlobalCflags = []string{
"-Werror=int-to-pointer-cast",
"-Werror=pointer-to-int-cast",
+ "-Werror=fortify-source",
}
IllegalFlags = []string{