fix x86 Android builds
After tinkering with libstdc++ -> libc++, looks like we need this
warning again. We already turn it on in Android's own x86 builds;
see gn_to_bp.py for that.
Change-Id: I7b7a76d1c22dd3f3b7712e9ce89b78d9a229a302
Reviewed-on: https://skia-review.googlesource.com/92360
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 87d24b0..fdf1470 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -298,6 +298,11 @@
# We're pretty sure it's actually 8-byte alignment.
cflags += [ "-Wno-over-aligned" ]
}
+ if (target_cpu == "x86" && is_android) {
+ # Clang seems to think new/malloc will only be 4-byte aligned on 32-bit x86 Android builds.
+ # We're pretty sure it's actually 8-byte alignment. See OverAlignedTest.cpp for more info.
+ cflags += [ "-Wno-over-aligned" ]
+ }
# Shouldn't be necessary for local builds. With distributed Windows builds, files may lose
# their case during copy, causing case-sensitivity mismatch on remote machines.