From 8b99e609e7da5dd3601e9214d8f869e96108fffe Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Wed, 2 Dec 2020 11:37:32 +0000 Subject: [PATCH 1/2] Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates. Tidied up debug and release configuration blocks in common project file to avoid duplication. Updated appveyor config to use latest Visual Studio 2019 image. Changed appveyor config file hash to use a new version of Qt pre-compiled binaries built for Visual Studio 2019 v16.8.1. Bumped vcpkg version to tag '2020.11-1' for binary caching feature. See #20392 for related discussion. --- .appveyor.yml | 19 +++--- build_msvc/bitcoin-qt/bitcoin-qt.vcxproj | 2 +- build_msvc/common.init.vcxproj | 63 +++++++------------ build_msvc/common.vcxproj | 2 +- .../test_bitcoin-qt/test_bitcoin-qt.vcxproj | 4 +- 5 files changed, 35 insertions(+), 55 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index bf93d7a9900..c21e7803a4e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,28 +1,29 @@ version: '{branch}.{build}' skip_tags: true -image: Previous Visual Studio 2019 +image: Visual Studio 2019 configuration: Release platform: x64 clone_depth: 5 environment: PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%' PYTHONUTF8: 1 - QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip' - QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21' + QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip' + QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3' QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019' - VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed' - VCPKG_COMMIT_ID: '40230b8e3f6368dcb398d649331be878ca1e9007' + VCPKG_TAG: '2020.11-1' install: # Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes. # - cmd: pip install zmq -# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is: +# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is: # a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary, -# b. Install the missing packages using the vcpkg manifest. +# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins). +# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed +# as part of the msbuild command using vcpkg mainfests. - ps: | cd c:\tools\vcpkg $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. - git pull origin master > $null - git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID + git -c advice.detachedHead=false checkout $env:VCPKG_TAG + git pull origin $env:VCPKG_TAG .\bootstrap-vcpkg.bat > $null Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" cd "$env:APPVEYOR_BUILD_FOLDER" diff --git a/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj b/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj index 17cd31a52ef..65ce1ee9da0 100644 --- a/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj +++ b/build_msvc/bitcoin-qt/bitcoin-qt.vcxproj @@ -56,7 +56,7 @@ $(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 /LTCG:OFF ..\..\src; diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj index ed227519ae1..9c589bccbc4 100644 --- a/build_msvc/common.init.vcxproj +++ b/build_msvc/common.init.vcxproj @@ -4,8 +4,6 @@ 16.0 - x86-windows-static - x64-windows-static true @@ -16,6 +14,8 @@ true true $(Configuration) + x86-windows-static + x64-windows-static @@ -45,66 +45,46 @@ + + false + false + v142 + Unicode + No + $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + $(Platform)\$(Configuration)\$(ProjectName)\ + + true - false true v142 Unicode $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ $(Platform)\$(Configuration)\$(ProjectName)\ - - false - true - false - v142 - Unicode - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ - $(Platform)\$(Configuration)\$(ProjectName)\ - - + - MaxSpeed + Disabled + false true true true MultiThreaded + None - true - true + false + false + /LTCG:OFF - - - Disabled - _DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebug - /bigobj %(AdditionalOptions) - - - - - - MaxSpeed - true - true - true - MultiThreaded - - - true - true - - - - + Disabled + false _DEBUG;%(PreprocessorDefinitions) true MultiThreadedDebug @@ -124,7 +104,6 @@ Console - true Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj index 4bbcc3767f6..270c75e8a7b 100644 --- a/build_msvc/common.vcxproj +++ b/build_msvc/common.vcxproj @@ -4,7 +4,7 @@ - + diff --git a/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj index 2095c0c3213..1ddd62edf25 100644 --- a/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj +++ b/build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj @@ -73,7 +73,7 @@ $(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 /LTCG:OFF @@ -83,7 +83,7 @@ $(QtDebugLibraries);%(AdditionalDependencies) - /ignore:4206 + /ignore:4206 From 2c69381f3de5091e103cb8bef299aba321503e7c Mon Sep 17 00:00:00 2001 From: Aaron Clauson Date: Thu, 3 Dec 2020 09:23:22 +0000 Subject: [PATCH 2/2] Removed redundant git pull from appveyor config. --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index c21e7803a4e..7250d4ad949 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -23,7 +23,6 @@ install: cd c:\tools\vcpkg $env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead. git -c advice.detachedHead=false checkout $env:VCPKG_TAG - git pull origin $env:VCPKG_TAG .\bootstrap-vcpkg.bat > $null Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)" cd "$env:APPVEYOR_BUILD_FOLDER"