From 77d2e4eaf54fb5e247cb39c77b99be6a155e667f Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 2 Aug 2017 22:01:16 -0400 Subject: [PATCH 1/2] Add AppVeyor rule to makefile This should sidestep some problems we are experiencing with AppVeyor during x64 builds. Specifically, the missing VCUpgrade.exe and the poor job it does when upgrading our project for the platform\'s tools. This recipe takes cryptlib.vcxproj and cryptest.vcxproj, and copies it into TestScripts. This ensures TestScripts always has the latest Visual Studio project files. Then, the recipe changes PlatformToolset to the undocumented $\(DefaultPlatformToolset\). Finally, our AppVeyor test script will copy TestScripts/*.vcxproj into PWD before executing MSbuild. Also see http://stackoverflow.com/questions/43423761/cant-perform-64-bit-testing-under-appveyor, http://stackoverflow.com/questions/45452145/how-to-set-platformtoolset-property-from-msbuild and http://stackoverflow.com/questions/43441273/how-to-run-vcupgrade-before-appveyor-build --- GNUmakefile | 7 +- TestScripts/cryptest.vcxproj | 321 +++++++++++++++++++++++ TestScripts/cryptlib.vcxproj | 479 +++++++++++++++++++++++++++++++++++ 3 files changed, 806 insertions(+), 1 deletion(-) create mode 100644 TestScripts/cryptest.vcxproj create mode 100644 TestScripts/cryptlib.vcxproj diff --git a/GNUmakefile b/GNUmakefile index da9d10f1..31d26606 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -746,8 +746,13 @@ ifeq ($(wildcard Filelist.txt),Filelist.txt) DIST_FILES := $(shell cat Filelist.txt) endif +.PHONY: appveyor +appveyor: + sed 's|Toolset>v100|Toolset>$$(DefaultPlatformToolset)|g' cryptlib.vcxproj > TestScripts/cryptlib.vcxproj + sed 's|Toolset>v100|Toolset>$$(DefaultPlatformToolset)|g' cryptest.vcxproj > TestScripts/cryptest.vcxproj + .PHONY: trim -trim: +trim: appveyor ifneq ($(IS_DARWIN),0) sed -i '' -e's/[[:space:]]*$$//' *.sh .*.yml *.h *.cpp *.asm *.s *.sln *.vcxproj *.filters GNUmakefile GNUmakefile-cross sed -i '' -e's/[[:space:]]*$$//' TestData/*.dat TestVectors/*.txt TestScripts/*.* diff --git a/TestScripts/cryptest.vcxproj b/TestScripts/cryptest.vcxproj new file mode 100644 index 00000000..d553244f --- /dev/null +++ b/TestScripts/cryptest.vcxproj @@ -0,0 +1,321 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + DLL-Import Debug + Win32 + + + DLL-Import Debug + x64 + + + DLL-Import Release + Win32 + + + DLL-Import Release + x64 + + + + {09cdac08-e6ae-48a9-8de7-0fbc779eebde} + cryptest + $(DefaultPlatformToolset) + Application + + + + + + + + + + + + + + Application + cryptest + .exe + false + MultiByte + true + + + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Debug\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Release\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + + + true + None + Level4 + + + + + NoErrorReport + cryptlib.lib;Ws2_32.lib + $(Platform)\Output\$(Configuration) + true + $(OutDir)\cryptlib.pdb + $(OutDir)\cryptest.exe + Console + + + + + + %(PreprocessorDefinitions) + Disabled + ProgramDatabase + EnableFastChecks + true + MultiThreadedDebug + + + %(PreprocessorDefinitions) + 0x0409 + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + MaxSpeed + true + AnySuitable + true + true + MultiThreaded + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + + + + + + CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + + + $(Platform)\DLL_Output\Debug + cryptopp.lib;cryptlib.lib;Ws2_32.lib + + + + + NDEBUG;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + + + $(Platform)\DLL_Output\Release + cryptopp.lib;cryptlib.lib;Ws2_32.lib + + + + + + StreamingSIMDExtensions2 + + + MachineX86 + true + + + + + + MachineX64 + + + + + + + echo ************************************************************************* + echo This configuration requires cryptopp.dll. You can build it yourself using + echo the cryptdll project, or obtain a pre-built, FIPS 140-2 validated DLL. If + echo you build it yourself the resulting DLL will not be considered FIPS + echo validated unless it undergoes the FIPS validation process. + echo ************************************************************************* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestScripts/cryptlib.vcxproj b/TestScripts/cryptlib.vcxproj new file mode 100644 index 00000000..bf8bbfed --- /dev/null +++ b/TestScripts/cryptlib.vcxproj @@ -0,0 +1,479 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + DLL-Import Debug + Win32 + + + DLL-Import Debug + x64 + + + DLL-Import Release + Win32 + + + DLL-Import Release + x64 + + + + {c39f4b46-6e89-4074-902e-ca57073044d2} + cryptlib + $(DefaultPlatformToolset) + StaticLibrary + + + + + + + + + + + + + + StaticLibrary + cryptlib + .lib + false + MultiByte + true + + + + + $(Platform)\Output\$(Configuration)\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Debug\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + $(Platform)\DLL_Output\Release\ + $(Platform)\$(ProjectName)\$(Configuration)\ + + + + + true + None + Level4 + Use + pch.h + + + NoErrorReport + + + + + + USE_PRECOMPILED_HEADERS;%(PreprocessorDefinitions) + Disabled + ProgramDatabase + EnableFastChecks + true + MultiThreadedDebug + + + %(PreprocessorDefinitions) + 0x0409 + + + + + + NDEBUG;USE_PRECOMPILED_HEADERS;%(PreprocessorDefinitions) + true + MaxSpeed + true + AnySuitable + true + true + MultiThreaded + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + + + + USE_PRECOMPILED_HEADERS;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + + + + + NDEBUG;USE_PRECOMPILED_HEADERS;CRYPTOPP_IMPORTS;%(PreprocessorDefinitions) + + + + + + StreamingSIMDExtensions2 + + + MachineX86 + true + + + + + + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + if not exist adhoc.cpp copy "%(FullPath)" adhoc.cpp + echo: >> adhoc.cpp.copied + + adhoc.cpp.copied;%(Outputs) + + + + + + + + + Building and assembling rdrand.asm + ml.exe /c /nologo /D_M_X86 /W3 /Cx /Zi /safeseh /Fo"$(IntDir)rdrand-x86.obj" "%(FullPath)" + $(IntDir)\rdrand-x86.obj;%(Outputs) + + + Building and assembling rdrand.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Cx /Zi /Fo"$(IntDir)rdrand-x64.obj" "%(FullPath)" + $(IntDir)\rdrand-x64.obj;%(Outputs) + + + Building and assembling x64dll.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Zi /Fo"$(IntDir)x64dll.obj" "%(FullPath)" + $(IntDir)x64dll.obj;%(Outputs) + + + Building and Assembling x64masm.asm + ml64.exe /c /nologo /D_M_X64 /W3 /Zi /Fo"$(IntDir)x64masm.obj" "%(FullPath)" + $(IntDir)x64masm.obj;%(Outputs) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From e162a67231a1cf87d32aa517f252802eeeb11694 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 2 Aug 2017 22:07:41 -0400 Subject: [PATCH 2/2] Copy converted *.vcxproj files from TestScripts before testing --- .appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 4c64133f..18665502 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,6 +35,10 @@ test_script: - cmd: >- + copy /y TestScripts/cryptlib.vcxproj . + + copy /y TestScripts/cryptest.vcxproj . + msbuild /t:Build cryptlib.vcxproj msbuild /t:Build cryptest.vcxproj