Toolchain size increased after rebranch merge

The toolchain size has increased for Xcode and Windows packages


Bug: [SR-15397] Binary Size increase on main - Swift

Xcode Toolchain:

Windows Toolchain:


Collected data on Xcode toolchain size between pre and post rebranch merge. (Updating llvm-project swift/main branch)

$  du -hd1
3.3G	swift-DEVELOPMENT-SNAPSHOT-2021-10-27-a.xctoolchain
2.9G	swift-DEVELOPMENT-SNAPSHOT-2021-10-05-a.xctoolchain

Following table are filtered based on >1MB files to reduce noise.

  • Baseline is swift-DEVELOPMENT-SNAPSHOT-2021-10-05-a.xctoolchain
  • Current is swift-DEVELOPMENT-SNAPSHOT-2021-10-05-a.xctoolchain

Files Added

+---------------------------------------------------------------------------------------------------+------------------+-----------------+-------+
| File                                                                                              | Baseline (bytes) | Current (bytes) | Delta |
+---------------------------------------------------------------------------------------------------+------------------+-----------------+-------+
| usr/lib/libLTO.dylib                                                                              |        0         |    195000304    |  100% |
| System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Clang/include/riscv_vector.h |        0         |     10155852    |  100% |
| usr/lib/clang/10.0.0/include/riscv_vector.h                                                       |        0         |     10155852    |  100% |
+---------------------------------------------------------------------------------------------------+------------------+-----------------+-------+

Files over 10% delta only

+----------------------------------------------------------------------------------------------------------+------------------+-----------------+-------+
| File                                                                                                     | Baseline (bytes) | Current (bytes) | Delta |
+----------------------------------------------------------------------------------------------------------+------------------+-----------------+-------+
| usr/bin/lldb                                                                                             |     1212576      |     1054048     |  -13% |
| usr/lib/swift/iphonesimulator/libswiftRemoteMirror.dylib                                                 |     2036160      |     2245824     |  10%  |
| usr/lib/swift/macosx/libswiftRemoteMirror.dylib                                                          |     1348032      |     1492144     |  11%  |
| usr/lib/swift/appletvsimulator/libswiftRemoteMirror.dylib                                                |     1348032      |     1492160     |  11%  |
| usr/lib/swift/watchsimulator/libswiftRemoteMirror.dylib                                                  |     2068928      |     2294976     |  11%  |
| usr/lib/clang/10.0.0/include/arm_sve.h                                                                   |     1200550      |     1585739     |  32%  |
| System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Clang/include/arm_sve.h             |     1200550      |     1585739     |  32%  |
| usr/lib/sourcekitd.framework/Versions/A/XPCServices/SourceKitService.xpc/Contents/MacOS/SourceKitService |    289654880     |    416514848    |  44%  |
| usr/bin/sk-stress-test                                                                                   |     3854512      |     9364608     |  143% |
| usr/bin/swift-evolve                                                                                     |     2647040      |     8050848     |  204% |
+----------------------------------------------------------------------------------------------------------+------------------+-----------------+-------+

File removed

+------------------------------------+------------------+----------------+-------+
| File                               | Baseline (bytes) | Current(bytes) | Delta |
+------------------------------------+------------------+----------------+-------+
| usr/lib/libSwiftSyntax.dylib       |     9978592      |       0        | -100% |
| usr/lib/libSwiftSyntaxParser.dylib |     10227600     |       0        | -100% |
+------------------------------------+------------------+----------------+-------+

