Skip to content

fix swift-inspect build #782

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 53 additions & 4 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2727,10 +2727,6 @@ jobs:
with:
name: devtools-amd64
path: ${{ github.workspace }}/BuildRoot/Library
- uses: actions/download-artifact@v4
with:
name: Windows-sdk-amd64
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform
- name: Download SDK
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -2779,6 +2775,59 @@ jobs:
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/${{ matrix.cpu }}/

# Download host SDK on top of the target SDK, so that the runtime DLLs are the host ones.
- uses: actions/download-artifact@v4
with:
name: Windows-sdk-amd64
path: ${{ github.workspace }}/BuildRoot/Library/Developer/Platforms/Windows.platform

- name: Move host libs to the host architecture directory
if: matrix.arch == 'arm64'
run: |
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/BlocksRuntime.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/dispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/swiftDispatch.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/Foundation.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationXML.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationNetworking.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/_FoundationICU.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationEssentials.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/
Move-Item ${env:SDKROOT}/usr/lib/swift/windows/FoundationInternationalization.lib ${env:SDKROOT}/usr/lib/swift/windows/x86_64/

- name: Move host runtime DLLs to the runtime binary directory.
run: |
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/dispatch -Recurse -Force
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/os -Recurse -Force
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/Block -Recurse -Force
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_foundation_unicode -Recurse -Force
Remove-Item -Path ${env:SDKROOT}/usr/lib/swift/_FoundationCShims -Recurse -Force

$RTLPath = cygpath -w "${{ github.workspace }}/BinaryCache/Developer/SDKs/Windows.sdk/usr/bin"
mkdir $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/BlocksRuntime.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/Foundation.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/FoundationEssentials.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/FoundationInternationalization.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/FoundationNetworking.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/FoundationXML.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/_FoundationICU.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/dispatch.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftCRT.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftCore.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftDispatch.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftDistributed.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftObservation.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftRegexBuilder.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftRemoteMirror.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftSwiftOnoneSupport.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftSynchronization.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swiftWinSDK.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_Builtin_float.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_Concurrency.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_Differentiation.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_RegexParser.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_StringProcessing.dll $RTLPath
Move-Item ${env:SDKROOT}/usr/bin/swift_Volatile.dll $RTLPath

- name: Checkout apple/swift
uses: actions/checkout@v4
Expand Down