Use -Werror in external/python/cpython2
* Keep existing invalid-source-encoding and macro-redefined
warnings to fix later.
* No -Werror for darwin_x86_64 yet. Must fix/suppress all warnings first.
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I7e6e1974af3ab8f763baa3b3fdbe7ae11e841844
diff --git a/Android.bp b/Android.bp
index acb1f96..8128dea 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,6 +24,8 @@
"-Wall",
"-Wstrict-prototypes",
"-DPy_BUILD_CORE",
+ "-Wno-error=invalid-source-encoding",
+ "-Wno-error=macro-redefined",
"-Wno-missing-field-initializers",
"-Wno-shift-count-overflow",
"-Wno-sign-compare",
@@ -37,9 +39,11 @@
// Regenerate include dirs with android_regen.sh
darwin_x86_64: {
local_include_dirs: ["darwin_x86_64/pyconfig"],
+ // cflags: ["-Werror"], // still has warnings on darwin
},
linux_glibc_x86_64: {
local_include_dirs: ["linux_x86_64/pyconfig"],
+ cflags: ["-Werror"],
},
windows: {
enabled: false,