From 925ad13a8500682b604063773b5ab43b77b88769 Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Tue, 29 Mar 2022 16:27:31 +0100 Subject: [PATCH 1/6] Fix Issue 22956 - Bump LLD version Or try to bump version at least --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e60385b6..380ea267 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ jobs: variables: VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ # NB: update windows/build_lld.sha256sums as well - LLVM_VER: 9.0.0 + LLVM_VER: 14.0.0 ARCH: x86 steps: - template: .azure-pipelines/build-lld.yml @@ -24,7 +24,7 @@ jobs: variables: VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ # NB: update windows/build_lld.sha256sums as well - LLVM_VER: 9.0.0 + LLVM_VER: 14.0.0 ARCH: x64 steps: - template: .azure-pipelines/build-lld.yml From 17d4b686b4dfee1d814fc0385f33aaa3c6d91174 Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Tue, 29 Mar 2022 19:37:59 +0100 Subject: [PATCH 2/6] Try to update LLVM_URL --- windows/build_lld.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/windows/build_lld.bat b/windows/build_lld.bat index f6506e75..518758a1 100644 --- a/windows/build_lld.bat +++ b/windows/build_lld.bat @@ -16,7 +16,10 @@ call "%VSINSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% cd %ROOT% @echo on -set LLVM_URL=http://releases.llvm.org/%LLVM_VER% + +:: LLVM releases are now done with github so need to match https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/lld-14.0.0.src.tar.xz + +set LLVM_URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-%LLVM_VER% powershell -Command "Invoke-WebRequest %LLVM_URL%/lld-%LLVM_VER%.src.tar.xz -OutFile lld.src.tar.xz" || exit /B 1 powershell -Command "Invoke-WebRequest %LLVM_URL%/llvm-%LLVM_VER%.src.tar.xz -OutFile llvm.src.tar.xz" || exit /B 1 From cc01e830a5cac6f871f926d83a5e4f0bde0ad098 Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Tue, 29 Mar 2022 19:46:08 +0100 Subject: [PATCH 3/6] Update 256sums --- windows/build_lld.sha256sums | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/build_lld.sha256sums b/windows/build_lld.sha256sums index f9f9c161..b0554329 100644 --- a/windows/build_lld.sha256sums +++ b/windows/build_lld.sha256sums @@ -1,2 +1,2 @@ -31c6748b235d09723fb73fea0c816ed5a3fab0f96b66f8fbc546a0fcc8688f91 lld.src.tar.xz -d6a0565cf21f22e9b4353b2eb92622e8365000a9e90a16b09b56f8157eabfe84 llvm.src.tar.xz +88fc0f028aa8c0d9287920b101f288b03c7fabb584077326c5a0be482eb9115c lld.src.tar.xz +4df7ed50b8b7017b90dc22202f6b59e9006a29a9568238c6af28df9c049c7b9b llvm.src.tar.xz From f5ebfb15cd1e8512febba92204baaf92a027f8ca Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Tue, 29 Mar 2022 20:01:11 +0100 Subject: [PATCH 4/6] Say yes to 7zip dialogues --- windows/build_lld.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/windows/build_lld.bat b/windows/build_lld.bat index 518758a1..491ad667 100644 --- a/windows/build_lld.bat +++ b/windows/build_lld.bat @@ -27,11 +27,11 @@ powershell -Command "Invoke-WebRequest %LLVM_URL%/llvm-%LLVM_VER%.src.tar.xz -Ou dos2unix "%ROOT%\windows\build_lld.sha256sums" sha256sum -c "%ROOT%\windows\build_lld.sha256sums" || exit /B 1 -7z x "llvm.src.tar.xz" || exit /B 1 -7z x "lld.src.tar.xz" || exit /B 1 +7z x "llvm.src.tar.xz" -y || exit /B 1 +7z x "lld.src.tar.xz" -y || exit /B 1 -7z x "llvm.src.tar" || exit /B 1 -7z x "lld.src.tar" || exit /B 1 +7z x "llvm.src.tar" -y || exit /B 1 +7z x "lld.src.tar" -y || exit /B 1 move "llvm-%LLVM_VER%.src" llvm move "lld-%LLVM_VER%.src" llvm\tools\lld From 336e91da15e5eef265f95b2743cf16c6d8835135 Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Wed, 30 Mar 2022 16:03:50 +0100 Subject: [PATCH 5/6] Try VS2019? --- windows/build_lld.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/build_lld.bat b/windows/build_lld.bat index 491ad667..8efe4a6d 100644 --- a/windows/build_lld.bat +++ b/windows/build_lld.bat @@ -46,8 +46,8 @@ set lld_build_dir=build-lld if not exist "%lld_build_dir%\nul" md "%lld_build_dir%" cd "%lld_build_dir%" -set CMAKE_OPT=-G "Visual Studio 15" -if "%ARCH%" == "x64" set CMAKE_OPT=-G "Visual Studio 15 Win64" +set CMAKE_OPT=-G "Visual Studio 19" +if "%ARCH%" == "x64" set CMAKE_OPT=-G "Visual Studio 19 Win64" set CMAKE_OPT=%CMAKE_OPT% -DCMAKE_BUILD_TYPE=Release set CMAKE_OPT=%CMAKE_OPT% -DLLVM_TARGETS_TO_BUILD=X86 From a8c64cb3487b4c7a24739debd230bb12893f366e Mon Sep 17 00:00:00 2001 From: Max Haughton Date: Wed, 30 Mar 2022 16:11:55 +0100 Subject: [PATCH 6/6] Add choco nativedesktop things --- windows/build_lld.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/windows/build_lld.bat b/windows/build_lld.bat index 8efe4a6d..9592c360 100644 --- a/windows/build_lld.bat +++ b/windows/build_lld.bat @@ -40,14 +40,16 @@ rem patch lld to not emit "No structured exception handler" sed -e s/IMAGE_DLL_CHARACTERISTICS_NO_SEH/0/ llvm\tools\lld\COFF\Writer.cpp >Writer.tmp move /Y Writer.tmp llvm\tools\lld\COFF\Writer.cpp +choco install visualstudio2019-workload-nativedesktop + set CMAKE_OPT=%CMAKE_OPT% -DCMAKE_CXX_FLAGS="/DIMAGE_DLL_CHARACTERISTICS_NO_SEH=0" set lld_build_dir=build-lld if not exist "%lld_build_dir%\nul" md "%lld_build_dir%" cd "%lld_build_dir%" -set CMAKE_OPT=-G "Visual Studio 19" -if "%ARCH%" == "x64" set CMAKE_OPT=-G "Visual Studio 19 Win64" +set CMAKE_OPT=-G "Visual Studio 15" +if "%ARCH%" == "x64" set CMAKE_OPT=-G "Visual Studio 15 Win64" set CMAKE_OPT=%CMAKE_OPT% -DCMAKE_BUILD_TYPE=Release set CMAKE_OPT=%CMAKE_OPT% -DLLVM_TARGETS_TO_BUILD=X86