Reland "Build with C11 on MSVC in the standalone Bazel build"

This reverts 1e2f169663. Bazel 6.3 has
since been released, which includes a fix for
https://github.com/bazelbuild/bazel/issues/15073. Envoy and gRPC have
both since updated to this Bazel version. The policies in
https://opensource.google/documentation/policies/cplusplus-support#build_systems
also imply a minimum Bazel version of 6.3.2.

I'm thinking we let this bake for a little while, to catch any
unexpected issues, and then, if it sticks, we try to go ahead and
require C11 across the board.

Update-Note: If using Bazel with MSVC, and the build fails with
something like "Command line error D8016 : '/std:c++20' and '/std:c11'
command-line options are incompatible", you are likely running into the
above Bazel bug. Update to Bazel 6.3 or later.

Bug: 623, 624
Change-Id: I8baa99392ca47bc7580bc2930e7f4b16beced91e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62905
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
chromium-stable
David Benjamin 1 year ago committed by Boringssl LUCI CQ
parent 5a3eb9ea7e
commit 235ee97b46
  1. 5
      util/BUILD.toplevel

@ -121,10 +121,7 @@ boringssl_copts = [
}) + asm_copts
boringssl_copts_c11 = boringssl_copts + select({
# TODO(crbug.com/boringssl/624): This should pass /std:c11 on MSVC. It was
# reverted due to https://github.com/bazelbuild/bazel/issues/15073. When
# Bazel 6.3.0 is released, restore it and require C11 on MSVC.
"@platforms//os:windows": [],
"@platforms//os:windows": ["/std:c11"],
"//conditions:default": gcc_copts_c11,
})

Loading…
Cancel
Save