Skip to content

Commit 0a0f2d3

Browse files
authored
Enables Windows OpenSSL build to run on custom VM (#230)
We need this ability temporarily to work around a compiler bug in MSVC 14.43 (fine in 14.40 and apparently fixed in not-yet-released 14.44). The "vcvarsall.bat options" parameter is for something like --vcvars_ver=14.44 to override the compiler version (which is not a reliable option, as it relies on precisely the right install layout... but it's the best we've got for this case)
1 parent 875fc41 commit 0a0f2d3

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

windows-release/openssl-build.yml

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ parameters:
1414
displayName: 'Sources Repository'
1515
type: string
1616
default: 'https://github.com/python/cpython-source-deps'
17+
- name: CustomBuildVM
18+
displayName: 'Custom build VM'
19+
type: boolean
20+
default: false
21+
- name: VCVarsOptions
22+
displayName: 'vcvarsall.bat options'
23+
type: string
24+
default: '(none)'
25+
- name: IncludeX86
26+
displayName: 'Include x86'
27+
type: boolean
28+
default: true
29+
- name: IncludeX64
30+
displayName: 'Include x64'
31+
type: boolean
32+
default: true
33+
- name: IncludeARM64
34+
displayName: 'Include ARM64'
35+
type: boolean
36+
default: true
1737

1838

1939
name: ${{ parameters.SourceTag }}_$(Date:yyyyMMdd)$(Rev:.rr)
@@ -36,22 +56,28 @@ jobs:
3656
- job: Build_SSL
3757
displayName: OpenSSL
3858
pool:
39-
vmImage: windows-latest
59+
${{ if eq(parameters.CustomBuildVM, 'true') }}:
60+
name: 'Windows Release'
61+
${{ else }}:
62+
vmImage: windows-latest
4063

4164
strategy:
4265
matrix:
43-
win32:
44-
Platform: 'win32'
45-
VCPlatform: 'amd64_x86'
46-
OpenSSLPlatform: 'VC-WIN32 no-asm'
47-
amd64:
48-
Platform: 'amd64'
49-
VCPlatform: 'amd64'
50-
OpenSSLPlatform: 'VC-WIN64A-masm'
51-
arm64:
52-
Platform: 'arm64'
53-
VCPlatform: 'amd64_arm64'
54-
OpenSSLPlatform: 'VC-WIN64-ARM'
66+
${{ if eq(parameters.IncludeX86, 'true') }}:
67+
win32:
68+
Platform: 'win32'
69+
VCPlatform: 'amd64_x86'
70+
OpenSSLPlatform: 'VC-WIN32 no-asm'
71+
${{ if eq(parameters.IncludeX64, 'true') }}:
72+
amd64:
73+
Platform: 'amd64'
74+
VCPlatform: 'amd64'
75+
OpenSSLPlatform: 'VC-WIN64A-masm'
76+
${{ if eq(parameters.IncludeARM64, 'true') }}:
77+
arm64:
78+
Platform: 'arm64'
79+
VCPlatform: 'amd64_arm64'
80+
OpenSSLPlatform: 'VC-WIN64-ARM'
5581

5682
workspace:
5783
clean: all
@@ -66,11 +92,14 @@ jobs:
6692
displayName: 'Check out OpenSSL sources'
6793
6894
- script: |
69-
call "$(vcvarsall)" $(VCPlatform)
95+
call "$(vcvarsall)" $(VCPlatform) %EXTRA_OPTS%
7096
perl "$(Build.SourcesDirectory)\Configure" $(OpenSSLPlatform) no-uplink
7197
nmake
7298
workingDirectory: '$(IntDir)'
7399
displayName: 'Build OpenSSL'
100+
env:
101+
${{ if ne(parameters.VCVarsOptions, '(none)') }}:
102+
EXTRA_OPTS: ${{ parameters.VCVarsOptions }}
74103
75104
- ${{ if ne(parameters.SigningCertificate, 'Unsigned') }}:
76105
- template: sign-files.yml

0 commit comments

Comments
 (0)