From 709791d7f23f9e34e113a25ccb2168de963fd76d Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 27 Dec 2022 20:06:32 -0800 Subject: [PATCH] CI: switch Yams to static linking on Windows Shared: 2,313,728 SwiftDriver.dll 623,616 Yams.dll Static: 2,712,064 SwiftDriver.dll This saves 225,280 bytes in the actual release build. --- .ci/vs2022.yml | 6 +----- .github/workflows/swift-toolchain.yml | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.ci/vs2022.yml b/.ci/vs2022.yml index a6bdf6904..79f78bc03 100644 --- a/.ci/vs2022.yml +++ b/.ci/vs2022.yml @@ -1170,7 +1170,7 @@ stages: inputs: cmakeArgs: -B $(Agent.BuildDirectory)/Yams - -D BUILD_SHARED_LIBS=YES + -D BUILD_SHARED_LIBS=NO -D BUILD_TESTING=NO -D CMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER=$(workspace.root)/toolchain-amd64/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/clang-cl.exe @@ -1425,10 +1425,6 @@ stages: inputs: cmakeArgs: --build $(Agent.BuildDirectory)/swift-crypto --target install - - task: CMake@1 - inputs: - cmakeArgs: - --build $(Agent.BuildDirectory)/Yams --target install - task: CMake@1 inputs: cmakeArgs: diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index 8cf8f233b..abfc58945 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -1134,7 +1134,7 @@ jobs: $SWIFTC = cygpath -m ${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr/bin/swiftc.exe cmake -B ${{ github.workspace }}/BinaryCache/yams ` - -D BUILD_SHARED_LIBS=YES ` + -D BUILD_SHARED_LIBS=NO ` -D BUILD_TESTING=NO ` -D CMAKE_BUILD_TYPE=Release ` -D CMAKE_C_COMPILER=cl ` @@ -1414,8 +1414,6 @@ jobs: run: cmake --build ${{ github.workspace }}/BinaryCache/swift-collections --target install - name: Install swift-crypto run: cmake --build ${{ github.workspace }}/BinaryCache/swift-crypto --target install - - name: Install Yams - run: cmake --build ${{ github.workspace }}/BinaryCache/yams --target install - name: Install swift-llbuild run: cmake --build ${{ github.workspace }}/BinaryCache/swift-llbuild --target install - name: Install swift-system