From 28e4a1b838b2ffbf9e2151ae5fcfffe5ab0ffac0 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 23 Jun 2023 15:29:16 -0400 Subject: [PATCH] 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 Auto-Submit: David Benjamin Reviewed-by: Adam Langley --- util/BUILD.toplevel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/BUILD.toplevel b/util/BUILD.toplevel index 2067864424..48dc920683 100644 --- a/util/BUILD.toplevel +++ b/util/BUILD.toplevel @@ -121,7 +121,7 @@ boringssl_copts = [ }) + asm_copts boringssl_copts_c11 = boringssl_copts + select({ - "@platforms//os:windows": [], + "@platforms//os:windows": ["/std:c11"], "//conditions:default": gcc_copts_c11, })