@@ -1889,12 +1889,6 @@ jobs:
1889
1889
name : ${{ matrix.os }}-${{ matrix.arch }}-stdlib
1890
1890
path : ${{ github.workspace }}/BuildRoot/Library
1891
1891
1892
- - uses : actions/upload-artifact@v4
1893
- if : matrix.os == 'Windows'
1894
- with :
1895
- name : ${{ matrix.os }}-${{ matrix.arch }}-vfs-overlay
1896
- path : ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
1897
-
1898
1892
- name : Upload PDBs to Azure
1899
1893
1900
1894
if : ${{ inputs.debug_info && matrix.os == 'Windows' }}
@@ -1945,10 +1939,6 @@ jobs:
1945
1939
with :
1946
1940
name : Windows-${{ inputs.build_arch }}-stdlib
1947
1941
path : ${{ github.workspace }}/BinaryCache/Library
1948
- - uses : actions/download-artifact@v4
1949
- with :
1950
- name : Windows-${{ matrix.arch }}-vfs-overlay
1951
- path : ${{ github.workspace }}/BinaryCache/swift/stdlib
1952
1942
1953
1943
with :
1954
1944
repository : swiftlang/swift
@@ -1980,12 +1970,56 @@ jobs:
1980
1970
$RTLPath = cygpath -w ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/bin
1981
1971
echo ${RTLPath} | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1982
1972
1983
- - name : extract swift-syntax
1973
+ - name : Extract swift-syntax
1984
1974
run : |
1985
1975
$module = "${{ github.workspace }}/BinaryCache/swift-syntax/cmake/modules/SwiftSyntaxConfig.cmake"
1986
1976
$bindir = cygpath -m ${{ github.workspace }}/BinaryCache/swift-syntax
1987
1977
(Get-Content $module).Replace('<BINARY_DIR>', "${bindir}") | Set-Content $module
1988
1978
1979
+ - name : Create vfs-overlay
1980
+ run : |
1981
+ $VfsOverlay = "${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml"
1982
+ $ModuleMapDir = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/share
1983
+ $Win10SdkRoot = Get-ItemPropertyValue `
1984
+ -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots" `
1985
+ -Name "KitsRoot10"
1986
+ $Win10SdkRoot = cygpath -m ${Win10SdkRoot}
1987
+ $InstallerLocation = Join-Path "${env:ProgramFiles(x86)}" "Microsoft Visual Studio" "Installer"
1988
+ $VsWhere = Join-Path "${InstallerLocation}" "vswhere.exe"
1989
+ $VsInstallPath = (& "$VsWhere" -latest -products * -format json | ConvertFrom-Json).installationPath
1990
+ $VsInstallPath = cygpath -m ${VsInstallPath}
1991
+
1992
+ $ModuleMap = @"
1993
+ version: 0
1994
+ use-external-names: false
1995
+ case-sensitive: false
1996
+ roots:
1997
+ - name: "${Win10SdkRoot}/Include/${env:WORKAROUND_WINDOWS_SDK_VERSION}/um"
1998
+ type: directory
1999
+ contents:
2000
+ - name: module.modulemap
2001
+ type: file
2002
+ external-contents: "${ModuleMapDir}/winsdk.modulemap"
2003
+ - name: "${Win10SdkRoot}/Include/${env:WORKAROUND_WINDOWS_SDK_VERSION}/ucrt"
2004
+ type: directory
2005
+ contents:
2006
+ - name: module.modulemap
2007
+ type: file
2008
+ external-contents: "${ModuleMapDir}/ucrt.modulemap"
2009
+ - name: "${VsInstallPath}/VC/Tools/MSVC/${env:WORKAROUND_WINDOWS_COMPILER_VERSION}/include"
2010
+ type: directory
2011
+ contents:
2012
+ - name: module.modulemap
2013
+ type: file
2014
+ external-contents: "${ModuleMapDir}/vcruntime.modulemap"
2015
+ - name: vcruntime.apinotes
2016
+ type: file
2017
+ external-contents: "${ModuleMapDir}/vcruntime.apinotes"
2018
+ "@
2019
+ $VfsOverlayDir = Split-Path -Parent $VfsOverlay
2020
+ New-Item -ItemType Directory -Path $VfsOverlayDir
2021
+ Write-Output $ModuleMap | Out-File -FilePath $VfsOverlay -Encoding utf8
2022
+
1989
2023
- name : Configure Foundation Macros
1990
2024
run : |
1991
2025
$WINDOWS_VFS_OVERLAY = cygpath -m ${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml
@@ -2190,11 +2224,6 @@ jobs:
2190
2224
with :
2191
2225
name : Windows-${{ inputs.build_arch }}-stdlib
2192
2226
path : ${{ github.workspace }}/BinaryCache/Library
2193
- - uses : actions/download-artifact@v4
2194
- if : matrix.os == 'Windows'
2195
- with :
2196
- name : Windows-${{ matrix.arch }}-vfs-overlay
2197
- path : ${{ github.workspace }}/BinaryCache/swift/stdlib
2198
2227
- uses : actions/download-artifact@v4
2199
2228
if : matrix.os != 'Android' || inputs.build_android
2200
2229
with :
@@ -2309,6 +2338,52 @@ jobs:
2309
2338
with :
2310
2339
ndk-version : ${{ inputs.ANDROID_NDK_VERSION }}
2311
2340
2341
+ - name : Create vfs-overlay
2342
+ if : matrix.os == 'Windows'
2343
+ run : |
2344
+ $VfsOverlay = "${{ github.workspace }}/BinaryCache/swift/stdlib/windows-vfs-overlay.yaml"
2345
+ $ModuleMapDir = cygpath -m ${{ github.workspace }}/BinaryCache/Library/Developer/Platforms/Windows.platform/Developer/SDKs/Windows.sdk/usr/share
2346
+ $Win10SdkRoot = Get-ItemPropertyValue `
2347
+ -Path "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Kits\Installed Roots" `
2348
+ -Name "KitsRoot10"
2349
+ $Win10SdkRoot = cygpath -m ${Win10SdkRoot}
2350
+ $InstallerLocation = Join-Path "${env:ProgramFiles(x86)}" "Microsoft Visual Studio" "Installer"
2351
+ $VsWhere = Join-Path "${InstallerLocation}" "vswhere.exe"
2352
+ $VsInstallPath = (& "$VsWhere" -latest -products * -format json | ConvertFrom-Json).installationPath
2353
+ $VsInstallPath = cygpath -m ${VsInstallPath}
2354
+
2355
+ $ModuleMap = @"
2356
+ version: 0
2357
+ use-external-names: false
2358
+ case-sensitive: false
2359
+ roots:
2360
+ - name: "${Win10SdkRoot}/Include/${env:WORKAROUND_WINDOWS_SDK_VERSION}/um"
2361
+ type: directory
2362
+ contents:
2363
+ - name: module.modulemap
2364
+ type: file
2365
+ external-contents: "${ModuleMapDir}/winsdk.modulemap"
2366
+ - name: "${Win10SdkRoot}/Include/${env:WORKAROUND_WINDOWS_SDK_VERSION}/ucrt"
2367
+ type: directory
2368
+ contents:
2369
+ - name: module.modulemap
2370
+ type: file
2371
+ external-contents: "${ModuleMapDir}/ucrt.modulemap"
2372
+ - name: "${VsInstallPath}/VC/Tools/MSVC/${env:WORKAROUND_WINDOWS_COMPILER_VERSION}/include"
2373
+ type: directory
2374
+ contents:
2375
+ - name: module.modulemap
2376
+ type: file
2377
+ external-contents: "${ModuleMapDir}/vcruntime.modulemap"
2378
+ - name: vcruntime.apinotes
2379
+ type: file
2380
+ external-contents: "${ModuleMapDir}/vcruntime.apinotes"
2381
+ "@
2382
+
2383
+ $VfsOverlayDir = Split-Path -Parent $VfsOverlay
2384
+ New-Item -ItemType Directory -Path $VfsOverlayDir
2385
+ Write-Output $ModuleMap | Out-File -FilePath $VfsOverlay -Encoding utf8
2386
+
2312
2387
- name : Configure libdispatch
2313
2388
if : matrix.os != 'Android' || inputs.build_android
2314
2389
run : |
0 commit comments