Skip to content

Commit 20e573c

Browse files
committed
build: adopt static linking for Yams on Windows toolchain
Windows now partially supports static linking of Swift libraries (non-swiftCore targets). Use this to enable static linking of Yams as there is a single user (swift-driver). This allows us to save ~256KB due to the internalisation.
1 parent 60952b8 commit 20e573c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/build-windows-toolchain.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ cmake --build %BuildRoot%\9 --target install || (exit /b)
450450
cmake ^
451451
-B %BuildRoot%\10 ^
452452

453+
-D BUILD_SHARED_LIBS=NO ^
453454
-D CMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE% ^
454455
-D CMAKE_C_COMPILER=%BuildRoot%/1/bin/clang-cl.exe ^
455456
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy /DYAML_DECLARE_EXPORT /DWIN32" ^

0 commit comments

Comments
 (0)