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
:: Based on your log, the folder includes the version number '6.0.3'
67
+
:: 2. Set the SDK Root
69
68
set "SDKROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk"
70
69
71
-
:: 3. Export SWIFTFLAGS so the compiler finds the libraries
70
+
:: 3. Fix Cyclic Dependency
71
+
:: We tell the C compiler (Clang) to ignore the standard module cache and
72
+
:: force it to prioritize the Swift-specific module maps.
72
73
set "SWIFTFLAGS=-sdk %SDKROOT% -I %SDKROOT%\usr\lib\swift -L %SDKROOT%\usr\lib\swift\windows"
73
74
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
75
echo Starting Fresh Swift Build...
78
-
swift build -c release -v
76
+
:: We add -Xcc -fno-implicit-modules to break the cycle during the build
77
+
swift build -c release -v -Xcc -fno-implicit-modules -Xcc -fno-modules
79
78
80
79
if %ERRORLEVEL% NEQ 0 (
81
80
echo "Swift build failed with exit code %ERRORLEVEL%"
0 commit comments