Don't impose Werror on users of BoringSSL

Change-Id: Ibc52fbe362728134fce3c90ee47a23065a2e31b2
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/74087
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
diff --git a/.bazelrc b/.bazelrc
index 62c7d20..24eb0dd 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -33,6 +33,12 @@
 build:macos --cxxopt=-std=c++17
 build:windows --cxxopt=/std:c++17
 
+# Our own builds should strictly build without warnings, but we don't add those
+# in targets like other flags because we can't assume all users will have clean
+# builds too.
+build:linux --cxxopt=-Werror
+build:macos --cxxopt=-Werror
+
 # Without setting a minimum macOS version, std::optional does not work.
 build:macos --cxxopt=-mmacosx-version-min=10.15
 
diff --git a/util/util.bzl b/util/util.bzl
index 3d747db..a94caeb 100644
--- a/util/util.bzl
+++ b/util/util.bzl
@@ -22,7 +22,6 @@
 gcc_copts = [
     # This list of warnings should match those in the top-level CMakeLists.txt.
     "-Wall",
-    "-Werror",
     "-Wformat=2",
     "-Wsign-compare",
     "-Wmissing-field-initializers",