aboutsummaryrefslogtreecommitdiff
path: root/build_msvc
diff options
context:
space:
mode:
authormerge-script <fanquake@gmail.com>2024-04-28 10:55:01 +0800
committermerge-script <fanquake@gmail.com>2024-04-28 10:55:01 +0800
commit3aaf7328eb656b642e5f0f74f3e4d51645a1d0ab (patch)
tree5cc08aec268e6b6c090936a104592b23e7af4274 /build_msvc
parent7fee0ca014b1513e836d2550d1b7512739d5a79a (diff)
parent18fd522ca9a74cf8690a6c9b9b729e78c6ed41fd (diff)
Merge bitcoin/bitcoin#29774: build: Enable fuzz binary in MSVC
18fd522ca9a74cf8690a6c9b9b729e78c6ed41fd ci, msvc: Add "Run fuzz binaries" step (Hennadii Stepanov) 52933d7283736fe3ae15e7ac44c02ca3bd95fe6d fuzz: Pass `SystemRoot` environment variable to subprocess (Hennadii Stepanov) 23cb8207cdd6c674480840b76626039cdfe7cb13 ci, msvc: Add "Clone fuzz corpus" step (Hennadii Stepanov) 19dceddf4bcdb74e84cf27229039a239b873d41b build, msvc: Build `fuzz.exe` binary (Hennadii Stepanov) 4c078d7bd278fa8b4db6e1da7b9b747f49a8ac4c build, msvc: Enable preprocessor conformance mode (Hennadii Stepanov) 09f5a74198c328c80539c17d951a70558e6b361e fuzz: Re-implement `read_stdin` in portable way (Hennadii Stepanov) Pull request description: Closes https://github.com/bitcoin/bitcoin/issues/29760. Suggested in https://github.com/bitcoin/bitcoin/pull/29758#issuecomment-2025593572. ACKs for top commit: maflcko: lgtm ACK 18fd522ca9a74cf8690a6c9b9b729e78c6ed41fd 🔍 sipsorcery: tACK 18fd522ca9a74cf8690a6c9b9b729e78c6ed41fd sipa: utACK 18fd522ca9a74cf8690a6c9b9b729e78c6ed41fd Tree-SHA512: 672ed6926ee9091f68f13780e77b60fc1d48731f16e847d849374f8426ffe1dafd9bcab06a27af62e8052ba345bb57f20f40579d6be8540c12ef85c23a6eec8b
Diffstat (limited to 'build_msvc')
-rw-r--r--build_msvc/bitcoin.sln8
-rw-r--r--build_msvc/bitcoind/bitcoind.vcxproj2
-rw-r--r--build_msvc/common.init.vcxproj.in4
-rw-r--r--build_msvc/fuzz/fuzz.vcxproj91
4 files changed, 101 insertions, 4 deletions
diff --git a/build_msvc/bitcoin.sln b/build_msvc/bitcoin.sln
index 0931bf5dfe..9fd6395f59 100644
--- a/build_msvc/bitcoin.sln
+++ b/build_msvc/bitcoin.sln
@@ -48,7 +48,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtest_util", "libtest_uti
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_bitcoin-qt", "test_bitcoin-qt\test_bitcoin-qt.vcxproj", "{51201D5E-D939-4854-AE9D-008F03FF518E}"
EndProject
-Project("{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}") = "libminisketch", "libminisketch\libminisketch.vcxproj", "{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libminisketch", "libminisketch\libminisketch.vcxproj", "{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzz", "fuzz\fuzz.vcxproj", "{AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -152,6 +154,10 @@ Global
{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Debug|x64.Build.0 = Debug|x64
{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.ActiveCfg = Release|x64
{542007E3-BE0D-4B0D-A6B0-AA8813E2558D}.Release|x64.Build.0 = Release|x64
+ {AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}.Debug|x64.ActiveCfg = Debug|x64
+ {AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}.Debug|x64.Build.0 = Debug|x64
+ {AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}.Release|x64.ActiveCfg = Release|x64
+ {AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build_msvc/bitcoind/bitcoind.vcxproj b/build_msvc/bitcoind/bitcoind.vcxproj
index a93723d8be..63337ca6a7 100644
--- a/build_msvc/bitcoind/bitcoind.vcxproj
+++ b/build_msvc/bitcoind/bitcoind.vcxproj
@@ -80,7 +80,7 @@
<ReplaceInFile FilePath="$(ConfigIniOut)"
Replace="@BUILD_BITCOIND_TRUE@" By=""></ReplaceInFile>
<ReplaceInFile FilePath="$(ConfigIniOut)"
- Replace="@ENABLE_FUZZ_BINARY_TRUE@" By="#"></ReplaceInFile>
+ Replace="@ENABLE_FUZZ_BINARY_TRUE@" By=""></ReplaceInFile>
<ReplaceInFile FilePath="$(ConfigIniOut)"
Replace="@ENABLE_ZMQ_TRUE@" By=""></ReplaceInFile>
<ReplaceInFile FilePath="$(ConfigIniOut)"
diff --git a/build_msvc/common.init.vcxproj.in b/build_msvc/common.init.vcxproj.in
index 950cc37f0a..71fceb6c66 100644
--- a/build_msvc/common.init.vcxproj.in
+++ b/build_msvc/common.init.vcxproj.in
@@ -87,10 +87,10 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
- <AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalOptions>/utf-8 /Zc:preprocessor /Zc:__cplusplus /std:c++20 %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4018;4244;4267;4715;4805</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
- <PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SECP256K1_STATIC;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;PROVIDE_FUZZ_MAIN_FUNCTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src;..\..\src\minisketch\include;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
diff --git a/build_msvc/fuzz/fuzz.vcxproj b/build_msvc/fuzz/fuzz.vcxproj
new file mode 100644
index 0000000000..fb77251a17
--- /dev/null
+++ b/build_msvc/fuzz/fuzz.vcxproj
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="..\common.init.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AFCEE6C1-89FB-49AB-A694-BA580A59E2D8}</ProjectGuid>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+ </PropertyGroup>
+ <ItemGroup>
+ <!-- TODO: Fix the code and remove bitdeque.cpp and miniscript.cpp exclusion. -->
+ <ClCompile Include="..\..\src\test\fuzz\*.cpp" Exclude="..\..\src\test\fuzz\bitdeque.cpp;..\..\src\test\fuzz\miniscript.cpp" />
+ <ClCompile Include="..\..\src\test\fuzz\util\descriptor.cpp">
+ <ObjectFileName>$(IntDir)test_fuzz_util_descriptor.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\test\fuzz\util\mempool.cpp">
+ <ObjectFileName>$(IntDir)test_fuzz_util_mempool.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\test\fuzz\util\net.cpp">
+ <ObjectFileName>$(IntDir)test_fuzz_util_net.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\coincontrol.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_coincontrol.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\coinselection.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_coinselection.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\fees.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_fees.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\notifications.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_notifications.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\parse_iso8601.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_parse_iso8601.obj</ObjectFileName>
+ </ClCompile>
+ <ClCompile Include="..\..\src\wallet\test\fuzz\scriptpubkeyman.cpp">
+ <ObjectFileName>$(IntDir)wallet_test_fuzz_scriptpubkeyman.obj</ObjectFileName>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\libminisketch\libminisketch.vcxproj">
+ <Project>{542007e3-be0d-4b0d-a6b0-aa8813e2558d}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_consensus\libbitcoin_consensus.vcxproj">
+ <Project>{2b384fa8-9ee1-4544-93cb-0d733c25e8ce}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_cli\libbitcoin_cli.vcxproj">
+ <Project>{0667528c-d734-4009-adf9-c0d6c4a5a5a6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_common\libbitcoin_common.vcxproj">
+ <Project>{7c87e378-df58-482e-aa2f-1bc129bc19ce}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_crypto\libbitcoin_crypto.vcxproj">
+ <Project>{6190199c-6cf4-4dad-bfbd-93fa72a760c1}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_node\libbitcoin_node.vcxproj">
+ <Project>{460fee33-1fe1-483f-b3bf-931ff8e969a5}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_util\libbitcoin_util.vcxproj">
+ <Project>{b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_wallet\libbitcoin_wallet.vcxproj">
+ <Project>{93b86837-b543-48a5-a89b-7c87abb77df2}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libbitcoin_zmq\libbitcoin_zmq.vcxproj">
+ <Project>{792d487f-f14c-49fc-a9de-3fc150f31c3f}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libtest_util\libtest_util.vcxproj">
+ <Project>{1e065f03-3566-47d0-8fa9-daa72b084e7d}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libunivalue\libunivalue.vcxproj">
+ <Project>{5724ba7d-a09a-4ba8-800b-c4c1561b3d69}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libsecp256k1\libsecp256k1.vcxproj">
+ <Project>{bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}</Project>
+ </ProjectReference>
+ <ProjectReference Include="..\libleveldb\libleveldb.vcxproj">
+ <Project>{18430fef-6b61-4c53-b396-718e02850f1b}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <DisableSpecificWarnings>4018;4244;4267;4334;4715;4805</DisableSpecificWarnings>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <Import Project="..\common.vcxproj" />
+</Project>