Skip to content

Commit 61ad739

Browse files
authored
fix swift-inspect build (#782)
* fix swift-inspect build * Use single globbed move-item
1 parent c6e86cf commit 61ad739

File tree

1 file changed

+30
-4
lines changed

1 file changed

+30
-4
lines changed

.github/workflows/swift-toolchain.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,10 +2727,6 @@ jobs:
27272727
with:
27282728
name: devtools-amd64
27292729
path: ${{ github.workspace }}/BuildRoot/Library
2730-
- uses: actions/download-artifact@v4
2731-
with:
2732-
name: Windows-sdk-amd64
2733-
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
27342730
- name: Download SDK
27352731
uses: actions/download-artifact@v4
27362732
with:
@@ -2779,6 +2775,36 @@ jobs:
27792775
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
27802776
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
27812777
2778+
# Download host SDK on top of the target SDK, so that the runtime DLLs are the host ones.
2779+
- uses: actions/download-artifact@v4
2780+
with:
2781+
name: Windows-sdk-amd64
2782+
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
2783+
2784+
- name: Move host libs to the host architecture directory
2785+
if: matrix.arch == 'arm64'
2786+
run: |
2787+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/BlocksRuntime.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2788+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/dispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2789+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/swiftDispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2790+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/Foundation.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2791+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationXML.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2792+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationNetworking.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2793+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/_FoundationICU.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2794+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2795+
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
2796+
2797+
- name: Move host runtime DLLs to the runtime binary directory.
2798+
run: |
2799+
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/dispatch -Recurse -Force
2800+
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/os -Recurse -Force
2801+
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/Block -Recurse -Force
2802+
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_foundation_unicode -Recurse -Force
2803+
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_FoundationCShims -Recurse -Force
2804+
2805+
$RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk/usr/bin"
2806+
mkdir $RTLPath
2807+
Get-ChildItem -Path ${env:SDKROOT}/usr/bin -Filter "*.dll" | Move-Item -Destination $RTLPath
27822808
27832809
- name: Checkout apple/swift
27842810
uses: actions/checkout@v4

0 commit comments

Comments
 (0)