You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:: This looks for where swift.exe is and goes up to the SDK folder
69
-
for /f "delims=" %%i in ('where swift.exe') do set "SWIFT_BIN_PATH=%%~dpi"
70
-
71
-
:: Logic: If Swift is in ...\Toolchains\6.0.0\usr\bin\,
72
-
:: the SDK is usually in ...\Platforms\6.0.0\Windows.platform\Developer\SDKs\Windows.sdk
73
-
:: SwiftyLab usually organizes them under a common 'Swift' root.
74
-
set "SDKROOT=%SWIFT_BIN_PATH%..\..\..\..\Platforms\Windows.platform\Developer\SDKs\Windows.sdk"
75
-
76
-
:: 3. Verify the path exists (Debugging)
77
-
echo Resolved SDKROOT to: %SDKROOT%
78
-
if not exist "%SDKROOT%" (
79
-
echo WARNING: SDKROOT path not found. Falling back to manual check.
80
-
dir C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms /s /b
81
-
)
82
-
83
-
echo Starting Fresh Swift Build (Swift 6.0)...
66
+
67
+
:: 2. Set the SDK Root precisely for 6.0.3
68
+
:: Based on your log, the folder includes the version number '6.0.3'
69
+
set "SDKROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk"
70
+
71
+
:: 3. Export SWIFTFLAGS so the compiler finds the libraries
72
+
set "SWIFTFLAGS=-sdk %SDKROOT% -I %SDKROOT%\usr\lib\swift -L %SDKROOT%\usr\lib\swift\windows"
73
+
74
+
echo Verifying SDK path...
75
+
if exist "%SDKROOT%" (echo SDK found!) else (echo ERROR: SDK NOT FOUND at %SDKROOT% && dir C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms /s /b && exit /b 1)
76
+
77
+
echo Starting Fresh Swift Build...
84
78
swift build -c release -v
85
-
79
+
86
80
if %ERRORLEVEL% NEQ 0 (
87
81
echo "Swift build failed with exit code %ERRORLEVEL%"
0 commit comments