[freetype2] enable fsanitize=function
Bug: https://fxbug.dev/42078767
Change-Id: Idc962668685b060a4b5e8dce74f4b7be0e57c105
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/freetype2/+/1189312
Reviewed-by: Gulfem Savrun Yeniceri <gulfem@google.com>
Reviewed-by: Daniel Thornburgh <dthorn@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index db0ea6c..44915e8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -28,19 +28,13 @@
config("freetype_config") {
include_dirs = [ "include" ]
- cflags = [ "-Wno-macro-redefined" ]
-
- # TODO(fxbug.dev/42078767): freetype2 has a lot of instances of this type of
- # UB. We should come back and fix these. Disabling this check here though
- # doesn't change anything since it wasn't until recently that this check was
- # extended to cover C, so these bugs were already here.
- cflags_c = [ "-fno-sanitize=function" ]
}
config("freetype_warnings") {
cflags = [
"-Wno-conversion",
"-Wno-implicit-fallthrough",
+ "-Wno-macro-redefined",
"-Wno-unused-function",
"-Wno-unused-variable",
]