Skip to content

Commit 3fa6a9f

Browse files
committed
Merge #20506: ci: AppVeyor fixes for Visual Studio 2019 16.8.1 image
2c69381 Removed redundant git pull from appveyor config. (Aaron Clauson) 8b99e60 Adjusted msvc compiler and linker settings to remove optimisations that are causing sporadic ABI issues on Visual Studio updates. (Aaron Clauson) Pull request description: The motivation for this PR is twofold: 1. Update the Qt binaries used by the appveyor CI job after a recent update to Visual Studio 2019 used in the Appveyor build image resulted in ABI incompatibilities, 2. Remove optimisations and debug information from the Bitcoin Core `Release` msvc build to reduce the chance of future ABI incompatibility issues for future Visual Studio updates. The changes made in this PR are: - Changed appveyor config file hash to use a new version of Qt pre-compiled binaries built for Visual Studio 2019 v16.8.1. - Adjusted msvc compiler and linker settings to remove optimisations and debug information generation to help avoid future 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. - Bumped vcpkg version to tag `2020.11-1` for binary caching feature*. See #20392 for related discussion. *Binary caching is a new [vcpkg feature](https://github.com/microsoft/vcpkg/blob/master/docs/specifications/binarycaching.md) that allows dependency caching. This PR is not using the feature but by updating the vcpkg version it means it can be optionally used by other contributors in their own Appveyor configs. By caching the vcpkg dependencies using this feature my build times are reduced by approx 10 minutes. ACKs for top commit: MarcoFalke: Concept ACK 2c69381 laanwj: Concept ACK 2c69381 Tree-SHA512: 372f5b8b3b5f7e56b78045f9fc06a22fd9f5366d06e99e2f1eaad6d741680da74d0e6371e7bc580cb41f4d6696b2101b950167309d33e98242578b458ace813a
2 parents a3186b6 + 2c69381 commit 3fa6a9f

File tree

5 files changed

+31
-52
lines changed

5 files changed

+31
-52
lines changed

.appveyor.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
version: '{branch}.{build}'
22
skip_tags: true
3-
image: Previous Visual Studio 2019
3+
image: Visual Studio 2019
44
configuration: Release
55
platform: x64
66
clone_depth: 5
77
environment:
88
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
99
PYTHONUTF8: 1
10-
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/v1.6/Qt5.9.8_x64_static_vs2019.zip'
11-
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
10+
QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip'
11+
QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3'
1212
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
13-
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
14-
VCPKG_COMMIT_ID: '40230b8e3f6368dcb398d649331be878ca1e9007'
13+
VCPKG_TAG: '2020.11-1'
1514
install:
1615
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
1716
# - cmd: pip install zmq
18-
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
17+
# The powershell block below is to set up vcpkg to install the c++ dependencies. The pseudo code is:
1918
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
20-
# b. Install the missing packages using the vcpkg manifest.
19+
# b. Append a setting to the vcpkg cmake config file to only do release builds of dependencies (skipping deubg builds saves ~5 mins).
20+
# Note originally this block also installed the dependencies using 'vcpkg install'. Dependencies are now installed
21+
# as part of the msbuild command using vcpkg mainfests.
2122
- ps: |
2223
cd c:\tools\vcpkg
2324
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
24-
git pull origin master > $null
25-
git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
25+
git -c advice.detachedHead=false checkout $env:VCPKG_TAG
2626
.\bootstrap-vcpkg.bat > $null
2727
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
2828
cd "$env:APPVEYOR_BUILD_FOLDER"

build_msvc/bitcoin-qt/bitcoin-qt.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</ClCompile>
5757
<Link>
5858
<AdditionalDependencies>$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
59-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
59+
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
6060
</Link>
6161
<ResourceCompile>
6262
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>

build_msvc/common.init.vcxproj

+18-39
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
<PropertyGroup Label="Globals">
66
<VCProjectVersion>16.0</VCProjectVersion>
7-
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
8-
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
97
<UseNativeEnvironment>true</UseNativeEnvironment>
108
</PropertyGroup>
119

@@ -16,6 +14,8 @@
1614
<VcpkgUseStatic>true</VcpkgUseStatic>
1715
<VcpkgAutoLink>true</VcpkgAutoLink>
1816
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
17+
<VcpkgTriplet Condition="'$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet>
18+
<VcpkgTriplet Condition="'$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet>
1919
</PropertyGroup>
2020

2121
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and !Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.props')">
@@ -45,66 +45,46 @@
4545
</ProjectConfiguration>
4646
</ItemGroup>
4747

