Build with C11 on MSVC in the standalone Bazel build
We require MSVC 2019 now, which has a /std:c11 flag. Enable it to match
the CMake build and remove a blocker for requiring C11 unconditionally.
(This select branch is also used by clang-cl. I had meant to figure out
the @bazel_tools business as part of this, but it turns out clang-cl
works better with the MSVC flags than the GCC ones anyway. -Wall in
clang-cl is like MSVC's /Wall and actually means all warnings. Ideally
we'd still condition this on the compiler, in case anyone uses MinGW,
but we can figure that out later.)
Tested with bazelisk build :all and
bazelisk build --compiler=clang-cl :all on Windows.
Change-Id: I4559789a221071eef39f9d34929f0e9c5994119e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61127
Commit-Queue: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel
index 2067864..48dc920 100644
--- a/util/BUILD.toplevel
+++ b/util/BUILD.toplevel
@@ -121,7 +121,7 @@
}) + asm_copts
boringssl_copts_c11 = boringssl_copts + select({
- "@platforms//os:windows": [],
+ "@platforms//os:windows": ["/std:c11"],
"//conditions:default": gcc_copts_c11,
})