From 5f9dccb9bce957979efa6efea961192a12f76790 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 29 Aug 2019 16:56:00 +0530 Subject: [PATCH] azure: Workaround MSYS2 PCH test failures Compiler version is hard-coded so that we remember to revisit this when the GCC version is updated. Closes https://github.com/mesonbuild/meson/issues/5807 --- azure-pipelines.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6ddeb10cd..55b6972a5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -197,6 +197,20 @@ jobs: mingw-w64-$(MSYS2_ARCH)-python3-setuptools ^ %TOOLCHAIN% displayName: Install Dependencies + - powershell: | + # https://github.com/mesonbuild/meson/issues/5807 + # https://github.com/msys2/MINGW-packages/issues/5719#issuecomment-525845769 + if ($env:compiler -eq 'gcc') { + (New-Object net.webclient).DownloadFile("https://github.com/mesonbuild/cidata/raw/master/win32/setdllcharacteristics.exe", "$(System.WorkFolder)\setdllcharacteristics.exe") + if ($env:MSYS2_ARCH -eq 'x86_64') { + $(System.WorkFolder)\setdllcharacteristics -d $env:MSYS2_ROOT\mingw64\lib\gcc\x86_64-w64-mingw32\9.2.0\cc1.exe + $(System.WorkFolder)\setdllcharacteristics -d $env:MSYS2_ROOT\mingw64\lib\gcc\x86_64-w64-mingw32\9.2.0\cc1plus.exe + } else { + $(System.WorkFolder)\setdllcharacteristics -d $env:MSYS2_ROOT\mingw32\lib\gcc\i686-w64-mingw32\9.2.0\cc1.exe + $(System.WorkFolder)\setdllcharacteristics -d $env:MSYS2_ROOT\mingw32\lib\gcc\i686-w64-mingw32\9.2.0\cc1plus.exe + } + } + displayName: MSYS2 PCH hack - script: | set BOOST_ROOT= set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem