@@ -2890,6 +2890,7 @@ jobs:
2890
2890
-D CMAKE_CXX_COMPILER=${CLANG_CL} `
2891
2891
-D CMAKE_CXX_COMPILER_TARGET=${{ matrix.triple }} `
2892
2892
-D CMAKE_CXX_FLAGS="${{ inputs.WINDOWS_CMAKE_CXX_FLAGS }}" `
2893
+ -D CMAKE_MT=mt `
2893
2894
-D CMAKE_Swift_COMPILER=${SWIFTC} `
2894
2895
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
2895
2896
-D CMAKE_Swift_COMPILER_WORKS=YES `
@@ -2917,6 +2918,7 @@ jobs:
2917
2918
-D CMAKE_C_COMPILER=${CLANG_CL} `
2918
2919
-D CMAKE_C_COMPILER_TARGET=${{ matrix.triple }} `
2919
2920
-D CMAKE_C_FLAGS="${{ inputs.WINDOWS_CMAKE_C_FLAGS }}" `
2921
+ -D CMAKE_MT=mt `
2920
2922
-D CMAKE_Swift_COMPILER=${SWIFTC} `
2921
2923
-D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
2922
2924
-D CMAKE_Swift_COMPILER_WORKS=YES `
@@ -3026,6 +3028,11 @@ jobs:
3026
3028
name : devtools-${{ matrix.arch }}
3027
3029
path : ${{ github.workspace }}/BuildRoot/Library
3028
3030
3031
+ - uses : actions/upload-artifact@v4
3032
+ with :
3033
+ name : swift-argument-parser-Windows-${{ matrix.arch }}
3034
+ path : ${{ github.workspace }}/BinaryCache/swift-argument-parser
3035
+
3029
3036
- name : Upload PDBs to Azure
3030
3037
3031
3038
if : ${{ inputs.debug_info }}
@@ -3066,45 +3073,55 @@ jobs:
3066
3073
- arch : amd64
3067
3074
cpu : x86_64
3068
3075
triple : x86_64-unknown-windows-msvc
3076
+
3069
3077
- arch : arm64
3070
3078
cpu : aarch64
3071
3079
triple : aarch64-unknown-windows-msvc
3072
3080
3073
3081
name : Windows ${{ matrix.arch }} Debugging Tools
3074
3082
3075
3083
steps :
3076
- - name : Download Compilers
3084
+ - name : Download swift-argument-parser
3077
3085
uses : actions/download-artifact@v4
3078
3086
with :
3079
- name : compilers-amd64
3080
- path : ${{ github.workspace }}/BuildRoot/Library
3081
- - name : Download Devtools
3087
+ name : swift-argument-parser-Windows-${{ matrix.arch }}
3088
+ path : ${{ github.workspace }}/BinaryCache/swift-argument-parser
3089
+
3090
+ - name : Download Compilers
3082
3091
uses : actions/download-artifact@v4
3083
3092
with :
3084
- name : devtools -amd64
3085
- path : ${{ github.workspace }}/BuildRoot /Library
3093
+ name : compilers -amd64
3094
+ path : ${{ github.workspace }}/BinaryCache /Library
3086
3095
- name : Download stdlib
3087
3096
uses : actions/download-artifact@v4
3088
3097
with :
3089
3098
name : Windows-stdlib-${{ matrix.arch }}
3090
- path : ${{ github.workspace }}/BuildRoot /Library/Developer/Platforms/Windows.platform
3099
+ path : ${{ github.workspace }}/BinaryCache /Library/Developer/Platforms/Windows.platform
3091
3100
- name : Download SDK
3092
3101
uses : actions/download-artifact@v4
3093
3102
with :
3094
3103
name : Windows-sdk-${{ matrix.arch }}
3095
- path : ${{ github.workspace }}/BuildRoot /Library/Developer/Platforms/Windows.platform
3104
+ path : ${{ github.workspace }}/BinaryCache /Library/Developer/Platforms/Windows.platform
3096
3105
3097
- - name : Update environment variables
3098
- run : |
3099
- $SDKRoot = cygpath -w "${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk"
3100
- echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3106
+ - uses : actions/checkout@v4
3107
+ with :
3108
+ repository : swiftlang/swift
3109
+ ref : ${{ inputs.swift_revision }}
3110
+ path : ${{ github.workspace }}/SourceCache/swift
3111
+ show-progress : false
3112
+
3113
+ - run : |
3114
+ $RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin"
3115
+ echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3101
3116
3102
- $ToolchainPath = cygpath -w "${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin"
3103
- echo "${ToolchainPath}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3104
- echo "AR=${ToolchainPath}\llvm-ar.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3117
+ $SDKRoot = cygpath -w "${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk"
3118
+ echo "SDKROOT=${SDKRoot}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3105
3119
3106
- $RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk/usr/bin"
3107
- echo "${RTLPath}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3120
+ - uses : compnerd/gha-setup-vsdevenv@f1ba60d553a3216ce1b89abe0201213536bc7557 # main
3121
+ with :
3122
+ host_arch : amd64
3123
+ components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
3124
+ arch : ${{ matrix.arch }}
3108
3125
3109
3126
- run : |
3110
3127
Move-Item ${env:SDKROOT}/usr/lib/swift/dispatch ${env:SDKROOT}/usr/include/
@@ -3127,71 +3144,40 @@ jobs:
3127
3144
- uses : actions/download-artifact@v4
3128
3145
with :
3129
3146
name : Windows-stdlib-amd64
3130
- path : ${{ github.workspace }}/BuildRoot /Library/Developer/Platforms/Windows.platform
3147
+ path : ${{ github.workspace }}/BinaryCache /Library/Developer/Platforms/Windows.platform
3131
3148
- uses : actions/download-artifact@v4
3132
3149
with :
3133
3150
name : Windows-sdk-amd64
3134
- path : ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
3135
-
3136
- - name : Move host libs to the host architecture directory
3137
- if : matrix.arch == 'arm64'
3138
- run : |
3139
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/BlocksRuntime.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3140
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/dispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3141
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/swiftDispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3142
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/Foundation.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3143
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationXML.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3144
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationNetworking.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3145
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/_FoundationICU.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3146
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3147
- Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
3151
+ path : ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform
3148
3152
3149
- - name : Move host runtime DLLs to the runtime binary directory.
3153
+ - name : Configure swift-inspect
3150
3154
run : |
3151
- Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/dispatch -Recurse -Force
3152
- Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/os -Recurse -Force
3153
- Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/Block -Recurse -Force
3154
- Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_foundation_unicode -Recurse -Force
3155
- Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_FoundationCShims -Recurse -Force
3156
-
3157
- $RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk/usr/bin"
3158
- mkdir $RTLPath
3159
- Get-ChildItem -Path ${env:SDKROOT}/usr/bin -Filter "*.dll" | Move-Item -Destination $RTLPath
3160
-
3161
- - uses : actions/checkout@v4
3162
- with :
3163
- repository : swiftlang/swift
3164
- ref : ${{ inputs.swift_revision }}
3165
- path : ${{ github.workspace }}/SourceCache/swift
3166
- show-progress : false
3155
+ $SWIFTC = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe
3167
3156
3157
+ cmake -B ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect `
3158
+ -D CMAKE_BUILD_TYPE=Release `
3159
+ -D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
3160
+ -D CMAKE_MT=mt `
3161
+ -D CMAKE_Swift_COMPILER=${SWIFTC} `
3162
+ -D CMAKE_Swift_COMPILER_TARGET=${{ matrix.triple }} `
3163
+ -D CMAKE_Swift_COMPILER_WORKS=YES `
3164
+ -D CMAKE_Swift_FLAGS="-sdk ${env:SDKROOT} ${{ inputs.CMAKE_Swift_FLAGS }} -Xcc `"-I${env:SDKROOT}/usr/include/swift/SwiftRemoteMirror`"" `
3165
+ -D CMAKE_Swift_FLAGS_RELEASE="-O" `
3166
+ -D CMAKE_SYSTEM_NAME=Windows `
3167
+ -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.cpu }} `
3168
+ -G Ninja `
3169
+ -S ${{ github.workspace }}/SourceCache/swift/tools/swift-inspect `
3170
+ -D ArgumentParser_DIR=${{ github.workspace }}/BinaryCache/swift-argument-parser/cmake/modules
3168
3171
- name : Build swift-inspect
3169
- id : swift_inspect
3170
- shell : cmd
3171
- run : |
3172
- swift build ^
3173
- --triple=${{ matrix.triple }} ^
3174
- --scratch-path="${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect" ^
3175
- --sdk="%SDKROOT%" ^
3176
- --package-path="${{ github.workspace }}/SourceCache/swift/tools/swift-inspect" ^
3177
- -c="release" ^
3178
- -Xbuild-tools-swiftc="-L%SDKROOT%/usr/lib/swift/windows" ^
3179
- -Xbuild-tools-swiftc="-I%SDKROOT%/usr/lib/swift" ^
3180
- -Xbuild-tools-swiftc="-use-ld=lld" ^
3181
- -Xcc="-I%SDKROOT%/usr/include/swift/SwiftRemoteMirror" ^
3182
- -Xswiftc="-use-ld=lld" ^
3183
- -Xlinker="%SDKROOT%/usr/lib/swift/windows/${{ matrix.cpu }}/swiftRemoteMirror.lib"
3184
-
3185
- - name : Copy swift-inspect executable
3186
- run : |
3187
- New-Item -Path ${{ github.workspace }}/BuildRoot-DebuggingTools/swift-inspect -ItemType Directory -Force | Out-Null
3188
- $SwiftInspectPath="${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect/${{ matrix.triple }}/release/swift-inspect.exe"
3189
- Copy-Item ${SwiftInspectPath} -Destination "${{ github.workspace }}/BuildRoot-DebuggingTools/swift-inspect/"
3172
+ run : cmake --build ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect
3173
+
3174
+ - name : Install swift-inspect
3175
+ run : cmake --build ${{ github.workspace }}/BinaryCache/${{ matrix.arch }}/swift-inspect --target install
3190
3176
3191
3177
- uses : actions/upload-artifact@v4
3192
3178
with :
3193
3179
name : debugging_tools-${{ matrix.arch }}
3194
- path : ${{ github.workspace }}/BuildRoot-DebuggingTools
3180
+ path : ${{ github.workspace }}/BuildRoot/Library
3195
3181
3196
3182
package_tools :
3197
3183
# TODO: Build this on macOS or make an equivalent Mac-only job
@@ -3210,7 +3196,7 @@ jobs:
3210
3196
uses : actions/download-artifact@v4
3211
3197
with :
3212
3198
name : debugging_tools-${{ matrix.arch }}
3213
- path : ${{ github.workspace }}/BuildRoot/DebuggingTools
3199
+ path : ${{ github.workspace }}/BuildRoot/Library
3214
3200
3215
3201
- name : Download Compilers
3216
3202
uses : actions/download-artifact@v4
@@ -3328,8 +3314,6 @@ jobs:
3328
3314
-p:CERTIFICATE=${env:CERTIFICATE} `
3329
3315
-p:PASSPHRASE=${{ secrets.PASSPHRASE }} `
3330
3316
-p:TOOLCHAIN_ROOT=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain `
3331
- -p:INCLUDE_SWIFT_INSPECT=true `
3332
- -p:SWIFT_INSPECT_BUILD=${{ github.workspace }}/BuildRoot/DebuggingTools/swift-inspect `
3333
3317
-p:ProductArchitecture=${{ matrix.arch }} `
3334
3318
-p:ProductVersion=${{ inputs.swift_version }} `
3335
3319
${{ github.workspace }}/SourceCache/swift-installer-scripts/platforms/Windows/dbg/dbg.wixproj
0 commit comments