thebrowsercompany / swift-build

Swift toolchain builds by The Browser Company
351 stars 10 forks source link

Fix swift-toolchain.yml after VS 17.10 upgrade on latest GHA image #158

Closed z2oh closed 2 months ago

z2oh commented 2 months ago

The GitHub runner image update introduced two main problems:

  1. VS 17.10 STL introduced a hard requirement on Clang 17, which is not available for any 5.10 toolchain. For now, manually patch yvals_.core.h to relax this requirement, but this is brittle.
  2. An update in VS 17.10 STL made mutex's constructor constexpr, which breaks compatibility between mixing different versions of the STL (reasonable). A PATH configuration problem on the GHA image causes the linker picks up an old copy of vcruntime140.dll from a Python installation rather than C:\Windows\system32\vcruntime140.dll, violating this requirement of the STL. This is fixed in the latest GHA windows image, 20240610.1, but this hasn't made it to our runners yet, so in the meantime, disable the constexpr constructor to revert back to the old behavior with /D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR
z2oh commented 2 months ago

Kicked off a CI job against this branch here: https://github.com/thebrowsercompany/swift-build/actions/runs/9494592510

z2oh commented 2 months ago

No, I'll submit a PR.

z2oh commented 2 months ago

https://github.com/compnerd/swift-build/pull/743