48-
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
49-
<LinkIncremental>true</LinkIncremental>
50-
<WholeProgramOptimization>false</WholeProgramOptimization>
51-
<UseDebugLibraries>true</UseDebugLibraries>
48+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
49+
<LinkIncremental>false</LinkIncremental>
50+
<UseDebugLibraries>false</UseDebugLibraries>
5251
<PlatformToolset>v142</PlatformToolset>
5352
<CharacterSet>Unicode</CharacterSet>
53+
<GenerateManifest>No</GenerateManifest>
5454
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
5555
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
5656
</PropertyGroup>
57-
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
58-
<LinkIncremental>false</LinkIncremental>
59-
<WholeProgramOptimization>true</WholeProgramOptimization>
60-
<UseDebugLibraries>false</UseDebugLibraries>
57+
58+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
59+
<LinkIncremental>true</LinkIncremental>
60+
<UseDebugLibraries>true</UseDebugLibraries>
6161
<PlatformToolset>v142</PlatformToolset>
6262
<CharacterSet>Unicode</CharacterSet>
6363
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
6464
<IntDir>$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
6565
</PropertyGroup>
6666

67-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
68-
<ClCompile>
69-
<Optimization>MaxSpeed</Optimization>
70-
<FunctionLevelLinking>true</FunctionLevelLinking>
71-
<IntrinsicFunctions>true</IntrinsicFunctions>
72-
<SDLCheck>true</SDLCheck>
73-
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
74-
</ClCompile>
75-
<Link>
76-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
77-
<OptimizeReferences>true</OptimizeReferences>
78-
</Link>
79-
</ItemDefinitionGroup>
80-
81-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
8268
<ClCompile>
8369
<Optimization>Disabled</Optimization>
84-
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
85-
<SDLCheck>true</SDLCheck>
86-
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
87-
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
88-
</ClCompile>
89-
</ItemDefinitionGroup>
90-
91-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
92-
<ClCompile>
93-
<Optimization>MaxSpeed</Optimization>
70+
<WholeProgramOptimization>false</WholeProgramOptimization>
9471
<FunctionLevelLinking>true</FunctionLevelLinking>
9572
<IntrinsicFunctions>true</IntrinsicFunctions>
9673
<SDLCheck>true</SDLCheck>
9774
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
75+
<DebugInformationFormat>None</DebugInformationFormat>
9876
</ClCompile>
9977
<Link>
100-
<EnableCOMDATFolding>true</EnableCOMDATFolding>
101-
<OptimizeReferences>true</OptimizeReferences>
78+
<EnableCOMDATFolding>false</EnableCOMDATFolding>
79+
<OptimizeReferences>false</OptimizeReferences>
80+
<AdditionalOptions>/LTCG:OFF</AdditionalOptions>
10281
</Link>
10382
</ItemDefinitionGroup>
10483

105-
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
84+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
10685
<ClCompile>
10786
<Optimization>Disabled</Optimization>
87+
<WholeProgramOptimization>false</WholeProgramOptimization>
10888
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
10989
<SDLCheck>true</SDLCheck>
11090
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -124,7 +104,6 @@
124104
</ClCompile>
125105
<Link>
126106
<SubSystem>Console</SubSystem>
127-
<GenerateDebugInformation>true</GenerateDebugInformation>
128107
<AdditionalDependencies>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)</AdditionalDependencies>
129108
</Link>
130109
<Lib>

build_msvc/common.vcxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Target Name="CopyBuildArtifacts" Condition="'$(ConfigurationType)' != 'StaticLibrary'">
55
<ItemGroup>
66
<BuildArtifacts Include="$(OutDir)$(TargetName)$(TargetExt)"></BuildArtifacts>
7-
<BuildArtifacts Include="$(OutDir)$(TargetName).pdb"></BuildArtifacts>
7+
<BuildArtifacts Include="$(OutDir)$(TargetName).pdb" Condition="Exists('$(OutDir)$(TargetName).pdb')"></BuildArtifacts>
88
</ItemGroup>
99
<Copy SourceFiles="@(BuildArtifacts)" SkipUnchangedFiles="true" DestinationFolder="..\..\src\" Condition="'$(OutDir)' != ''"></Copy>
1010
</Target>

build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</ClCompile>
7474
<Link>
7575
<AdditionalDependencies>$(QtLibraryDir)\Qt5Test.lib;$(QtReleaseLibraries);%(AdditionalDependencies)</AdditionalDependencies>
76-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
76+
<AdditionalOptions>/ignore:4206 /LTCG:OFF</AdditionalOptions>
7777
</Link>
7878
</ItemDefinitionGroup>
7979

@@ -83,7 +83,7 @@
8383
</ClCompile>
8484
<Link>
8585
<AdditionalDependencies>$(QtDebugLibraries);%(AdditionalDependencies)</AdditionalDependencies>
86-
<AdditionalOptions>/ignore:4206</AdditionalOptions>
86+
<AdditionalOptions>/ignore:4206</AdditionalOptions>
8787
</Link>
8888
</ItemDefinitionGroup>
8989
<ItemGroup>

0 commit comments

Comments
 (0)