]> git.lizzy.rs Git - rust.git/commitdiff
Work around CI issue with windows sdk 10.0.20348.0.
authorMara Bos <m-ou.se@m-ou.se>
Fri, 10 Sep 2021 11:46:15 +0000 (13:46 +0200)
committerMara Bos <m-ou.se@m-ou.se>
Fri, 10 Sep 2021 11:46:15 +0000 (13:46 +0200)
.github/workflows/ci.yml
src/ci/github-actions/ci.yml
src/ci/scripts/install-clang.sh

index ff4fa1527e93ad09beb3f137c458c5c79bc18600..78ff874e7550114f3919a77a108a9fd93514b788 100644 (file)
@@ -404,6 +404,7 @@ jobs:
               RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --host=aarch64-pc-windows-msvc --enable-full-tools --enable-profiler"
               SCRIPT: python x.py dist
               DIST_REQUIRE_ALL_TOOLS: 0
+              WINDOWS_SDK_20348_HACK: 1
             os: windows-latest-xl
           - name: dist-i686-mingw
             env:
index 6417f5a984ad55070e00731831ef815bd472998c..c9f8692d41887e1546d32836cece40f546f421cf 100644 (file)
@@ -635,6 +635,9 @@ jobs:
               SCRIPT: python x.py dist
               # RLS does not build for aarch64-pc-windows-msvc. See rust-lang/rls#1693
               DIST_REQUIRE_ALL_TOOLS: 0
+              # Hack around this SDK version, because it doesn't work with clang.
+              # See https://github.com/rust-lang/rust/issues/88796
+              WINDOWS_SDK_20348_HACK: 1
             <<: *job-windows-xl
 
           - name: dist-i686-mingw
index 7b540b5c6e99dd2bc0f274df220bef1fb13f983a..fd29d3a022ad3860be66cbb67bf69415daee65a7 100755 (executable)
@@ -37,6 +37,12 @@ if isMacOS; then
     # `clang-ar` by accident.
     ciCommandSetEnv AR "ar"
 elif isWindows && [[ ${CUSTOM_MINGW-0} -ne 1 ]]; then
+
+    if [[ ${WINDOWS_SDK_20348_HACK-0} -eq 1 ]]; then
+        rm -rf '/c/Program Files (x86)/Windows Kits/10/include/10.0.20348.0'
+        mv '/c/Program Files (x86)/Windows Kits/10/include/'10.0.{19041,20348}.0
+    fi
+
     # If we're compiling for MSVC then we, like most other distribution builders,
     # switch to clang as the compiler. This'll allow us eventually to enable LTO
     # amongst LLVM and rustc. Note that we only do this on MSVC as I don't think