Change framework.lib from object to static lib. - #1562
Conversation
|
Also see #1561 which gets build size down to ~18 GByte for me. What's the size with this one? If this also lowers it, I could adopt this to my PR. |
I don't see anything small like this. That is by just switching the framework.lib to STATIC (this PR) I get the best size reduction. @SaschaWillems Could you please check the sizes with your environment as well? |
|
... as a side note: when I try to change the framework.lib to shared, I get unresolved externals of 2 functions, that would be resolved from apps.cpp. But that file is cmake-generated into the build tree. |
|
Welp. Ignore my PR. I forgot that I only had a few samples enabled, so size change wasn't what I thought it would be. |
|
#1563 <-- I'm doing a few things here to address this issue. Would you test how much we save by using this version? Basically I'm looking to make a few changes to the build flags, switch to static libs and remove the .obj files once they get into the .libs. This combo should keep sccache working, keep debugging symbols available, and dramatically reduce the size of the build folder in Windows by removing duplicated debug symbols. |
|
@asuessenbach, if you get a chance, give it another try, I had the cmake looking for my build setup and not all msvc setups... opps. |
|
@gpx1000 I don't see any additional size reduction with your latest changes. And, by the way, I don't see anything at |
tomek-brcm
left a comment
There was a problem hiding this comment.
Builds fine on Linux, no regressions.
Description
Changing the framework.lib from object to static reduces the size of each samples lib from about 300MB to about 25MB.
Build tested on Win11 with VS2026. Run tested on Win11 with NVidia GPU.
Fixes #1555
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: