Skip to content

Commit 332217f

Browse files
committed
Working on fixing SwiftShims error
1 parent 60b7254 commit 332217f

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,25 +64,30 @@ jobs:
6464
:: 1. Initialize Visual Studio
6565
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
6666
67-
:: 2. Set Paths
67+
:: 2. Define our paths clearly
6868
set "SWIFT_ROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift"
6969
set "SDKROOT=%SWIFT_ROOT%\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk"
70-
:: This is the missing piece:
7170
set "RESOURCE_DIR=%SWIFT_ROOT%\Toolchains\6.0.3+Asserts\usr\lib\swift"
7271
73-
echo Starting Build with Resource Dir Fix...
74-
:: We pass the resource-dir and explicitly include the shims path
72+
echo Starting Build with final path mapping...
73+
74+
:: 3. Execute build with both Resource Dir and SDK Include flags
7575
swift build -c release -v ^
7676
-Xswiftc -resource-dir -Xswiftc "%RESOURCE_DIR%" ^
7777
-Xswiftc -I -Xswiftc "%RESOURCE_DIR%\shims" ^
78+
-Xswiftc -I -Xswiftc "%SDKROOT%\usr\lib\swift" ^
7879
-Xcc -fno-implicit-modules ^
7980
-Xcc -fno-modules ^
8081
-Xcc -D_CRT_USE_BUILTIN_OFF ^
8182
-Xswiftc -Xfrontend -Xswiftc -disable-implicit-concurrency-module-import
8283
83-
if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
84+
if %ERRORLEVEL% NEQ 0 (
85+
echo "Build failed. Checking for existence of Shims..."
86+
dir "%RESOURCE_DIR%\shims"
87+
exit /b %ERRORLEVEL%
88+
)
8489
85-
echo Build successful!
90+
echo Build successful! Finding your DLL...
8691
dir /s /b .build\*.dll
8792
8893
- name: Verify library was built

0 commit comments

Comments
 (0)