Skip to content

Commit a9fde2c

Browse files
committed
Fix circular dependency
1 parent c35e1c5 commit a9fde2c

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,17 @@ jobs:
6464
:: 1. Initialize Visual Studio Environment
6565
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
6666
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'
67+
:: 2. Set the SDK Root
6968
set "SDKROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk"
7069
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.
7273
set "SWIFTFLAGS=-sdk %SDKROOT% -I %SDKROOT%\usr\lib\swift -L %SDKROOT%\usr\lib\swift\windows"
7374
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-
7775
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
7978
8079
if %ERRORLEVEL% NEQ 0 (
8180
echo "Swift build failed with exit code %ERRORLEVEL%"

0 commit comments

Comments
 (0)