Skip to content

Commit 1e2f169

Browse files
davidbenBoringssl LUCI CQ
authored andcommitted
Revert "Build with C11 on MSVC in the standalone Bazel build"
This reverts commit 28e4a1b. Bazel broke --cxxopt on Windows in bazelbuild/bazel#15073, which means projects enabling, say, C++20 with --cxxopt=/std:c++20 are silently passing /std:c++20 to our C files. This is already a problem, but MSVC is smart enough to silently ignore the flag when building C. However, MSVC will report an error if you then pass /std:c++20 /std:c11 into the same command. It seems that check is not aware of this ignoring behavior. Ultimately, this is a Bazel bug, and one that makes the broken versions of Bazel unsuitable for use with C. This was fixed in Bazel in bazelbuild/bazel#18119 and backported to the upcoming Bazel 6.3.0 release in bazelbuild/bazel#18552 Temporarily revert the change. When Bazel 6.3.0 is released, we'll put this back and require Windows users use a functioning version of Bazel. Bug: 624 Fixed: 623 Change-Id: I68d9b2ed8751b4cf5dc7f42f8c1fbd42a97d6ca2 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61365 Auto-Submit: David Benjamin <[email protected]> Commit-Queue: David Benjamin <[email protected]> Commit-Queue: Adam Langley <[email protected]> Reviewed-by: Adam Langley <[email protected]>
1 parent 63f4b80 commit 1e2f169

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

util/BUILD.toplevel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ boringssl_copts = [
121121
}) + asm_copts
122122

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

0 commit comments

Comments
 (0)