Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Binary file size is >6M in release mode #788

felixf4xu started this conversation in General
Discussion options

Hi,

After compiling, I check the file size:

504,832 cassowary.dll
1,653,760 SwiftCOM.dll
6,483,456 SwiftWin32.dll
6,564,352 SwiftWin32UI.dll
6,560,256 Calculator.exe
6,553,088 UICatalog.exe

this is in release mode (by swift build -c release). in debug mode, it will be about 9M.

I'd like to make sure, is this normal? There are all about 6M in size, seems to have something in common.

You must be logged in to vote

Replies: 1 comment

Comment options

Yes, the size is expected as that is a limitation of SPM. We cannot indicate dynamic linking for Calculator and UICatalog to SwiftWin32. That is why the two executables are relatively similar in size to SwiftWin32. They are tiny apps that include all of SwiftWin32. A more accurate size measurement would use CMake based builds where we could link dynamically to the implementation.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /