diff --git a/Algorithms/AlgorithmsDll.vcxproj b/Algorithms/AlgorithmsDll.vcxproj deleted file mode 100644 index 7903edd5..00000000 --- a/Algorithms/AlgorithmsDll.vcxproj +++ /dev/null @@ -1,307 +0,0 @@ - - - - - Debug-neon - ARM64 - - - Debug-sse2 - x64 - - - Debug-avx - x64 - - - Debug-avx2 - x64 - - - Debug-avx512 - x64 - - - Debug-sse2 - Win32 - - - Debug-avx - Win32 - - - Debug-avx2 - Win32 - - - Debug-avx512 - Win32 - - - Release-neon - ARM64 - - - Release-sse2 - x64 - - - Release-avx - x64 - - - Release-avx2 - x64 - - - Release-avx512 - x64 - - - Release-sse2 - Win32 - - - Release-avx - Win32 - - - Release-avx2 - Win32 - - - Release-avx512 - Win32 - - - - Release - neon - - - Release - sse2 - - - Release - avx - - - Release - avx2 - - - Release - avx512 - - - Debug - neon - - - Debug - sse2 - - - Debug - avx - - - Debug - avx2 - - - Debug - avx512 - - - - - - - - - - - - - - - - - - true - false - false - false - false - - - true - false - false - false - - - true - false - false - - - true - false - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - false - false - false - false - - - true - false - false - false - - - true - false - false - - - true - false - - - - 16.0 - Win32Proj - {12b1fb3e-a5e8-4778-82c2-b456049c4cf6} - AlgorithmsDll - 10.0 - - - - DynamicLibrary - ClangCL - Unicode - - - true - - - false - true - - - - - - - - - - true - - - false - - - $(ProjectDir)streebog;$(ProjectDir)deps\mbedtls\include;$(ProjectDir)XKCP;$(ProjectDir)deps\XKCP\lib\high\Keccak\;$(ProjectDir)deps\XKCP\lib\high\TurboSHAKE\;$(ProjectDir)deps\XKCP\lib\high\Keccak\FIPS202\;$(ProjectDir)deps\XKCP\lib\high\Keccak\SP800-185\;$(ProjectDir)deps\XKCP\lib\high\common\;$(ProjectDir)deps\XKCP\lib\high\Keccak\PRG\;$(ProjectDir)deps\XKCP\lib\high\Ketje\;$(ProjectDir)deps\XKCP\lib\high\Keyak\;$(ProjectDir)deps\XKCP\lib\high\KangarooTwelve\;$(ProjectDir)deps\XKCP\lib\high\Kravatte\;$(ProjectDir)deps\XKCP\lib\high\Xoofff\;$(ProjectDir)deps\XKCP\lib\high\Xoodyak\;$(ProjectDir)deps\XKCP\lib\common\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-200\ref\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-400\ref\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-800\plain\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-800\plain\lcua\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600\common\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600\plain-64bits\;$(ProjectDir)deps\XKCP\lib\low\common\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600\plain-64bits\lcua-shld\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600-times2\SIMD128\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600-times2\SIMD128\SSSE3-ua\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600-times4\fallback-on2\;$(ProjectDir)deps\XKCP\lib\low\KeccakP-1600-times8\fallback-on2\;$(ProjectDir)deps\XKCP\lib\low\Xoodoo\;$(ProjectDir)deps\XKCP\lib\low\Xoodoo\SSE2\;$(ProjectDir)deps\XKCP\lib\low\Xoodoo-times4\SSSE3\;$(ProjectDir)deps\XKCP\lib\low\Xoodoo-times8\fallback-on1\;$(ProjectDir)deps\XKCP\lib\low\Xoodoo-times16\fallback-on1\;$(ProjectDir)deps\XKCP\lib\low\Ketje\SnP-compliant\;$(IncludePath) - $(SolutionDir)bin\$(ConfigurationReal)\$(Platform)\ - $(ProjectName)-$(Platform)-$(Flavor) - $(SolutionDir)obj\$(ProjectName)\$(Platform)\$(Configuration)\ - - - - - - StreamingSIMDExtensions2 - - - - - AdvancedVectorExtensions - - - - - AdvancedVectorExtensions2 - - - - - AdvancedVectorExtensions512 - - - - - Level3 - true - BLAKE3_USE_NEON;MBEDTLS_CONFIG_FILE="$(ProjectDir)mbedtls_config.h";ALGORITHMSDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - NotUsing - true - stdcpp17 - - - Windows - true - false - /PDBALTPATH:%_PDB% /Brepro %(AdditionalOptions) - - $(ProjectDir)deps\XKCP\bin\libXKCP-$(Platform)-$(Flavor).lib;%(AdditionalDependencies) - - - - - MultiThreaded - true - true - NDEBUG;%(PreprocessorDefinitions) - - - true - true - - - - - MultiThreadedDebug - _DEBUG;%(PreprocessorDefinitions) - - - - - - - \ No newline at end of file diff --git a/Algorithms/AlgorithmsDll.vcxproj.filters b/Algorithms/AlgorithmsDll.vcxproj.filters deleted file mode 100644 index ba4fc5b7..00000000 --- a/Algorithms/AlgorithmsDll.vcxproj.filters +++ /dev/null @@ -1,169 +0,0 @@ - - - - - {c45949b8-d6c0-462c-bec0-92504e39e4c9} - - - {5d55c3f6-a2a0-47aa-8ee4-a617fc1473d0} - - - {66f0a0ef-450b-40eb-aed2-90523bd0f678} - - - {402b6c58-bf2b-4664-9630-4fab7d16894a} - - - {e8de2202-489c-4331-90cf-a66bc00736b6} - - - {5bd3a683-cf14-4915-9242-cdabbdbbc761} - - - {797b3c51-465d-4c66-88bc-2a934fb9f78c} - - - {5d3fcf71-ff59-4873-b414-8eb2005a636e} - - - {a1cce50e-3e65-4478-8e6c-c1310894be78} - - - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - mbedTLS - - - xxHash - - - Blake2sp - - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - GOST R 34.11-2012 - - - CRC32 - - - CRC64 - - - QuickXorHash - - - - - mbedTLS - - - xxHash - - - Blake2sp - - - Blake3 - - - Blake3 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - GOST R 34.11-2012 - - - XKCP - - - CRC32 - - - CRC64 - - - - QuickXorHash - - - - - Blake3 - - - Blake3 - - - Blake3 - - - Blake3 - - - \ No newline at end of file diff --git a/Algorithms/CMakeLists.txt b/Algorithms/CMakeLists.txt index e642ede8..e336b031 100644 --- a/Algorithms/CMakeLists.txt +++ b/Algorithms/CMakeLists.txt @@ -4,14 +4,7 @@ project(AlgorithmsDll) set(CMAKE_CXX_STANDARD 20) -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") -string(REGEX REPLACE "/M[DT]d?" "" CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL}") +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") string(REGEX REPLACE "/Ob1" "/Ob2" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") string(REGEX REPLACE "/Ob1" "/Ob2" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") @@ -56,5 +49,17 @@ target_link_libraries(${PROJECT_NAME} BLAKE3 ) +target_link_options(${PROJECT_NAME} PRIVATE + /BREPRO + /PDBALTPATH:%_PDB% + /FILEALIGN:0x1000 + /cetcompat + /guard:cf + "/EXPORT:get_algorithms_begin_${OHT_FLAVOR}=get_algorithms_begin" + "/EXPORT:get_algorithms_end_${OHT_FLAVOR}=get_algorithms_end" + /OPT:REF + /OPT:ICF=10 + ) + install(TARGETS ${PROJECT_NAME} DESTINATION .) install(FILES $ DESTINATION .) diff --git a/Algorithms/Hasher2.cpp b/Algorithms/Hasher2.cpp index b76f4f06..d54820d6 100644 --- a/Algorithms/Hasher2.cpp +++ b/Algorithms/Hasher2.cpp @@ -859,8 +859,11 @@ constexpr HashAlgorithm k_algorithms[] = { make_algorithm("QuickXorHash", false), }; -extern "C" __declspec(dllexport) constexpr const HashAlgorithm* k_algorithms_begin = std::begin(k_algorithms); -extern "C" __declspec(dllexport) constexpr const HashAlgorithm* k_algorithms_end = std::end(k_algorithms); +constexpr const HashAlgorithm* k_algorithms_begin = std::begin(k_algorithms); +constexpr const HashAlgorithm* k_algorithms_end = std::end(k_algorithms); + +extern "C" const HashAlgorithm* get_algorithms_begin() { return k_algorithms_begin; } +extern "C" const HashAlgorithm* get_algorithms_end() { return k_algorithms_end; } /* // these are what I found with a quick FTP search