Skip to content

Commit bee18d1

Browse files
authored
Merge pull request #10801 from SparkiDev/windows_asm_1
Add Windows assembly files to the build
2 parents 926a504 + bcef8f4 commit bee18d1

28 files changed

Lines changed: 150930 additions & 2240 deletions

.github/workflows/os-check.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,12 @@ jobs:
546546
fail-fast: false
547547
matrix:
548548
arch: [ x64, Win32, ARM64 ]
549+
asm: [ false ]
550+
include:
551+
# Intel assembly build (x64 only): assembles the crypto .asm files
552+
# and enables the matching USE_INTEL_SPEEDUP code paths.
553+
- arch: x64
554+
asm: true
549555
# This should be a safe limit for the tests to run.
550556
timeout-minutes: 6
551557
env:
@@ -570,7 +576,7 @@ jobs:
570576
working-directory: ${{env.GITHUB_WORKSPACE}}
571577
# Add additional options to the MSBuild command line here (like platform or verbosity level).
572578
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
573-
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{matrix.arch}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
579+
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{matrix.arch}} /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:WolfSSLIntelAsm=${{matrix.asm}} ${{env.SOLUTION_FILE_PATH}}
574580

575581
- if: ${{ matrix.arch != 'ARM64' }}
576582
name: Run Test

.github/workflows/win-csharp-test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ jobs:
1313
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
1414
runs-on: windows-latest
1515

16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# false: pure C. true: assemble the crypto .asm files and enable the
20+
# USE_INTEL_SPEEDUP code paths (x64).
21+
asm: [ false, true ]
22+
1623
# This should be a safe limit for the tests to run.
1724
timeout-minutes: 6
1825

@@ -48,7 +55,7 @@ jobs:
4855
working-directory: ${{env.GITHUB_WORKSPACE}}
4956
# Add additional options to the MSBuild command line here (like platform or verbosity level).
5057
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
51-
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
58+
run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:WolfSSLIntelAsm=${{matrix.asm}} ${{env.SOLUTION_FILE_PATH}}
5259

5360
- name: Run wolfCrypt test
5461
working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\

examples/client/client.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@
478478
<ItemGroup>
479479
<ClInclude Include="..\..\IDE\WIN\user_settings.h" />
480480
</ItemGroup>
481+
<!-- Keep USE_INTEL_SPEEDUP/WOLFSSL_X86_64_BUILD consistent with the library
482+
(set by /p:WolfSSLIntelAsm=true) so struct layouts match; a mismatch
483+
overruns hash/Hmac stack buffers. -->
484+
<ItemDefinitionGroup Condition="'$(WolfSSLIntelAsm)'=='true' And '$(Platform)'=='x64'">
485+
<ClCompile>
486+
<PreprocessorDefinitions>USE_INTEL_SPEEDUP;WOLFSSL_X86_64_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
487+
</ClCompile>
488+
</ItemDefinitionGroup>
481489
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
482490
<ImportGroup Label="ExtensionTargets">
483491
</ImportGroup>

examples/echoclient/echoclient.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@
478478
<ItemGroup>
479479
<ClInclude Include="..\..\IDE\WIN\user_settings.h" />
480480
</ItemGroup>
481+
<!-- Keep USE_INTEL_SPEEDUP/WOLFSSL_X86_64_BUILD consistent with the library
482+
(set by /p:WolfSSLIntelAsm=true) so struct layouts match; a mismatch
483+
overruns hash/Hmac stack buffers. -->
484+
<ItemDefinitionGroup Condition="'$(WolfSSLIntelAsm)'=='true' And '$(Platform)'=='x64'">
485+
<ClCompile>
486+
<PreprocessorDefinitions>USE_INTEL_SPEEDUP;WOLFSSL_X86_64_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
487+
</ClCompile>
488+
</ItemDefinitionGroup>
481489
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
482490
<ImportGroup Label="ExtensionTargets">
483491
</ImportGroup>

examples/echoserver/echoserver.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@
478478
<ItemGroup>
479479
<ClInclude Include="..\..\IDE\WIN\user_settings.h" />
480480
</ItemGroup>
481+
<!-- Keep USE_INTEL_SPEEDUP/WOLFSSL_X86_64_BUILD consistent with the library
482+
(set by /p:WolfSSLIntelAsm=true) so struct layouts match; a mismatch
483+
overruns hash/Hmac stack buffers. -->
484+
<ItemDefinitionGroup Condition="'$(WolfSSLIntelAsm)'=='true' And '$(Platform)'=='x64'">
485+
<ClCompile>
486+
<PreprocessorDefinitions>USE_INTEL_SPEEDUP;WOLFSSL_X86_64_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
487+
</ClCompile>
488+
</ItemDefinitionGroup>
481489
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
482490
<ImportGroup Label="ExtensionTargets">
483491
</ImportGroup>

examples/server/server.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,14 @@
478478
<ItemGroup>
479479
<ClInclude Include="..\..\IDE\WIN\user_settings.h" />
480480
</ItemGroup>
481+
<!-- Keep USE_INTEL_SPEEDUP/WOLFSSL_X86_64_BUILD consistent with the library
482+
(set by /p:WolfSSLIntelAsm=true) so struct layouts match; a mismatch
483+
overruns hash/Hmac stack buffers. -->
484+
<ItemDefinitionGroup Condition="'$(WolfSSLIntelAsm)'=='true' And '$(Platform)'=='x64'">
485+
<ClCompile>
486+
<PreprocessorDefinitions>USE_INTEL_SPEEDUP;WOLFSSL_X86_64_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
487+
</ClCompile>
488+
</ItemDefinitionGroup>
481489
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
482490
<ImportGroup Label="ExtensionTargets">
483491
</ImportGroup>

sslSniffer/sslSniffer.vcxproj

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@
256256
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
257257
</ProjectReference>
258258
</ItemGroup>
259+
<!-- Keep USE_INTEL_SPEEDUP/WOLFSSL_X86_64_BUILD consistent with the library
260+
(set by /p:WolfSSLIntelAsm=true) so struct layouts match; a mismatch
261+
overruns hash/Hmac stack buffers. -->
262+
<ItemDefinitionGroup Condition="'$(WolfSSLIntelAsm)'=='true' And '$(Platform)'=='x64'">
263+
<ClCompile>
264+
<PreprocessorDefinitions>USE_INTEL_SPEEDUP;WOLFSSL_X86_64_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
265+
</ClCompile>
266+
</ItemDefinitionGroup>
259267
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
260268
<ImportGroup Label="ExtensionTargets">
261269
</ImportGroup>

0 commit comments

Comments
 (0)