Merge "Do not enable stack protector for Windows"
diff --git a/Android.bp b/Android.bp
index fa9a7eb..ebd9400 100644
--- a/Android.bp
+++ b/Android.bp
@@ -74,7 +74,6 @@
         "-ffunction-sections",
         "-funwind-tables",
         "-g",
-        "-fstack-protector",
         "-fno-short-enums",
         "-finline-limit=64",
         "-Wa,--noexecstack",
@@ -149,6 +148,10 @@
         },
         windows: {
             enabled: true,
+            // "-fstack-protector" is not used by default on Windows, and enabling it
+            // on one library only prevents this library from being linked successfully
+            // when used as a dependency. So we disable it for Windows.
+            cflags: ["-fno-stack-protector"],
         },
     },
 }