bazelbuild / continuous-integration

Bazel's Continuous Integration Setup
https://buildkite.com
Apache License 2.0
259 stars 135 forks source link

Install a previous version of MSVC build tools #1968

Closed meteorcloudy closed 4 months ago

meteorcloudy commented 4 months ago

Fixes https://github.com/bazelbuild/continuous-integration/issues/1967

There is no way to prevent installing the latest version, so we remove it manually.

fmeum commented 4 months ago

@meteorcloudy We found this workaround to fix the issue while still using the latest MSVC version: https://github.com/actions/runner-images/issues/10004#issuecomment-2153445161

meteorcloudy commented 4 months ago

Oh, do you mean adding /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR? That would only work for Bazel binaries having this change? Otherwise, we still need to ask users to upgrade vcruntime140.dll, right?

meteorcloudy commented 4 months ago

I'm hoping Microsoft could release a new MSVC version that fixes this issue.. otherwise, we'll have to give people a heads-up before switching to the latest MSVC (maybe in Bazel 8).

fmeum commented 4 months ago

Oh, do you mean adding /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR? That would only work for Bazel binaries having this change? Otherwise, we still need to ask users to upgrade vcruntime140.dll, right?

Yes. For building Bazel we would only need to add the copt, for Bazel itself we either need to add this to the toolchain or have users deal with the fallout themselves.

We noticed this because our protoc built from source would fail during the build.

meteorcloudy commented 4 months ago

Okay, I'll wait a bit on https://github.com/actions/runner-images/issues/10004 to see if there is any official recommended solution. In general, we probably shouldn't add too many random options in the default toolchain.