Thanks for kicking off the thread @mishal_shah, I forgot about doing that. Fantastic tables (I'm going to have to copy it)! I had collected some similar details on the Windows builds. Replicating it here for having a single location with all the data.

+-----------------------------------------+---------+---------+---------+
| MSI                                     | 5.5     | main    | delta   |
+-----------------------------------------+---------+---------+---------+
| windows-devtools-amd64.msi              |    9 MB |   10 MB | +  1 MB |
| windows-icu-amd64.msi                   |   13 MB |   13 MB |    -    |
| windows-runtime-amd64.msi               |    5 MB |    6 MB | +  1 MB |
| windows-sdk-amd64.msi                   |   11 MB |   12 MB | +  1 MB |
| windows-toolchain-amd64.msi             |  407 MB |  454 MB | + 47 MB |
+-----------------------------------------+---------+---------+---------+

+-----------------------------------------+---------+---------+---------+
| Install Root                            | 5.5     | main    | delta   |
+-----------------------------------------+---------+---------+---------+
| devtools image                          |   39 MB |   41 MB | +  2 MB |
| runtime/sdk image                       |   79 MB |   93 MB | + 14 MB |
| toolchain image                         | 3587 MB | 3979 MB | +392 MB |
+-----------------------------------------+---------+---------+---------+

+-----------------------------------------+---------+---------+---------+
| Install Subtree                         | 5.5     | main    | delta   |
+-----------------------------------------+---------+---------+---------+
| toolchain usr/bin                       | 3448 MB | 3813 MB | +365 MB |
| toolchain usr/lib                       |  138 MB |  166 MB | + 28 MB |
+-----------------------------------------+---------+---------+---------+

+-----------------------------------------+---------+---------+---------+
| File                                    | 5.5     | main    | delta   |
+-----------------------------------------+---------+---------+---------+
| usr/bin/LTO.dll                         |   46 MB |   51 MB | +  5 MB |
| usr/bin/_InternalSwiftScan.dll          |  100 MB |  109 MB | +  9 MB |
| usr/bin/_InternalSwiftSyntaxParser.dll  |   19 MB |   20 MB | +  1 MB |
| usr/bin/addr2line.exe                   |    6 MB |    6 MB |    -    |
| usr/bin/ar.exe                          |   12 MB |   12 MB |    -    |
| usr/bin/c++filt.exe                     |  425 KB |  441 KB | + 16 KB |
| usr/bin/clang++.exe                     |   83 MB |   89 MB | +  6 MB |
| usr/bin/clang-cl.exe                    |   83 MB |   89 MB | +  6 MB |
| usr/bin/clang-cpp.exe                   |   83 MB |   89 MB | +  6 MB |
| usr/bin/clang-format.exe                |    2 MB |    2 MB |    -    |
| usr/bin/clang-tidy.exe                  |   41 MB |   45 MB | +  4 MB |
| usr/bin/clang.exe                       |   83 MB |   89 MB | +  6 MB |
| usr/bin/clangd.exe                      |   33 MB |   37 MB | +  4 MB |
| usr/bin/complete-test.exe               |  285 KB |  242 KB | - 43 KB |
| usr/bin/dispatch.dll                    |  227 KB |  227 KB |    -    |
| usr/bin/dsymutil.exe                    |   35 MB |   36 MB | +  1 MB |
| usr/bin/dwp.exe                         |   34 MB |   35 MB | +  1 MB |
| usr/bin/git-clang-format                |   21 KB |   22 KB | +  1 KB |
| usr/bin/ld.lld.exe                      |   52 MB |   54 MB | +  2 MB |
| usr/bin/ld64.lld.darwinnew.exe          |   52 MB |   54 MB | +  2 MB |
| usr/bin/ld64.lld.darwinold.exe          |         |   54 MB | + 54 MB |
| usr/bin/ld64.lld.exe                    |   52 MB |   54 MB | +  2 MB |
| usr/bin/libIndexStore.dll               |  401 KB |  361 KB | - 40 KB |
| usr/bin/libclang.dll                    |   60 MB |   83 MB | + 23 MB |
| usr/bin/liblldb.dll                     |  117 MB |  123 MB | +  6 MB |
| usr/bin/lld-link.exe                    |   52 MB |   54 MB | +  2 MB |
| usr/bin/lld.exe                         |   52 MB |   54 MB | +  2 MB |
| usr/bin/lldb-argdumper.exe              |  240 KB |  199 KB | - 41 KB |
| usr/bin/lldb-moduleimport-test.exe      |  100 MB |  106 MB | +  6 MB |
| usr/bin/lldb-server.exe                 |   75 MB |  109 MB | + 34 MB |
| usr/bin/lldb-vscode.exe                 |  435 KB |  479 KB | + 44 KB |
| usr/bin/lldb.exe                        |  299 KB |  262 KB | - 37 KB |
| usr/bin/llvm-ar.exe                     |   12 MB |   12 MB |    -    |
| usr/bin/llvm-cov.exe                    |    5 MB |    5 MB |    -    |
| usr/bin/llvm-cvtres.exe                 |    4 MB |  379 KB | -  4 MB |
| usr/bin/llvm-cxxfilt.exe                |  425 KB |  441 KB | + 16 KB |
| usr/bin/llvm-dlltool.exe                |   12 MB |   12 MB |    -    |
| usr/bin/llvm-dwarfdump.exe              |   10 MB |   11 MB | +  1 MB |
| usr/bin/llvm-dwp.exe                    |   34 MB |   35 MB | +  1 MB |
| usr/bin/llvm-lib.exe                    |   12 MB |   12 MB |    -    |
| usr/bin/llvm-lipo.exe                   |    4 MB |    5 MB |    -    |
| usr/bin/llvm-mt.exe                     |  286 KB |  248 KB | - 38 KB |
| usr/bin/llvm-nm.exe                     |   12 MB |   13 MB | +  1 MB |
| usr/bin/llvm-objcopy.exe                |    5 MB |    5 MB |    -    |
| usr/bin/llvm-objdump.exe                |   13 MB |   14 MB | +  1 MB |
| usr/bin/llvm-pdbutil.exe                |    6 MB |    6 MB |    -    |
| usr/bin/llvm-profdata.exe               |    2 MB |    3 MB | +  1 MB |
| usr/bin/llvm-ranlib.exe                 |   12 MB |   12 MB |    -    |
| usr/bin/llvm-rc.exe                     |  429 KB |  612 KB | +200 KB |
| usr/bin/llvm-readelf.exe                |    7 MB |    7 MB |    -    |
| usr/bin/llvm-readobj.exe                |    7 MB |    7 MB |    -    |
| usr/bin/llvm-size.exe                   |    4 MB |    4 MB |    -    |
| usr/bin/llvm-strings.exe                |  340 KB |  348 KB | +  8 KB |
| usr/bin/llvm-strip.exe                  |    5 MB |    5 MB |    -    |
| usr/bin/llvm-symbolizer.exe             |    6 MB |    6 MB |    -    |
| usr/bin/llvm-undname.exe                |  388 KB |  407 KB | + 29 KB |
| usr/bin/nm.exe                          |   12 MB |   13 MB | +  1 MB |
| usr/bin/objcopy.exe                     |    5 MB |    5 MB |    -    |
| usr/bin/objdump.exe                     |   13 MB |   14 MB |    -    |
| usr/bin/ranlib.exe                      |   12 MB |   12 MB |    -    |
| usr/bin/readelf.exe                     |    7 MB |    7 MB |    -    |
| usr/bin/repl_swift.exe                  |   11 KB |   11 KB |    -    |
| usr/bin/sil-func-extractor.exe          |  100 MB |  106 MB | +  6 MB |
| usr/bin/sil-llvm-gen.exe                |  100 MB |  106 MB | +  6 MB |
| usr/bin/sil-nm.exe                      |  100 MB |  106 MB | +  6 MB |
| usr/bin/sil-opt.exe                     |  100 MB |  106 MB | +  6 MB |
| usr/bin/sil-passpipeline-dumper.exe     |   37 MB |   39 MB | +  2 MB |
| usr/bin/size.exe                        |    4 MB |    4 MB |    -    |
| usr/bin/sourcekitd-test.exe             |  479 KB |  449 KB | - 30 KB |
| usr/bin/sourcekitdInProc.dll            |   73 MB |  106 MB | + 32 MB |
| usr/bin/strings.exe                     |  340 KB |  348 KB | +  8 KB |
| usr/bin/swift-api-digester.exe          |  130 MB |  109 MB | - 21 MB |
| usr/bin/swift-api-dump.py               |   12 KB |   12 KB |    -    |
| usr/bin/swift-api-extract.exe           |  103 MB |  109 MB | +  6 MB |
| usr/bin/swift-ast-script.exe            |  102 MB |  108 MB | +  6 MB |
| usr/bin/swift-autolink-extract.exe      |  103 MB |  109 MB | +  6 MB |
| usr/bin/swift-def-to-yaml-converter.exe |  701 KB |  728 KB | + 27 KB |
| usr/bin/swift-demangle-yamldump.exe     |  515 KB |  533 KB | + 18 KB |
| usr/bin/swift-demangle.exe              |  665 KB |  676 KB | + 11 KB |
| usr/bin/swift-dependency-tool.exe       |   53 MB |   56 MB | +  3 MB |
| usr/bin/swift-frontend.exe              |  103 MB |  109 MB | +  6 MB |
| usr/bin/swift-ide-test.exe              |  102 MB |  108 MB | +  6 MB |
| usr/bin/swift-indent.exe                |  103 MB |  109 MB | +  6 MB |
| usr/bin/swift-llvm-opt.exe              |   63 MB |   66 MB | +  3 MB |
| usr/bin/swift-refactor.exe              |  100 MB |  106 MB | +  6 MB |
| usr/bin/swift-reflection-dump.exe       |    5 MB |    5 MB |    -    |
| usr/bin/swift-remoteast-test.exe        |  102 MB |  108 MB | +  6 MB |
| usr/bin/swift-serialize-diagnostics.exe |  748 KB |  774 KB | + 26 KB |
| usr/bin/swift-symbolgraph-extract.exe   |  103 MB |  109 MB | +  6 MB |
| usr/bin/swift-syntax-parser-test.exe    |  367 KB |  381 KB | + 17 KB |
| usr/bin/swift-syntax-test.exe           |   70 MB |  104 MB | + 34 MB |
| usr/bin/swift.exe                       |  103 MB |  109 MB | +  6 MB |
| usr/bin/swiftDemangle.dll               |  179 KB |  181 KB | +  2 KB |
| usr/bin/swiftRemoteMirror.dll           |  513 KB |  518 KB | +  6 KB |
| usr/bin/swiftc.exe                      |  103 MB |  109 MB | +  6 MB |
| usr/bin/wasm-ld.exe                     |   52 MB |   54 MB | +  2 MB |
| usr/lib/BlocksRuntime.lib               |    6 KB |    6 KB |    -    |
| usr/lib/LTO.lib                         |   23 KB |   12 KB |    -    |
| usr/lib/clang                           |   10 MB |   21 MB | + 11 MB |
| usr/lib/dispatch.lib                    |   46 KB |   46 KB |    -    |
| usr/lib/libIndexStore.lib               |   22 KB |   22 KB |    -    |
| usr/lib/libclang.lib                    |  124 KB |  125 KB | +  1 KB |
| usr/lib/liblldb.lib                     |  906 KB |  906 KB |    -    |
| usr/lib/site-packages                   |  118 MB |  124 MB | +  6 MB |
| usr/lib/sourcekitdInProc.lib            |   22 KB |   22 KB |    -    |
| usr/lib/swift                           |   10 MB |   21 MB | + 11 MB |
| usr/lib/swiftDemangle.lib               |    4 KB |    4 KB |    -    |
+-----------------------------------------+---------+---------+---------+


+-------------------------------------------+---------+---------+---------+
| Install Subtree                           | 5.5     | main    | delta   |
+-------------------------------------------+---------+---------+---------+
| platform usr/bin                          |   14 MB |   15 MB | +  1 MB |
| platform usr/lib                          |   64 MB |   77 MB | + 13 MB |
+-------------------------------------------+---------+---------+---------+

+-------------------------------------------+---------+---------+---------+
| File                                      | 5.5     | main    | delta   |
+-------------------------------------------+---------+---------+---------+
| usr/bin/BlocksRuntime.dll                 |   13 KB |   13 KB |    -    |
| usr/bin/Foundation.dll                    |    6 MB |    7 MB | +  1 MB |
| usr/bin/FoundationNetworking.dll          |    2 MB |    2 MB |    -    |
| usr/bin/FoundationXML.dll                 |    2 MB |    2 MB |    -    |
| usr/bin/dispatch.dll                      |  226 KB |  226 KB |    -    |
| usr/bin/plutil.exe                        |   48 KB |   48 KB |    -    |
| usr/bin/sdk-module-lists                  |    8 KB |    8 KB |    -    |
| usr/bin/swift-api-checker.py              |   12 KB |   12 KB |    -    |
| usr/bin/swift-api-dump.py                 |   12 KB |   12 KB |    -    |
| usr/bin/swiftCRT.dll                      |   40 KB |   39 KB | -  1 KB |
| usr/bin/swiftCore.dll                     |    5 MB |    5 MB |    -    |
| usr/bin/swiftDispatch.dll                 |  138 KB |  139 KB | +  1 KB |
| usr/bin/swiftRemoteMirror.dll             |  513 KB |  518 KB | +  5 KB |
| usr/bin/swiftSwiftOnoneSupport.dll        |  215 KB |  217 KB | +  2 KB |
| usr/bin/swiftWinSDK.dll                   |   28 KB |   28 KB |    -    |
| usr/bin/swift_Concurrency.dll             |  290 KB |  283 KB | -  7 KB |
| usr/bin/swift_Differentiation.dll         |  338 KB |  337 KB | -  1 KB |
| usr/lib/swift/Block                       |    3 KB |    3 KB |    -    |
| usr/lib/swift/CFURLSessionInterface       |   48 KB |   48 KB |    -    |
| usr/lib/swift/CFXMLInterface              |   18 KB |   18 KB |    -    |
| usr/lib/swift/CoreFoundation              |  816 KB |  835 KB | + 19 KB |
| usr/lib/swift/FrameworkABIBaseline        |   16 MB |   17 MB | +  1 MB |
| usr/lib/swift/clang                       |   10 MB |   21 MB | + 11 MB |
| usr/lib/swift/dispatch                    |  188 KB |  188 KB |    -    |
| usr/lib/swift/os                          |   15 KB |   15 KB |    -    |
| usr/lib/swift/shims                       |  207 KB |  157 KB | - 50 KB |
| usr/lib/swift/windows                     |   38 MB |   39 MB | +  1 MB |
+-------------------------------------------+---------+---------+---------+

+-------------------------------------------+---------+---------+---------+
| Install Subtree                           | 5.5     | main    | delta   |
+-------------------------------------------+---------+---------+---------+
| devtools usr/bin                          |   22 MB |   23 MB | +  1 MB |
| devtools usr/lib                          |   18 MB |   19 MB | +  1 MB |
+-------------------------------------------+---------+---------+---------+

+-------------------------------------------+---------+---------+---------+
| File                                      | 5.5     | main    | delta   |
+-------------------------------------------+---------+---------+---------+
| usr/bin/ArgumentParser.dll                |  612 KB |  647 KB | + 35 KB |
| usr/bin/Basics.dll                        |  163 KB |  230 KB | + 67 KB |
| usr/bin/Build.dll                         |  462 KB |  470 KB | +  8 KB |
| usr/bin/BuildServerProtocol.dll           |  223 KB |  222 KB | -  1 KB |
| usr/bin/CYaml.dll                         |   95 KB |   95 KB |    -    |
| usr/bin/Collections.dll                   |   17 KB |   17 KB |    -    |
| usr/bin/Commands.dll                      |    2 MB |    3 MB | +  1 MB |
| usr/bin/Crypto.dll                        |  704 KB |  701 KB | -  3 KB |
| usr/bin/DequeModule.dll                   |  118 KB |  118 KB |    -    |
| usr/bin/IndexStoreDB.dll                  |  580 KB |  582 KB | +  2 KB |
| usr/bin/LLBuildManifest.dll               |  183 KB |  183 KB |    -    |
| usr/bin/LSPLogging.dll                    |   45 KB |   47 KB | +  2 KB |
| usr/bin/LanguageServeProtocol.dll         |    2 MB |    2 MB |    -    |
| usr/bin/LanguageServerProtocolJSONRPC.dll |  111 KB |  110 KB | -  1 KB |
| usr/bin/OrderedCollections.dll            |  297 KB |  297 KB |    -    |
| usr/bin/PackageCollections.dll            |  897 KB |  851 KB | - 46 KB |
| usr/bin/PackageCollectionsModel.dll       |  166 KB |  163 KB | -  3 KB |
| usr/bin/PackageCollectionsSigning.dll     |  840 KB |  841 KB | +  1 KB |
| usr/bin/PackageGraph.dll                  |  746 KB |  728 KB | - 18 KB |
| usr/bin/PackageLoading.dll                |  487 KB |  502 KB | + 15 KB |
| usr/bin/PackageModel.dll                  |  609 KB |  671 KB | + 62 KB |
| usr/bin/PriorityQueueModule.dll           |   49 KB |   48 KB | -  1 KB |
| usr/bin/SKCore.dll                        |  254 KB |  255 KB | +  1 KB |
| usr/bin/SKSupport.dll                     |   53 KB |   52 KB | -  1 KB |
| usr/bin/SKSwiftPMWorkspace.dll            |   70 KB |   68 KB | -  2 KB |
| usr/bin/SPMBuildCore.dll                  |  275 KB |  269 KB | -  6 KB |
| usr/bin/SourceControl.dll                 |   43 KB |  193 KB | +150 KB |
| usr/bin/SourceKitD.dll                    |  161 KB |  146 KB | - 15 KB |
| usr/bin/SourceKitLSP.dll                  |  137 KB |  615 KB | +478 KB |
| usr/bin/SwiftDriver.dll                   |  526 KB |    2 MB | +  2 MB |
| usr/bin/SwiftDriverExecution.dll          |    2 MB |   98 KB | -  2 MB |
| usr/bin/SwiftOptions.dll                  |  839 KB |  883 KB | + 54 KB |
| usr/bin/TSCBasic.dll                      |  507 KB |  509 KB | +  2 KB |
| usr/bin/TSCLibc.dll                       |   22 KB |   22 KB |    -    |
| usr/bin/TSCUtility.dll                    |    2 MB |    2 MB |    -    |
| usr/bin/Workspace.dll                     |  580 KB |  813 KB | +283 KB |
| usr/bin/XCBuildSupport.dll                |  573 KB |  564 KB | -  8 KB |
| usr/bin/Xcodeproj.dll                     |  305 KB |  295 KB | - 10 KB |
| usr/bin/Yams.dll                          |  516 KB |  508 KB | -  8 KB |
| usr/bin/llbuild.dll                       |    2 MB |    2 MB |    -    |
| usr/bin/llbuildSwift.dll                  |  174 KB |  176 KB | +  2 KB |
| usr/bin/sourcekit-lsp.exe                 |   67 KB |   66 KB | -  1 KB |
| usr/bin/swift-build-tool.exe              |    2 MB |    2 MB |    -    |
| usr/bin/swift-build.exe                   |   18 KB |   18 KB |    -    |
| usr/bin/swift-package.exe                 |   18 KB |   21 KB | +  3 KB |
| usr/bin/swift-run.exe                     |   18 KB |   18 KB |    -    |
| usr/bin/swift-test.exe                    |  116 KB |   18 KB | - 98 KB |
+-------------------------------------------+---------+---------+---------+

These aren't as precise as your collection (rounding due to the units). But it does identify the areas.

1 Like

Hahaha. I heard you liked linkers, so I put four in your install.
They're all the same size. Are there differences between them. If not are they all symlinks to the same binary at least?

1 Like

They should be identical copies. They will compress to a single copy though they cannot be symlinks :frowning: This would a good thing to resolve upstream.

Terms of Service

Privacy Policy

Cookie Policy